* @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'); } //////////// //////////// Check Droits utilisateur //////////// if (!$l21auth->hasRight('news')) ReloadIndex('admin'); //////////// if (isset($_GET['id'])) $id = $_GET['id']; if (isset($_POST['id'])) $id = $_POST['id']; $req_det = SQL_getoneCompleteNews($id); $result = $sql_object->DBSelect($req_det); // Do record exists? if(!isset($result[0]['news_title'])) redirect_to('@module_default'); $news_object = new news; $display_title = formatText($result[0]['news_title'], '2HTML'); $display_header = formatText(empty_none($result[0]['news_header']), '2HTML'); $display_body = formatText($result[0]['news_body'], '2HTML'); $display_level = formatText(empty_none($result[0]['level_name'], '2HTML')); $display_scale = formatText(empty_none($result[0]['scale_denomination'], '2HTML')); $display_user = formatText($result[0]['user_login'], '2HTML'); $display_date_crea = $result[0]['news_date_crea_display']; $display_last_modify = $result[0]['news_last_modify_display']; $news_level_id=$result[0]['level_id']; $news_scale_id=$result[0]['news_scale']; $news_owner = $result[0]['news_posted_by']; // getting tags include_once('../class/class.tag.php'); $otag = new tag(); $display_tags = empty_none($otag->getTags('news', $id, true)); $display_statut = display_statut($result[0]['news_statut']); if (formatDate($result[0]['news_published_date_display'], true) == formatDate('0001-01-01', true)) $display_published_date = mb_ucfirst(_t('statut','draft')); else $display_published_date = $result[0]['news_published_date_display']; $link_sup = $rub_link . "&todo=sup&id="; $link_mod = $rub_link . "&todo=mod&id="; ?>
"; echo formatTitleh2($display_title); echo "\n"; if ($l21auth->GetSessionElement('id') == $news_owner || $l21auth->isSuperAdmin()) { echo "\t" . _t('news','sup') . "\n"; echo "\t" . _t('news','mod') . "\n"; } echo "
\n"; echo "
" . mb_ucfirst(_t('news','title')) . " :
\n"; echo "
" . $display_title . "
\n"; echo "
" . mb_ucfirst(_t('news','header')) . " :
\n"; echo "
" . $display_header . "
\n"; echo "
" . mb_ucfirst(_t('news','body')) . " :
\n"; echo "
" . $display_body . "
\n"; if($l21auth->isSuperAdmin()) { echo "
" . mb_ucfirst(_t('news','level')) . " :
\n"; echo '
' . $display_level . '
'.PHP_EOL; echo "
" . mb_ucfirst(_t('news','scale')) . " :
\n"; echo '
' . $display_scale . '
'.PHP_EOL; echo "
".mb_ucfirst(_t('tag','name'))." :
\n"; echo "
".$display_tags."
\n"; echo "
" . mb_ucfirst(_t('news','author')) . " :
\n"; echo '
' . $display_user . '
'.PHP_EOL; } else { echo "
" . mb_ucfirst(_t('news','level')) . " :
\n"; echo "
" . $display_level . "
\n"; echo "
" . mb_ucfirst(_t('news','scale')) . " :
\n"; echo "
" . $display_scale . "
\n"; echo "
".mb_ucfirst(_t('tag','name'))." :
\n"; echo "
".$display_tags."
\n"; echo "
" . mb_ucfirst(_t('news','author')) . " :
\n"; echo "
" . $display_user . "
\n"; } echo "
" . mb_ucfirst(_t('statut','published_on')) . " :
\n"; echo "
" . $display_published_date . "
\n"; echo "
" . mb_ucfirst(_t('divers','date_crea')) . " :
\n"; echo "
" . $display_date_crea . "
\n"; echo "
" . mb_ucfirst(_t('divers','last_modify')) . " :
\n"; echo "
" . $display_last_modify . "
\n"; echo "
" . mb_ucfirst(_t('divers','statut')) . " :
\n"; echo "
" . $display_statut . "
\n"; echo "
\n"; ?>