* @version $id SVN * @access public * @license http://opensource.org/licenses/gpl-3.0.html */ //////////// Check Inclusion de pages //////////// if (!function_exists('AuthenthificationProcess')) { include_once ("../lib/lib_common.php"); ReloadIndex('admin'); } include_once('../lib/input_helpers.php'); // @todo handle files to exclude from theme.xml if (isset($_REQUEST['file']) && !empty($_REQUEST['file'])) { $file = $_REQUEST['file']; $file_path = THEME_PUBLIC_PATH. $file; } else { $file = 'index.php'; $file_path = THEME_PUBLIC_PATH. $file; } $edit_link=$rub_link."&todo=edit_files&file="; $link_confirm="confirm.php?rub=".$rub."&todo=".$todo.'&file='.$file; if(isset($_POST['save'])) { if (get_magic_quotes_gpc()) { $savecontent = stripslashes($_POST['file_content']); } else { $savecontent = $_POST['file_content']; } if(!is_writable($file_path)) { $user_msg = array('class' => 'error', 'msg' => _t('sys_theme', 'not_writable')); } else { $r = file_put_contents($file_path, $savecontent, LOCK_EX); if(is_numeric($r)) header("Location: ".$link_confirm); else system_error(); } } // we get current file content for edit $content = ''; if(file_exists($file_path) && is_readable($file_path)) { $content = file_get_contents($file_path); } else { $user_msg = array('class' => 'error', 'msg' => _t('sys_theme', 'not_accessible')); } if(!is_writable($file_path)) { $user_msg = array('class' => 'error', 'msg' => _t('sys_theme', 'not_writable')); } // we get all editables files $editables = GetAllFiles(THEME_PUBLIC_PATH,array('php', 'css', 'js', 'txt'), true); // and populate the container $edit_files = ''; ?>

'.$user_msg['msg'].'

'; } ?>