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

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