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 content
  5.  * @author linea21 <info@linea21.com>
  6.  * @version $id SVN
  7.  * @access public
  8.  * @license http://opensource.org/licenses/gpl-3.0.html
  9.  *  'Content' module is used by 'Publication' and '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. if(isset($_POST['id']))    $id=$_POST['id'];
  20. if(isset($_GET['id']))    $id=$_GET['id'];
  21.  
  22. $contents_object new contents;
  23.  
  24. if($type=='P'{
  25.   $requeteSQL_getPublicationTitle($parent);
  26.   $result=$sql_object->DBSelect($requete);
  27.   $current_title=FormatText($result[0]['publi_title']'2HTML');
  28.   $current_owner=$result[0]['publi_posted_by'];
  29.  
  30.   //////////// Check Droits utilisateur ////////////
  31.   if (!hasRight('publication')) ReloadIndex('admin');
  32.   ///////////
  33.  
  34.   $requeteSQL_getOnePublicationParts($id);
  35.   $result=$sql_object->DBSelect($requete);
  36.   $display_title=formatText($result[0]['publicon_title']'2HTML');
  37.   $display_body=linkin_content(formatText($result[0]['publicon_body'],'2HTML'));
  38.   $display_date_crea=$result[0]['publicon_date_crea_display'];
  39.   $display_last_modify=$result[0]['publicon_last_modify_display'];
  40.  
  41. }
  42.  
  43. if($type=='W'{
  44.   $requeteSQL_getWorkshopRepTitleAndGroup($parent);
  45.   $result=$sql_object->DBSelect($requete);
  46.   $current_title=FormatText($result[0]['workrep_title']).' ('.FormatText($result[0]['workshop_denomination']).')';
  47.   $current_workshop_id=$result[0]['workrep_workshop_id'];
  48.  
  49.   //////////// Check Droits utilisateur ////////////
  50.   if (!hasRight('workshop')) ReloadIndex('admin');
  51.   ///////////
  52.  
  53.   $requeteSQL_getOneWorkshopParts($id);
  54.   $result=$sql_object->DBSelect($requete);
  55.   $display_title=formatText($result[0]['workrepcon_title']'2HTML');
  56.   $display_body=formatText($result[0]['workrepcon_body']'2HTML');
  57.   $display_date_crea=$result[0]['workrepcon_date_crea_display'];
  58.   $display_last_modify=$result[0]['workrepcon_last_modify_display'];
  59. }
  60.  
  61. $link_sup="?rub=contents&amp;todo=sup&amp;parent=".$parent."&amp;type=".$type."&amp;id=";
  62. $link_mod="?rub=contents&amp;todo=mod&amp;parent=".$parent."&amp;type=".$type."&amp;id=";
  63.  
  64. ?>
  65.  
  66. <div id="chemin">
  67. <ul>
  68.     <li><a href="index.php" class="chemin_home"><?php echo _t('way','home')?></a>
  69.     </li>
  70.     <li><a href="<?php echo $rub_link?>" id="chemin_<?php echo $rub?>"
  71.         class="chemin_rub"><?php echo _t('menu',$mod_inc)?></a></li>
  72.     <li><span><?php echo formatNavTitle(_t('contents',$mod_inc.'_type')." : "$current_title)?></span>
  73.     </li>
  74. </ul>
  75. </div>
  76. <!--end barre haute -->
  77. <?php
  78. include_once(THEME_ADMIN_PATH."quickicons.php");
  79. ?>
  80.  
  81.  
  82. <div class="contentcontainer"><?php
  83. include_once($dir."/menurub.php");
  84. ?>
  85. <div id="content"><?php
  86. echo "<h2>";
  87. echo formatTitleh2($current_title);;
  88. echo "</h2>\n";
  89. if (($type=='W' && AuthUser4Workshop($current_workshop_id$sql_object)) || ($type=='P' && GetSessionElement('id')==$current_owner|| IsSuperAdmin()) {
  90.   echo "\t<a href=\"".$link_sup.$id."\" class=\"ico_sup2\" title=\""._t('contents','sup')."\"></a>\n";
  91.   echo "\t<a href=\"".$link_mod.$id."\" class=\"ico_mod2\" title=\""._t('contents','mod')."\"></a>\n";
  92. }
  93. echo "<dl class=\"dl3\">\n";
  94. echo "<dt>"._t('contents','title')."</dt>\n";
  95. echo "<dd>"$display_title."</dd>\n";
  96. echo "<dt>"_t('contents','body')"</dt>\n";
  97. echo "<dd>".$display_body."</dd>\n";
  98. echo "<dt>"._t('divers','date_crea'." :</dt>\n";
  99. echo "<dd>"$display_date_crea"</dd>\n";
  100. echo "<dt>"._t('divers','last_modify'." :</dt>\n";
  101. echo "<dd>"$display_last_modify"</dd>\n";
  102. echo "</dl>\n";
  103. ?></div>
  104. <?php include_once($dir."/help.php")?></div>

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