2022-12-20 11:21:31 +00:00
|
|
|
<?php
|
|
|
|
error_reporting(E_ALL);
|
|
|
|
ini_set('display_errors', 1);
|
|
|
|
|
|
|
|
$_page = isset($_GET['p']) ? $_GET['p'] : '';
|
|
|
|
|
|
|
|
require_once('./inc/tpl.class.php');
|
|
|
|
require_once('./inc/router.inc.php');
|
|
|
|
|
|
|
|
$tpl = (object)$tpl;
|
|
|
|
|
2022-12-20 12:26:32 +00:00
|
|
|
$generated = round(microtime(true) - $_SERVER['REQUEST_TIME_FLOAT'], 5);
|
|
|
|
|
2022-12-20 11:21:31 +00:00
|
|
|
if(!@$tpl->debug) {
|
|
|
|
tpl::view('tpl/' . $tpl->file,
|
|
|
|
array_merge([
|
2022-12-20 12:26:32 +00:00
|
|
|
'page' => $_page,
|
|
|
|
'generated' => $generated
|
2022-12-20 11:21:31 +00:00
|
|
|
],
|
|
|
|
gettype($tpl->data) !== 'string' ? $tpl->data : [])
|
|
|
|
);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
echo "<pre>";
|
|
|
|
print_r($_content);
|
|
|
|
echo "</pre>";
|
|
|
|
}
|