forked from TFcis/SkyOnlinejudge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGlobalSetting.php
60 lines (47 loc) · 1.29 KB
/
GlobalSetting.php
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php
#Default Setting
#DON'T CHANGE THIS FILE!
#If you want to replace setting , yout should edit LocalSetting.php
define('IN_SKYOJSYSTEM',1);
session_start();
date_default_timezone_set( "Asia/Taipei" );
require_once('config/config.php');
#Environment
$_E = array();
$_E['ROOT'] = __DIR__;
$_E['SITEDIR'] = '/';
#Site Setting
$_E['site']['admin']=array(1);
$_E['site']['name'] ='Sky Online Judge';
#Error Message
$_E['template']['alert'] ='';
#MathJax
$_E['EnableMathJax'] = 0;
$_E['uesLocalMathJaxFile'] = 0;
#Codepad
$_E['Codepad']['allowguestsubmit'] = false ;
if( file_exists('LocalSetting.php') )
{
require_once('LocalSetting.php');
}
$_E['SITEROOT'] = "//".$_SERVER['SERVER_NAME'].$_E['SITEDIR'];
if( isset($cgUseHTTPS) && $cgUseHTTPS === true)
{
$_E['SITEROOT'] = 'https:'.$_E['SITEROOT'];
}
require_once('function/Skyoj.lib.php');
require_once('function/mysqlCore.php');
require_once('function/sqlCore.php');
SQL::connect();
SQL::query('SET NAMES UTF8');
require_once('function/userControl.php');
require_once('function/renderCore.php');
require_once('function/pluginsCore.php');
userControl::intro();
//test
$QUEST = '';
if( isset($_SERVER['PATH_INFO']) )
$QUEST = $_SERVER['PATH_INFO'];
if( !empty($QUEST) ) //remoce first '/'
$QUEST = substr($QUEST,1);
$QUEST = explode('/',$QUEST);