Source for file mod.php
Documentation is available at mod.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");
if (isset ($_GET['id'])) $id= $_GET['id'];
if (isset ($_POST['id'])) $id= $_POST['id'];
$level_object= new level;
$data= $sql_object->DBSelect($requete, 'OBJECT');
$display_title= formatText($data[0]->level_name, '2HTML');
$form_denomination= formatText($data[0]->level_name, '2FIELD');
$form_description= formatText($data[0]->level_description, '2FIELD');
$form_comment= formatText($data[0]->level_comment, '2FIELD');
$form_visual_identity= $data[0]->level_visual_identity;
if(!empty($form_visual_identity)) {
$complete_uri= "../". $data[0]->level_visual_identity;
} else $complete_uri= _t('divers','novisu');
$form_statut_level= $data[0]->level_statut;
$form_range= $data[0]->level_range;
if(isset ($_POST['valider'])) {
$table[0]= $_POST['denomination'];
$table[1]= $_POST['description'];
$table[2]= $_POST['com_level'];
$table[3]= $form_visual_identity;
$table[5]= $_POST['statut'];
$integrity= $level_object->CheckDataIntegrity($table);
if(is_string($integrity)) $format_text= '2FIELD'; else $format_text= 'HTML';
$form_denomination= formatText($_POST['denomination'], $format_text);
$form_description= formatText($_POST['description'], $format_text);
$form_comment= formatText($_POST['com_level'], $format_text);
$form_statut_level= $_POST['statut'];
if(isset ($_POST['enregistrer'])) {
include_once('../class/system/class.upload.php');
$result= $level_object->ModifyLevel($id, $data_table, $sql_object);
$visual_uri= "../". $data_table[3];
$result_rename= $upload_object->Archivefile($visual_uri);
$link_confirm= "confirm.php?rub=". $rub. "&todo=". $todo. "&id=". $id;
if($result) header("Location: ". $link_confirm);
if($form_statut_level== 'P') $mask_statut_P= ' checked="checked"';
if($form_statut_level== 'D') $mask_statut_D= ' checked="checked"';
<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','level'); ?></a></li>
<li><span> <?php echo formatNavTitle(_t('level','mod'). ' : '. $display_title); ?></span>
include_once(THEME_ADMIN_PATH. "quickicons.php");
$select_statut.= "<label for=\"statut_P\" >". _t('divers','statut') . " : *</label>\n";
$select_statut.= "<input type=\"radio\" name=\"statut\" id=\"statut_P\" value=\"P\"". $mask_statut_P. " /><span class=\"radio\">". _t('statut','public'). "</span>\n";
$select_statut.= "<input type=\"radio\" name=\"statut\" id=\"statut_D\" value=\"D\"". $mask_statut_D. " /><span class=\"radio\">". _t('statut','draft'). "</span>\n";
$select_statut.= '<input name="statut" type="hidden" id="statut" value="P" />'. END_LINE;
if(!isset ($integrity) || is_string($integrity)) {
<div class="contentcontainer"> <?php
include_once($dir. "/menurub.php");
<form id="modlevel" action=" <?php echo $_SERVER['SCRIPT_NAME']; ?>"
<p><label for="denomination"> <?php echo _t('level','denomination'); ?> :
*</label> <input name="denomination" type="text" id="denomination"
maxlength="200" value=" <?php echo $form_denomination; ?>"
<p><label for="description"> <?php echo _t('level','description'); ?> : </label>
<textarea id="description" name="description" class="largetextfield"
<?php echo AREA_SETTINGS; ?>> <?php echo $form_description; ?></textarea>
<p><label for="com_level"> <?php echo _t('level','comment'); ?> : </label>
<textarea id="com_level" name="com_level" class="largetextfield"
<?php echo AREA_SETTINGS; ?>> <?php echo $form_comment; ?></textarea> <br />
<p> <?php echo $select_statut; ?></p>
<p><label for="img"> <?php echo _t('level','visual_identity'); ?> :</label>
<?php echo $complete_uri; ?></p>
<div><input name="id" type="hidden" value=" <?php echo $id; ?>" id="id" />
<input name="rub" type="hidden" value=" <?php echo $rub; ?>" id="rub" />
<?php echo cancel_button('javascript:history.go(-1);'); ?> <input
name="todo" type="hidden" value=" <?php echo $todo; ?>" id="todo" /> <input
name="valider" type="submit" value=" <?php echo _t('btn','valid') ?>"
class="button" id="valider" /></div>
<?php include_once($dir. "/help.php"); ?></div>
<div class="contentcontainer"> <?php
include_once($dir. "/menurub.php");
<dt> <?php echo _t('level','denomination'); ?> :</dt>
<dd> <?php echo $form_denomination; ?><br />
<dt> <?php echo _t('level','description'); ?> :</dt>
<dd> <?php echo empty_none($form_description); ?><br />
<dt> <?php echo _t('level','comment'); ?> :</dt>
<dd> <?php echo empty_none($form_comment); ?><br />
<dt> <?php echo _t('divers','statut'); ?> : </dt>
<dt> <?php echo _t('level','visual_identity'); ?></dt>
<dd> <?php echo $complete_uri; ?><br />
<form id="modlevel" action=" <?php echo $_SERVER['SCRIPT_NAME']; ?>"
<div><input name="id" type="hidden" value=" <?php echo $id; ?>" id="id" />
<input name="rub" type="hidden" value=" <?php echo $rub; ?>" id="rub" />
<input name="todo" type="hidden" value=" <?php echo $todo; ?>" id="todo" />
<input name="data_table" type="hidden" value=" <?php echo $table; ?>"
id="data_table" /> <?php echo cancel_button('?rub=level&todo=list'); ?>
<input name="retour" type="button"
value=" <?php echo _t('btn','preview') ?>" class="button" id="retour"
onclick="history.go(-1);" /> <input name="enregistrer" type="submit"
value=" <?php echo _t('btn','save') ?>" class="button" id="valider" /></div>
<?php include_once($dir. "/help.php"); ?></div>
|