Source for file list.php
Documentation is available at list.php
* @package linea21.modules
* @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 ////////////
if(!isset ($_GET['statut']) || $_GET['statut']==- 1) $statut=- 1;
elseif($_GET['statut']!=- 1) $statut= $_GET['statut'];
if(!isset ($_GET['debut'])) $debut= 0;
else $debut= $_GET['debut'];
if($statut== 'public') $mask_statut_1= 'selected="selected"';
if($statut== 'draft') $mask_statut_2= 'selected="selected"';
if($statut== 'archives_p') $mask_statut_3= 'selected="selected"';
if($statut== 'archives_a') $mask_statut_4= 'selected="selected"';
// Nombre d'enregistrement total dans la bdd
$result_nb_req= $sql_object->DBSelect($req_count_news);
$bdd_nb_news= $result_nb_req[0]['num_rows'];
$bdd_nb_news_display = $bdd_nb_news. " ". _t('news','nb_total'). "<br />\n";
$link_back= "<div class=\"filter\"><a href=\"". $rub_link. "&todo=list\">". _t('news','all'). "</a></div>";
$result_nb_req= $sql_object->DBSelect($req_count_news);
$count_request= $result_nb_req[0]['num_rows'];
$result_news_list= $sql_object->DBSelect($req_list_news);
$count_request= $bdd_nb_news;
$result_news_list= $sql_object->DBSelect($req_list_news);
if($count_request<= 1) $count_request_display = _t('divers','query_result'). " : ". $count_request. " ". _t('divers','record'). "<br />\n";
else $count_request_display = _t('divers','query_result'). " : ". $count_request. " ". _t('divers','records'). "<br />\n";
$link_sup= $rub_link. "&todo=sup&id=";
$link_mod= $rub_link. "&todo=mod&id=";
$link_det= $rub_link. "&todo=det&id=";
$link_statut= $rub_link. "&todo=list&statut=";
$link_self= $link_statut. $statut;
// Liste des statuts disponibles
$select_statut= "<select name=\"statut_filter\" id=\"statut_filter\" onchange=\"ChangeLocation(this)\">\n";
$select_statut.= "<option value=\"-1\">". _t('news','statut_filter'). "</option>\n";
$select_statut.= "<option value=\"". $link_statut. "public\"". $mask_statut_1. ">". display_statut('P'). "</option>\n";
$select_statut.= "<option value=\"". $link_statut. "draft\"". $mask_statut_2. ">". display_statut('D'). "</option>\n";
$select_statut.= "<option value=\"". $link_statut. "archives_p\"". $mask_statut_3. ">". display_statut('PA'). "</option>\n";
$select_statut.= "<option value=\"". $link_statut. "archives_a\"". $mask_statut_4. ">". display_statut('AA'). "</option>\n";
$select_statut.= "</select>\n";
<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','news'); ?></a></li>
include_once(THEME_ADMIN_PATH. "quickicons.php");
<div class="contentcontainer"> <?php include_once($dir. "/menurub.php"); ?>
<div class="filterselect"> <?php
echo $bdd_nb_news_display;
echo $count_request_display;
if($result_news_list!= 0) {
echo "<table cellspacing=\"0\" cellpadding=\"3\" class=\"sortable\" id=\"sort-table\">\n";
echo "<td>". _t('news','title'). "</td>\n";
echo "<td>". _t('divers','date_crea'). "</td>\n";
echo "<td>". cutText(_t('divers','date_publi'), 13, 1, ''). "</td>\n";
echo "<td> <span class=\"semnone\">". _t('divers','actions'). "</span></td>\n";
for($i= 0; $i< count($result_news_list); $i++ ) {
$news_owner= $result_news_list[$i]['news_posted_by'];
$news_statut= $result_news_list[$i]['news_statut'];
$news_published_date = $news_statut== 'D' ? _t('statut','draft') : $result_news_list[$i]['news_published_date_display'];
echo "<tr id=\"news-". $result_news_list[$i]['news_id']. "\">\n";
echo "<td><a href=\"". $link_det. $result_news_list[$i]['news_id']. "\" title=\"". _t('news','det'). "\">". $news_title. "</a></td>\n";
echo "<td>". $result_news_list[$i]['news_date_crea_display']. "</td>\n";
echo "<td>". $news_published_date. "</td>\n";
echo "<td style=\"width:50px\">\n";
echo "<div class=\"iconetab\">\n";
echo "<a href=\"". $link_sup. $result_news_list[$i]['news_id']. "\" class=\"ico_sup\" title=\"". _t('news','sup'). "\"></a>\n";
echo "<a href=\"". $link_mod. $result_news_list[$i]['news_id']. "\" class=\"ico_mod\" title=\"". _t('news','mod'). "\"></a>\n";
echo "<div class=\"info\">". _t('news','noresult'). "</div>";
// Ability to drag'n drop items
<?php include_once($dir. "/help.php"); ?></div>
|