28 lines
543 B
PHP
28 lines
543 B
PHP
<?php
|
|
require_once("config.php");
|
|
require_once("source/common.php");
|
|
require_once("source/myfun.php");
|
|
if(APP_DEBUG)
|
|
{
|
|
ini_set('display_errors', 'On');
|
|
error_reporting(E_WARNING | E_ERROR | E_PARSE | E_CORE_ERROR | E_CORE_WARNING);
|
|
}else
|
|
{
|
|
error_reporting(0);
|
|
}
|
|
$tp = $_GET["tp"];
|
|
|
|
if(empty($tp))
|
|
{
|
|
$tp='pc/index';
|
|
}
|
|
$op = $_GET['op'];
|
|
$tpl = init_smarty();
|
|
|
|
$tpl->assign("tp", $tp);
|
|
$tpl->assign("op", $op);
|
|
if(!file_exists(S_ROOT."source/{$tp}.php")){
|
|
http_response_code(404);
|
|
}
|
|
include_once(S_ROOT."source/{$tp}.php");
|