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.     $requete= SQL_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 (!HaveRight('publication')) ReloadIndex('admin');
  32.     ///////////
  33.     
  34.     $requete= SQL_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_template=$contents_object->GetTemplateName($result[0]['publicon_template']);
  39.     $display_date_crea=$result[0]['publicon_date_crea_display'];
  40.     $display_last_modify=$result[0]['publicon_last_modify_display'];
  41.     
  42.     $reca_visual="<dt>".$GLOBALS['lang']['contents']['visu1'].": </dt>\n";
  43.     if(empty($result[0]['publicon_photos_uri'])) {
  44.         $reca_visual.="<dd>".$GLOBALS['lang']['divers']['none']."</dd>\n";
  45.     } else {
  46.         $complete_uri='../'.$result[0]['publicon_photos_uri'];
  47.         $reca_visual.="<dd>".EnlargeImage($complete_uri)."</dd>\n";
  48.     }
  49.     }
  50. if($type=='W') {
  51.     $requete= SQL_getWorkshopRepTitleAndGroup($parent);
  52.     $result=$sql_object->DBSelect($requete);
  53.     $current_title=FormatText($result[0]['workrep_title']).' ('.FormatText($result[0]['workshop_denomination']).')';
  54.     $current_workshop_id=$result[0]['workrep_workshop_id'];
  55.     
  56.     //////////// Check Droits utilisateur ////////////
  57.     if (!HaveRight('workshop')) ReloadIndex('admin');
  58.     ///////////
  59.     
  60.     $requete= SQL_getOneWorkshopParts($id);
  61.     $result=$sql_object->DBSelect($requete);
  62.     $display_title=formatText($result[0]['workrepcon_title'], '2HTML');
  63.     $display_body=formatText($result[0]['workrepcon_body'], '2HTML');
  64.     $display_date_crea=$result[0]['workrepcon_date_crea_display'];
  65.     $display_last_modify=$result[0]['workrepcon_last_modify_display'];
  66. }
  67.  
  68. $link_sup="?rub=contents&amp;todo=sup&amp;parent=".$parent."&amp;type=".$type."&amp;id=";
  69. $link_mod="?rub=contents&amp;todo=mod&amp;parent=".$parent."&amp;type=".$type."&amp;id=";
  70.  
  71. ?>
  72.  
  73. <div id="chemin">
  74.     <ul>
  75.         <li>
  76.             <a href="index.php"><? echo $GLOBALS['lang']['way']['home']; ?></a>
  77.         </li>
  78.         <li>
  79.             <a href="<?php echo $rub_link; ?>"><? echo $GLOBALS['lang']['menu'][$mod_inc]; ?></a>
  80.         </li>
  81.         <li>
  82.             <span><? echo formatNavTitle($GLOBALS['lang']['contents'][$mod_inc.'_type']." : ". $current_title); ?></span>
  83.         </li>
  84.     </ul>
  85. </div>
  86. <!--end barre haute -->
  87. <?php
  88. include_once("quickicons.php");
  89. ?>
  90.  
  91.  
  92. <div class="contentcontainer">
  93.         <?php
  94.         include_once($dir."/menurub.php");
  95.         ?>
  96.         <div id="content">
  97.         <?php
  98.         echo "<h2>";
  99.         echo formatTitleh2($current_title);;
  100.         echo "</h2>\n";
  101.         if (($type=='W' && AuthUser4Workshop($current_workshop_id, $sql_object)) || ($type=='P' && GetSessionElement('id')==$current_owner) || IsSuperAdmin()) {
  102.             echo "\t<a href=\"".$link_sup.$id."\" class=\"ico_sup2\" title=\"".$GLOBALS['lang']['contents']['sup']."\"></a>\n";
  103.             echo "\t<a href=\"".$link_mod.$id."\" class=\"ico_mod2\" title=\"".$GLOBALS['lang']['contents']['mod']."\"></a>\n";
  104.         }
  105.         echo "<dl class=\"dl3\">\n";
  106.         echo "<dt>".$GLOBALS['lang']['contents']['title']."</dt>\n";
  107.         echo "<dd>". $display_title."</dd>\n";
  108.         echo "<dt>". $GLOBALS['lang']['contents']['body']. "</dt>\n";
  109.         echo "<dd>".$display_body."</dd>\n";
  110.         if($type=='P') {
  111.             echo "<dt>".$GLOBALS['lang']['contents']['template']." :</dt>\n";
  112.             echo "<dd>".$display_template."</dd>\n";
  113.             echo $reca_visual;
  114.         }
  115.         echo "<dt>".$GLOBALS['lang']['divers']['date_crea'] ." :</dt>\n";
  116.         echo "<dd>". $display_date_crea. "</dd>\n";
  117.         echo "<dt>".$GLOBALS['lang']['divers']['last_modify'] ." :</dt>\n";
  118.         echo "<dd>". $display_last_modify. "</dd>\n";
  119.         echo "</dl>\n";
  120.         ?>
  121.  
  122. </div>
  123. <?php include_once($dir."/help.php"); ?>
  124. </div>

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