linea21-modules
[ class tree: linea21-modules ] [ index: linea21-modules ] [ all elements ]

Source for file list.php

Documentation is available at list.php

  1. <?php
  2. /**
  3.  * @package linea21.modules
  4.  * @subpackage publication
  5.  * @author linea21 <info@linea21.com>
  6.  * @version $id SVN
  7.  * @access public
  8.  * @license http://opensource.org/licenses/gpl-3.0.html
  9.  */
  10.  
  11. //////////// Check Inclusion de pages ////////////
  12. if (!function_exists('AuthenthificationProcess')) {
  13.   include_once("../lib/lib_common.php");
  14.   ReloadIndex('admin');
  15. }
  16. ////////////
  17.  
  18. //////////// Check Droits utilisateur ////////////
  19. if (!hasRight('publication')) ReloadIndex('admin');
  20. ////////////
  21.  
  22. if(!isset($_GET['statut']|| $_GET['statut']==-1$statut=-1;
  23. elseif($_GET['statut']!=-1$statut=$_GET['statut'];
  24.  
  25.  
  26. if(!isset($_GET['debut'])) $debut=0;
  27. else $debut=$_GET['debut'];
  28.  
  29. $mask_statut_1='';
  30. $mask_statut_2='';
  31. $mask_statut_3='';
  32. $mask_statut_4='';
  33. if($statut=='public'$mask_statut_1='selected="selected"';
  34. if($statut=='draft'$mask_statut_2='selected="selected"';
  35. if($statut=='archives_p'$mask_statut_3='selected="selected"';
  36. if($statut=='archives_a'$mask_statut_4='selected="selected"';
  37.  
  38. // Nombre d'enregistrement total dans la bdd
  39. $req_count_publi=SQL_getCountPublicationList();
  40. $result_nb_req=$sql_object->DBSelect($req_count_publi);
  41. $bdd_nb_publi=$result_nb_req[0]['num_rows'];
  42. $bdd_nb_publi_display $bdd_nb_publi." "._t('publication','nb_total')."<br />\n";
  43.  
  44. if($statut!=-1{
  45.   $link_back="<div class=\"filter\"><a href=\"".$rub_link."&amp;todo=list\">"._t('publication','all')."</a></div>";
  46.   $req_count_publi=SQL_getCountPublicationList($statut);
  47.   $result_nb_req=$sql_object->DBSelect($req_count_publi);
  48.   $count_request=$result_nb_req[0]['num_rows'];
  49.   $req_list_publi=SQL_getPublicationList($debutSELECT_LIMIT$statut);
  50.   $result_publi_list=$sql_object->DBSelect($req_list_publi);
  51. else {
  52.   $link_back='';
  53.   $count_request=$bdd_nb_publi;
  54.   $req_list_publi=SQL_getPublicationList($debutSELECT_LIMIT$statut);
  55.   $result_publi_list=$sql_object->DBSelect($req_list_publi);
  56. }
  57.  
  58. if($count_request<=1$count_request_display _t('divers','query_result')." : ".$count_request." "._t('divers','record')."<br />\n";
  59. else $count_request_display _t('divers','query_result')." : ".$count_request." "._t('divers','records')."<br />\n";
  60.  
  61.  
  62. $link_sup=$rub_link."&amp;todo=sup&amp;id=";
  63. $link_mod=$rub_link."&amp;todo=mod&amp;id=";
  64. $link_det=$rub_link."&amp;todo=det&amp;id=";
  65. $link_statut=$rub_link."&amp;todo=list&amp;statut=";
  66. $link_self=$link_statut.$statut;
  67.  
  68.  
  69. // Liste des statuts disponible
  70. $select_statut="<select name=\"statut_filter\" id=\"statut_filter\"  onchange=\"ChangeLocation(this)\">\n";
  71. $select_statut.="<option value=\"-1\">"._t('publication','statut_filter')."</option>\n";
  72. $select_statut.="<option value=\"".$link_statut."public\"".$mask_statut_1.">".display_statut('P')."</option>\n";
  73. $select_statut.="<option value=\"".$link_statut."draft\"".$mask_statut_2.">".display_statut('D')."</option>\n";
  74. $select_statut.="<option value=\"".$link_statut."archives_p\"".$mask_statut_3.">".display_statut('PA')."</option>\n";
  75. $select_statut.="<option value=\"".$link_statut."archives_a\"".$mask_statut_4.">".display_statut('AA')."</option>\n";
  76. $select_statut.="</select>\n";
  77. ?>
  78. <div id="chemin">
  79. <ul>
  80.     <li><a href="index.php" class="chemin_home"><?php echo _t('way','home')?></a>
  81.     </li>
  82.     <li><a href="<?php echo $rub_link?>" id="chemin_<?php echo $rub?>"
  83.         class="chemin_rub"><?php echo _t('menu','publication')?></a></li>
  84.     <li><span><?php echo formatNavTitle(_t('publication','list')) ?></span>
  85.     </li>
  86. </ul>
  87. </div>
  88. <!--end barre haute -->
  89. <?php
  90. include_once(THEME_ADMIN_PATH."quickicons.php");
  91. ?>
  92. <div class="contentcontainer"><?php    include_once($dir."/menurub.php");    ?>
  93. <div id="content"><?php
  94. echo $link_back;
  95. ?>
  96. <div class="filterselect"><?php
  97. echo $select_statut;
  98. ?></div>
  99. <p><?php
  100. echo $bdd_nb_publi_display;
  101. echo $count_request_display;
  102. ?></p>
  103. <?php
  104. echo linkin_page($link_self$count_request$debut);
  105.  
  106. if($result_publi_list!=0{
  107.   echo "<table cellspacing=\"0\" cellpadding=\"3\" class=\"sortable\" id=\"sort-table\">\n";
  108.   echo "<thead>\n";
  109.   echo "<tr>\n";
  110.   echo "<td>"._t('publication','title')."</td>\n";
  111.   echo "<td>"._t('publication','author')."</td>\n";
  112.   echo "<td>"._t('divers','date_crea')."</td>\n";
  113.   echo "<td>".cutText(_t('divers','date_publi')131'')."</td>\n";
  114.   echo "<td>&nbsp;<span class=\"semnone\">"._t('divers','actions')."</span></td>\n";
  115.   echo "</tr>\n";
  116.   echo "</thead>\n";
  117.  
  118.  
  119.   echo "<tbody>";
  120.   for($i=0$i<count($result_publi_list)$i++{
  121.     $publi_title=formatText(cutText($result_publi_list[$i]['publi_title'],50)'2HTML');
  122.     $publi_owner=$result_publi_list[$i]['publi_posted_by'];
  123.     $publi_statut=$result_publi_list[$i]['publi_statut'];
  124.     $publi_published_date $publi_statut=='D' _t('statut','draft'$result_publi_list[$i]['publi_published_date_display'];
  125.     echo "<tr id=\"publi-".$result_publi_list[$i]['publi_id']."\">\n";
  126.     echo "<td><a href=\"".$link_det.$result_publi_list[$i]['publi_id']."\" title=\""._t('publication','det')."\">".$publi_title."</a></td>\n";
  127.     echo "<td>".$result_publi_list[$i]['user_login']."</td>\n";
  128.     echo "<td>".$result_publi_list[$i]['publi_date_crea_display']."</td>\n";
  129.     echo "<td>".$publi_published_date."</td>\n";
  130.     echo "<td style=\"width:50px\">\n";
  131.     if (GetSessionElement('id'== $publi_owner || IsSuperAdmin()) {
  132.       echo "<div class=\"iconetab\">";
  133.       echo "\t<a href=\"".$link_sup.$result_publi_list[$i]['publi_id']."\" class=\"ico_sup\" title=\""._t('publication','sup')."\"></a>\n";
  134.       echo "\t<a href=\"".$link_mod.$result_publi_list[$i]['publi_id']."\" class=\"ico_mod\" title=\""._t('publication','mod')."\"></a>\n";
  135.       echo "</div>";
  136.     else echo '';
  137.     echo "</td>\n";
  138.     echo "</tr>\n";
  139.   }
  140.  
  141.   echo "</tbody>";
  142.   echo "</table>";
  143. else {
  144.   echo "<div class=\"info\">"._t('publication','noresult')."</div>";
  145. }
  146. echo linkin_page($link_self$count_request$debut);
  147.  
  148. ?></div>
  149.  
  150. <?php
  151. // Ability to drag'n drop items
  152. footerAddJS('../lib/js/jquery.tablednd_0_5.js');
  153. ?>
  154.  
  155. <?php include_once($dir."/help.php")?></div>

Documentation generated on Thu, 03 May 2012 15:05:56 +0200 by phpDocumentor 1.4.1