* @version $Id$ * @access public * @license http://opensource.org/licenses/gpl-3.0.html */ //////////// Check Inclusion de pages //////////// if (!class_exists('auth')) { include_once("../lib/lib_common.php"); ReloadIndex('admin'); } //////////// include_once("../lib/input_helpers.php"); include_once(override('../level/mysql.inc.php', THEME_ADMIN_PATH)); if(isset($_POST['id'])) $id=$_POST['id']; if(isset($_GET['id'])) $id=$_GET['id']; $mask_statut_P=''; $mask_statut_D=''; $mask_statut_AA=''; $mask_statut_PA=''; $req_det= SQL_getoneCompletePublication($id); $result=$sql_object->DBSelect($req_det); // Do record exists? if(!isset($result[0]['publi_title'])) redirect_to('@module_default'); $publi_title=formatText($result[0]['publi_title'], '2HTML'); $form_title=formatText($result[0]['publi_title'], '2FIELD'); $form_resume=formatText($result[0]['publi_resume'], '2FIELD'); if(empty($result[0]['publi_comment'])) $form_comment=''; else $form_comment=formatText($result[0]['publi_comment'], '2FIELD'); $form_level=$result[0]['publi_level']; $form_scale=$result[0]['publi_scale']; $form_author=formatText($result[0]['user_login'], '2FIELD'); $form_statut=$result[0]['publi_statut']; $current_status=$result[0]['publi_statut']; $publi_owner=$result[0]['publi_posted_by']; $form_publication_date = $result[0]['publi_published_date_display']; if (formatDate($form_publication_date, true) == formatDate('0001-01-01', true)) $form_publication_date = ''; // getting tags include_once('../class/class.tag.php'); $otag = new tag(); $form_tags = $otag->getTags('publication', $id, true); //////////// Check Droits utilisateur //////////// if (!$l21auth->hasRight('publication')) ReloadIndex('admin'); if ($l21auth->GetSessionElement('id')!=$publi_owner && !$l21auth->isSuperAdmin()) ReloadIndex('admin'); //////////// ?>
ModifyPublication($id, $data_table, $sql_object); if($result) { $otag->modifyTags('publication', $id, $data_table['8']); } $link_confirm="confirm.php?rub=".$rub."&todo=".$todo; if($result) { header("Location: ".safe_redirect($link_confirm)); exit; } else system_error(); } if(isset($_POST['valider'])) { $table = array(); $table[0]=$_POST['publi_title']; $table[1]=$_POST['publi_resume']; $table[2]=$_POST['publi_level']; $table[3]=$_POST['publi_scale']; $table[4]=$_POST['publi_author']; $table[5]=$_POST['publi_comment']; $table[6]=$_POST['publi_statut']; $table[7]=$current_status; // statut courant $table[8]=$_POST['publi_tags']; if($table[6] != 'D') $table['publication_date'] = $_POST['publi_publication_date']; else $table['publication_date'] = formatDate('0001-01-01', true); $integrity=$publication_object->CheckDataIntegrity($table, $sql_object); if(is_string($integrity)) { $text_format='2FIELD'; } else { $text_format='2HTML'; $table[4]=$integrity['user_id']; } $form_title=formatText($_POST['publi_title'], $text_format); $form_resume=formatText($_POST['publi_resume'], $text_format); $form_level=$_POST['publi_level']; $form_scale=$_POST['publi_scale']; $form_author=formatText($_POST['publi_author'], $text_format); $form_comment=formatText($_POST['publi_comment'], $text_format); $form_publication_date=$_POST['publi_publication_date']; $form_tags=formatText($_POST['publi_tags'], $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=''; $table=urlencode(serialize($table)); } // select-box statut if($form_statut=='P') $mask_statut_P=' selected="selected"'; if($form_statut=='D') $mask_statut_D=' selected="selected"'; if($form_statut=='AA') $mask_statut_AA=' selected="selected"'; if($form_statut=='PA') $mask_statut_PA=' selected="selected"'; $select_statut="\n"; if(!isset($integrity) || is_string($integrity)) { // select-box des niveaux $data=$sql_object->DBSelect(SQL_getLevelsList()); $select_level=LevelSelectBox($data, "publi_level", $form_level); // select-box des échelles $data=$sql_object->DBSelect($req_list_scale); $select_scale=ScaleSelectBox($data, "publi_scale", $form_scale); } ?>


DBSelect(SQL_getoneLevel($form_level)); $level_name=formatText($record[0]['level_name'], '2HTML'); } // getting scale name $r = $sql_object->DBSelect(SQL_getonescaleDenomination($form_scale)); if(isset($r[0]['scale_denomination'])) { $scale_denomination = formatText($r[0]['scale_denomination'], '2HTML'); } else { $scale_denomination = empty_none(''); } $display_form_resume=empty_nc($form_resume); $display_form_comment=empty_nc($form_comment); ?>

\n"; echo "
".mb_ucfirst(_t('publication','title'))." :
\n"; echo "
". $form_title."
\n"; echo "
".mb_ucfirst( _t('publication','resume')). " :
\n"; echo "
".$display_form_resume."
\n"; if($current_status == ('P' || 'AA' || 'PA')) { echo "
".mb_ucfirst(_t('statut','published_on'))." :
\n"; echo "
".$form_publication_date."
\n"; } echo "
".mb_ucfirst(_t('publication','level'))." :
\n"; echo "
".$level_name."
\n"; echo "
".mb_ucfirst(_t('publication','author'))." :
\n"; echo "
".$form_author."
\n"; echo "
".mb_ucfirst(_t('publication','scale'))." :
\n"; echo "
".$scale_denomination."
\n"; echo "
".mb_ucfirst(_t('tag','name'))." :
\n"; echo "
".empty_none(str_replace(',', ', ', $form_tags))."
\n"; echo "
".mb_ucfirst(_t('divers','statut')) ." :
\n"; echo "
". display_statut($_POST['publi_statut']). "
\n"; echo "
".mb_ucfirst(_t('publication','comment')) ." :
\n"; echo "
". $display_form_comment. "
\n"; echo "\n"; ?>