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

Source for file list.php

Documentation is available at list.php

  1. <?php
  2. /**
  3.  * @package linea21.core
  4.  * @subpackage user
  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 (!IsSuperAdmin()) ReloadIndex('admin');
  20. ////////////
  21.  
  22.  
  23. if(!isset($_GET['groupe']|| $_GET['groupe']==-1$groupe=-1;
  24. elseif($_GET['groupe']!=-1{
  25.   $groupe=$_GET['groupe'];
  26.   $alphabeta=-1;
  27. }
  28.  
  29. if(!isset($_GET['alphabeta']|| $_GET['alphabeta']==-1$alphabeta=-1;
  30. elseif($_GET['alphabeta']!=-1{
  31.   $alphabeta=$_GET['alphabeta'];
  32.   $groupe=-1;
  33. }
  34.  
  35. if(!isset($_GET['debut'])) $debut=0;
  36. else $debut=$_GET['debut'];
  37.  
  38. if($groupe!=-|| $alphabeta!=-1{
  39.   $link_back="<div class=\"filter\"><a href=\"".$rub_link."&amp;todo=list\">"._t('user','all')."</a></div>";
  40.   if($groupe!=-1{
  41.     $requete_count=SQLCount_getlistuser('GROUP'$groupe);
  42.     $req_user_list=SQL_getlistuser($debutSELECT_LIMIT'GROUP'$groupe);
  43.   }
  44.   if($alphabeta!=-1{
  45.     $requete_count=SQLCount_getlistuser('ALPHA'$alphabeta);
  46.     $req_user_list=SQL_getlistuser($debutSELECT_LIMIT'ALPHA'$alphabeta);
  47.   }
  48. }
  49. else {
  50.   $link_back='';
  51.   // Liste des utilisateurs par défaut
  52.   $requete_count=SQLCount_getlistuser();
  53.   $req_user_list=SQL_getlistuser($debut);
  54. }
  55. $result_user_list=$sql_object->DBSelect($req_user_list);
  56.  
  57. $result_nb_req=$sql_object->DBSelect($requete_count);
  58. $count_request=$result_nb_req[0]['num_rows'];
  59.  
  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_self=$rub_link."&amp;todo=list&amp;groupe=".$groupe."&amp;alphabeta=".$alphabeta;
  66. $link_list_group=$rub_link."&amp;todo=list&amp;groupe=";
  67. $link_list_alphabetical=$rub_link."&amp;todo=list&amp;alphabeta=";
  68.  
  69.  
  70. // Liste des groupes d'utilisateurs
  71. $result_group=$sql_object->DBSelect($req_list_group);
  72. $select_group="<select name=\"group_filter\" id=\"group_filter\"  onchange=\"ChangeLocation(this)\">\n";
  73. $select_group.="<option value=\"-1\">"._t('user','selectgroup')."</option>\n";
  74. for($i=0$i<count($result_group)$i++)  {
  75.   if($groupe==$result_group[$i]['catus_id']$mask=" selected=\"selected\""else $mask='';
  76.   $select_group.="\t<option value=\"".$link_list_group.$result_group[$i]['catus_id']."\"".$mask.">".formatText($result_group[$i]['catus_name'])."</option>\n";
  77. }
  78. $select_group.="</select>\n";
  79.  
  80. // Liste alphabetique
  81. $result_alphabetical=$sql_object->DBSelect($req_alphabetical);
  82. $select_alphabetical="<select name=\"alhpabetical_filter\" id=\"alhpabetical_filter\" onchange=\"ChangeLocation(this)\">\n";
  83. $select_alphabetical.="<option value=\"-1\">"._t('user','alphabetical')."</option>\n";
  84. for($i=0$i<count($result_alphabetical)$i++)  {
  85.   if($alphabeta==$result_alphabetical[$i]['first_letter']$mask=" selected=\"selected\""else $mask='';
  86.   $select_alphabetical.="\t<option value=\"".$link_list_alphabetical.$result_alphabetical[$i]['first_letter']."\"".$mask.">".formatText($result_alphabetical[$i]['first_letter'])."</option>\n";
  87. }
  88. $select_alphabetical.="</select>\n";
  89.  
  90. //nombre total d'utilisateurs
  91. $result_group=$sql_object->DBSelect($req_nb_inscrit);
  92. $nb_inscrits=$result_group[0]['nb_inscrit'];
  93. $nb_inscrits_display $nb_inscrits." "._t('user','nb_total')."<br />\n";
  94. if($count_request<=1$count_request_display _t('divers','query_result')." : ".$count_request." "._t('divers','record')."<br />\n";
  95. else $count_request_display _t('divers','query_result')." : ".$count_request." "._t('divers','records')."<br />\n";
  96. ?>
  97. <div id="chemin">
  98. <ul>
  99.     <li><a href="index.php" class="chemin_home"><?php echo _t('way','home')?></a>
  100.     </li>
  101.     <li><a href="<?php echo $rub_link?>" id="chemin_<?php echo $rub?>"
  102.         class="chemin_rub"><?php echo _t('menu','user')?></a></li>
  103.     <li><span><?php echo formatNavTitle(_t('user','list'))?></span></li>
  104. </ul>
  105. </div>
  106. <!--end barre haute -->
  107. <?php
  108. include_once(THEME_ADMIN_PATH."quickicons.php");
  109. ?>
  110. <div class="contentcontainer"><?php    include_once($dir."/menurub.php");    ?>
  111. <div id="content"><?php
  112. echo $link_back;
  113. ?>
  114. <div class="filterselect"><?php
  115. echo $select_group;
  116. echo $select_alphabetical;
  117.  
  118. ?></div>
  119. <p><?php
  120. echo $nb_inscrits_display;
  121. echo $count_request_display;
  122. ?></p>
  123. <?php
  124. echo linkin_page($link_self$count_request$debut);
  125.  
  126. if($result_user_list!=0{
  127.   echo "<table cellspacing=\"0\" cellpadding=\"3\">\n";
  128.   echo "<thead>\n";
  129.   echo "<tr>\n";
  130.   echo "<td>"._t('user','login')."</td>\n";
  131.   echo "<td>"._t('user','groupe')."</td>\n";
  132.   echo "<td>"._t('user','date_record')."</td>\n";
  133.   echo "<td>&nbsp;<span class=\"semnone\">"._t('user','actions')."</span></td>\n";
  134.   echo "</tr>\n";
  135.   echo "</thead>\n";
  136.  
  137.   echo "<tbody>\n";
  138.   for($i=0$i<count($result_user_list)$i++{
  139.     echo "<tr>\n";
  140.     echo "<td><a href=\"".$link_det.$result_user_list[$i]['user_id']."\" title=\"".formatText(_t('user','det'))."\">".formatText($result_user_list[$i]['user_login'])."</a></td>\n";
  141.     echo "<td>".formatText($result_user_list[$i]['catus_name'])."</td>\n";
  142.     echo "<td>".$result_user_list[$i]['user_date_crea_display']."</td>\n";
  143.     echo "<td>\n";
  144.     echo "<div class=\"iconetab\">";
  145.     echo "\t<a href=\"".$link_sup.$result_user_list[$i]['user_id']."\" class=\"ico_sup\" title=\""._t('user','sup')."\"></a>\n";
  146.     echo "\t<a href=\"".$link_mod.$result_user_list[$i]['user_id']."\" class=\"ico_mod\" title=\""._t('user','mod')."\"></a>\n";
  147.     echo "</div>";
  148.     echo "</td>\n";
  149.     echo "</tr>\n";
  150.   }
  151.   echo "</tbody>";
  152.   echo "</table>";
  153. else {
  154.   echo "<div class=\"info\">"._t('user','noresult')."</div>";
  155. }
  156.  
  157. echo linkin_page($link_self$count_request$debut);
  158. ?></div>
  159. <?php include_once($dir."/help.php")?></div>

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