init
This commit is contained in:
39
index.php
Executable file
39
index.php
Executable file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
/* Requests Handler */
|
||||
|
||||
//Start buffering
|
||||
ob_start();
|
||||
require_once 'config.php';
|
||||
$oClassManagement = new ClassManagement('main');
|
||||
ToolBox::cleanPost($_POST);
|
||||
ToolBox::cleanPost($_GET);
|
||||
ToolBox::cleanPost($_REQUEST);
|
||||
ToolBox::fixGlobalVars(isset($argv)?$argv:array());
|
||||
|
||||
//Available variables
|
||||
$sAction = isset($_GET['a'])?$_GET['a']:'';
|
||||
$sPage = isset($_GET['p'])?$_GET['p']:'index';
|
||||
$sLang = isset($_GET['l'])?$_GET['l']:(isset($_COOKIE['l'])?$_COOKIE['l']:'');
|
||||
//...
|
||||
|
||||
//Initiate class
|
||||
$oWedding = new Main($oClassManagement, $sLang);
|
||||
switch($sAction)
|
||||
{
|
||||
case 'action':
|
||||
break;
|
||||
//...
|
||||
|
||||
default:
|
||||
$sResult = $oWedding->getPage($sPage);
|
||||
break;
|
||||
}
|
||||
|
||||
//Log and clean buffer
|
||||
$sDebug = ob_get_clean();
|
||||
if(Settings::DEBUG && $sDebug!='') dlog($sDebug, true);
|
||||
|
||||
echo $sResult;
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user