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 project
  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['statut']|| $_GET['statut']==-1$statut=-1;
  24. elseif($_GET['statut']!=-1$statut=$_GET['statut'];
  25.  
  26.  
  27. if(!isset($_GET['debut'])) $debut=0;
  28. else $debut=$_GET['debut'];
  29.  
  30. $mask_statut_1='';
  31. $mask_statut_2='';
  32. $mask_statut_3='';
  33. $mask_statut_4='';
  34. if($statut=='public'$mask_statut_1='selected="selected"';
  35. if($statut=='draft'$mask_statut_2='selected="selected"';
  36. if($statut=='archives_p'$mask_statut_3='selected="selected"';
  37. if($statut=='archives_a'$mask_statut_4='selected="selected"';
  38.  
  39. // Nombre d'enregistrement total dans la bdd
  40. $result_nb_req=$sql_object->DBSelect($req_count_projects);
  41. $bdd_nb_projects=$result_nb_req[0]['num_rows'];
  42. $bdd_nb_projects_display $bdd_nb_projects." "._t('project','nb_total')."<br />\n";
  43.  
  44. if($statut!=-1{
  45.   $link_back="<div class=\"filter\"><a href=\"".$rub_link."&amp;todo=list\">"._t('project','all')."</a></div>";
  46.   $req_count_projects=SQL_getCountProjectsList($statut);
  47.   $result_nb_req=$sql_object->DBSelect($req_count_projects);
  48.   $count_request=$result_nb_req[0]['num_rows'];
  49.   $req_list_projects=SQL_getProjectsList($debutSELECT_LIMIT$statut);
  50.   $result_projects_list=$sql_object->DBSelect($req_list_projects);
  51. else {
  52.   $link_back='';
  53.   $count_request=$bdd_nb_projects;
  54.   $req_list_projects=SQL_getProjectsList($debutSELECT_LIMIT$statut);
  55.   $result_projects_list=$sql_object->DBSelect($req_list_projects);
  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. $link_sup=$rub_link."&amp;todo=sup&amp;id=";
  62. $link_mod=$rub_link."&amp;todo=mod&amp;id=";
  63. $link_det=$rub_link."&amp;todo=det&amp;id=";
  64. $link_statut=$rub_link."&amp;todo=list&amp;statut=";
  65. $link_self=$link_statut.$statut;
  66.  
  67.  
  68. // Liste des statuts disponibles
  69. $select_statut="<select name=\"statut_filter\" id=\"statut_filter\"  onchange=\"ChangeLocation(this)\">\n";
  70. $select_statut.="<option value=\"-1\">"._t('project','statut_filter')."</option>\n";
  71. $select_statut.="<option value=\"".$link_statut."public\"".$mask_statut_1.">".display_statut('P')."</option>\n";
  72. $select_statut.="<option value=\"".$link_statut."draft\"".$mask_statut_2.">".display_statut('D')."</option>\n";
  73. $select_statut.="<option value=\"".$link_statut."archives_p\"".$mask_statut_3.">".display_statut('PA')."</option>\n";
  74. $select_statut.="<option value=\"".$link_statut."archives_a\"".$mask_statut_4.">".display_statut('AA')."</option>\n";
  75. $select_statut.="</select>\n";
  76. ?>
  77. <div id="chemin">
  78. <ul>
  79.     <li><a href="index.php" class="chemin_home"><?php echo _t('way','home')?></a>
  80.     </li>
  81.     <li><a href="<?php echo $rub_link?>" id="chemin_<?php echo $rub?>"
  82.         class="chemin_rub"><?php echo _t('menu','project')?></a></li>
  83.     <li><span><?php echo formatNavTitle(_t('project','list'))?></span></li>
  84. </ul>
  85. </div>
  86. <!--end barre haute -->
  87. <?php
  88. include_once(THEME_ADMIN_PATH."quickicons.php");
  89. ?>
  90. <div class="contentcontainer"><?php    include_once($dir."/menurub.php");    ?>
  91. <div id="content"><?php
  92. echo $link_back;
  93. ?>
  94. <div class="filterselect"><?php
  95. echo $select_statut;
  96. ?></div>
  97. <p><?php
  98. echo $bdd_nb_projects_display;
  99. echo $count_request_display;
  100. ?></p>
  101. <?php
  102. echo linkin_page($link_self$count_request$debut);
  103.  
  104. if($result_projects_list!=0{
  105.   echo "<table cellspacing=\"0\" cellpadding=\"3\" class=\"sortable\" id=\"sort-table\">\n";
  106.   echo "<thead>\n";
  107.   echo "<tr>\n";
  108.   echo "<td>"._t('project','name')."</td>\n";
  109.   echo "<td>"._t('project','priority')."</td>\n";
  110.   echo "<td>"._t('divers','date_crea')."</td>\n";
  111.   echo "<td>".cutText(_t('divers','date_publi')131'')."</td>\n";
  112.   echo "<td>&nbsp;<span class=\"semnone\">"._t('divers','actions')."</span></td>\n";
  113.   echo "</tr>\n";
  114.   echo "</thead>\n";
  115.  
  116.   echo "<tbody>\n";
  117.  
  118.  
  119.   for($i=0$i<count($result_projects_list)$i++{
  120.     $project_name=formatText(cutText($result_projects_list[$i]['project_name'],50)'2HTML');
  121.     $complete_project_name $result_projects_list[$i]['complete_project_name'];
  122.     $project_owner=$result_projects_list[$i]['project_posted_by'];
  123.     $project_statut=$result_projects_list[$i]['project_statut'];
  124.     $project_published_date $project_statut=='D' _t('statut','draft'$result_projects_list[$i]['project_published_date_display'];
  125.     echo "<tr id=\"project-".$result_projects_list[$i]['project_id']."\">\n";
  126.     echo "<td><a href=\"".$link_det.$result_projects_list[$i]['project_id']."\" title=\""._t('project','det')." ".formatText($complete_project_name'2ALT')."\">".$project_name."</a></td>\n";
  127.     echo "<td>".$result_projects_list[$i]['priority_name']."</td>\n";
  128.     echo "<td>".$result_projects_list[$i]['project_date_crea_display']."</td>\n";
  129.     echo "<td>".$project_published_date."</td>\n";
  130.     echo "<td style=\"width:50px\">\n";
  131.  
  132.     if (IsSuperAdmin()) {
  133.       echo "<div class=\"iconetab\">\n";
  134.       echo "<a href=\"".$link_sup.$result_projects_list[$i]['project_id']."\" class=\"ico_sup\" title=\""._t('project','sup')."\"></a>\n";
  135.       echo "<a href=\"".$link_mod.$result_projects_list[$i]['project_id']."\" class=\"ico_mod\" title=\""._t('project','mod')."\"></a>\n";
  136.       echo "</div>\n";
  137.     else echo '';
  138.     echo "</td>\n";
  139.     echo "</tr>\n";
  140.   }
  141.  
  142.   echo "</tbody>";
  143.   echo "</table>";
  144. else {
  145.   echo "<div class=\"info\">"._t('project','noresult')."</div>";
  146. }
  147. echo linkin_page($link_self$count_request$debut);
  148. ?>
  149. </div>
  150. <?php
  151. // Ability to drag'n drop items
  152. footerAddJS('../lib/js/jquery.tablednd_0_5.js');
  153. ?>
  154. <?php
  155. include_once($dir."/help.php");
  156. ?>
  157. </div>

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