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 admin
  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. include_once("../lib/functions_auth.php");
  11.  
  12.  
  13. if(!isset($_SESSION['sess_is_known'])) header("Location: login.php");
  14.  
  15.  
  16. include_once("../lib/no_cache.php");
  17. if(isset($_POST['rub']))    $rub=$_POST['rub'];
  18. if(isset($_GET['rub']))    $rub=$_GET['rub'];
  19.  
  20. if(!isset($_GET['todo']) && !isset($_POST['todo'])) {
  21.     $todo="list";
  22. } else {
  23.     if(isset($_POST['todo']))    $todo=$_POST['todo'];
  24.     if(isset($_GET['todo']))    $todo=$_GET['todo'];
  25. }
  26. include_once("../config/define.php");
  27. include_once("../config/server.php");
  28. include_once("../lib/items.php");
  29.  
  30. if(defined('MOD_DEBUG') && MOD_DEBUG == true) {
  31.   include_once('../class/system/class.bench.php');
  32.   $bench = new bench();
  33.   $bench->start_bench();
  34. }
  35.  
  36.  
  37. /**
  38. * Section include
  39. * 
  40. **/
  41.  
  42.  
  43. $dir="../";
  44. if(isset($rub)) {
  45.     switch ($rub) {
  46.         case 'level':
  47.         $dir.="level";
  48.         break;
  49.         case 'scale':
  50.         $dir.="scale";
  51.         break;
  52.         case 'theme':
  53.         $dir.="theme";
  54.         break;        
  55.         case 'news':
  56.         $dir.="news";
  57.         break;
  58.         case 'project':
  59.         $dir.="project";
  60.         break;    
  61.         case 'newsletter':
  62.         $dir.="newsletter";
  63.         break;
  64.         case 'publication':
  65.         $dir.="publication";
  66.         break;
  67.         case 'sdi':
  68.         $dir.="sdi";
  69.         break;
  70.         case 'dashboard':
  71.         $dir.="dashboard";
  72.         break;
  73.         case 'user':
  74.         $dir.="user";
  75.         break;
  76.         case 'workshop':
  77.         $dir.="workshop";
  78.         break;
  79.         case 'workshoprep':
  80.         $dir.="workshoprep";
  81.         break;
  82.         case 'yellowpages':
  83.         $dir.="yellowpages";
  84.         break;
  85.         case 'resources':
  86.         $dir.="resources";
  87.         break;
  88.         case 'contents':
  89.         $dir.="contents";
  90.         break;
  91.         case 'system':
  92.         $dir.="system";
  93.         break;
  94.         case 'tools':
  95.         $dir.="tools";
  96.         break;
  97.         default:
  98.         $dir.="home";
  99.         $rub="home";
  100.     }
  101. } else {
  102.         $dir.="home";
  103.         $rub="home";
  104. }
  105.     
  106. /**
  107. * language include
  108. * 
  109. **/
  110.  
  111. include_once('../lib/lang.php'); 
  112.  
  113.  
  114.  
  115.  
  116. include_once("../lib/lib_common.php");
  117. include_once("../class/system/class.".SQL.".php");
  118.  
  119. if(defined('MOD_DEBUG') && MOD_DEBUG == true) {
  120.   $bench->add_flag('Pre-execute and includes');
  121. }
  122.  
  123. $sql_entity=SQL;
  124. $sql_object = new $sql_entity;
  125. $sql_object -> DBInitialise();
  126. $sql_object -> DBConnexion();
  127. $rub_link="index.php?rub=".$rub;
  128.  
  129. include_once(SQL.'.inc.php');
  130. $sql_inc_file=$dir."/".SQL.".inc.php";
  131. if(file_exists($sql_inc_file)) include_once($sql_inc_file);
  132.  
  133. if(defined('MOD_DEBUG') && MOD_DEBUG == true) {
  134.   $bench->add_flag('... loading SQL files');
  135. }
  136.  
  137. include_once(THEME_ADMIN_PATH."index.php"); 
  138.  
  139.  
  140.  
  141.  
  142. $sql_object -> DBClose();
  143. ?>

Documentation generated on Fri, 16 Oct 2009 09:34:05 +0200 by phpDocumentor 1.4.1