39 lines
791 B
PHP
Executable File
39 lines
791 B
PHP
Executable File
<?php
|
|
|
|
/* Requests Handler */
|
|
|
|
//Start buffering
|
|
ob_start();
|
|
require_once 'class_management.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;
|
|
|
|
?>
|