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. $dir="../";
  43. if(isset($rub)) {
  44.     switch ($rub{
  45.         case 'level':
  46.         $dir.="level";
  47.         break;
  48.         case 'scale':
  49.         $dir.="scale";
  50.         break;
  51.         case 'theme':
  52.         $dir.="theme";
  53.         break;        
  54.         case 'news':
  55.         $dir.="news";
  56.         break;
  57.         case 'project':
  58.         $dir.="project";
  59.         break;    
  60.         case 'newsletter':
  61.         $dir.="newsletter";
  62.         break;
  63.         case 'publication':
  64.         $dir.="publication";
  65.         break;
  66.         case 'sdi':
  67.         $dir.="sdi";
  68.         break;
  69.         case 'dashboard':
  70.         $dir.="dashboard";
  71.         break;
  72.         case 'user':
  73.         $dir.="user";
  74.         break;
  75.         case 'workshop':
  76.         $dir.="workshop";
  77.         break;
  78.         case 'workshoprep':
  79.         $dir.="workshoprep";
  80.         break;
  81.         case 'yellowpages':
  82.         $dir.="yellowpages";
  83.         break;
  84.         case 'resources':
  85.         $dir.="resources";
  86.         break;
  87.         case 'contents':
  88.         $dir.="contents";
  89.         break;
  90.         case 'system':
  91.         $dir.="system";
  92.         break;
  93.         case 'tools':
  94.         $dir.="tools";
  95.         break;
  96.         default:
  97.         $dir.="home";
  98.         $rub="home";
  99.     }
  100. else {
  101.         $dir.="home";
  102.         $rub="home";
  103. }
  104.     
  105. /**
  106. * language include
  107. **/
  108.  
  109. include_once('../lib/lang.php')
  110.  
  111.  
  112.  
  113.  
  114. include_once("../lib/lib_common.php");
  115. include_once("../class/system/class.".SQL.".php");
  116.  
  117. if(defined('MOD_DEBUG'&& MOD_DEBUG == true{
  118.   $bench->add_flag('Pre-execute and includes');
  119. }
  120.  
  121. $sql_entity=SQL;
  122. $sql_object new $sql_entity;
  123. $sql_object -> DBInitialise();
  124. $sql_object -> DBConnexion();
  125. $rub_link="index.php?rub=".$rub;
  126.  
  127. include_once(SQL.'.inc.php');
  128. $sql_inc_file=$dir."/".SQL.".inc.php";
  129. if(file_exists($sql_inc_file)) include_once($sql_inc_file);
  130.  
  131. if(defined('MOD_DEBUG'&& MOD_DEBUG == true{
  132.   $bench->add_flag('... loading SQL files');
  133. }
  134.  
  135. include_once(THEME_ADMIN_PATH."index.php")
  136.  
  137.  
  138.  
  139.  
  140. $sql_object -> DBClose();
  141. ?>

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