forked from lindayi/NewLinuxer
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathadminjudge.php
215 lines (214 loc) · 8.87 KB
/
adminjudge.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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
<?php
session_start();
if(!isset($_SESSION['judger'])){
header("Location:admin2014.php");
exit();
}
include_once("conn.php");
include_once("config.php");
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>管理后台 - 2014纳新系统</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/bootstrap-responsive.min.css" rel="stylesheet">
<link href="css/site.css" rel="stylesheet">
<!--[if lt IE 9]><script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
</head>
<?php
if($_SESSION['judger'] != $adminuser)
{
echo "<script>alert(\"对不起,您没有权限进行决策!\"); window.location.href=\"adminindex.php\";</script>";
exit();
}
if($_GET["id"] != "")
{
if($_GET["action"] == "fail") $tmpstatus = 0 - $CurrentStatus;
if($_GET["action"] == "ok") $tmpstatus = $CurrentStatus + 1;
if($_GET["action"] == "reset") $tmpstatus = $CurrentStatus;
mysql_query("UPDATE profile SET status = ".$tmpstatus." WHERE profileid = ".$_GET["id"]);
}
?>
<body>
<div class="container">
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </a> <a class="brand" href="#">Xiyou Linux Group</a>
<div class="nav-collapse">
<ul class="nav">
<li>
<a href="adminindex.php">管理面板</a>
</li>
<li>
<a href="admininterview.php">面试评价</a>
</li>
<li class="active">
<a href="adminjudge.php">结果筛选</a>
</li>
</ul>
<ul class="nav pull-right">
<li>
<a href="adminhistory.php"><?php echo $_SESSION["judger"];?></a>
</li>
<li>
<a href="admin2014.php?action=logout">注销登录</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="row" style="padding-top:40px">
<div class="span3">
<div class="well" style="padding: 8px 0;">
<ul class="nav nav-list">
<li class="nav-header">
概览
</li>
<li>
<a href="adminindex.php"><i class="icon-home"></i> 管理面板</a>
</li>
<li>
<a href="adminrecord.php"><i class="icon-th-list"></i> 报名记录
<span class="badge badge-info">
<?php
$result = mysql_query("SELECT COUNT(*) FROM profile");
$row = mysql_fetch_array($result);
echo $row[0];
?>
</span>
</a>
</li>
<li class="nav-header">
面试
</li>
<li>
<a href="admininterview.php"><i class="icon-pencil"></i> 面试评价</a>
</li>
<li>
<a href="adminhistory.php"><i class="icon-edit"></i> 评价记录</a>
</li>
</li>
<li class="nav-header">
决策
</li>
<li class="active">
<a href="adminjudge.php"><i class="icon-white icon-check"></i> 结果筛选</a>
</li>
<li class="divider">
<li>
<a href="admin2014.php?action=logout"><i class="icon-stop"></i> 注销登录</a>
</li>
</ul>
</div>
</div>
<div class="span9">
<legend>结果筛选</legend>
<div class="alert alert-block alert-info">
<h4>当前进度: 第<?php echo $CurrentStatus; ?>轮面试</h4>
<br />
<div class="progress progress-striped active">
<div class="bar" style="width: <?php echo $CurrentStatus / 4 * 100;?>%;"></div>
</div>
<div class="row-fluid">
<div class="span4">
<a href="adminjudge-a.php" class="btn btn-large btn-block btn-success">自动通过全A评价</a>
</div>
<div class="span4">
<a href="adminjudge-c.php" class="btn btn-large btn-block btn-danger">自动淘汰全C评价</a>
</div>
<div class="span4">
<a href="adminjudge-manual.php" class="btn btn-large btn-block btn-primary">手动决策</a>
</div>
</div>
</div>
<div class="tabbable">
<ul class="nav nav-tabs">
<li class="active"><a href="#tab1" data-toggle="tab">本轮待决策名单</a></li>
<li class><a href="#tab2" data-toggle="tab">本轮已通过名单</a></li>
<li class><a href="#tab3" data-toggle="tab">本轮已淘汰名单</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tab1">
<table class="table table-hover table-striped table-bordered">
<thead>
<tr>
<th>编号</th><th>姓名</th><th>专业班级</th><th>电话</th><th>评价1</th><th>评价2</th>
</tr>
</thead>
<tbody>
<?php
$result = mysql_query("SELECT DISTINCT profile.profileid, name, class, tel FROM profile, record WHERE profile.profileid = record.profileid AND profile.status = ".$CurrentStatus);
while($row = mysql_fetch_array($result))
{
echo "<tr><td>".$row["profileid"]."</td><td>".$row["name"]."</td><td>".$row["class"]."</td><td>".$row["tel"]."</td><td><strong>";
$subresult = mysql_query("SELECT * FROM record WHERE profileid = ".$row["profileid"]." AND status = ".$CurrentStatus);
$judgerow = mysql_fetch_array($subresult);
echo $grade[$judgerow["grade"]]."</strong>-".$judgerow["judger"]."</td><td><strong>";
$judgerow = mysql_fetch_array($subresult);
echo $grade[$judgerow["grade"]]."</strong>-".$judgerow["judger"]."</td></tr>\n";
}
?>
</tbody>
</table>
</div>
<div class="tab-pane" id="tab2">
<table class="table table-hover table-striped table-bordered">
<thead>
<tr>
<th>编号</th><th>姓名</th><th>专业班级</th><th>电话</th><th>评价1</th><th>评价2</th><th>操作</th>
</tr>
</thead>
<tbody>
<?php
$result = mysql_query("SELECT DISTINCT profile.profileid, name, class, tel FROM profile, record WHERE profile.profileid = record.profileid AND profile.status > ".$CurrentStatus);
while($row = mysql_fetch_array($result))
{
echo "<tr><td>".$row["profileid"]."</td><td>".$row["name"]."</td><td>".$row["class"]."</td><td>".$row["tel"]."</td><td><strong>";
$subresult = mysql_query("SELECT * FROM record WHERE profileid = ".$row["profileid"]." AND status = ".$CurrentStatus);
$judgerow = mysql_fetch_array($subresult);
echo $grade[$judgerow["grade"]]."</strong>-".$judgerow["judger"]."</td><td><strong>";
$judgerow = mysql_fetch_array($subresult);
echo $grade[$judgerow["grade"]]."</strong>-".$judgerow["judger"]."</td><td><a href=\"adminjudge.php?id=".$row["profileid"]."&action=fail\">淘汰</a> | <a href=\"adminjudge.php?id=".$row["profileid"]."&action=reset\">撤销</a></td></tr>\n";
}
?>
</tbody>
</table>
</div>
<div class="tab-pane" id="tab3">
<table class="table table-hover table-striped table-bordered">
<thead>
<tr>
<th>编号</th><th>姓名</th><th>专业班级</th><th>电话</th><th>评价1</th><th>评价2</th><th>操作</th>
</tr>
</thead>
<tbody>
<?php
$result = mysql_query("SELECT DISTINCT profile.profileid, name, class, tel FROM profile, record WHERE profile.profileid = record.profileid AND profile.status = -".$CurrentStatus);
while($row = mysql_fetch_array($result))
{
echo "<tr><td>".$row["profileid"]."</td><td>".$row["name"]."</td><td>".$row["class"]."</td><td>".$row["tel"]."</td><td><strong>";
$subresult = mysql_query("SELECT * FROM record WHERE profileid = ".$row["profileid"]." AND status = ".$CurrentStatus);
$judgerow = mysql_fetch_array($subresult);
echo $grade[$judgerow["grade"]]."</strong>-".$judgerow["judger"]."</td><td><strong>";
$judgerow = mysql_fetch_array($subresult);
echo $grade[$judgerow["grade"]]."</strong>-".$judgerow["judger"]."</td><td><a href=\"adminjudge.php?id=".$row["profileid"]."&action=ok\">通过</a> | <a href=\"adminjudge.php?id=".$row["profileid"]."&action=reset\">撤销</a></td></tr>\n";
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="js/jquery-1.10.0.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/site.js"></script>
</body>
</html>