Source for file edit.php
Documentation is available at edit.php
* @author linea21 <info@linea21.com>
* @license http://opensource.org/licenses/gpl-3.0.html
//////////// Check Inclusion de pages ////////////
include_once ("../lib/lib_common.php");
include_once('../lib/input_helpers.php');
// @todo handle files to exclude from theme.xml
if (isset ($_REQUEST['file']) && !empty($_REQUEST['file'])) {
$file = $_REQUEST['file'];
$edit_link= $rub_link. "&todo=edit_files&file=";
$link_confirm= "confirm.php?rub=". $rub. "&todo=". $todo. '&file='. $file;
if(isset ($_POST['save'])) {
$savecontent = $_POST['file_content'];
$user_msg = array('class' => 'error', 'msg' => _t('sys_theme', 'not_writable'));
// we get current file content for edit
$user_msg = array('class' => 'error', 'msg' => _t('sys_theme', 'not_accessible'));
$user_msg = array('class' => 'error', 'msg' => _t('sys_theme', 'not_writable'));
// we get all editables files
// and populate the container
foreach ($editables as &$item) {
if($shortname == $file) {
$edit_files .= '<li><a href="'. $edit_link. $shortname. '" title="'. _t('sys_theme', 'edit_file'). ' : ' . $shortname. '" class="'. $class. '">'. $shortname. "</a></li>";
<li><a href="index.php" class="chemin_home"> <?php echo _t('way','home') ?></a>
<li><a href=" <?php echo $rub_link; ?>" id="chemin_ <?php echo $rub; ?>" class="chemin_rub"> <?php echo _t('menu','system')?></a></li>
<li><span> <?php echo _t('sys_theme','theme_editor') ?></span></li>
include_once(THEME_ADMIN_PATH. "quickicons.php");
<div class="contentcontainer">
<?php include_once($dir . "/menurub.php");?>
<h2> <?php echo _t('sys_theme','theme_editor'); ?></h2>
<h3> <?php echo _t('sys_theme','current_file'). ' : ' . $file; ?></h3>
// we display user message if needed
echo '<p class="'. $user_msg['class']. '">'. $user_msg['msg']. '</p>';
<h3> <?php echo _t('sys_theme','files'); ?> : </h3>
<?php echo $edit_files; ?>
<form id="edit_file" action=" <?php echo $_SERVER['SCRIPT_NAME']; ?>" method="post">
<textarea id="file_content" name="file_content" cols="90" rows="35"> <?php echo $content; ?></textarea>
<input name="file" type="hidden" value=" <?php echo $file; ?>" id="file" />
<input name="rub" type="hidden" value=" <?php echo $rub; ?>" id="rub" />
<input name="todo" type="hidden" value=" <?php echo $todo; ?>" id="todo" />
<input name="save" type="submit" value=" <?php echo _t('btn','save') ?>" class="button" id="save" />
<?php include_once($dir . "/help.php");?></div>
|