forked from TFcis/SkyOnlinejudge
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuser.php
More file actions
36 lines (28 loc) · 692 Bytes
/
user.php
File metadata and controls
36 lines (28 loc) · 692 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php namespace SKYOJ\User;
if (!defined('IN_SKYOJSYSTEM')) {
exit('Access denied');
}
require_once 'function/user/user.lib.php';
function UserHandle()
{
global $SkyOJ,$_E,$_G;
$param = $SkyOJ->UriParam(1)??($_G['uid']?'view':'login');
switch( $param )
{
//api
case 'edit':
break;
case 'login':
case 'logout':
case 'view':
case 'register':
break;
default:
\Render::render('nonedefined');
exit(0);
}
$funcpath = $_E['ROOT']."/function/user/user_$param.php";
$func = __NAMESPACE__ ."\\{$param}Handle";
require_once($funcpath);
$func();
}