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

Source for file list_com.php

Documentation is available at list_com.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. if (isset($_POST['id'])) $id $_POST['id'];
  22. if (isset($_GET['id'])) $id $_GET['id'];
  23.  
  24. $req_det SQL_getoneCompleteWorkshop($id);
  25. $result $sql_object -> DBSelect($req_det);
  26. $workshop_denomination formatText($result[0]['workshop_denomination']'2HTML');
  27.  
  28. if(!isset($_GET['debut'])) $debut=0;
  29. else $debut=$_GET['debut'];
  30.  
  31. // Nombre d'enregistrement total dans la bdd
  32. $req_count_com SQL_getcountnbcom($id);
  33. $result_nb_com=$sql_object->DBSelect($req_count_com);
  34. $bdd_nb_com=$result_nb_com[0]['num_rows'];
  35. $bdd_nb_com_display $bdd_nb_com." "._t('workshop','nb_total_com')."<br />\n";
  36.  
  37. $link_back='';
  38. $count_request=$bdd_nb_com;
  39. $req_list_workcom=SQL_getWorkcomList($debutSELECT_LIMIT$id);
  40. $result_workcom_list=$sql_object->DBSelect($req_list_workcom);
  41.  
  42. if($count_request<=1$count_request_display _t('divers','query_result')." : ".$count_request." "._t('divers','record')."<br />\n";
  43. else $count_request_display _t('divers','query_result')." : ".$count_request." "._t('divers','records')."<br />\n";
  44.  
  45.  
  46. $link_sup_com=$rub_link."&amp;todo=sup_com&amp;id=".$id."&amp;com_id=";
  47. $link_mod_com=$rub_link."&amp;todo=mod_com&amp;id=".$id."&amp;com_id=";
  48. $link_det=$rub_link."&amp;todo=det&amp;id=";
  49. $link_det_user="index.php?rub=user&amp;todo=det&amp;id=";
  50. $link_statut=$rub_link."&amp;todo=list&amp;statut=";
  51. $link_add_com=$rub_link."&amp;todo=add_com&amp;id=".$id."&amp;com_id=";
  52. $link_list_com=$rub_link."&amp;todo=list_com&amp;id=".$id;
  53. $link_self=$link_list_com;
  54. $link_det_com=$rub_link."&amp;todo=det_com&amp;id=".$id."&amp;com_id=";
  55. $navtitle=_t('workshop','list_com')." : ".$workshop_denomination;
  56. $titleh2=_t('workshop','name')." : ".$workshop_denomination;
  57. ?>
  58. <div id="chemin">
  59. <ul>
  60.     <li><a href="index.php" class="chemin_home"><?php echo _t('way','home'?></a>
  61.     </li>
  62.     <li><a href="<?php echo $rub_link?>" id="chemin_<?php echo $rub?>"
  63.         class="chemin_rub"><?php echo _t('menu','workshop')?></a></li>
  64.     <li><span><?php echo formatnavTitle($navtitle)?></span></li>
  65. </ul>
  66. </div>
  67. <!--end barre haute -->
  68. <?php
  69. include_once(THEME_ADMIN_PATH."quickicons.php");
  70. ?>
  71. <div class="contentcontainer"><?php    include_once($dir."/menurub.php");    ?>
  72. <div id="content"><?php afflinkbar($todo,$id$lang)?> <?php
  73. echo "<h2>" formatTitleh2($titleh2)"</h2>\n";
  74. ?> <?php
  75. echo $link_back;
  76.  
  77. ?>
  78. <p><?php
  79. echo $bdd_nb_com_display;
  80. echo $count_request_display;
  81. if (isWorkgroupOrganiser (GetSessionElement('id')$sql_object$id)==true || IsSuperAdmin())
  82. echo "<a href=\"" $link_add_com."0\" title=\"" _t('workshop','add_com'"\" class=\"ico_add2\" style=\"margin-right:20px;\"></a>";
  83. ?></p>
  84. <?php
  85. echo linkin_page($link_self$count_request$debut);
  86.  
  87. if($result_workcom_list!=0{
  88.   echo "<table cellspacing=\"0\" cellpadding=\"3\" class=\"table2\">\n";
  89.   echo "<thead>\n";
  90.   echo "<tr>\n";
  91.   echo "<td>"._t('workshop','com_statut')."</td>\n";
  92.   echo "<td>"._t('workshop','com_subject')."</td>\n";
  93.   echo "<td>"._t('workshop','com_author')."</td>\n";
  94.   echo "<td>"._t('workshop','com_nb_rep')."</td>\n";
  95.   echo "<td>"._t('workshop','com_date_last')."</td>\n";
  96.   echo "<td><span class=\"semnone\">"._t('divers','actions')."</span></td>\n";
  97.   echo "</tr>\n";
  98.   echo "</thead>\n";
  99.   echo "<tbody>\n";
  100.  
  101.  
  102.   for($i=0$i<count($result_workcom_list)$i++{
  103.  
  104.     $req_workcom_det=SQL_getWorkcom_detList($result_workcom_list[$i]['workcom_id']);
  105.     $result_workcom_det=$sql_object->DBSelect($req_workcom_det);
  106.  
  107.     $workcom_title=formatText(cutText($result_workcom_list[$i]['workcom_subject']901)'2HTML');
  108.     $workcom_user=formatText(cutText($result_workcom_list[$i]['user_login']101)'2HTML');
  109.  
  110.     echo "<tr>\n";
  111.     if ($result_workcom_list[$i]['workcom_statut']=='C'{
  112.       echo "<td><img src=\"" .THEME_ADMIN_PATH"images/ico_lock.gif\" alt=\"".$result_workcom_list[$i]['workcom_statut']."\" class=\"iconetodo\" /></td>\n";
  113.     }
  114.     else echo "<td width=\"5%\">&nbsp;</td>\n";
  115.     echo "<td width=\"50%\"><a href=\"".$link_det_com.$result_workcom_list[$i]['workcom_id']."\" title=\""._t('workshop','com')."\">".$workcom_title."</a></td>\n";
  116.     if (IsSuperAdmin())
  117.     echo "<td width=\"15%\"><a href=\"".$link_det_user.$result_workcom_list[$i]['workcom_user_id']."\" title=\""._t('workshop','com_author')."\">".$workcom_user."</a></td>\n";
  118.     else     echo "<td width=\"15%\"><span>".$workcom_user."</span></td>\n";
  119.     if ($result_workcom_det[0]['nb_rep']==""{
  120.       echo "<td width=\"5%\"><span class=\"date_table\">0</span></td>\n";
  121.     }
  122.     else echo "<td width=\"5%\"><span class=\"nb_rep_table\">".$result_workcom_det[0]['nb_rep']."</span></td>\n";
  123.     if ($result_workcom_det[0]['workcom_date_crea_display']==""{
  124.       echo "<td width=\"15%\"><span class=\"date_table\">".$result_workcom_list[$i]['workcom_date_crea_display']."</span></td>\n";
  125.     }
  126.     else echo "<td width=\"15%\"><span class=\"date_table\">".$result_workcom_det[0]['workcom_date_crea_display']."</span></td>\n";
  127.  
  128.     if (isWorkgroupOrganiser (GetSessionElement('id')$sql_object$id)==true || IsSuperAdmin()){
  129.       echo "<td width=\"15%\"><div class=\"iconetab\"><a href=\"".$link_sup_com.$result_workcom_list [$i]['workcom_id']."&amp;mes_id=".$result_workcom_list [$i]['workcom_id']."\" title=\""._t('workshop','sup_com')."\" class=\"ico_sup\"></a>\n";
  130.       echo "<a href=\"".$link_mod_com.$result_workcom_list [$i]['workcom_id']."&amp;mes_id=".$result_workcom_list [$i]['workcom_id']."\" title=\""._t('workshop','mod_com')."\" class=\"ico_mod\"></a></div></td>";
  131.     }
  132.     else echo "<td width=\"15%\">&nbsp;</td>\n";
  133.     echo "</tr>\n";
  134.   }
  135.  
  136.   echo "</tbody>";
  137.   echo "</table>";
  138. else {
  139.   echo "<div class=\"info\">"._t('workshop','no_com')."</div>";
  140. }
  141. echo linkin_page($link_self$count_request$debut);
  142.  
  143. ?></div>
  144. <?php include_once($dir."/help.php")?></div>

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