linea21-modules
[ class tree: linea21-modules ] [ index: linea21-modules ] [ all elements ]

Source for file sup.php

Documentation is available at sup.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. include_once("../lib/lib_common.php");
  19. $complete_type=strtoupper($mod_inc);
  20.  
  21. if(isset($_POST['id']))    $id=$_POST['id'];
  22. if(isset($_GET['id']))    $id=$_GET['id'];
  23.  
  24. if(isset($_POST['valider'])) {
  25.     $contents_object new contents;
  26.     $result=$contents_object->DeleteContents($id$complete_type,$sql_object);
  27.  
  28.     $link_confirm="confirm.php?rub=".$rub."&todo=".$todo."&type=".$type."&id=".$parent;
  29.     if($resultheader("Location: ".$link_confirm);
  30.     else  system_error();
  31. }
  32.  
  33. if($type=='P'{
  34.     $requeteSQL_getPublicationTitle($parent);
  35.     $result=$sql_object->DBSelect($requete);
  36.     $current_title=FormatText($result[0]['publi_title']);
  37.     $current_owner=$result[0]['publi_posted_by'];
  38.     
  39.     //////////// Check Droits utilisateur ////////////
  40.     if (!HaveRight('publication')) ReloadIndex('admin');
  41.     if (GetSessionElement('id')!=$current_owner && !IsSuperAdmin()) ReloadIndex('admin');
  42.     ///////////
  43.     
  44.     $requeteSQL_getOnePublicationParts($id);
  45.     $result=$sql_object->DBSelect($requete);
  46.     $current_part=FormatText($result[0]['publicon_title']'2HTML');
  47. }
  48. if($type=='W'{
  49.     $requeteSQL_getWorkshopRepTitleAndGroup($parent);
  50.     $result=$sql_object->DBSelect($requete);
  51.     $current_title=FormatText($result[0]['workrep_title']).' ('.FormatText($result[0]['workshop_denomination']).')';
  52.     $current_workshop_id=$result[0]['workrep_workshop_id'];
  53.     
  54.     //////////// Check Droits utilisateur ////////////
  55.     if (!HaveRight('workshop')) ReloadIndex('admin');
  56.     if (!AuthUser4Workshop($current_workshop_id$sql_object&& !IsSuperAdmin()) ReloadIndex('admin');
  57.     ///////////
  58.     
  59.     $requeteSQL_getOneWorkshopParts($id);
  60.     $result=$sql_object->DBSelect($requete);
  61.     $current_part=FormatText($result[0]['workrepcon_title']'2HTML');
  62. }
  63. ?>
  64. <div id="chemin">
  65.     <ul>
  66.         <li>
  67.             <a href="index.php" class="chemin_home"><? echo _t('way','home')?></a>
  68.         </li>
  69.         <li>
  70.                <a href="<?php echo $rub_link?>" id="chemin_<? echo $rub?>" class="chemin_rub"><? echo _t('menu',$mod_inc)?></a>
  71.         </li>
  72.         <li>
  73.             <span><? echo formatNavTitle(_t('contents',$mod_inc.'_type')." : "$current_title)?></span>
  74.         </li>
  75.     </ul>
  76. </div>
  77. <!--end barre haute -->
  78. <?php
  79. include_once(THEME_ADMIN_PATH."quickicons.php");
  80. ?>
  81. <div class="contentcontainer">
  82. <?php
  83. include_once($dir."/menurub.php");
  84. ?>
  85. <div id="content">
  86. <? echo "<h2>"formatTitleh2($current_title)."</h2>"?>
  87. <form id="suptheme" action="<?php echo $_SERVER['SCRIPT_NAME']?>" method="post">
  88. <p class="info">
  89. <?php 
  90. echo _t('contents','supp_info')."'".$current_part."'\n";
  91. ?>
  92. </p>
  93. <p><?php echo _t('divers','sup_confirm')?></p>
  94. <div>
  95. <input name="id" type="hidden" value="<?php echo $id?>" />
  96. <input name="rub" type="hidden" value="<?php echo $rub?>" id="rub" />
  97. <input name="todo" type="hidden" value="<?php echo $todo?>" id="todo" />
  98. <input name="type" type="hidden" value="<?php echo $type?>" id="type" />
  99. <input name="parent" type="hidden" value="<?php echo $parent?>" id="parent" />
  100. <?php echo cancel_button($cancel_link)?>
  101. <input name="valider" type="submit" value="<? echo _t('btn','valid'?>" class="button" id="valider" />
  102. </div>
  103. </form>
  104. </div>
  105. <?php include_once($dir."/help.php")?>
  106. </div>

Documentation generated on Fri, 16 Oct 2009 09:39:24 +0200 by phpDocumentor 1.4.1