-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
151 lines (128 loc) · 5.24 KB
/
index.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<?php
/**
* ---------------------------------------
* @name 生蚝比赛报名系统
* @user 广州市越秀区东风东路小学
* @copyright 版权所有:小生蚝 <master@xshgzs.com>
* @create 系统创建时间:2017-04-08
* @modify 最后修改时间:2017-09-02
* ---------------------------------------
*/
require_once("Functions/PDOConn.php");
require_once("Functions/PublicFunc.php");
define("GlobalSetName","GlobalSettings.json");
$GB_Sets=new Settings(GlobalSetName);
$Title=$GB_Sets->G("Title",2,"System");
define("Prefix",$GB_Sets->G("SessionPrefix",2,"System"));
$Query=explode("&",$_SERVER['QUERY_STRING']);
// 去除页码参数
foreach($Query as $Key=>$Value){
if(substr($Value,0,4)=="Page"){
unset($Query[$Key]);
}
}
$Query=implode("&",$Query);
$nowURL=$_SERVER['PHP_SELF'].'?'.$Query;
unset($Query);
?>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author" content="生蚝科技 Oyster Tech">
<meta name="description" content="广州市越秀区东风东路小学游泳队管理系统">
<meta name="keywords" content="东风东游泳队,生蚝科技,东风东路小学,东风东游泳队管理系统">
<link rel="shortcut icon" href="favicon.ico">
<!-- ▼ 引入CSS文件 ▼ -->
<link rel="stylesheet" href="res/css/demo.css" type="text/css">
<link rel="stylesheet" href="res/css/Notification.css" type="text/css">
<link href="https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.bootcss.com/zTree.v3/3.5.28/css/zTreeStyle/zTreeStyle.min.css" type="text/css">
<link href="https://cdn.bootcss.com/datatables/1.10.16/css/dataTables.bootstrap.min.css" rel="stylesheet">
<link src="res/css/dataTables.responsive.css" rel="stylesheet">
<!-- ▲ 引入CSS文件 ▲ -->
<!-- ▼ 引入JS文件 ▼ -->
<script src="https://cdn.bootcss.com/jquery/1.11.2/jquery.min.js"></script>
<script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script type="text/javascript" src="https://cdn.bootcss.com/zTree.v3/3.5.28/js/jquery.ztree.core.min.js"></script>
<script type="text/javascript" src="https://cdn.bootcss.com/zTree.v3/3.5.28/js/jquery.ztree.excheck.min.js"></script>
<script type="text/javascript" src="https://cdn.bootcss.com/zTree.v3/3.5.28/js/jquery.ztree.exedit.min.js"></script>
<script src="https://cdn.bootcss.com/datatables/1.10.16/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.bootcss.com/datatables/1.10.16/js/dataTables.bootstrap.min.js"></script>
<script src="res/js/dataTables.responsive.js"></script>
<script src="res/js/utils.js"></script>
<script src="res/js/idCard.js"></script>
<script src="res/js/Notification.js"></script>
<!-- ▲ 引入JS文件 ▲ -->
<title><?php echo $Title; ?></title>
<style>
th{font-weight:bolder;text-align:center;}
body{padding-top:70px;}
</style>
<script>
// 关闭所有input的自动填充功能
$("input").attr("autocomplete","off");
// 百度统计
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?542f97a67d236404d5762fc15c4b21c3";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
</head>
<body style="font-family:Microsoft YaHei; background-color:#f9f9f9">
<?php
$UserID=GetSess(Prefix."UserID");
$RealName=GetSess(Prefix."RealName");
$RoleID=GetSess(Prefix."RoleID");
$RoleName=GetSess(Prefix."RoleName");
// 待加载页面的参数 + 参数过滤
$file=isset($_GET['file'])?$_GET['file']:'View';
$action=isset($_GET['action'])?$_GET['action']:'Index.php';
$file=TextFilter($file);
$action=TextFilter($action);
// 获取当前页面的ID
$NowMenuID_rs=PDOQuery($dbcon,"SELECT * FROM sys_menu WHERE PageFile=? AND PageDOS=?",[$file,$action],[PDO::PARAM_STR,PDO::PARAM_STR]);
$NowMenuID=@$NowMenuID_rs[0][0]['MenuID'];
// 所有允许权限的Array Session
$AllPurview=isset($_SESSI0N[Prefix."AllPurv"])?$_SESSI0N[Prefix."AllPurv"]:"";
if($AllPurview==""){
// 获取当前角色的所有权限ID
$AllPurv_rs=PDOQuery($dbcon,"SELECT * FROM role_purview WHERE RoleID=?",[$RoleID],[PDO::PARAM_INT]);
$TotalPurv=sizeof($AllPurv_rs[0]);
// 循环添加给所有允许权限的Array Session
for($i=0;$i<$TotalPurv;$i++){
$_SESSION[Prefix.'AllPurv'][$i]=$AllPurv_rs[0][$i]['PurvID'];
}
}
require_once("Functions/ChkLogged.php");
// 引入导航栏
include("Functions/ShowNav.php");
// 引入页面文件
$includeFileName=$file.'/'.$action;
echo '<div class="container text-center">';
$includeStatus=include($includeFileName);
echo '</div>';
// 文件404
if($includeStatus==false){
$ErrTips="";
$ErrTips.='<center>';
$ErrTips.='<h1>404</h1>';
$ErrTips.="<h3>$includeFileName</h3>";
$ErrTips.='<hr>';
$ErrTips.='<p style="font-weight:bolder;font-size:18;line-height:23px;">';
$ErrTips.="© 生蚝科技 2014-".date("Y");
$ErrTips.='</p>';
$ErrTips.='</center>';
die($ErrTips);
}
// 脚部版权文件
include("footer.php");
?>
<!-- ▼ 警示框 ▼ -->
<div id="dm-notif"></div>
<!-- ▲ 警示框 ▲ -->
</body>
</html>