34 lines
693 B
PHP
34 lines
693 B
PHP
<?php
|
|
|
|
require '../config/config.php';
|
|
require 'bootstrap/init.php';
|
|
|
|
if (empty($_REQUEST['c']) || empty($_REQUEST['a'])) {
|
|
die();
|
|
return;
|
|
}
|
|
|
|
function autoload_controller__($classname)
|
|
{
|
|
require_once "controller/$classname.class.php";
|
|
spl_autoload_unregister('autoload_controller__');
|
|
}
|
|
spl_autoload_register('autoload_controller__');
|
|
|
|
function loginVerify($accountid, $sessionid)
|
|
{
|
|
if (!phpcommon\isValidSessionId($accountid, $sessionid)) {
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
try{
|
|
$c = $_REQUEST['c'];
|
|
$a = $_REQUEST['a'];
|
|
$classname = $c .'Controller';
|
|
$obj = eval('return (new $classname())->$a();');
|
|
} catch (Exception $e){
|
|
echo($e);
|
|
}
|