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