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 newsletter
  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. if (!isset($_GET['statut']|| $_GET['statut'== -1$statut = -1;
  18. elseif ($_GET['statut'!= -1$statut $_GET['statut'];
  19.  
  20. if (!isset($_GET['debut'])) $debut 0;
  21. else $debut $_GET['debut'];
  22.  
  23. $mask_statut_1 '';
  24. $mask_statut_2 '';
  25. $mask_statut_3 '';
  26.  
  27. if ($statut == 'public'$mask_statut_1 'selected="selected"';
  28. if ($statut == 'draft'$mask_statut_2 'selected="selected"';
  29. if ($statut == 'waiting'$mask_statut_3 'selected="selected"';
  30. // Nombre d'enregistrement total dans la bdd
  31. $result_nb_req $sql_object->DBSelect(SQL_getCountNewsletterList(-1));
  32. $bdd_nb_news $result_nb_req[0]['num_rows'];
  33. $bdd_nb_news_display $bdd_nb_news " " _t('newsletter','nb_total'"<br />\n";
  34.  
  35. if ($statut != -1{
  36.   $link_back "<div class=\"filter\"><a href=\"" $rub_link "&amp;todo=list\">" _t('newsletter','all'"</a></div>";
  37.   $req_count_news SQL_getCountNewsletterList($statut);
  38.   $result_nb_req $sql_object->DBSelect($req_count_news);
  39.   $count_request $result_nb_req[0]['num_rows'];
  40.   $req_list_newsletter SQL_getNewsletterList($debutSELECT_LIMIT$statut);
  41.   $result_newsletter_list $sql_object->DBSelect($req_list_newsletter);
  42. else {
  43.   $link_back '';
  44.   $count_request $bdd_nb_news;
  45.   $req_list_newsletter SQL_getNewsletterList($debutSELECT_LIMIT$statut);
  46.   $result_newsletter_list $sql_object->DBSelect($req_list_newsletter);
  47. }
  48.  
  49. if ($count_request <= 1$count_request_display _t('divers','query_result'" : " $count_request " " _t('divers','record'"<br />\n";
  50. else $count_request_display _t('divers','query_result'" : " $count_request " " _t('divers','records'"<br />\n";
  51.  
  52. $link_sup $rub_link "&amp;todo=sup&amp;id=";
  53. $link_mod $rub_link "&amp;todo=mod&amp;id=";
  54. $link_det $rub_link "&amp;todo=det&amp;id=";
  55. $link_statut $rub_link "&amp;todo=list&amp;statut=";
  56. $link_self $link_statut $statut;
  57. // Liste des statuts disponibles
  58. $select_statut "<select name=\"statut_filter\" id=\"statut_filter\"  onchange=\"ChangeLocation(this)\">\n";
  59. $select_statut .= "<option value=\"-1\">" _t('newsletter','statut_filter'"</option>\n";
  60. $select_statut .= "<option value=\"" $link_statut "public\"" $mask_statut_1 ">"._t('statut','public')."</option>\n";
  61. $select_statut .= "<option value=\"" $link_statut "draft\"" $mask_statut_2 ">"._t('statut','draft')."</option>\n";
  62. $select_statut .= "<option value=\"" $link_statut "waiting\"" $mask_statut_3 ">"._t('statut','W')."</option>\n";
  63. $select_statut .= "</select>\n";
  64.  
  65. ?>
  66. <div id="chemin">
  67. <ul>
  68.     <li><a href="index.php" class="chemin_home"><?php echo _t('way','home');
  69.     ?></a></li>
  70.     <li><a href="<?php echo $rub_link;
  71. ?>" id="chemin_<?php echo $rub?>"
  72.         class="chemin_rub"><?php echo _t('menu','newsletter');
  73.         ?></a></li>
  74.     <li><span><?php echo formatNavTitle(_t('newsletter','list'));
  75.     ?></span></li>
  76. </ul>
  77. </div>
  78. <!--end barre haute -->
  79.     <?php
  80.     include_once(THEME_ADMIN_PATH."quickicons.php");
  81.  
  82.     ?>
  83. <div class="contentcontainer"><?php include_once($dir "/menurub.php");
  84. ?>
  85. <div id="content"><?php
  86. echo $link_back;
  87.  
  88. ?>
  89. <div class="filterselect"><?php
  90. echo $select_statut;
  91. ?></div>
  92. <p><?php
  93. echo $bdd_nb_news_display;
  94. echo $count_request_display;
  95.  
  96. ?></p>
  97. <?php
  98. echo linkin_page($link_self$count_request$debut);
  99.  
  100. if ($result_newsletter_list != 0{
  101.   echo "<table cellspacing=\"0\" cellpadding=\"3\">\n";
  102.   echo "<thead>\n";
  103.   echo "<tr>\n";
  104.   echo "<td>" _t('newsletter','title'"</td>\n";
  105.   echo "<td>"._t('divers','date_crea')."</td>\n";
  106.   echo "<td>".cutText(_t('divers','date_publi')131'')."</td>\n";
  107.   echo "<td>&nbsp;<span class=\"semnone\">" _t('divers','actions'"</span></td>\n";
  108.   echo "</tr>\n";
  109.   echo "</thead>\n";
  110.  
  111.  
  112.  
  113.   echo "<tbody>\n";
  114.   for($i 0$i count($result_newsletter_list)$i++{
  115.     $newsletter_title formatText(cutText($result_newsletter_list[$i]['newsletter_title']53)'2HTML');
  116.     $newsletter_status $result_newsletter_list[$i]['newsletter_statut'];
  117.     $newsletter_published_date $newsletter_status=='P' $result_newsletter_list[$i]['newsletter_published_date_display'_t('statut','draft');
  118.     echo "<tr>\n";
  119.     echo "<td><a href=\"" $link_det $result_newsletter_list[$i]['newsletter_id'"\" title=\"" _t('newsletter','det'"\">" $newsletter_title "</a></td>\n";
  120.     echo "<td>" $result_newsletter_list[$i]['newsletter_date_crea_display'"</td>\n";
  121.     echo "<td>" $newsletter_published_date "</td>\n";
  122.     echo "<td style=\"width:50px\">\n";
  123.     if ($newsletter_status != 'P'{
  124.       echo "<div class=\"iconetab\">";
  125.       echo "\t<a href=\"" $link_sup $result_newsletter_list[$i]['newsletter_id'"\" class=\"ico_sup\" title=\"" _t('newsletter','sup'"\"></a>\n";
  126.       echo "\t<a href=\"" $link_mod $result_newsletter_list[$i]['newsletter_id'"\" class=\"ico_mod\" title=\"" _t('newsletter','mod'"\"></a>\n";
  127.       echo "</div>";
  128.     else echo '&nbsp;';
  129.     echo "</td>\n";
  130.     echo "</tr>\n";
  131.   }
  132.  
  133.   echo "</tbody>";
  134.   echo "</table>";
  135. else {
  136.   echo "<div class=\"info\">" _t('newsletter','noresult'"</div>";
  137. }
  138. echo linkin_page($link_self$count_request$debut);
  139.  
  140. ?></div>
  141. <?php include_once($dir "/help.php");
  142. ?></div>

Documentation generated on Thu, 03 May 2012 15:06:02 +0200 by phpDocumentor 1.4.1