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

Documentation generated on Thu, 20 Mar 2014 16:48:05 +0100 by phpDocumentor 1.4.1