-
Notifications
You must be signed in to change notification settings - Fork 0
/
manager_deal.php.txt
executable file
·123 lines (97 loc) · 5.78 KB
/
manager_deal.php.txt
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
<?php
session_start();
?>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>大学生职业发展协会 --- 后台管理系统</title>
<link href="style.css" type="text/css" rel="stylesheet" media="screen">
</head>
<body>
<div id="header">
<div id="menu">
<div id="menu_logo"></div>
<div id="menu_word">大学生职业发展协会</div>
<div id="menu_bar">
<div class="menu_atom">
<ul>
<li><a href="index.php"><img src="image/menu_1.png" title="首页"></a></li>
<li><a href="about.php"><img src="image/menu_2.png" title="关于我们"></a></li>
<li><a href="linkus.php"><img src="image/menu_3.png" title="联系我们"></a></li>
<li><a href="manager.php"><img src="image/menu_4.png" title="管理员入口"></a></li>
</ul>
</div>
</div>
</div>
</div>
<div id="content_manager">
<div id="content_manager_inside">
<div id="content_manager_inside_box">
<div class="content_manager_inside_box_title">职协后台管理系统</div>
</div>
<div id="content_manager_inside_main">
<?php
if(isset($_SESSION['scdaadmin'])){
/* 登录成功 */
$_SESSION['scdaadmin']="zhbitscda";
echo "<div class='manager_deal_style'>欢迎您回来!</div><br /><br />";
echo "<div class='manager_deal_style'><a href='manager_data.php'>网站数据查询</a></div>";
echo "<div class='manager_deal_style'><a href='manager_part.php'>添加部门介绍</a></div>";
echo "<div class='manager_deal_style'><a href='manager_news.php'>添加新闻内容</a></div>";
echo "<div class='manager_deal_style'><a href='manager_msg.php'>意见建议管理</a></div>";
/* 登出 */
echo '<div class="logout" title="登出管理员系统"><a href="logout.php">登出</a></div>';
}else{
if(!empty($_POST["name"]) and !empty($_POST["password"]) and !empty($_GET["ip"])){
$ip=$_SERVER["REMOTE_ADDR"];
if(strcmp($ip,$_GET["ip"]) != 0){
die ("请正确登录管理系统");
}
$name=trim($_POST["name"]);
$name=htmlspecialchars($name);
$password=trim($_POST["password"]);
$password=htmlspecialchars($password);
if($name == "zhbitscda" && $password == "zhbitscda"){
/* 登录成功 */
$_SESSION['scdaadmin']="zhbitscda";
echo "<div class='manager_deal_style'>管理员登录成功!</div><br /><br />";
echo "<div class='manager_deal_style'><a href='manager_data.php'>网站数据查询</a></div>";
echo "<div class='manager_deal_style'><a href='manager_part.php'>添加部门介绍</a></div>";
echo "<div class='manager_deal_style'><a href='manager_news.php'>添加新闻内容</a></div>";
echo "<div class='manager_deal_style'><a href='manager_msg.php'>意见建议管理</a></div>";
/* 登出 */
echo '<div class="logout" title="登出管理员系统"><a href="logout.php">登出</a></div>';
}else{
if(!isset($_SESSION['wrong'])){
$_SESSION['wrong']=1;
}else{
$_SESSION['wrong']+=1;
}
/* 超过3次登录不成功触发 */
if($_SESSION['wrong'] <= 3){
die ("您的登录不成功!");
}else{
$url_page = "http://1.hehuaqi.sinaapp.com/zhbitscda/index.php";
echo "<script language='javascript' type='text/javascript'>";
echo "window.location.href='$url_page'";
echo "</script>";
}
}
}else{
die ("请输入管理员姓名和密码再登录");
}
}
?>
</div>
<div id="content_manager_inside_bottom"></div>
</div>
</div>
<div id="footer">
<div id="footer_inside">
<div id="footer_left">Copyright 2011- 大学生职业发展协会</div>
<div id="footer_right"><a href="linkus.php">联系我们</a> | <a href="about.php">关于职协</a> 技术支持:北纬21工作室</div>
</div>
</div>
</body>
</html>