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

Documentation generated on Thu, 03 May 2012 15:07:40 +0200 by phpDocumentor 1.4.1