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

Source for file det.php

Documentation is available at det.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. if(isset($_POST['id']))    $id=$_POST['id'];
  12. if(isset($_GET['id']))    $id=$_GET['id'];
  13. //////////// Check Inclusion de pages ////////////
  14. if (!function_exists('AuthenthificationProcess')){
  15.   include_once("../lib/lib_common.php");
  16.   ReloadIndex('admin');
  17. }
  18. ////////////
  19.  
  20.  
  21. $result=$sql_object->DBSelect($req_det);
  22. if(count($result)>1exit();
  23.  
  24. if ($result[0]['workshop_statut']<>'P' && !IsSuperAdmin()){
  25.   ReloadIndex('admin');
  26. }
  27.  
  28. $link_det=$rub_link."&amp;todo=det&amp;id=";
  29. $link_sup=$rub_link."&amp;todo=sup&amp;id=";
  30. $link_mod=$rub_link."&amp;todo=mod&amp;id=";
  31. $link_det_u="index.php?rub=user&amp;todo=det&amp;id=";
  32. $link_det_theme="index.php?rub=theme&amp;todo=det&amp;id=";
  33. $link_det_level="index.php?rub=level&amp;todo=det&amp;id=";
  34. $link_sup_u=$rub_link."&amp;todo=sup_u&amp;id=";
  35. $link_add_u=$rub_link."&amp;todo=add_u&amp;id=";
  36. $link_list_cal=$rub_link."&amp;todo=list_cal&amp;id=";
  37. $link_list_com=$rub_link."&amp;todo=list_com&amp;id=";
  38. $link_sup_rep="index.php?rub=workshoprep&amp;todo=sup&amp;id=";
  39. $link_mod_rep="index.php?rub=workshoprep&amp;todo=mod&amp;id=";
  40. $link_det_rep="index.php?rub=workshoprep&amp;todo=det&amp;id=";
  41. $link_add_rep="index.php?rub=workshoprep&amp;todo=add&amp;work_id=";
  42.  
  43. $workshop_denomination=formatText($result[0]['workshop_denomination']'2HTML');
  44. $workshop_resume=empty_nc(formatText($result[0]['workshop_resume']'2HTML'));
  45. $workshop_comment=empty_nc(formatText($result[0]['workshop_comment']'2HTML'));
  46. $theme_denomination=formatText($result[0]['theme_name']'2HTML');
  47. $level_denomination=formatText(empty_none($result[0]['level_name']'2HTML'));
  48. $workshop_statut=display_statut($result[0]['workshop_statut']);
  49. $display_date_crea=$result[0]['workshop_date_crea_display'];
  50. $display_last_modify=$result[0]['workshop_last_modify_display'];
  51. $workshop_objectnew workshop ;
  52.  
  53. $req_user=SQL_getWorkshopUserList($id);
  54. $result_user $sql_object -> DBSelect($req_user);
  55.  
  56. //récupération des organisateurs du workshop
  57. $form_organizer='';
  58. $j=0;
  59. for($i=0$i<count($result_user)$i++{
  60.   if ($result_user[$i]['jwu_user_right']=='O' || $result_user[$i]['jwu_user_right']=='A'){
  61.     $j++;
  62.     if ($j<>1$form_organizer.=", ";
  63.     $form_organizer.=$result_user[$i]['user_login'];
  64.   }
  65. }
  66.  
  67. // formattage des données
  68.  
  69. //prepa affichage des infos générales
  70. $reca_generals="<dl class=\"dl3\">\n";
  71. $reca_generals.="<dt  class=\"dl_intitule\">"._t('workshop','generals')." : </dt>\n";
  72. $reca_generals.="<dd>&nbsp;<br /></dd>\n";
  73. $reca_generals.="<dt>"._t('workshop','title')."</dt>\n";
  74. $reca_generals.="<dd>"$workshop_denomination."</dd>\n";
  75. $reca_generals.="<dt>"_t('workshop','resume')"</dt>\n";
  76. $reca_generals.="<dd>".$workshop_resume."</dd>\n";
  77. $reca_generals.="<dt>"._t('workshop','theme')." :</dt>\n";
  78. if (IsSuperAdmin())
  79. $reca_generals.="<dd><a href=\"".$link_det_theme.$result[0]['workshop_theme']."\" title=\"".$theme_denomination."\">".$theme_denomination."</a></dd>\n";
  80. else $reca_generals.="<dd>".$theme_denomination."</dd>\n";
  81. $reca_generals.="<dt>"._t('workshop','level')." :</dt>\n";
  82. if (IsSuperAdmin(&& $result[0]['workshop_level'<> -1)
  83. $reca_generals.="<dd><a href=\"".$link_det_level.$result[0]['workshop_level']."\" title=\"".$level_denomination."\">".$level_denomination."</a></dd>\n";
  84.  
  85. else $reca_generals.="<dd>".$level_denomination."</dd>\n";
  86.  
  87. $reca_generals.="<dt>"._t('divers','date_crea'."</dt>\n";
  88. $reca_generals.="<dd>"$display_date_crea"</dd>\n";
  89. $reca_generals.="<dt>"._t('divers','last_modify'."</dt>\n";
  90. $reca_generals.="<dd>"$display_last_modify"</dd>\n";
  91. $reca_generals.="<dt>"._t('divers','statut')." :</dt>\n";
  92. $reca_generals.="<dd>"$workshop_statut"</dd>\n";
  93. $reca_generals.="<dt>"._t('workshop','comment')." :</dt>\n";
  94. $reca_generals.="<dd>"$workshop_comment"</dd>\n";
  95. $reca_generals.="<dt>"._t('workshop','organizer')." :</dt>\n";
  96. $reca_generals.="<dd>"$form_organizer"</dd>\n";
  97. $reca_generals.="</dl>\n";
  98.  
  99.  
  100. // Récuperation des différentes parties
  101.  
  102. //prepa affichage des utilisateurs du workgroup
  103.  
  104. if($result_user==false$contents_user="<div class=\"info\">"._t('workshop','no_user')."</div>";
  105. else {
  106.   $contents_user"<table cellspacing=\"0\" cellpadding=\"3\" class=\"table2\">\n";
  107.   $contents_user.="<thead>\n";
  108.   $contents_user.="<tr>\n";
  109.   $contents_user.="<td>"._t('workshop','user')."</td>\n";
  110.   $contents_user.="<td> <span class=\"semnone\">"._t('divers','actions')."</span></td>\n";
  111.   $contents_user.="</tr>\n";
  112.   $contents_user.="</thead>\n";
  113.   $contents_user.="<tbody>\n";
  114.   $mailing_list='';
  115.       
  116.       
  117.   for($i=0$i<count($result_user)$i++{
  118.         
  119.     $contents_user.="<tr>\n";
  120.     $contents_user.="<td>";
  121.     if (IsSuperAdmin())
  122.     $contents_user.="<a href=\"".$link_det_u.$result_user[$i]['jwu_user_id']."\" title=\"".formatText(_t('workshop','user')'2HTML')."\">".formatText($result_user[$i]['user_login']'2HTML')."</a>\n";
  123.     else
  124.     $contents_user.="<span>".formatText($result_user[$i]['user_login']'2HTML')."</span>";
  125.     if ($result_user[$i]['jwu_user_right']=='O' || $result_user[$i]['jwu_user_right']=='A')
  126.     $contents_user.="<span class=\"text_det_it\">(".display_statut($result_user[$i]['jwu_user_right']).")</span> ";
  127.     $contents_user.="</td>\n";
  128.     if (isWorkgroupOrganiser(GetSessionElement('id')$sql_object$id)==true || IsSuperAdmin()){
  129.       $contents_user.="<td><div class=\"iconetab\">";
  130.       if ($result_user[$i]['jwu_user_right']<>'O')
  131.       $contents_user.="<a href=\"".$link_sup_u.$id."&amp;u_id=".$result_user[$i]['jwu_user_id']."\" title=\""._t('workshop','del_user')."\" class=\"ico_sup\"></a>\n";
  132.       else if (IsSuperAdmin())
  133.       $contents_user.="<a href=\"".$link_sup_u.$id."&amp;u_id=".$result_user[$i]['jwu_user_id']."\" title=\""._t('workshop','del_user')."\" class=\"ico_sup\"></a>\n";
  134.       $contents_user.="<a href=\"mailto:".$result_user[$i]['profile_email']."\" title=\"".$result_user[$i]['profile_email']."\" class=\"ico_mail\"></a></div></td>";
  135.     }
  136.     else $contents_user.="<td>&nbsp;</td>\n";
  137.     $contents_user.="</tr>\n";
  138.     $mailing_list.=$result_user[$i]['profile_email'].MAIL_SEPARATOR."%20";
  139.   }
  140.   $contents_user.="</tbody>";
  141.   $contents_user.="</table>";
  142. }
  143.  
  144. $reca_user ="<br class=\"brendstep\" />\n";
  145. $reca_user.="<div class=\"workshop_det\">\n";
  146. $reca_user.="<a name=\"workshopuser\" id=\"workshopuser\" href=\"#workshopuser\" onclick=\"$('#workshop_user').slideToggle();\">"._t('workshop','user')."</a>\n";
  147. $reca_user.="</div>\n";
  148. $reca_user.="<div id=\"workshop_user\" style=\"display:none;\" >\n";
  149. if (isWorkgroupOrganiser (GetSessionElement('id')$sql_object$id)==true || IsSuperAdmin())
  150. $reca_user.="<a href=\"".$link_add_u.$id."\" title=\""._t('workshop','add_new_user')."\" class=\"ico_add2\"></a><br class=\"brendstep\" />";
  151. $reca_user.=$contents_user;
  152. if (isWorkgroupOrganiser (GetSessionElement('id')$sql_object$id)==true || IsSuperAdmin())
  153. $reca_user.="<div class=\"mailing_list\"><a href=\"mailto:".$mailing_list."\" title=\""._t('workshop','mailing_list')."\"> <img src=\"" .THEME_ADMIN_PATH"images/ico_mail2.gif\" alt=\""._t('workshop','mailing_list')."\" /> &nbsp;"._t('workshop','mailing_list')."</a></div>";
  154. $reca_user.="</div>\n";
  155. $reca_user.="<br class=\"brendstep\" />\n";
  156.  
  157. //prepa affichage des rapports d'un workgroup
  158.  
  159. $req_workshop_reportSQL_getWorkshopReportList($id);
  160. $result_report=$sql_object->DBSelect($req_workshop_report);
  161.  
  162. //$workshop_report_object= new workshop_report ;
  163.  
  164. $link_res_sup="?rub=resources&amp;todo=sup&amp;id=&amp;parent=".$id."&amp;type=P&amp;id=";
  165. $link_mod=$rub_link."&amp;todo=mod&amp;id=";
  166.  
  167. if($result_report==0{
  168.   $contents_report="<div class=\"info\">"._t('workshop','no_report')."</div>";
  169. else {
  170.   $contents_report"<table cellspacing=\"0\" cellpadding=\"3\" class=\"table2\">\n";
  171.   $contents_report.="<thead>\n";
  172.   $contents_report.="<tr>\n";
  173.   $contents_report.="<td>"._t('workshop','title_report')."</td>\n";
  174.   $contents_report.="<td>"._t('divers','statut')."</td>\n";
  175.   $contents_report.="<td>"._t('divers','date_crea')."</td>\n";
  176.   $contents_report.="<td> <span class=\"semnone\">"._t('divers','actions')."</span></td>\n";
  177.   $contents_report.="</tr>\n";
  178.   $contents_report.="</thead>\n";
  179.   $contents_report.="<tbody>\n";
  180.  
  181.   for($i=0$i<count($result_report)$i++{
  182.  
  183.     $workshop_report_title=formatText(cutText($result_report[$i]['workrep_title']601)'2HTML');
  184.  
  185.     $contents_report.="<tr>\n";
  186.     $contents_report.="<td width=\"50%\"><a href=\"".$link_det_rep.$result_report[$i]['workrep_id']."\" title=\"".$workshop_report_title."\">".$workshop_report_title."</a></td>\n";
  187.     $contents_report.="<td>".display_statut($result_report[$i]['workrep_statut'])."</td>\n";
  188.     $contents_report.="<td>".$result_report[$i]['workrep_date_crea_display']."</td>\n";
  189.     if (isWorkgroupOrganiser (GetSessionElement('id')$sql_object$id)==true || IsSuperAdmin()){
  190.       $contents_report.="<td><div class=\"iconetab\"><a href=\"".$link_sup_rep.$result_report[$i]['workrep_id']."\" title=\""._t('workshop','del_report')."\" class=\"ico_sup\"></a>\n";
  191.       $contents_report.="<a href=\"".$link_mod_rep.$result_report[$i]['workrep_id']."\" title=\""._t('workshop','mod_report')."\" class=\"ico_mod\"></a></div></td>";
  192.     }
  193.     else $contents_report.="<td>&nbsp;</td>\n";
  194.     $contents_report.="</tr>\n";
  195.   }
  196.  
  197.   $contents_report.="</tbody>";
  198.   $contents_report.="</table>";
  199. }
  200.     
  201. $reca_report='';
  202. $reca_report.="<div class=\"workshop_det\">\n";
  203. $reca_report.="<a name=\"resreport\" id=\"resreport\" href=\"#resreport\" onclick=\"$('#res_report').slideToggle();\">"._t('workshop','report')."</a>\n";
  204. $reca_report.="</div>\n";
  205. $reca_report.="<div id=\"res_report\" style=\"display:none;\" >\n";
  206. if (isWorkgroupOrganiser (GetSessionElement('id')$sql_object$id)==true || IsSuperAdmin())
  207. $reca_report.="<a href=\"".$link_add_rep.$id."\" title=\""._t('workshop','add_new_report')."\" class=\"ico_add2\"></a><br class=\"brendstep\" />";
  208. $reca_report.=$contents_report;
  209. $reca_report.="</div>\n";
  210. $reca_report.="<br class=\"brendstep\" />\n";
  211.  
  212. $navtitle=_t('workshop','det')." : ".$workshop_denomination;
  213. ?>
  214. <div id="chemin">
  215. <ul>
  216.     <li><a href="index.php" class="chemin_home"><?php echo _t('way','home')?></a>
  217.     </li>
  218.     <li><a href="<?php echo $rub_link?>" id="chemin_<?php echo $rub?>"
  219.         class="chemin_rub"><?php echo _t('menu','workshop');?></a></li>
  220.     <li><span><?php echo formatnavTitle($navtitle)?></span></li>
  221. </ul>
  222. </div>
  223. <!--end barre haute -->
  224. <?php
  225. include_once(THEME_ADMIN_PATH."quickicons.php");
  226. ?>
  227. <div class="contentcontainer"><?php
  228. include_once($dir."/menurub.php");
  229. ?>
  230. <div id="content"><?php    
  231. afflinkbar($todo,$id$lang);
  232. echo "<h2>".formatTitleh2($workshop_denomination)."</h2>\n";
  233. if (IsSuperAdmin()){
  234.   echo "<a href=\"".$link_sup.$id."\" title=\""._t('workshop','sup')."\" class=\"ico_sup2\"></a>";
  235.   echo "<a href=\"".$link_mod.$id."\" title=\""._t('workshop','mod')."\" class=\"ico_mod2\"></a><br class=\"brendstep\" />";
  236. }
  237. echo $reca_generals;
  238. echo $reca_user;
  239. echo $reca_report;
  240. ?></div>
  241.  
  242. <?php
  243. // Ability to drag'n drop items
  244. footerAddJS('../lib/js/jquery.tablednd_0_5.js');
  245. ?>
  246.  
  247. <?php include_once($dir."/help.php")?></div>

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