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. // DO NOT REMOVE
  11. header("Cache-control: private")// necessary for IE and FF to display form data afer clicking the back button
  12.  
  13. if(!isset($_SESSION['authenticated'])) {
  14.   if(!empty($_SERVER["QUERY_STRING"])) $page "login.php?page="rawurlencode("index.php?"$_SERVER["QUERY_STRING"]);
  15.   else $page "login.php";
  16.   header("Location: "$page);
  17.   exit();
  18. }
  19.  
  20. if(isset($_REQUEST['rub']))    $rub=$_REQUEST['rub'];
  21. if(!isset($_REQUEST['todo'])) {
  22.   $todo="list";
  23. else {
  24.   $todo=$_REQUEST['todo'];
  25. }
  26.  
  27. include_once("../config/define.php");
  28.  
  29. // check if session is not expired
  30. $l21auth->isActive();
  31.  
  32. // if is simple user
  33. if($l21auth->isSimpleUser()) {
  34.     header("Location: login.php");
  35.     exit();
  36. }
  37.  
  38. // Set_Cookie_last_page() must be after define.php include
  39. $l21auth->setCookieLastPage();
  40.  
  41.  
  42. /**
  43.  * Section include if dir exists
  44.  **/
  45.  
  46. if(isset($rub)) {
  47.   if(is_dir(override('../'.$rubTHEME_ADMIN_PATH))) $dir='../'.$rub;
  48.   else ReloadIndex('admin');
  49. else {
  50.   $dir='../home';
  51.   $rub='home';
  52. }
  53.  
  54. /**
  55.  * language include
  56.  **/
  57.  
  58.  
  59. $rub_link="index.php?rub=".$rub;
  60.  
  61. include_once(SQL.'.inc.php');
  62. $sql_inc_file=override($dir."/".SQL.".inc.php"THEME_ADMIN_PATH);
  63. if(file_exists($sql_inc_file)) include_once($sql_inc_file);
  64.  
  65. if(isset($Dbg)) {
  66.   $debug_line->setEndTime();
  67. }
  68.  
  69. include_once(THEME_ADMIN_PATH."index.php");
  70.  
  71. $sql_object -> DBClose();
  72. if(isset($Dbg)) $Dbg->display();
  73. ?>

Documentation generated on Mon, 08 Apr 2013 18:14:39 +0200 by phpDocumentor 1.4.1