/
Message_land_back.php
205 lines (173 loc) · 6.24 KB
/
Message_land_back.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
<!--*******************************************************************对land.php的后台操作-->
<!DOCTYPE html>
<html>
<head>
<title></title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<div id="black">
<div id="top-top">
<br/>
<?php
header("content-type:text/html;charset=utf-8");
require_once 'MessageTool.php';
if(isset($_POST['username'])&&isset($_POST['userpassword']))
{
if($_POST['username']!=''&&$_POST['userpassword']!='')
{
$usernam=$_POST['username'];
$pad=$_POST['userpassword'];
$userpassword=md5($pad);
//以下开始进行对数据库的精确查找
$MysqliTool=new MysqliTool();
$sql="select userpassword from users where username='$usernam' limit 0,1";
$res=$MysqliTool->execute_dql($sql);
if($row=$res->fetch_assoc())
{
$password=$row['userpassword'];
if($password==$userpassword)
{
$_SESSION['user']=$usernam;
}
else
{
echo"<script language=\"javascript\">";
echo"alert(\"对不起,用户名或密码错误!!!!\");" ;
echo"location.href=\"land.php\"";
echo"</script>";
}
}
else
{
echo"<script language=\"javascript\">";
echo"alert(\"对不起,用户名或密码错误!!!!\");" ;
echo"location.href=\"land.php\"";
echo"</script>";
}
}
$res->free();
}
echo "<p align='right'>";
echo $_SESSION['user'];
echo "<script>function getDate(){confirm(\"确定退出登录?\");location.href=\"land.php\";} </script>";
echo "<a href=\"#\" onclick=\"getDate()\"> 退出</a>";
echo "</p>";
?>
</div>
<div id="container">
<div id="top">
<div id="top-middle">
<font size="6px" face="华文楷体" ><center>耽   美   评   论   圈</center></font>
</div>
</div>
<div id="middle">
<div id="middle-left">
<?php
header("content-type:text/html;charset=utf-8");
require_once 'MessageTool.php';
$MysqliTool=new MysqliTool();
$sql="select * from message";
$res=$MysqliTool->execute_dql($sql);
while ($row=$res->fetch_assoc())
{
$id=$row['id'];
$add_user=$_SESSION['user'];
echo "<table width='780' >";
echo "<tr>";
echo"<td colspan='2'><hr color='#6699FF' size='20px' align=center width='780px'></td>";
echo "</tr>";
echo "<tr>";
echo"<td><p align='left'>".$row['id']."楼    <p></td>";
echo"<td align='right'><form action='back.php' method='post'><input type='hidden' name='ids' value='$id'><input type='submit' name='submit3' value='删除'></form></td>";
echo "</tr>";
echo "<tr>";
echo "<td><font size='5px' face='黑体' color='blue'>【".$row['title']."】</font></td>";
echo "</tr>";
echo "<tr>";
echo "<td align='right' colspan='2'>".$row['user']."</td>";
echo "</tr>";
echo "<tr>";
echo"<td colspan='2'><hr color='#333333' size='1px' align=center width='780px'></td>";
echo "</tr>";
echo "<tr>";
echo "<td colspan='2'><font size='4px' face='华文楷体'>        ".$row['message']."</font></td>";
echo "</tr>";
//输出add_message
echo "<tr>";
echo"<td colspan='2'><hr color='#333333' size='1px' align=center width='780px'></td>";
echo "</tr>";
echo "<tr>";
echo"<td colspan='2'>评论如下</td>";
echo "</tr>";
$sqll="select * from add_message where messageid='$id'";
$ress=$MysqliTool->execute_dql($sqll);
while ($roww=$ress->fetch_assoc()) {
echo "<tr>";
echo "<td colspan='2'>".$roww['add_user'].":".$roww['add_message']."</td>";
echo "</tr>";
echo "<tr>";
echo"<td colspan='2'><hr style='border:1px dashed #000; ;width='780px'></td>";
echo "</tr>";
}
echo "<tr>";
echo"<td colspan='2'><hr color='#CCCC99' size='0.5px' align=center width='780px'></td>";
echo "</tr>";
echo "<tr>";
echo "<td align='right' colspan='2'>".$row['lastdate']."</td>";
echo "</tr>";
echo "<form action='back.php' method='post'>";
echo "<tr>";
echo"<td colspan='2' align='left'>请在下面输入点评</textarea></td>";
echo "</tr>";
echo "<tr>";
echo"<td colspan='2'><textarea name='add_message' rows='2' cols='95'></textarea></td>";
echo "</tr>";
echo "<tr>";
echo"<td colspan='2'><input type='hidden' name='idss' value='$id'><input type='hidden' name='add_user' value='$add_user'><input type='submit' name='submit5' value='提交'></td>";
echo "</tr>";
echo "</from>";
echo "<tr>";
echo"<td colspan='2'><hr color='black' size='1px' align=center width='780px'></td>";
echo "</tr>";
echo "</table>";
}
?>
</div>
<div id="middle-right">
<br/>
<font face="华文楷体" size="3px">
<table width="180px" height="480px" align="center">
<tr align="center"><td><font face="华文琥珀" size="5px">评论须知</font></td></tr>
<tr><td>1)本评论圈全发言禁止匿名</td></tr>
<tr><td>2)评论圈发言禁止只可以涉及有关耽美内容,非腐女者自行绕道</td></tr>
<tr><td>3)本圈发言禁止爆粗口,互相攻击,违者禁号</td></tr>
<tr><td>4)本评论圈禁止散播淫秽,不健康信息,违者禁号</td></tr>
<tr><td>5)禁止刷屏</td></tr>
<tr><td> </td></tr>
<tr><td> </td></tr>
<tr><td> </td></tr>
<tr><td>耽美评论圈官方群号:xxxxxxxxxxxxx</td></tr>
<tr><td>评论圈圈主:Hennessy</td></tr>
<tr><td> </td></tr>
</table>
</font>
</div>
</div>
<div id="botton">
<div id="botton-middle">
<form action="back.php" method="post">
<p id="user"> </p>
<br/><font face="黑体">发表留言</font>
<br/>昵称<?php echo $_SESSION['user'];?>
<br/>主题<input type="text" name="object">
<br/>内容
<br><textarea name="message" rows="8" cols="103"></textarea>
<br/><br/><center><input type="submit" name="submit1" value="发表" style="width:60px;height:25px;"></center>
</form>
</div>
</div>
</div>
</div>
</body>
</html>