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 (!HaveRight('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_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>"._t('contents','visu1').": </dt>\n";
  43.   if(empty($result[0]['publicon_photos_uri'])) {
  44.     $reca_visual.="<dd>"._t('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.   $requeteSQL_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.   $requeteSQL_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><a href="index.php" class="chemin_home"><?php echo _t('way','home')?></a>
  76.     </li>
  77.     <li><a href="<?php echo $rub_link?>" id="chemin_<?php echo $rub?>"
  78.         class="chemin_rub"><?php echo _t('menu',$mod_inc)?></a></li>
  79.     <li><span><?php echo formatNavTitle(_t('contents',$mod_inc.'_type')." : "$current_title)?></span>
  80.     </li>
  81. </ul>
  82. </div>
  83. <!--end barre haute -->
  84. <?php
  85. include_once(THEME_ADMIN_PATH."quickicons.php");
  86. ?>
  87.  
  88.  
  89. <div class="contentcontainer"><?php
  90. include_once($dir."/menurub.php");
  91. ?>
  92. <div id="content"><?php
  93. echo "<h2>";
  94. echo formatTitleh2($current_title);;
  95. echo "</h2>\n";
  96. if (($type=='W' && AuthUser4Workshop($current_workshop_id$sql_object)) || ($type=='P' && GetSessionElement('id')==$current_owner|| IsSuperAdmin()) {
  97.   echo "\t<a href=\"".$link_sup.$id."\" class=\"ico_sup2\" title=\""._t('contents','sup')."\"></a>\n";
  98.   echo "\t<a href=\"".$link_mod.$id."\" class=\"ico_mod2\" title=\""._t('contents','mod')."\"></a>\n";
  99. }
  100. echo "<dl class=\"dl3\">\n";
  101. echo "<dt>"._t('contents','title')."</dt>\n";
  102. echo "<dd>"$display_title."</dd>\n";
  103. echo "<dt>"_t('contents','body')"</dt>\n";
  104. echo "<dd>".$display_body."</dd>\n";
  105. if($type=='P'{
  106.   echo "<dt>"._t('contents','template')." :</dt>\n";
  107.   echo "<dd>".$display_template."</dd>\n";
  108.   echo $reca_visual;
  109. }
  110. echo "<dt>"._t('divers','date_crea'." :</dt>\n";
  111. echo "<dd>"$display_date_crea"</dd>\n";
  112. echo "<dt>"._t('divers','last_modify'." :</dt>\n";
  113. echo "<dd>"$display_last_modify"</dd>\n";
  114. echo "</dl>\n";
  115. ?></div>
  116. <?php include_once($dir."/help.php")?></div>

Documentation generated on Fri, 01 Apr 2011 09:30:03 +0200 by phpDocumentor 1.4.1