Files
objects/index.php
2014-12-03 20:27:47 +01:00

39 lines
781 B
PHP
Executable File

<?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;
?>