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

Documentation generated on Fri, 16 Oct 2009 09:31:22 +0200 by phpDocumentor 1.4.1