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 workshoprep
  5.  * @author linea21 <info@linea21.com>
  6.  * @version $id SVN
  7.  * @access public
  8.  * @license http://opensource.org/licenses/gpl-3.0.html
  9.  *  'Workshoprep' (as Workshop Report) module is used by 'Workshop' modules
  10.  */
  11.  
  12. //////////// Check Inclusion de pages ////////////
  13. if (!function_exists('AuthenthificationProcess')) {
  14.   include_once("../lib/lib_common.php");
  15.   ReloadIndex('admin');
  16. }
  17. ////////////
  18.  
  19. //////////// Check Droits utilisateur ////////////
  20. if (!hasRight('workshop')) ReloadIndex('admin');
  21. ////////////
  22.  
  23. if(isset($_POST['id']))    $id=$_POST['id'];
  24. if(isset($_GET['id']))    $id=$_GET['id'];
  25.  
  26. $result=$sql_object->DBSelect($req_det);
  27. if(count($result)>1exit();
  28.  
  29. $workrep_title=formatText($result[0]['workrep_title']'2HTML');
  30. $workrep_resume=formatText($result[0]['workrep_resume']'2HTML');
  31. $workrep_comment=formatText(empty_none($result[0]['workrep_comment'])'2HTML');
  32. $workrep_statut=display_statut($result[0]['workrep_statut']);
  33. $display_date_crea=$result[0]['workrep_date_crea_display'];
  34. $display_last_modify=$result[0]['workrep_last_modify_display'];
  35. if($result[0]['workrep_published_date_display']=='01-01-0001'$display_published_date=_t('workshoprep','not_published');
  36. else $display_published_date=$result[0]['workrep_published_date_display'];
  37. $workrep_workshop_name=formatText($result[0]['workshop_denomination']'2HTML');
  38. $workshop_title=' ('.$workrep_workshop_name.')';
  39. $work_id=$result[0]['workrep_workshop_id'];
  40.  
  41. $link_sup=$rub_link."&amp;todo=sup&amp;id=";
  42. $link_mod=$rub_link."&amp;todo=mod&amp;id=";
  43.  
  44. // formattage des données
  45. include_once('../class/class.resources.php');
  46. $resources_object new resources;
  47.  
  48.  
  49. //prepa affichage des infos générales
  50. $reca_generals="<dl class=\"dl3\">\n";
  51. $reca_generals.="<dt  class=\"dl_intitule\">"._t('workshoprep','generals')." : </dt>\n";
  52. $reca_generals.="<dd>&nbsp;<br /></dd>\n";
  53. $reca_generals.="<dt>"._t('workshoprep','title')."</dt>\n";
  54. $reca_generals.="<dd>"$workrep_title."</dd>\n";
  55. $reca_generals.="<dt>"_t('workshoprep','resume')"</dt>\n";
  56. $reca_generals.="<dd>".$workrep_resume."</dd>\n";
  57. $reca_generals.="<dt>"_t('workshoprep','workshop_product')"</dt>\n";
  58. $reca_generals.="<dd>".$workrep_workshop_name."</dd>\n";
  59. $reca_generals.="<dt>"._t('workshoprep','published_on'."</dt>\n";
  60. $reca_generals.="<dd>".$display_published_date"</dd>\n";
  61. $reca_generals.="<dt>"._t('divers','date_crea'."</dt>\n";
  62. $reca_generals.="<dd>"$display_date_crea"</dd>\n";
  63. $reca_generals.="<dt>"._t('divers','last_modify'."</dt>\n";
  64. $reca_generals.="<dd>"$display_last_modify"</dd>\n";
  65. $reca_generals.="<dt>"._t('divers','statut')." :</dt>\n";
  66. $reca_generals.="<dd>"$workrep_statut"</dd>\n";
  67. $reca_generals.="<dt>"._t('workshoprep','comment')." :</dt>\n";
  68. $reca_generals.="<dd>"$workrep_comment"</dd>\n";
  69. $reca_generals.="</dl>\n";
  70.  
  71.  
  72. //prepa affichage des différentes parties du dossier
  73. $part_link_add="?rub=contents&amp;todo=add&amp;parent=".$id."&amp;type=W";
  74. $part_link_sup="?rub=contents&amp;todo=sup&amp;parent=".$id."&amp;type=W&amp;id=";
  75. $part_link_mod="?rub=contents&amp;todo=mod&amp;parent=".$id."&amp;type=W&amp;id=";
  76. $part_link_det="?rub=contents&amp;todo=det&amp;parent=".$id."&amp;type=W&amp;id=";
  77. $req_parts=SQL_getWorkshopParts($id);
  78. $result=$sql_object->DBSelect($req_parts);
  79. if($result==0$contents_parts="<div class=\"info\">"._t('workshoprep','no_part')."</div>";
  80. else {
  81.   
  82.   $contents_parts ="<table cellspacing=\"0\" cellpadding=\"3\" class=\"sortable\" id=\"sort-part\">\n";
  83.   $contents_parts.="<tbody>\n";
  84.   
  85.   for($i=0$i<count($result)$i++{
  86.     
  87.     $contents_parts.="<tr id=\"part-".$result[$i]['workrepcon_id']."\">\n";
  88.     $contents_parts.="<td><a href=\"".$part_link_det.$result[$i]['workrepcon_id']."\" title=\"Détails du thème\">".formatText($result[$i]['workrepcon_title']'2HTML')."</a></td>\n";
  89.     $contents_parts.="<td style=\"width:50px\">\n";
  90.     if(AuthUser4Workshop($work_id$sql_object|| IsSuperAdmin()) {
  91.       $contents_parts.="<div class=\"iconetab\">\n";
  92.       $contents_parts.="\t<a href=\"".$part_link_sup.$result[$i]['workrepcon_id']."\" class=\"ico_sup\" title=\""._t('workshoprep','del_part')."\"></a>\n";
  93.       $contents_parts.="\t<a href=\"".$part_link_mod.$result[$i]['workrepcon_id']."\" class=\"ico_mod\" title=\""._t('workshoprep','mod_part')."\"></a>\n";
  94.       $contents_parts.="</div>\n";
  95.     }
  96.     $contents_parts.="</td>\n";
  97.     $contents_parts.="</tr>\n";
  98.   }
  99.   $contents_parts.="</tbody>\n";
  100.   $contents_parts.="</table>\n";
  101. }
  102.  
  103. $reca_parts ="<br class=\"brendstep\" />\n";
  104. $reca_parts.="<div class=\"publi_det\">\n";
  105. $reca_parts.="<a name=\"publipart\" id=\"publipart\" href=\"#publipart\" onclick=\"$('#publi_part').slideToggle();\">"._t('workshoprep','parts')."</a>\n";
  106. $reca_parts.="</div>\n";
  107. $reca_parts.="<div id=\"publi_part\" style=\"display:none;\" >\n";
  108. if(AuthUser4Workshop($work_id$sql_object|| IsSuperAdmin()) {
  109.   $reca_parts.="\t<a href=\"".$part_link_add."\" class=\"ico_add2\" title=\""._t('workshoprep','add_new_part')."\"></a><br class=\"brendstep\" />\n";
  110. }
  111. $reca_parts.=$contents_parts;
  112. $reca_parts.="</div>\n";
  113.  
  114. $reca_parts.="<br class=\"brendstep\" />\n";
  115.  
  116. //prepa affichage des ressources LINK associées
  117. $link_res_add="?rub=resources&amp;todo=add_l&amp;parent=".$id."&amp;type=W";
  118. $link_res_sup="?rub=resources&amp;todo=sup&amp;parent=".$id."&amp;type=W&amp;res=link&amp;id=";
  119. $link_res_mod="?rub=resources&amp;todo=mod_l&amp;parent=".$id."&amp;type=W&amp;res=link&amp;id=";
  120. $result=SQL_GetResources($id'WORKSHOP''LINK'$sql_object);
  121. if($result==0{
  122.   $contents_link="<div class=\"info\">"._t('workshoprep','no_link')."</div>";
  123. else {
  124.   $contents_link ="<table cellspacing=\"0\" cellpadding=\"3\" class=\"sortable\" id=\"sort-link\">\n";
  125.   $contents_link.="<tbody>\n";
  126.   
  127.   for($i=0$i<count($result)$i++{
  128.     $contents_link.="<tr id=\"link-".$result[$i]['linkres_id']."\">\n";
  129.     $contents_link.="<td><a href=\"".$result[$i]['linkres_text']."\" class=\"out\">".formatText($result[$i]['linkres_mask']'2HTML')."</a></td>\n";
  130.     $contents_link.="<td style=\"width:50px\">\n";
  131.     if(AuthUser4Workshop($work_id$sql_object|| IsSuperAdmin()) {
  132.       $contents_link.="<div class=\"iconetab\">\n";
  133.       $contents_link.="\t<a href=\"".$link_res_sup.$result[$i]['linkres_id']."\" class=\"ico_sup\" title=\""._t('workshoprep','del_link')."\"></a>\n";
  134.       $contents_link.="\t<a href=\"".$link_res_mod.$result[$i]['linkres_id']."\" class=\"ico_mod\" title=\""._t('workshoprep','mod_link')."\"></a>\n";
  135.       $contents_link.="</div>\n";
  136.     }
  137.     $contents_link.="</td>\n";
  138.     $contents_link.="</tr>\n";
  139.   }
  140.   $contents_link.="</tbody>\n";
  141.   $contents_link.="</table>\n";
  142. }
  143. $reca_link='';
  144. $reca_link.="<div class=\"publi_det\">\n";
  145. $reca_link.="<a name=\"reslink\" id=\"reslink\" href=\"#reslink\" onclick=\"$('#res_link').slideToggle();\">"._t('workshoprep','link_res')."</a>\n";
  146. $reca_link.="</div>\n";
  147. $reca_link.="<div id=\"res_link\" style=\"display:none;\" >\n";
  148. if(AuthUser4Workshop($work_id$sql_object|| IsSuperAdmin()) {
  149.   $reca_link.="\t<a href=\"".$link_res_add."\" class=\"ico_add2\" title=\""._t('workshoprep','add_new_linkres')."\"></a><br class=\"brendstep\" />\n";
  150. }
  151. $reca_link.=$contents_link;
  152. $reca_link.="</div>\n";
  153. $reca_link.="<br class=\"brendstep\" />\n";
  154.  
  155.  
  156.  
  157. //prepa affichage des ressources biblio associés
  158. $biblio_res_add="?rub=resources&amp;todo=add_b&amp;parent=".$id."&amp;type=W";
  159. $biblio_res_sup="?rub=resources&amp;todo=sup&amp;parent=".$id."&amp;type=W&amp;res=biblio&amp;id=";
  160. $biblio_res_mod="?rub=resources&amp;todo=mod_b&amp;parent=".$id."&amp;type=W&amp;id=";
  161. $result=SQL_GetResources($id'WORKSHOP''BIBLIO'$sql_object);
  162. if($result==0{
  163.   $contents_biblio="<div class=\"info\">"._t('workshoprep','no_biblio')."</div>";
  164. else {
  165.   $contents_biblio ="<table cellspacing=\"0\" cellpadding=\"3\" class=\"sortable\" id=\"sort-biblio\">\n";
  166.   $contents_biblio.="<tbody>\n";
  167.   
  168.   for($i=0$i<count($result)$i++{
  169.     if(!empty($result[$i]['bibliores_sub_title'])) $subtitle=formatText($result[$i]['bibliores_sub_title']'2HTML').'. ';
  170.     else $subtitle='';
  171.     if(!empty($result[$i]['bibliores_editor'])) $editor=formatText($result[$i]['bibliores_editor']'2HTML').'. ';
  172.     else $editor='';
  173.     if(!empty($result[$i]['bibliores_date'])) $biblio_date=formatText($result[$i]['bibliores_date']'2HTML');
  174.     else $biblio_date='';
  175.     
  176.     $contents_biblio.="<tr id=\"biblio-".$result[$i]['bibliores_id']."\">\n";
  177.     $contents_biblio.="<td>\n";
  178.     $contents_biblio.="<span class=\"text_det\">".formatText($result[$i]['bibliores_author']'2HTML')." - </span><span class=\"text_det_it\">".formatText($result[$i]['bibliores_title']'2HTML').",</span>\n";
  179.     $contents_biblio.="<p class=\"text_det\">".$subtitle.$editor.$biblio_date."</p>\n";
  180.     $contents_biblio.="</td>\n";
  181.     $contents_biblio.="<td style=\"width:50px\">\n";
  182.     
  183.     if(AuthUser4Workshop($work_id$sql_object|| IsSuperAdmin()) {
  184.       $contents_biblio.="<div class=\"iconetab\">\n";
  185.       $contents_biblio.="\t<a href=\"".$biblio_res_sup.$result[$i]['bibliores_id']."\" class=\"ico_sup\" title=\""._t('workshoprep','del_biblio')."\"></a>\n";
  186.       $contents_biblio.="\t<a href=\"".$biblio_res_mod.$result[$i]['bibliores_id']."\" class=\"ico_mod\" title=\""._t('workshoprep','mod_biblio')."\"></a>\n";
  187.       $contents_biblio.="</div>\n";
  188.     }
  189.     $contents_biblio.="</td>\n";
  190.     $contents_biblio.="</tr>\n";
  191.   }
  192.   $contents_biblio.="</tbody>\n";
  193.   $contents_biblio.="</table>\n";
  194. }
  195. $reca_biblio='';
  196. $reca_biblio.="<div class=\"publi_det\">\n";
  197. $reca_biblio.="<a name=\"resmulti\" id=\"resmulti\" href=\"#resmulti\" onclick=\"$('#res_biblio').slideToggle();\">"._t('workshoprep','biblio_res')."</a>\n";
  198. $reca_biblio.="</div>\n";
  199. $reca_biblio.="<div id=\"res_biblio\" style=\"display:none;\" >\n";
  200. if(AuthUser4Workshop($work_id$sql_object|| IsSuperAdmin()) {
  201.   $reca_biblio.="\t<a href=\"".$biblio_res_add."\" class=\"ico_add2\" title=\""._t('workshoprep','add_new_bibliores')."\"></a><br class=\"brendstep\" />\n";
  202. }
  203. $reca_biblio.=$contents_biblio;
  204. $reca_biblio.="</div>\n";
  205. $reca_biblio.="<br class=\"brendstep\" />\n";
  206. $rub_link="index.php?rub=workshop";
  207. ?>
  208. <div id="chemin">
  209. <ul>
  210.     <li><a href="index.php" class="chemin_home"><?php echo _t('way','home')?></a>
  211.     </li>
  212.     <li><a href="<?php echo $rub_link?>" id="chemin_<?php echo $rub?>"
  213.         class="chemin_rub"><?php echo _t('menu','workshop')?></a></li>
  214.     <li><span><?php echo formatnavTitle(_t('workshoprep','det')" : " .$workrep_title.$workshop_title)?></span>
  215.     </li>
  216. </ul>
  217. </div>
  218. <!--end barre haute -->
  219. <?php
  220. include_once(THEME_ADMIN_PATH."quickicons.php");
  221. ?>
  222. <div class="contentcontainer"><?php
  223. include_once($dir."/menurub.php");
  224. ?>
  225. <div id="content"><?php
  226. echo "<h2>".formatTitleh2($workrep_title.$workshop_title)."</h2>\n";
  227. if(AuthUser4Workshop($work_id$sql_object|| IsSuperAdmin()) {
  228.   echo "\t<a href=\"".$link_sup.$id."\" class=\"ico_sup2\" title=\""._t('workshoprep','sup')."\"></a>\n";
  229.   echo "\t<a href=\"".$link_mod.$id."\" class=\"ico_mod2\" title=\""._t('workshoprep','mod')."\"></a>\n";
  230. }
  231. echo $reca_generals;
  232. echo $reca_parts;
  233. echo $reca_link;
  234. echo $reca_biblio;
  235. ?></div>
  236.  
  237. <?php
  238. // Ability to drag'n drop items
  239. footerAddJS('../lib/js/jquery.tablednd_0_5.js');
  240. ?>
  241.  
  242. <?php include_once($dir."/help.php")?></div>

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