3 /***************************************************************************
\r
6 * copyright : (C) 2003 - 2005 CyberAlien
\r
7 * support : http://www.phpbbstyles.com
\r
11 * file revision : 72
\r
12 * project revision : 78
\r
13 * last modified : 05 Dec 2005 13:54:54
\r
15 ***************************************************************************/
\r
17 /***************************************************************************
\r
19 * This program is free software; you can redistribute it and/or modify
\r
20 * it under the terms of the GNU General Public License as published by
\r
21 * the Free Software Foundation; either version 2 of the License, or
\r
22 * (at your option) any later version.
\r
24 ***************************************************************************/
\r
26 define('IN_PHPBB', 1);
\r
27 $phpbb_root_path = "./../";
\r
28 $no_page_header = true;
\r
29 require($phpbb_root_path . 'extension.inc');
\r
30 require('./pagestart.' . $phpEx);
\r
32 // check if mod is installed
\r
33 if(empty($template->xs_version) || $template->xs_version !== 8)
\r
35 message_die(GENERAL_ERROR, isset($lang['xs_error_not_installed']) ? $lang['xs_error_not_installed'] : 'eXtreme Styles mod is not installed. You forgot to upload includes/template.php');
\r
38 define('IN_XS', true);
\r
39 include_once('xs_include.' . $phpEx);
\r
41 $template->assign_block_vars('nav_left',array('ITEM' => '» <a href="' . append_sid('xs_config.'.$phpEx) . '">' . $lang['xs_configuration'] . '</a>'));
\r
42 $template->assign_block_vars('nav_left',array('ITEM' => '» <a href="' . append_sid('xs_chmod.'.$phpEx) . '">' . $lang['xs_chmod'] . '</a>'));
\r
44 $lang['xs_chmod_return'] = str_replace('{URL}', append_sid('xs_config.'.$phpEx), $lang['xs_chmod_return']);
\r
45 $lang['xs_chmod_message1'] .= $lang['xs_chmod_return'];
\r
46 $lang['xs_chmod_error1'] .= $lang['xs_chmod_return'];
\r
48 if(defined('DEMO_MODE'))
\r
50 xs_error($lang['xs_permission_denied']);
\r
53 if(!get_ftp_config(append_sid('xs_chmod.'.$phpEx), array(), false))
\r
57 xs_ftp_connect(append_sid('xs_chmod.'.$phpEx), array(), true);
\r
59 if($ftp === XS_FTP_LOCAL)
\r
61 @mkdir('../cache', 0777);
\r
62 @chmod('../cache', 0777);
\r
63 if(xs_dir_writable('../cache'))
\r
65 xs_message($lang['Information'], $lang['xs_chmod_message1']);
\r
67 xs_error($lang['xs_chmod_error1']);
\r
70 $str = ftp_pwd($ftp);
\r
72 if(strlen($str) && substr($str, strlen($str) - 1) !== '/')
\r
76 $res = @ftp_site($ftp, "CHMOD 0777 {$str}cache");
\r
79 @ftp_mkdir($ftp, 'cache');
\r
80 $res = @ftp_site($ftp, "CHMOD 0777 {$str}cache");
\r
85 xs_message($lang['Information'], $lang['xs_chmod_message1']);
\r
89 xs_error($lang['xs_chmod_error1']);
\r