Source for file list.php
Documentation is available at list.php
* @package linea21.modules
* @author Simon Georget <simon@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) {
$status_q= array($_GET['statut']);
$status_q = array('P', 'D', 'E');
if(isset ($_GET['module']) ) {
if(!isset ($_GET['debut'])) $debut= 0;
else $debut= $_GET['debut'];
if($status== 'public') $mask_statut_1= 'selected="selected"';
if($status== 'draft') $mask_statut_2= 'selected="selected"';
// Nombre d'enregistrement total dans la bdd
$nb_comments = sprintf(_t('comment','nb_total'), $nb);
// tous les commentaires sont retournés !!!
// et la pagination est effectuée ici via array_slice()
$data = $comm->getAllByModule($status_q, $sql_object, false, 'date');
(count($data) == 1 && $data == 0) ? $nb_q_comments = 0 : $nb_q_comments = count($data);
$data = $comm->getByModule(array('module' => $module, 'status' => $status_q, 'limit' => false), $sql_object);
(count($data) == 1 && $data == 0) ? $nb_q_comments = 0 : $nb_q_comments = count($data);
if($module != 'all' || $status != - 1) {
$link_back= "<div class=\"filter\"><a href=\"". $rub_link. "&todo=list\">". _t('comment','all'). "</a></div>";
if($nb_q_comments<= 1) $query_count = _t('divers','query_result'). " : ". $nb_q_comments. " ". _t('divers','record'). "<br />\n";
else $query_count = _t('divers','query_result'). " : ". $nb_q_comments. " ". _t('divers','records'). "<br />\n";
$link_status= $rub_link. "&todo=list&module=". $module. "&statut=";
$link_module= $rub_link. "&todo=list&statut=". $status. "&module=";
$link_self= $rub_link. "&todo=list&statut=". $status. "&module=". $module;
// Liste des modules disponibles
if($module== 'news') $mask_statut_1 = 'selected="selected"';
if($module== 'project') $mask_statut_2 = 'selected="selected"';
if($module== 'publication') $mask_statut_3 = 'selected="selected"';
if($module== 'report') $mask_statut_4 = 'selected="selected"';
if($module== 'indicator') $mask_statut_5 = 'selected="selected"';
if($module== 'files') $mask_statut_6 = 'selected="selected"';
if($module== 'contribute') $mask_statut_7 = 'selected="selected"';
$select_module= "<select name=\"statut_filter\" id=\"statut_filter\" onchange=\"ChangeLocation(this)\">\n";
$select_module.= "<option value=\"-1\">". _t('comment','module_filter'). "</option>\n";
$select_module.= "<option value=\"". $link_module. "news\"". $mask_statut_1. "> -- ". ucfirst(_t('comment_map', 'news')). "</option>\n";
$select_module.= "<option value=\"". $link_module. "project\"". $mask_statut_2. "> -- ". ucfirst(_t('comment_map', 'project')). "</option>\n";
$select_module.= "<option value=\"". $link_module. "publication\"". $mask_statut_3. "> -- ". ucfirst(_t('comment_map', 'publication')). "</option>\n";
$select_module.= "<option value=\"". $link_module. "report\"". $mask_statut_4. "> -- ". ucfirst(_t('comment_map', 'report')). "</option>\n";
$select_module.= "<option value=\"". $link_module. "indicator\"". $mask_statut_5. "> -- ". ucfirst(_t('comment_map', 'indicator')). "</option>\n";
$select_module.= "<option value=\"". $link_module. "files\"". $mask_statut_6. "> -- ". ucfirst(_t('comment_map', 'files')). "</option>\n";
$select_module.= "<option value=\"". $link_module. "contribute\"". $mask_statut_7. "> -- ". ucfirst(_t('comment_map', 'contribute')). "</option>\n";
$select_module.= "</select>\n";
<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','comment'); ?></a></li>
include_once(THEME_ADMIN_PATH. "quickicons.php");
<div class="contentcontainer"> <?php include_once($dir. "/menurub.php"); ?>
<a href=" <?php echo $link_status; ?>D"> <?php echo ucfirst(_t('comment', 'awaiting')); ?></a> |
<a href=" <?php echo $link_status; ?>P"> <?php echo ucfirst(_t('comment', 'all_approved')); ?></a> |
<a href=" <?php echo $link_status; ?>E"> <?php echo ucfirst(_t('comment', 'all_disapproved')); ?></a> |
<a href="index.php?rub=comment&todo=list"> <?php echo _t('comment','all'); ?></a>
<div class="filterselect"> <?php echo $select_module; ?></div>
echo $nb_comments. '<br />';
echo '<div id="comments">';
if(!empty($html_comments)) echo $html_comments;
else echo "<div class=\"info\">". _t('comment','noresult'). "</div>";
<?php include_once($dir. "/help.php"); ?></div>
|