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 yellowpages
  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. if(!isset($_GET['statut']|| $_GET['statut']==-1$statut=-1;
  19. elseif($_GET['statut']!=-1{
  20. $statut=$_GET['statut'];
  21. $alphabeta=-1;
  22. }
  23.  
  24. if(!isset($_GET['alphabeta']|| $_GET['alphabeta']==-1$alphabeta=-1;
  25. elseif($_GET['alphabeta']!=-1{
  26.     $alphabeta=$_GET['alphabeta'];
  27.     $statut=-1;
  28. }
  29.  
  30. if(!isset($_GET['debut'])) $debut=0;
  31. else $debut=$_GET['debut'];
  32.  
  33. $mask_statut_1='';
  34. $mask_statut_2='';
  35. $mask_statut_3='';
  36.  
  37. if($statut=='P'$mask_statut_1='selected="selected"';
  38. if($statut=='AA'$mask_statut_2='selected="selected"';
  39. if($statut=='D'$mask_statut_3='selected="selected"';
  40.  
  41.  
  42. // Nombre d'enregistrement total dans la bdd
  43. $result_nb_req=$sql_object->DBSelect($req_count_yp);
  44. $bdd_nb_yp=$result_nb_req[0]['num_rows'];
  45. $bdd_nb_yp_display $bdd_nb_yp." "._t('yp','nb_total')."<br />\n";
  46.  
  47. if($statut!=-|| $alphabeta!=-1{
  48.     $link_back="<div class=\"filter\"><a href=\"".$rub_link."&amp;todo=list\">"._t('yp','all')."</a></div>";
  49.     
  50.         if($statut!=-1{    
  51.     $req_count_yp=SQL_getCountypList($statut);
  52.     $result_nb_req=$sql_object->DBSelect($req_count_yp);
  53.     $count_request=$result_nb_req[0]['num_rows'];
  54.     $req_list_yp=SQL_getypList($debutSELECT_LIMIT$statut);
  55.     $result_yp_list=$sql_object->DBSelect($req_list_yp);
  56. }
  57.     
  58.     if($alphabeta!=-1{    
  59.     $req_count_yp=SQL_getCountypList('ALPHA'$alphabeta);
  60.     $result_nb_req=$sql_object->DBSelect($req_count_yp);
  61.     $count_request=$result_nb_req[0]['num_rows'];
  62.     $req_list_yp=SQL_getypList($debutSELECT_LIMIT'ALPHA'$alphabeta);
  63.     $result_yp_list=$sql_object->DBSelect($req_list_yp);
  64. }
  65.  
  66. else {
  67.     $link_back='';
  68.     $count_request=$bdd_nb_yp;
  69.     $req_list_yp=SQL_getypList($debutSELECT_LIMIT$statut);
  70.     $result_yp_list=$sql_object->DBSelect($req_list_yp);
  71. }
  72.  
  73. if($count_request<=1$count_request_display _t('divers','query_result')." : ".$count_request." "._t('divers','record')."<br />\n";
  74. else $count_request_display _t('divers','query_result')." : ".$count_request." "._t('divers','records')."<br />\n";
  75.  
  76.  
  77. $link_sup=$rub_link."&amp;todo=sup&amp;id=";
  78. $link_mod=$rub_link."&amp;todo=mod&amp;id=";
  79. $link_det=$rub_link."&amp;todo=det&amp;id=";
  80. $link_statut=$rub_link."&amp;todo=list&amp;statut=";
  81. $link_list_alphabetical=$rub_link."&amp;todo=list&amp;alphabeta=";
  82. //&amp;groupe=".$groupe."&amp;alphabeta=".$alphabeta;"
  83. $link_self=$link_statut.$statut."&amp;alphabeta=".$alphabeta;
  84.  
  85.  
  86. // Liste des statuts disponible
  87. $select_statut="<select name=\"statut_filter\" id=\"statut_filter\"  onchange=\"ChangeLocation(this)\">\n";
  88. $select_statut.="<option value=\"-1\">"._t('divers','select_choice2')."</option>\n";
  89. $select_statut.="<option value=\"".$link_statut."D\"".$mask_statut_3.">"._t('yp','preinscription')."</option>\n";
  90. $select_statut.="<option value=\"".$link_statut."P\"".$mask_statut_1.">".display_statut('P')."</option>\n";
  91. $select_statut.="<option value=\"".$link_statut."AA\"".$mask_statut_2.">".display_statut('AA')."</option>\n";
  92. $select_statut.="</select>\n";
  93.  
  94. // Liste alphabetique
  95. $result_alphabetical=$sql_object->DBSelect($req_alphabetical);
  96. $select_alphabetical="<select name=\"alhpabetical_filter\" id=\"alhpabetical_filter\" onchange=\"ChangeLocation(this)\">\n";
  97. $select_alphabetical.="<option value=\"-1\">"._t('yp','alphabetical')."</option>\n";
  98. for($i=0$i<count($result_alphabetical)$i++)  {
  99.     if($alphabeta==$result_alphabetical[$i]['first_letter']$mask=" selected=\"selected\""else $mask='';
  100.     $select_alphabetical.="\t<option value=\"".$link_list_alphabetical.$result_alphabetical[$i]['first_letter']."\"".$mask.">".$result_alphabetical[$i]['first_letter']."</option>\n";
  101. }
  102. $select_alphabetical.="</select>\n";
  103.  
  104. ?>
  105. <div id="chemin">
  106.     <ul>
  107.         <li>
  108.             <a href="index.php" class="chemin_home"><? echo _t('way','home'?></a>
  109.         </li>
  110.         <li>
  111.                <a href="<?php echo $rub_link?>" id="chemin_<? echo $rub?>" class="chemin_rub"><? echo _t('menu','yellowpages')?></a>
  112.         </li>
  113.         <li>
  114.             <span><? echo _t('yp','list'?></span>
  115.         </li>
  116.     </ul>
  117. </div>
  118.   <!--end barre haute -->
  119. <?php
  120. include_once(THEME_ADMIN_PATH."quickicons.php");
  121. ?>
  122. <div class="contentcontainer">
  123. <?php    include_once($dir."/menurub.php");    ?>
  124. <div id="content">
  125. <?php
  126.         echo $link_back;
  127. ?>
  128.     <div class="filterselect">
  129.         <?php
  130.         echo $select_statut;
  131.         echo $select_alphabetical
  132.         ?>
  133.     </div>
  134.     <p><?php
  135.     echo $bdd_nb_yp_display;
  136.     echo $count_request_display;
  137.     ?>
  138.     </p>
  139. <?php
  140. echo linkin_page($link_self$count_request$debut);
  141.  
  142. if($result_yp_list!=0{
  143. echo "<table cellspacing=\"0\" cellpadding=\"3\">\n";
  144. echo "<thead>\n";
  145.     echo "<tr>\n"
  146.     echo "<td style=\"width:40%\">"._t('yp','name2')."</td>\n";;
  147.     echo "<td>"._t('divers','date_crea')."</td>\n";
  148.     echo "<td>&nbsp;<span class=\"semnone\">"._t('divers','actions')."</span></td>\n";
  149.     echo "</tr>\n";
  150. echo "</thead>\n";
  151. echo "<tbody>\n";
  152.  
  153.  
  154. for($i=0$i<count($result_yp_list)$i++{
  155.     $yp_title=formatText($result_yp_list[$i]['yellowp_name']'2HTML');
  156.     $yp_title=cutText($yp_title351)
  157.     echo "<tr>\n";
  158.     echo "<td><a href=\"".$link_det.$result_yp_list[$i]['yellowp_id']."\" title=\""._t('yp','det')."\">".$yp_title."</a></td>\n";
  159.     echo "<td>".$result_yp_list[$i]['yellowp_date_crea_display']."</td>\n";
  160.     echo "<td><div class=\"iconetab\"><a href=\"".$link_sup.$result_yp_list[$i]['yellowp_id']."\" title=\""._t('yp','sup')."\" class=\"ico_sup\"></a>";
  161.     echo "<a href=\"".$link_mod.$result_yp_list[$i]['yellowp_id']."\" title=\""._t('yp','mod')."\" class=\"ico_mod\"></a></div></td>\n";
  162.     echo "</tr>\n";
  163. }
  164.  
  165. echo "</tbody>";
  166. echo "</table>";
  167.  
  168. else {
  169.     echo "<div class=\"info\">"._t('yp','noresult')."</div>";
  170. }
  171. echo linkin_page($link_self$count_request$debut);
  172.  
  173. ?>
  174. </div>
  175. <?php include_once($dir."/help.php")?>
  176. </div>

Documentation generated on Fri, 16 Oct 2009 09:35:54 +0200 by phpDocumentor 1.4.1