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

Source for file index.php

Documentation is available at index.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 (!class_exists('auth')) {
  14.   include_once("../lib/lib_common.php");
  15.   ReloadIndex('admin');
  16. }
  17. ////////////
  18.  
  19. include_once('../class/class.resources.php');
  20.  
  21. if(isset($_POST['type']))    $type=$_POST['type'];
  22. if(isset($_GET['type']))    $type=$_GET['type'];
  23.  
  24. if(isset($_POST['parent']))    $parent=$_POST['parent'];
  25. if(isset($_GET['parent']))    $parent=$_GET['parent'];
  26.  
  27. if(isset($_POST['res']))    $res=$_POST['res'];
  28. if(isset($_GET['res']))        $res=$_GET['res'];
  29.  
  30. if($type=='P')  {
  31.   $mod_inc='publication';
  32.   $rub_link='?rub='.$mod_inc;
  33.   $cancel_link='index.php?rub=publication&amp;todo=det&amp;id='.$parent;
  34. }
  35. if($type=='W'{
  36.   $mod_inc='workshop';
  37.   $rub_link='?rub='.$mod_inc;
  38.   $cancel_link='index.php?rub=workshoprep&amp;todo=det&amp;id='.$parent;
  39. }
  40.  
  41. //////////// Check Droits utilisateur ////////////
  42. if (!$l21auth->hasRight($mod_inc)) ReloadIndex('admin');
  43. ///////////
  44.  
  45. $todopage=$dir."/";
  46. switch ($todo)
  47. {
  48.   case 'add_l':
  49.     $todopage.="add_link.php";
  50.     break;
  51.   case 'add_m':
  52.     $todopage.="add_multi.php";
  53.     break;
  54.   case 'add_b':
  55.     $todopage.="add_biblio.php";
  56.     break;
  57.   case 'mod_l':
  58.     $todopage.="mod_link.php";
  59.     break;
  60.   case 'mod_m':
  61.     $todopage.="mod_multi.php";
  62.     break;
  63.   case 'mod_b':
  64.     $todopage.="mod_biblio.php";
  65.     break;
  66.   case 'sup':
  67.     $todopage.="sup.php";
  68.     break;
  69.   default:
  70.     $todopage.="add.php";
  71. }
  72. include_once(override($todopageTHEME_ADMIN_PATH));
  73. ?>

Documentation generated on Thu, 20 Mar 2014 16:48:07 +0100 by phpDocumentor 1.4.1