forked from lindayi/NewLinuxer
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathadmin2014.php
69 lines (66 loc) · 2.87 KB
/
admin2014.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
<?php
include_once("config.php");
$lifeTime = 0.5 * 3600;
session_set_cookie_params($lifeTime);
session_start();
?>
<!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>
<body>
<div id="login-page" class="container">
<?php
if($_GET['action'] == "logout"){
unset($_SESSION['judger']);
echo "<div class=\"alert alert-info\">\n";
echo " <strong>提示!</strong> 注销成功。请在下方重新登录。\n";
echo "</div>\n";
}
if(isset($_SESSION['judger']))
{
echo "<div class=\"alert alert-info\">\n";
echo " <strong>提示!</strong> ".$_SESSION['judger']." 已登录系统。<a href=\"adminindex.php\">进入</a> | <a href=\"admin2014.php?action=logout\">注销</a>\n";
echo "</div>\n";
}
if($_POST["password"] != "" && $_POST["password"] != $Admin_Password && $_POST["judger"] != $adminuser)
{
echo "<div class=\"alert\">\n";
echo " <strong>警告!</strong> 密码错误。请检查你的输入。\n";
echo "</div>\n";
}
if($_POST["judger"] == $adminuser && $_POST["password"] != $adminpass)
{
echo "<div class=\"alert\">\n";
echo " <strong>警告!</strong> 密码错误。请检查你的输入。\n";
echo "</div>\n";
}
if($_POST["password"] == $Admin_Password && $_POST["judger"] != $adminuser)
{
$_SESSION['judger'] = $_POST["judger"];
echo "<script>window.location.href = 'adminindex.php';</script>";
}
if($_POST["judger"] == $adminuser && $_POST["password"] == $adminpass)
{
$_SESSION['judger'] = $_POST["judger"];
echo "<script>window.location.href = 'adminindex.php';</script>";
}
?>
<form id="login-form" class="well " action="admin2014.php" method="post">
<input name="judger" type="text" class="input-xlarge" placeholder="面试官" required /> <br />
<input name="password" type="password" class="input-xlarge" placeholder="密码" required /> <br />
<button type="submit" class="btn btn-block btn-large btn-primary">登陆</button>
</form>
</div>
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/site.js"></script>
</body>
</html>