Source for file add.php
Documentation is available at add.php
* @author linea21 <info@linea21.com>
* @license http://opensource.org/licenses/gpl-3.0.html
<script type="text/javascript">
$("#psdtheme").fadeOut("slow");
$("#pdesctheme").fadeOut("slow");
$("#description_ALL").click();
$("#psdtheme").fadeIn("slow");
$("#pdesctheme").fadeIn("slow");
//////////// Check Inclusion de pages ////////////
include_once("../lib/lib_common.php");
<li><a href="index.php" class="chemin_home"> <?php echo _t('way','home'); ?></a></li>
<li><a href=" <?php echo $rub_link; ?>" id="chemin_ <?php echo $rub; ?>" class="chemin_rub"> <?php echo _t('menu','theme'); ?></a></li>
<li><span> <?php echo formatnavTitle(_t('theme','add')); ?></span></li>
$theme_object = new theme;
$form_description_all= '';
$form_desc_publication= '';
$mask_statut_P= "checked=\"checked\"";
$mask_desc_ALL= "checked=\"checked\"";
$layer_all_style= "style=\"display:block;\"";
$layer_det_style= "style=\"display:none;\"";
if(isset ($_POST['enregistrer'])) {
$result= $theme_object->AddTheme($data_table, $sql_object);
$link_confirm= "confirm.php?rub=". $rub. "&todo=". $todo;
if(isset ($_POST['valider'])) {
if(isset ($_POST['root'])) $root = true; else $root = false;
$table[0]= $_POST['denomination'];
$table[1]= ''; // anciennement le visuel de thème
$table[2]= $_POST['sdtheme'];
if($_POST['description']== 'ALL') {
$table[3]= $_POST['desc_for_all'];
$table[4]= $_POST['desc_for_all'];
$table[5]= $_POST['desc_for_all'];
$table[6]= $_POST['desc_for_all'];
$table[7]= $_POST['desc_for_all'];
if($_POST['description']== 'DET') {
if(isset ($_POST['desc_det_project'])) $table[3]= $_POST['desc_det_project']; else $table[3]= '';
if(isset ($_POST['desc_det_dashboard'])) $table[4]= $_POST['desc_det_dashboard']; else $table[4]= '';
if(isset ($_POST['desc_det_publication'])) $table[5]= $_POST['desc_det_publication']; else $table[5]= '';
if(isset ($_POST['desc_det_news'])) $table[6]= $_POST['desc_det_news']; else $table[6]= '';
if(isset ($_POST['desc_det_workshop'])) $table[7]= $_POST['desc_det_workshop']; else $table[7]= '';
// Rang des themes par catégorie
$table[13]= $_POST['statut'];
$root == true ? $table[14]= 1 : $table[14]= 0;
$theme_object= new theme;
if($root == true) $theme_object->SetRoot();
$integrity= $theme_object->CheckDataIntegrity($table);
if(is_string($integrity)) $format_text= '2FIELD';
else $format_text= '2HTML';
$form_denomination= formatText($_POST['denomination'], $format_text);
$form_sdtheme= $_POST['sdtheme'];
if($_POST['description']== 'ALL') {
$layer_all_style= "style=\"display:block;\"";
$layer_det_style= "style=\"display:none;\"";
$mask_desc_ALL= "checked=\"checked\"";
if($_POST['description']== 'DET') {
if(isset ($_POST['desc_det_project'])) $form_desc_project= formatText($_POST['desc_det_project'], $format_text);
if(isset ($_POST['desc_det_dashboard'])) $form_desc_dashboard= formatText($_POST['desc_det_dashboard'], $format_text);
if(isset ($_POST['desc_det_publication'])) $form_desc_publication= formatText($_POST['desc_det_publication'], $format_text);
if(isset ($_POST['desc_det_news'])) $form_desc_news= formatText($_POST['desc_det_news'], $format_text);
if(isset ($_POST['desc_det_workshop'])) $form_desc_workshop= formatText($_POST['desc_det_workshop'], $format_text);
$layer_all_style= "style=\"display:none;\"";
$layer_det_style= "style=\"display:block;\"";
$mask_desc_DET= "checked=\"checked\"";
if($_POST['statut']== 'D') $mask_statut_D= "checked=\"checked\""; else $mask_statut_D= '';
if($_POST['statut']== 'P') $mask_statut_P= "checked=\"checked\""; else $mask_statut_P= '';
// preparation affichage detaillé
$description_detail_form= '';
$description_detail_form.= "<p>\n";
$description_detail_form.= "<label for=\"desc_det_project\">". _t('theme','desc_det_project'). " : *</label>\n";
$description_detail_form.= "<textarea id=\"desc_det_project\" name=\"desc_det_project\" ". AREA_SETTINGS. " class=\"largetextfield\" >". $form_desc_project. "</textarea>\n";
$description_detail_form.= "</p>\n";
$description_detail_form.= "<p>\n";
$description_detail_form.= "<label for=\"desc_det_dashboard\">". _t('theme','desc_det_dashboard'). " : *</label>\n";
$description_detail_form.= "<textarea id=\"desc_det_dashboard\" name=\"desc_det_dashboard\" ". AREA_SETTINGS. " class=\"largetextfield\" >". $form_desc_dashboard. "</textarea>\n";
$description_detail_form.= "</p>\n";
$description_detail_form.= "<p>\n";
$description_detail_form.= "<label for=\"desc_det_publication\">". _t('theme','desc_det_publication'). " : *</label>\n";
$description_detail_form.= "<textarea id=\"desc_det_publication\" name=\"desc_det_publication\" ". AREA_SETTINGS. " class=\"largetextfield\" >". $form_desc_publication. "</textarea>\n";
$description_detail_form.= "</p>\n";
$description_detail_form.= "<p>\n";
$description_detail_form.= "<label for=\"desc_det_news\">". _t('theme','desc_det_news'). " : *</label>\n";
$description_detail_form.= "<textarea id=\"desc_det_news\" name=\"desc_det_news\" ". AREA_SETTINGS. " class=\"largetextfield\" >". $form_desc_news. "</textarea>\n";
$description_detail_form.= "</p>\n";
$description_detail_form.= "<p>\n";
$description_detail_form.= "<label for=\"desc_det_workshop\">". _t('theme','desc_det_workshop'). " : *</label>\n";
$description_detail_form.= "<textarea id=\"desc_det_workshop\" name=\"desc_det_workshop\" ". AREA_SETTINGS. " class=\"largetextfield\" >". $form_desc_workshop. "</textarea>\n";
$description_detail_form.= "</p>\n";
include_once(THEME_ADMIN_PATH. "quickicons.php");
include_once("../lib/input_helpers.php");
// select-box des SD thèmes
$data= $sql_object->DBSelect($req_listsdtheme);
if(!isset ($integrity) || is_string($integrity)) {
<div class="contentcontainer"> <?php
include_once($dir. "/menurub.php");
<form id="addtheme" action=" <?php echo $_SERVER['SCRIPT_NAME']; ?>" method="post">
<label for="denomination"> <?php echo _t('theme','denomination'); ?> : *</label>
<input name="denomination" type="text" class="textfield" id="denomination" maxlength="200" value=" <?php echo $form_denomination; ?>" />
<label for="root"> <?php echo _t('theme','is_root'); ?> :</label>
<input type="checkbox" name="root" id="root" value="true" />
<label for="sdtheme"> <?php echo _t('theme','sdtheme'); ?> : *</label> <?php echo $select_sdtheme; ?>
<input name="statut" type="hidden" id="statut" value="P" />
<div class="label"> <?php echo _t('theme','description'); ?> : *</div>
<input name="description" class="radioinline" type="radio" id="description_ALL" value="ALL" onclick="ShowthemeDesc('all');" <?php echo $mask_desc_ALL; ?> />
<label for="description_ALL"> <?php echo _t('theme','description_all'); ?></label>
<input name="description" class="radioinline" type="radio" id="description_DET" value="DET" onclick="ShowthemeDesc('det');" <?php echo $mask_desc_DET; ?> />
<label for="description_DET"> <?php echo _t('theme','description_det'); ?></label>
<div id="all" <?php echo $layer_all_style; ?>>
<label for="desc_for_all"> <?php echo _t('theme','desc_all'); ?> : *</label>
<textarea id="desc_for_all" name="desc_for_all" <?php echo AREA_SETTINGS; ?> class="largetextfield"> <?php echo $form_description_all; ?></textarea>
<div id="det" <?php echo $layer_det_style; ?>> <?php echo $description_detail_form; ?></div>
<input name="rub" type="hidden" value=" <?php echo $rub; ?>" id="rub" />
<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" />
<?php include_once($dir. "/help.php"); ?>
$data= $sql_object->DBSelect($requete);
$display_sdtheme_name= formatText($data[0]['sdtheme_name'],'2HTML');
<div class="contentcontainer"> <?php
include_once($dir. "/menurub.php");
echo "<dl class=\"dl3\">";
echo "<dt>". formatText(_t('theme','denomination'),'2HTML'). "</dt>";
echo "<dd>". $form_denomination. "</dd>";
echo "<dt>". _t('theme','sdtheme'). "</dt>";
echo "<dd>". $display_sdtheme_name. "</dd>";
if($_POST['description']== 'ALL') {
echo "<dt>". formatText(_t('theme','desc_all'), '2HTML'). "</dt>";
echo "<dd>". $form_description_all. "</dd>";
if($_POST['description']== 'DET') {
echo "<dt>". formatText(_t('theme','desc_det_project'),'2HTML'). "</dt>";
echo "<dd>". $form_desc_project. "</dd>";
echo "<dt>". formatText(_t('theme','desc_det_dashboard'), '2HTML'). "</dt>";
echo "<dd>". $form_desc_dashboard. "</dd>";
echo "<dt>". formatText(_t('theme','desc_det_publication'), '2HTML'). "</dt>";
echo "<dd>". $form_desc_publication. "</dd>";
echo "<dt>". formatText(_t('theme','desc_det_news'), '2HTML'). "</dt>";
echo "<dd>". $form_desc_news. "</dd>";
echo "<dt>". formatText(_t('theme','desc_det_workshop'), '2HTML'). "</dt>";
echo "<dd>". $form_desc_workshop. "</dd>";
/** PAS DE GESTION DES STATUTS
echo "<dt>"._t('divers','statut') ."</dt>";
echo "<dd>". display_statut($_POST['statut']). "</dd>";
<form id="addscale" action=" <?php echo $_SERVER['SCRIPT_NAME']; ?>" method="post">
<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" />
<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" />
<?php include_once($dir. "/help.php"); ?></div>
|