mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-09 16:38:41 +00:00
96d4a3ecf7
Due to historical reasons, the code is in subfolder "1". With SVN removal, we place the code back and remove the annoying "1" folder.
26 lines
640 B
PHP
26 lines
640 B
PHP
<?php
|
|
|
|
require $_SERVER['DOCUMENT_ROOT'] . '/app/libs/uoj-lib.php';
|
|
|
|
require UOJContext::documentRoot().'/app/route.php';
|
|
require UOJContext::documentRoot().'/app/controllers/subdomain/blog/route.php';
|
|
|
|
include UOJContext::documentRoot().'/app/controllers'.call_user_func(function() {
|
|
$route = Route::dispatch();
|
|
$q_pos = strpos($route['action'], '?');
|
|
|
|
if ($q_pos === false) {
|
|
$path = $route['action'];
|
|
} else {
|
|
parse_str(substr($route['action'], $q_pos + 1), $vars);
|
|
$_GET += $vars;
|
|
$path = substr($route['action'], 0, $q_pos);
|
|
}
|
|
|
|
if (isset($route['onload'])) {
|
|
call_user_func($route['onload']);
|
|
}
|
|
|
|
return $path;
|
|
});
|