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

Source for file det_com.php

Documentation is available at det_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($_POST['id'])) $id $_POST['id'];
  19. if (isset($_GET['id'])) $id $_GET['id'];
  20.  
  21. if (isset($_POST['com_id'])) $com_id $_POST['com_id'];
  22. if (isset($_GET['com_id'])) $com_id $_GET['com_id'];
  23.  
  24. if(!isset($_GET['debut'])) $debut=0;
  25. else $debut=$_GET['debut'];
  26.  
  27.  
  28. $req_count_com SQL_getWorkcom_detList($com_id);
  29. $result_nb_com=$sql_object->DBSelect($req_count_com);
  30. $bdd_nb_com=$result_nb_com[0]['nb_rep'];
  31. $bdd_nb_com_display $bdd_nb_com." ".$GLOBALS['lang']['workshop']['nb_total_com_mes']."<br />\n";
  32.  
  33.  
  34. include_once("../lib/lib_common.php");
  35. $req_det SQL_getoneCompleteWorkshop($id);
  36. $result $sql_object -> DBSelect($req_det);
  37. if (count($result1exit();
  38.  
  39.  
  40. $link_det $rub_link "&amp;todo=det&amp;id=";
  41. $link_sup_com=$rub_link."&amp;todo=sup_com&amp;id=".$id."&amp;com_id=";
  42. $link_lock_com=$rub_link."&amp;todo=lock_com&amp;id=".$id."&amp;com_id=";
  43. $link_mod_com=$rub_link."&amp;todo=mod_com&amp;id=".$id."&amp;com_id=";
  44. $link_add_com=$rub_link."&amp;todo=add_com&amp;id=".$id."&amp;com_id=";
  45. $link_list_com=$rub_link."&amp;todo=list_com&amp;id=".$id;
  46. $link_det_com=$rub_link."&amp;todo=det_com&amp;id=".$id."&amp;com_id=";
  47. $link_det_user="index.php?rub=user&amp;todo=det&amp;id=";
  48.  
  49. $link_self=$link_det_com.$com_id;
  50.  
  51. $workshop_denomination formatText($result[0]['workshop_denomination']'2HTML');
  52. $workshop_resume formatText($result[0]['workshop_resume']'2HTML');
  53.  
  54. if (empty($result[0]['workshop_comment'])) $workshop_comment $GLOBALS['lang']['divers']['none'];
  55. else $workshop_comment formatText($result[0]['workshop_comment']'2HTML');
  56.  
  57. $theme_denomination formatText($result[0]['theme_name']'2HTML');
  58. $level_denomination formatText($result[0]['level_name']'2HTML');
  59. $workshop_statut display_statut($result[0]['workshop_statut']);
  60. $display_date_crea $result[0]['workshop_date_crea_display'];
  61. $display_last_modify $result[0]['workshop_last_modify_display'];
  62.  
  63.     $link_back='';
  64.     $count_request=$bdd_nb_com;
  65. $req_com_root SQL_getOnetopicWorkcom($id$com_id$com_id);
  66. $result_com_root $sql_object -> DBSelect($req_com_root);
  67. $com_num=-1;
  68.  
  69. $req_list_com SQL_getOnetopicWorkcom2($id$com_id$com_num$debutSELECT_LIMIT);
  70. $result_com $sql_object -> DBSelect($req_list_com);
  71.  
  72.  
  73. $reca_com='';
  74.  
  75. if ($result_com_root [0]['workcom_statut']=='C'{
  76.   $reca_com .= "\n<div class=\"task_forum\" id=\"task_forum_out\">\n";
  77.   }
  78. else {
  79. $reca_com .= "\n<div class=\"task_forum\" id=\"task_forum_title\">\n";
  80. }
  81.  
  82. $reca_com .= "<span class=\"date_task\">" $result_com_root[0]['workcom_date_crea_display'"</span>\n";
  83. $reca_com .= "<span class=\"titre_task\">" formatText($result_com_root[0]['workcom_subject']'2HTML'"</span>\n";
  84. if (WorkshopAuth_id (GetSessionElement('id')$sql_object$id)==true || IsSuperAdmin()){
  85. $reca_com .="<a href=\"" $link_sup_com ."0&amp;mes_id=".$result_com_root[0]['workcom_id']."\" title=\"" $GLOBALS['lang']['workshop']['sup_com'"\" class=\"ico_sup2\"></a>"
  86. $reca_com .="<a href=\"" $link_mod_com ."0&amp;mes_id=".$result_com_root[0]['workcom_id']."\" title=\"" $GLOBALS['lang']['workshop']['mod_com'"\" class=\"ico_mod2\"></a>";    
  87. }             
  88. $reca_com .= "<br class=\"brendstep\" /><p class=\"text_task\">" linkin_content(formatText($result_com_root[0]['workcom_body']'2HTML')) "</p>";
  89. $reca_com .= "<br class=\"brendstep\" />";
  90. if (IsSuperAdmin())
  91. $reca_com .= "<a href=\"" $link_det_user.$result_com_root[0]['workcom_user_id']."\" title=\"" $GLOBALS['lang']['workshop']['com_author'"\" class=\"auth_task_forum\">"formatText($result_com_root[0]['user_login']'2HTML'"</a><span class=\"auth_task_forum\">".$GLOBALS['lang']['workshop']['com_author'].": </span>\n";
  92. else $reca_com .= "<span class=\"auth_task_forum\">"formatText($result_com_root[0]['user_login']'2HTML'"</span><span class=\"auth_task_forum\">".$GLOBALS['lang']['workshop']['com_author'].": </span>\n";
  93. $reca_com .="</div>\n";
  94.  
  95. $reca_com_list='';
  96. if ($result_com<>0{
  97. for($i 0$i count($result_com)$i++{
  98.  
  99. if ($result_com [$i]['workcom_statut']=='C'{
  100.   $reca_com_list .= "\n<div class=\"task_forum\" id=\"task_forum_out\">\n";
  101. }
  102. else {
  103. $reca_com_list .= "\n<div class=\"task_forum\">\n";
  104. }
  105. $reca_com_list .= "<span class=\"date_task_forum\">" $result_com [$i]['workcom_date_crea_display'"</span>\n";
  106. $reca_com_list .= "<span class=\"titre_task_forum\">" formatText($result_com [$i]['workcom_subject']'2HTML'"</span>\n";
  107. if (WorkshopAuth_id (GetSessionElement('id')$sql_object$id)==true || IsSuperAdmin()){
  108. $reca_com_list .="<a href=\"" $link_sup_com $com_id "&amp;mes_id=".$result_com [$i]['workcom_id']."\" title=\"" $GLOBALS['lang']['workshop']['sup_com_mes'"\" class=\"ico_sup2\"></a>";                  
  109. $reca_com_list .="<a href=\"" $link_mod_com $com_id "&amp;mes_id=".$result_com [$i]['workcom_id']."\" title=\"" $GLOBALS['lang']['workshop']['mod_com_mes'"\" class=\"ico_mod2\"></a>";
  110. }
  111. $reca_com_list .= "<br class=\"brendstep\" /><p class=\"text_task_forum\">" linkin_content(formatText($result_com [$i]['workcom_body']'2HTML')) "</p>";
  112. $reca_com_list .= "<br class=\"brendstep\" />";
  113. if (IsSuperAdmin())
  114. $reca_com_list .= "<a href=\"" $link_det_user.$result_com[$i]['workcom_user_id']."\" title=\"" $GLOBALS['lang']['workshop']['com_author'"\" class=\"auth_task_forum\">"formatText($result_com[$i]['user_login']'2HTML'"</a><span class=\"auth_task_forum\">".$GLOBALS['lang']['workshop']['com_author'].": </span>\n";
  115. else $reca_com_list .= "<span class=\"auth_task_forum\">"formatText($result_com[$i]['user_login']'2HTML'"</span><span class=\"auth_task_forum\">".$GLOBALS['lang']['workshop']['com_author'].": </span>\n";
  116.  
  117. $reca_com_list .="</div>\n";
  118.  
  119. }
  120. else {
  121. $reca_com_list .="<div class=\"info\">".$GLOBALS['lang']['workshop']['no_com_rep']."</div>";
  122. }
  123. ?>
  124. <div id="chemin">
  125.     <ul>
  126.         <li>
  127.             <a href="index.php"><?php echo $GLOBALS['lang']['way']['home'];
  128. ?></a>
  129.         </li>
  130.         <li>
  131.             <a href="<?php echo $rub_link;
  132. ?>"><?php echo $GLOBALS['lang']['menu']['workshop'];
  133. ?></a>
  134.         </li>
  135.         <li>
  136.             <span><?php echo formatnavTitle($GLOBALS['lang']['workshop']['det_com'" : " .$result_com_root[0]['workcom_subject']);
  137. ?></span>
  138.         </li>
  139.     </ul>
  140. </div>
  141.   <!--end barre haute -->
  142. <?php
  143. include_once("quickicons.php");
  144.  
  145. ?>
  146. <div class="contentcontainer">
  147. <?php
  148. include_once($dir "/menurub.php");
  149.  
  150. ?>
  151. <div id="content">
  152. <?php afflinkbar($todo,$id$lang)?>
  153.         <?php
  154. echo "<h2>" formatTitleh2($result_com_root[0]['workcom_subject']" ( " $workshop_denomination ")"."</h2>\n";
  155.  
  156. ?>
  157.  
  158. <?php
  159. if (WorkshopAuth_id (GetSessionElement('id')$sql_object$id)==true || IsSuperAdmin()){
  160. if ($result_com_root [0]['workcom_statut']<>'C'){
  161. echo "<a href=\"" $link_add_com $com_id "\" title=\"" $GLOBALS['lang']['workshop']['add_com_mes']  "\" class=\"ico_add2\"></a>";
  162. }
  163. if ($result_com_root [0]['workcom_statut']=='C'){
  164.  echo "<a href=\"" $link_lock_com ."0&amp;lock=1&amp;mes_id=".$result_com_root[0]['workcom_id']."\" title=\"" $GLOBALS['lang']['workshop']['unlock_com'"\" class=\"ico_unlock2\"></a>";
  165. }else{
  166.  echo "<a href=\"" $link_lock_com ."0&amp;lock=0&amp;mes_id=".$result_com_root[0]['workcom_id']."\" title=\"" $GLOBALS['lang']['workshop']['lock_com'"\" class=\"ico_lock2\"></a>";
  167. }
  168. }
  169. ?>
  170.  
  171.     
  172. <p><?php
  173.     echo $bdd_nb_com_display;
  174.     //echo $count_request_display;
  175.     ?>
  176.     </p>
  177. <?php
  178. echo linkin_page($link_self$count_request$debut);
  179.  
  180.  
  181. echo $reca_com;
  182. echo $reca_com_list;
  183.  
  184. echo linkin_page($link_self$count_request$debut);
  185.  
  186. ?>
  187. <br class="brendstep" />
  188. </div>
  189. <?php include_once($dir "/help.php");
  190. ?>
  191. </div>

Documentation generated on Sat, 08 Nov 2008 14:51:51 +0100 by phpDocumentor 1.4.1