Source for file add.php
Documentation is available at add.php
* @package linea21.modules
* @subpackage publication
* @author linea21 <info@linea21.com>
* @license http://opensource.org/licenses/gpl-3.0.html
//////////// Check Inclusion de pages ////////////
include_once("../lib/lib_common.php");
//////////// Check Droits utilisateur ////////////
<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','publication'); ;?></a></li>
$mask_statut_D= "checked=\"checked\"";
if(isset ($_POST['enregistrer'])) {
$result= $publication_object->AddPublication($data_table, $sql_object);
$link_confirm= "confirm.php?rub=". $rub. "&todo=". $todo;
if(isset ($_POST['valider'])) {
$table[0]= $_POST['publi_title'];
$table[1]= $_POST['publi_resume'];
$table[2]= $_POST['publi_theme'];
$table[3]= $_POST['publi_scale'];
$table[4]= $_POST['publi_level'];
$table[5]= $_POST['publi_author'];
$table[6]= $_POST['publi_comment'];
$table[7]= $_POST['publi_statut'];
$integrity= $publication_object->CheckDataIntegrity($table, $sql_object);
$table[5]= $integrity['user_id'];
$form_title= formatText($_POST['publi_title'], $text_format);
$form_resume= formatText($_POST['publi_resume'], $text_format);
$form_theme= $_POST['publi_theme'];
$form_scale= $_POST['publi_scale'];
$form_level= $_POST['publi_level'];
$form_author= formatText($_POST['publi_author'], $text_format);
$form_comment= formatText($_POST['publi_comment'], $text_format);
if($_POST['publi_statut']== 'D') $mask_statut_D= "checked=\"checked\""; else $mask_statut_D= '';
if($_POST['publi_statut']== 'P') $mask_statut_P= "checked=\"checked\""; else $mask_statut_P= '';
if(!isset ($integrity) || is_string($integrity)) {
include_once("../lib/input_helpers.php");
$data= $sql_object->DBSelect($req_list_theme);
// select-box des échelles
$data= $sql_object->DBSelect($req_list_scale);
// select-box des niveaux
$data= $sql_object->DBSelect($req_list_level);
include_once(THEME_ADMIN_PATH. "quickicons.php");
if(!isset ($integrity) || is_string($integrity)) {
<div class="contentcontainer">
include_once($dir. "/menurub.php");
<form id="addpublication" action=" <?php echo $_SERVER['SCRIPT_NAME']; ?>" method="post">
<label for="publi_title"> <?php echo _t('publication','title'); ?> : *</label>
<input name="publi_title" type="text" class="textfield" id="publi_title" maxlength="150" value=" <?php echo $form_title; ?>" />
<label for="publi_resume"> <?php echo _t('publication','resume'); ?> : *</label>
<textarea id="publi_resume" name="publi_resume" class="largetextfield" <?php echo AREA_SETTINGS; ?>> <?php echo $form_resume; ?></textarea>
<label for="publi_theme"> <?php echo _t('publication','theme'); ?> : *</label>
<?php echo $select_theme; ?>
<label for="publi_scale"> <?php echo _t('publication','scale'); ?> : *</label>
<?php echo $select_scale; ?>
<label for="publi_level"> <?php echo _t('publication','level'); ?> : </label>
<?php echo $select_level; ?>
<label for="publi_author"> <?php echo _t('publication','author'); ?> : *</label>
<input name="publi_author" type="text" class="textfield" id="publi_author" maxlength="150" value=" <?php echo $form_author; ?>" />
<div class="label"> <?php echo _t('publication','statut'); ?> : *</div>
<input name="publi_statut" type="radio" id="statut_P" value="P" <?php echo $mask_statut_P; ?> />
<label for="statut_P"> <?php echo _t('statut','public'); ?></label>
<input name="publi_statut" type="radio" id="statut_D" value="D" <?php echo $mask_statut_D; ?> />
<label for="statut_D"> <?php echo _t('statut','draft'); ?></label>
<label for="publi_comment"> <?php echo _t('publication','comment'); ?> : </label>
<textarea id="publi_comment" name="publi_comment" class="largetextfield" <?php echo AREA_SETTINGS; ?>> <?php echo $form_comment; ?></textarea>
<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"); ?></div>
$result= $sql_object->DBSelect($requete);
if($result== 0 || count($result)!= 1) exit;
else $theme_denomination= formatText($result[0]['theme_name'], '2HTML');
$result= $sql_object->DBSelect($requete);
if($result== 0 || count($result)!= 1) exit;
else $scale_denomination= formatText($result[0]['scale_denomination'], '2HTML');
$result= $sql_object->DBSelect($requete);
if($result== 0 || count($result)!= 1) exit;
else $level_denomination= formatText($result[0]['level_name'], '2HTML');
else $level_denomination= _t('divers','none');
$display_form_resume= empty_nc($form_resume);
$display_form_comment= empty_nc($form_comment);
<div class="contentcontainer"> <?php
include_once($dir. "/menurub.php");
<h2> <?php echo _t('recap','title') ?></h2>
echo "<dl class=\"dl3\">\n";
echo "<dt>". _t('publication','title'). "</dt>\n";
echo "<dd>". $form_title. "</dd>\n";
echo "<dt>". _t('publication','resume'). "</dt>\n";
echo "<dd>". $display_form_resume. "</dd>\n";
echo "<dt>". _t('publication','theme'). " :</dt>\n";
echo "<dd>". $theme_denomination. "</dd>\n";
echo "<dt>". _t('publication','scale'). " :</dt>\n";
echo "<dd>". $scale_denomination. "</dd>\n";
echo "<dt>". _t('publication','level'). " :</dt>\n";
echo "<dd>". $level_denomination. "</dd>\n";
echo "<dt>". _t('publication','author'). " :</dt>\n";
echo "<dd>". $form_author. "</dd>\n";
echo "<dt>". _t('divers','statut') . "</dt>\n";
echo "<dt>". _t('publication','comment') . "</dt>\n";
echo "<dd>". $display_form_comment. "</dd>\n";
<form id="addpublication" 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>
|