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.         default:
  95.         $dir.="home";
  96.         $rub="home";
  97.     }
  98. } else {
  99.         $dir.="home";
  100.         $rub="home";
  101. }
  102.     
  103. /**
  104. * language include
  105. * 
  106. **/
  107.  
  108. include_once('../lib/lang.php'); 
  109.  
  110.  
  111.  
  112.  
  113. include_once("../lib/lib_common.php");
  114. include_once("../class/system/class.".SQL.".php");
  115.  
  116. if(defined('MOD_DEBUG') && MOD_DEBUG == true) {
  117.   $bench->add_flag('Pre-execute and includes');
  118. }
  119.  
  120. $sql_entity=SQL;
  121. $sql_object = new $sql_entity;
  122. $sql_object -> DBInitialise();
  123. $sql_object -> DBConnexion();
  124. $rub_link="index.php?rub=".$rub;
  125.  
  126. include_once(SQL.'.inc.php');
  127. $sql_inc_file=$dir."/".SQL.".inc.php";
  128. if(file_exists($sql_inc_file)) include_once($sql_inc_file);
  129.  
  130. if(defined('MOD_DEBUG') && MOD_DEBUG == true) {
  131.   $bench->add_flag('... loading SQL files');
  132. }
  133.  
  134. include_once("header.php"); 
  135.  
  136. if(defined('MOD_DEBUG') && MOD_DEBUG == true) {
  137.   $bench->add_flag('... loading Header file');
  138. }
  139.  
  140. include_once($dir."/index.php"); 
  141. include_once("common_menu.php");
  142. include_once($dir."/quickbox.php"); 
  143.  
  144. if(defined('MOD_DEBUG') && MOD_DEBUG == true) {
  145.   $bench->add_flag('... loading Modules files');
  146. }
  147.  
  148. include_once("footer.php");
  149.  
  150. ?>

Documentation generated on Sat, 08 Nov 2008 14:52:38 +0100 by phpDocumentor 1.4.1