-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.inc.php
72 lines (66 loc) · 1.99 KB
/
main.inc.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
61
62
63
64
65
66
67
68
69
70
71
72
<?php
if (!defined('IN_DISCUZ')) {
exit('Access Denied');
}
if (!$_G['uid']) {
showmessage('not_loggedin', '', '', array('login' => 1));
}
require ('es_config.inc.php');
$action = dhtmlspecialchars($_G["gp_action"]);
$index = dhtmlspecialchars($_G['gp_module']);
$basename = 'plugin.php?id=websengoku:main';
$basename2 = "plugin.php?id=websengoku:main&module={$index}";
//print_r($_G);
$uid = intval($_G["uid"]);
//检查用户是否注册
$sql = "SELECT * FROM " . DB::table("es_member") . " WHERE uid= " . $uid;
$user_info = DB::fetch_first($sql);
//print_r($user_info);
if (empty($user_info) and $index != "reg") {
showmessage('您尚未注册本游戏,下面将引导您注册.', 'plugin.php?id=websengoku:main&module=reg');
}
if($index=='logout'){
$sql = "DELETE FROM " . DB::table('es_member') . " WHERE uid = " . $uid;
DB::query($sql);
}
$global_cfg['admincp'] = $_G['cache']['plugin']['websengoku'];
$global_admincp = $global_cfg['admincp'];
if ($index) {
require ($index . '.inc.php');
}
//var_dump($_G['cache']['plugin']['websengoku']);
//print_r($global_cfg);
/*
if ($index)
{
switch ($index)
{
case 'reg':
// $sql = "SELECT uid FROM es_user WHERE uid= " . $_G['uid'];
// $user_info = DB::fetch_first($sql);
// if (!empty($user_info)){
// showmessage('您已经注册了本游戏,不能重新注册','plugin.php?id=websengoku:main');
// }
//$sql = "SELECT zhiye FROM es_config"
$config_array = parse_ini_file("es_config.inc.php");
$zhiye_array = explode(",", $config_array['zhiye']);
$birth_city_array = explode(",", $config_array['birth_city']);
$nengli_array = explode(",", $config_array['nengli']);
//print_r ($zhiye_array);
break;
case 'myinfo':
require ('myinfo.inc.php');
break;
case 'chaoting':
require ('chaoting.inc.php');
//print_r($guan_info_array);
break;
default:
require ($index . '.inc.php');
//echo $index . '.inc.php';
break;
}
}*/
include template('websengoku:main');
//include template('websengoku:chaoting');
?>