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

Source for file index.php

Documentation is available at index.php

  1. <?php
  2. /**
  3.  * @package linea21.core
  4.  * @subpackage plugins
  5.  * @author linea21 <info@linea21.com>
  6.  * @version $id SVN
  7.  * @access public
  8.  * @license http://opensource.org/licenses/gpl-3.0.html
  9.  */
  10.  
  11. //////////// Check Droits utilisateur ////////////
  12. if (!IsSuperAdmin()) ReloadIndex('admin');
  13. ////////////
  14.  
  15. $todopage=$dir."/";
  16.  
  17. if(isset($_REQUEST['current']&& in_array($_REQUEST['current']availablePlugins())) {
  18.  
  19.   $name $_REQUEST['current'];
  20.  
  21.   $plug new plugin($name);
  22.   if(!$plug->is_active()) die("The plugin is currently disabled. Please, enable it before accessing the page.");
  23.  
  24.   // we include all plugin files
  25.   //  $plug->loadPlugin($name);
  26.   //  _debug(sprintf('Delegates to %s plugin.', $name));
  27.  
  28.   $todopage.=$name.'/index.php';
  29.  
  30. else {
  31.  
  32.   if(isset($_REQUEST['name'])) $name $_REQUEST['name'];
  33.  
  34.   switch ($todo)
  35.   {
  36.     case 'enable':
  37.       $plug new plugin($name);
  38.       $plug->enable();
  39.       header("Location: ".$_SERVER['HTTP_REFERER']);
  40.       break;
  41.     case 'disable':
  42.       $plug new plugin($name);
  43.       $plug->disable();
  44.       header("Location: ".$_SERVER['HTTP_REFERER']);
  45.       break;
  46.     case 'list':
  47.       $todopage.="list.php";
  48.       break;
  49.     default:
  50.       $todopage.="list.php";
  51.   }
  52. }
  53. include_once($todopage);
  54. ?>

Documentation generated on Thu, 03 May 2012 15:05:10 +0200 by phpDocumentor 1.4.1