forked from TFcis/SkyOnlinejudge
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcode.php
More file actions
36 lines (31 loc) · 752 Bytes
/
code.php
File metadata and controls
36 lines (31 loc) · 752 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\Code;
if (!defined('IN_SKYOJSYSTEM')) {
exit('Access denied');
}
require_once 'function/code/code.lib.php';
function CodeHandle()
{
global $SkyOJ,$_E;
$param = $SkyOJ->UriParam(1)??'codepad';
if( $_E['Codepad']['enabled'] == false )
{
\Render::ShowMessage('Codepad Closed QQ');
exit(0);
}
switch( $param )
{
case 'codepad':
case 'view':
break;
//api
case 'submit':
break;
default:
\Render::render('nonedefined');
exit(0);
}
$funcpath = $_E['ROOT']."/function/code/code_$param.php";
$func = __NAMESPACE__ ."\\{$param}Handle";
require_once($funcpath);
$func();
}