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 resources
  5.  * @author linea21 <info@linea21.com>
  6.  * @version $id SVN
  7.  * @access public
  8.  * @license http://opensource.org/licenses/gpl-3.0.html
  9.  *  'Resource' 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.  
  20. if(isset($_POST['id']))    $id=$_POST['id'];
  21. if(isset($_GET['id']))    $id=$_GET['id'];
  22.  
  23. if(isset($_POST['valider'])) {
  24.     $resources_object new resources;
  25.     if($res=='biblio'$result=$resources_object->DeleteBiblioRes($id$sql_object);
  26.     if($res=='multi'$result=$resources_object->DeleteMultiRes($id$sql_object);
  27.     if($res=='link'$result=$resources_object->DeleteLinkRes($id$sql_object);
  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']'2HTML');
  37.     $publi_owner=$result[0]['publi_posted_by'];
  38.     
  39.     //////////// Check Droits utilisateur ////////////
  40.     if (!HaveRight('publication')) ReloadIndex('admin');
  41.     if (GetSessionElement('id')!=$publi_owner && !IsSuperAdmin()) ReloadIndex('admin');
  42.     ///////////
  43.     
  44.  
  45. }
  46. if($type=='W'{
  47.     $requeteSQL_getWorkshopRepTitleAndGroup($parent);
  48.     $result=$sql_object->DBSelect($requete);
  49.     $current_title=FormatText($result[0]['workrep_title'].' ('.$result[0]['workshop_denomination'].')''2HTML');
  50.     $workshop_id=$result[0]['workrep_workshop_id'];
  51.     
  52.     //////////// Check Droits utilisateur ////////////
  53.     if (!HaveRight('workshop')) ReloadIndex('admin');
  54.     if (!AuthUser4Workshop($workshop_id$sql_object&& !IsSuperAdmin()) ReloadIndex('admin');
  55.     ///////////
  56.     
  57. }
  58.  
  59. if($res=='link'{
  60.     $requeteSQL_getLinkInfo($id);
  61.     $result=$sql_object->DBSelect($requete);
  62.     $current_info=FormatText($result[0]['linkres_mask']'2HTML');
  63.     $type_display=_t('resources','link_res');
  64. }
  65. if($res=='multi'{
  66.     $requeteSQL_getMultiInfo($id);
  67.     $result=$sql_object->DBSelect($requete);
  68.     $current_info=FormatText($result[0]['multires_name']'2HTML');
  69.     $type_display=_t('resources','multi_res');
  70. }
  71. if($res=='biblio'{
  72.     $requeteSQL_getBiblioInfo($id);
  73.     $result=$sql_object->DBSelect($requete);
  74.     $current_info=FormatText($result[0]['bibliores_title']." <span class=\"text_det_it\">(".$result[0]['bibliores_author'].")</span>"'2HTML');
  75.     $type_display=_t('resources','biblio_res');
  76. }
  77. ?>
  78. <div id="chemin">
  79.     <ul>
  80.         <li>
  81.             <a href="index.php" class="chemin_home"><? echo _t('way','home')?></a>
  82.         </li>
  83.         <li>
  84.                <a href="<?php echo $rub_link?>" id="chemin_<? echo $rub?>" class="chemin_rub"><? echo _t('menu',$mod_inc)?></a>
  85.         </li>
  86.         <li>
  87.             <span><? echo formatNavTitle(_t('resources',$mod_inc.'_type')." : "$current_title)?></span>
  88.         </li>
  89.     </ul>
  90. </div>
  91. <!--end barre haute -->
  92. <?php
  93. include_once(THEME_ADMIN_PATH."quickicons.php");
  94. ?>
  95. <div class="contentcontainer">
  96. <?php
  97. include_once($dir."/menurub.php");
  98. ?>
  99. <div id="content">
  100. <? echo "<h2>".formatTitleh2($current_title)."</h2>"?>
  101. <form id="suptheme" action="<?php echo $_SERVER['SCRIPT_NAME']?>" method="post">
  102. <p class="info">
  103. <?php 
  104. echo _t('resources','supp_info')."'".$type_display."' "._t('resources','next')." \n";
  105. echo $current_info."\n"
  106. ?>
  107. </p>
  108. <p><?php echo _t('divers','sup_confirm')?></p>
  109. <div>
  110. <input name="id" type="hidden" value="<?php echo $id?>" />
  111. <input name="rub" type="hidden" value="<?php echo $rub?>" id="rub" />
  112. <input name="res" type="hidden" value="<?php echo $res?>" id="res" />
  113. <input name="todo" type="hidden" value="<?php echo $todo?>" id="todo" />
  114. <input name="parent" type="hidden" value="<?php echo $parent?>" id="parent" />
  115. <input name="type" type="hidden" value="<?php echo $type?>" id="type" />
  116. <?php echo cancel_button($cancel_link)?>
  117. <input name="valider" type="submit" value="<? echo _t('btn','valid'?>" class="button" id="valider" />
  118. </div>
  119. </form>
  120. </div>
  121. <?php include_once($dir."/help.php")?>
  122. </div>

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