1 <?php
include ("config.php");
2 function getreason($marked)
4 $sql = "SELECT * FROM marked WHERE markid='$marked'";
5 $result = mysql_query($sql);
6 $myrow = mysql_fetch_array($result);
7 return $myrow["reason"];
11 echo "Invalid marked messageID.";
16 echo "Invalid boardID.";
21 echo "Invalid topicID.";
26 echo "Invalid messageID.";
29 function getusername($username)
31 $sql = "SELECT * FROM users WHERE username='$username'";
32 $result = mysql_query($sql);
33 $myrow = mysql_fetch_array($result);
34 return $myrow["username"];
36 function getreason2($reason, $id)
43 return "Bad Language.";
46 $sql = "SELECT * FROM marked WHERE markid='$id'";
47 $result = mysql_query($sql);
48 $myrow = mysql_fetch_array($result);
49 return $myrow["reason2"];
52 function timetime($topicid)
54 $sql = "SELECT * FROM messages WHERE messageid='$topicid'";
55 $result = mysql_query($sql);
56 $myrow = mysql_fetch_array($result);
57 $timey = substr($myrow["messsec"], 0, 4).'-'.substr($myrow["messsec"], 4, 2).'-'.substr($myrow["messsec"], 6, 2).' '.substr($myrow["messsec"], 8, 2).':'.substr($myrow["messsec"], 10, 2).':'.substr($myrow["messsec"], 12, 2);
60 $sql = "SELECT * FROM users WHERE username='$uname'";
61 $result = mysql_query($sql);
62 $myrow = mysql_fetch_array($result);
63 if (!$myrow["level"] >= 50)
65 echo "You cannot view this page.";
68 include ("colors.inc");
69 echo "<title>GameFAQs Hell</title>";
70 echo "<body bgcolor=".$bgcolor." text=".$fontcolor." LINK=blue VLINK=blue alink=".$alink.">";
73 $sql = "UPDATE marked SET active='0' WHERE markid='$marked'";
74 $result = mysql_query($sql);
75 $usename = getusername($uname);
76 $sql = "INSERT INTO moderators (modby,modid,type,action) VALUES ('$usename','$marked','Moderate','No Action')";
77 $result = mysql_query($sql);
78 echo "<font color=black>No action taken. Return to marked <a href=modme.php>messages</a>.</font>";
83 $sql = "UPDATE topics SET closed='1' WHERE topicid='$topic'";
84 $result = mysql_query($sql);
85 $sql = "UPDATE marked SET active='0' WHERE markid='$marked'";
86 $result = mysql_query($sql);
87 $usename = getusername($uname);
88 $sql = "INSERT INTO moderators (modby,modid,type,action) VALUES ('$usename','$marked','Moderate','Close Topic')";
89 $result = mysql_query($sql);
90 echo "<font color=black>Topic closed. Return to marked <a href=modme.php>messages</a>.</style></font>";
95 $sql = "SELECT * FROM messages WHERE messageid='$message'";
96 $result = mysql_query($sql);
97 $myrow = mysql_fetch_array($result);
98 $messbod = $myrow["messbody"];
99 $meby = $myrow["messby"];
100 $timee = $myrow["messsec"];
101 $date = $myrow["postdate"];
102 $sql = "UPDATE marked SET active='0' WHERE markid='$marked'";
103 $result = mysql_query($sql);
104 $datedate = date("n/j/y H:i:s");
105 $sql = "INSERT INTO modded (modbod,board,topic,message,modby,moddedat,postedat) VALUES ('$messbod','$board','$topic','$message','$meby','$datedate','$date')";
106 $result = mysql_query($sql);
108 $sql = "UPDATE messages SET messbody='[This message has been deleted by a moderator]' WHERE messageid='$message'";
109 $result = mysql_query($sql);
110 $usename = getusername($uname);
111 $sql = "INSERT INTO moderators (modby,modid,type,action) VALUES ('$usename','$marked','Moderate','Delete Message')";
112 $result = mysql_query($sql);
113 echo "<font color=black>Message deleted. Return to marked <a href=modme.php>messages</a>.</style></font>";
118 $datethe = date("n/j/y h:i:s A");
119 $sql = "UPDATE users SET notify='1' WHERE userid='$user'";
120 $result = mysql_query($sql);
121 $sql = "SELECT * FROM messages WHERE messageid='$message'";
122 $result = mysql_query($sql);
123 $myrow = mysql_fetch_array($result);
124 $messbod = $myrow["messbody"];
125 $meby = $myrow["messby"];
126 $date = $myrow["postdate"];
127 $sql = "SELECT * FROM users WHERE username='$meby'";
128 $result = mysql_query($sql);
129 $myrow = mysql_fetch_array($result);
130 $sql = "UPDATE marked SET active='0' WHERE markid='$marked'";
131 $result = mysql_query($sql);
132 $modbod12 = "You are an asshole. Go away.";
133 $sql = "INSERT INTO systemnot (sysbod,sendto,sentat,active,sentfrom) VALUES ('$modbod12','$user','$datethe','1','3')";
134 $result = mysql_query($sql);
135 $datedate = date("n/j/y H:i:s");
136 $sql = "INSERT INTO modded (modbod,board,topic,message,modby,moddedat,postedat) VALUES ('$messbod','$board','$topic','$message','$meby','$datedate','$date')";
137 $result = mysql_query($sql);
138 $sql = "UPDATE messages SET messbody='[This message has been deleted by a moderator]' WHERE messageid='$message'";
139 $result = mysql_query($sql);
140 $sql = "UPDATE users SET level='5' WHERE username='$meby'";
141 $result = mysql_query($sql);
142 $sql = "UPDATE users SET cookies='0' WHERE username='$meby'";
143 $result = mysql_query($sql);
144 $sql = "UPDATE users SET attack='0' WHERE username='$meby'";
145 $result = mysql_query($sql);
146 $sql = "UPDATE users SET money='0' WHERE username='$meby'";
147 $result = mysql_query($sql);
148 $sql = "UPDATE users SET faction='0' WHERE username='$meby'";
149 $result = mysql_query($sql);
150 $sql = "UPDATE users SET turns='0' WHERE username='$meby'";
151 $result = mysql_query($sql);
152 $usename = getusername($uname);
153 $sql = "INSERT INTO moderators (modby,modid,type,action) VALUES ('$usename','$marked','Moderate','Suspended User, Deleted Message')";
154 $result = mysql_query($sql);
155 echo "<font color=black>User suspended. Return to marked <a href=modme.php>messages</a>.</style></font>";
160 $sql = "SELECT * FROM messages WHERE messageid='$message'";
161 $result = mysql_query($sql);
162 $datedate = date("n/j/y H:i:s");
163 $myrow = mysql_fetch_array($result);
164 $messbod = $myrow["messbody"];
165 $meby = $myrow["messby"];
166 $date = $myrow["postdate"];
167 $sql = "UPDATE marked SET active='0' WHERE markid='$marked'";
168 $result = mysql_query($sql);
169 $sql = "INSERT INTO modded (modbod,board,topic,message,modby,moddedat,postedat) VALUES ('$messbod','$board','$topic','$message','$meby','$datedate','$date')";
170 $result = mysql_query($sql);
171 $sql = "DELETE FROM topics WHERE topicid='$topic'";
172 $result = mysql_query($sql);
173 $sql = "DELETE FROM messages WHERE topic='$topic'";
174 $result = mysql_query($sql);
175 $usename = getusername($uname);
176 $sql = "INSERT INTO moderators (modby,modid,type,action) VALUES ('$usename','$marked','Moderate','Delete Topic')";
177 $result = mysql_query($sql);
178 echo "<font color=black>Topic deleted. Return to marked <a href=modme.php>messages</a>.</font>";
183 $datethe = date("n/j/y h:i:s A");
184 $sql = "UPDATE users SET notify='1' WHERE userid='$user'";
185 $result = mysql_query($sql);
186 $sql = "SELECT * FROM messages WHERE messageid='$message'";
187 $result = mysql_query($sql);
188 $myrow = mysql_fetch_array($result);
189 $messbod = $myrow["messbody"];
190 $meby = $myrow["messby"];
191 $date = $myrow["postdate"];
192 $sql = "SELECT * FROM users WHERE username='$meby'";
193 $result = mysql_query($sql);
194 $myrow = mysql_fetch_array($result);
195 $userid = $myrow["userid"];
196 $modbod12 = "You are an asshole. Go away.";
197 $sql = "INSERT INTO systemnot (sysbod,sendto,sentat,active,sentfrom) VALUES ('$modbod12','$userid','$datethe','1','3')";
198 $result = mysql_query($sql);
199 $sql = "UPDATE marked SET active='0' WHERE markid='$marked'";
200 $result = mysql_query($sql);
201 $datedate = date("n/j/y H:i:s");
202 $sql = "INSERT INTO modded (modbod,board,topic,message,modby,moddedat,postedat) VALUES ('$messbod','$board','$topic','$message','$meby','$datedate','$date')";
203 $result = mysql_query($sql);
204 $sql = "DELETE FROM topics WHERE topicid='$topic'";
205 $result = mysql_query($sql);
206 $sql = "DELETE FROM messages WHERE topic='$topic'";
207 $result = mysql_query($sql);
208 $sql = "UPDATE users SET level='5' WHERE username='$meby'";
209 $result = mysql_query($sql);
210 $sql = "UPDATE users SET cookies='0' WHERE username='$meby'";
211 $result = mysql_query($sql);
212 $sql = "UPDATE users SET attack='0' WHERE username='$meby'";
213 $result = mysql_query($sql);
214 $sql = "UPDATE users SET money='0' WHERE username='$meby'";
215 $result = mysql_query($sql);
216 $sql = "UPDATE users SET faction='0' WHERE username='$meby'";
217 $result = mysql_query($sql);
218 $sql = "UPDATE users SET turns='0' WHERE username='$meby'";
219 $result = mysql_query($sql);
220 $usename = getusername($uname);
221 $sql = "INSERT INTO moderators (modby,modid,type,action) VALUES ('$usename','$marked','Moderate','Delete Topic, Suspend User')";
222 $result = mysql_query($sql);
223 echo "<font color=black>Topic deleted, user suspended. Return to marked <a href=modme.php>messages</a>.</style></font>";
228 $sql = "SELECT * FROM messages WHERE messageid='$message'";
229 $result = mysql_query($sql);
230 $myrow = mysql_fetch_array($result);
231 $messbod = $myrow["messbody"];
232 $meby = $myrow["messby"];
233 $sql = "SELECT * FROM users WHERE username='$meby'";
234 $result = mysql_query($sql);
235 $myrow = mysql_fetch_array($result);
236 $useid = $myrow["userid"];
237 $cooks = $myrow["cookies"];
239 $sql = "UPDATE users SET cookies='$cooks' WHERE userid='$useid'";
240 $result = mysql_query($sql);
241 $sql = "UPDATE marked SET active='0' WHERE markid='$marked'";
242 $result = mysql_query($sql);
243 $sql = "UPDATE messages SET auraed='1' WHERE messageid='$message'";
244 $result = mysql_query($sql);
245 $usename = getusername($uname);
246 $sql = "INSERT INTO moderators (modby,modid,type,action) VALUES ('$usename','$marked','Moderate','Remove 1 Aura')";
247 $result = mysql_query($sql);
248 echo "<font color=black>User lost 1 aura point. Return to marked <a href=modme.php>messages</a>.</style></font>";
253 $sql = "SELECT * FROM messages WHERE messageid='$message'";
254 $result = mysql_query($sql);
255 $myrow = mysql_fetch_array($result);
256 $messbod = $myrow["messbody"];
257 $meby = $myrow["messby"];
258 $sql = "SELECT * FROM users WHERE username='$meby'";
259 $result = mysql_query($sql);
260 $myrow = mysql_fetch_array($result);
261 $useid = $myrow["userid"];
262 $cooks = $myrow["cookies"];
264 $sql = "UPDATE users SET cookies='$cooks' WHERE userid='$useid'";
265 $result = mysql_query($sql);
266 $sql = "UPDATE marked SET active='0' WHERE markid='$marked'";
267 $result = mysql_query($sql);
268 $sql = "UPDATE messages SET auraed='1' WHERE messageid='$message'";
269 $result = mysql_query($sql);
270 $usename = getusername($uname);
271 $sql = "INSERT INTO moderators (modby,modid,type,action) VALUES ('$usename','$marked','Moderate','Remove 2 Aura')";
272 $result = mysql_query($sql);
273 echo "<font color=black>User lost 2 aura points. Return to marked <a href=modme.php>messages</a>.</style></font>";
278 $sql = "SELECT * FROM messages WHERE messageid='$message'";
279 $result = mysql_query($sql);
280 $myrow = mysql_fetch_array($result);
281 $messbod = $myrow["messbody"];
282 $meby = $myrow["messby"];
283 $sql = "SELECT * FROM users WHERE username='$meby'";
284 $result = mysql_query($sql);
285 $myrow = mysql_fetch_array($result);
286 $useid = $myrow["userid"];
287 $cooks = $myrow["cookies"];
289 $sql = "UPDATE users SET cookies='$cooks' WHERE userid='$useid'";
290 $result = mysql_query($sql);
291 $sql = "UPDATE marked SET active='0' WHERE markid='$marked'";
292 $result = mysql_query($sql);
293 $sql = "UPDATE messages SET auraed='1' WHERE messageid='$message'";
294 $result = mysql_query($sql);
295 $usename = getusername($uname);
296 $sql = "INSERT INTO moderators (modby,modid,type,action) VALUES ('$usename','$marked','Moderate','Remove 5 Aura')";
297 $result = mysql_query($sql);
298 echo "<font color=black>User lost 5 aura points. Return to marked <a href=modme.php>messages</a>.</style></font>";
303 $sql = "SELECT * FROM messages WHERE messageid='$message'";
304 $result = mysql_query($sql);
305 $myrow = mysql_fetch_array($result);
306 $messbod = $myrow["messbody"];
307 $meby = $myrow["messby"];
308 $sql = "SELECT * FROM users WHERE username='$meby'";
309 $result = mysql_query($sql);
310 $myrow = mysql_fetch_array($result);
311 $useid = $myrow["userid"];
312 $cooks = $myrow["cookies"];
314 $sql = "UPDATE users SET cookies='$cooks' WHERE userid='$useid'";
315 $result = mysql_query($sql);
316 $sql = "UPDATE marked SET active='0' WHERE markid='$marked'";
317 $result = mysql_query($sql);
318 $sql = "UPDATE messages SET auraed='1' WHERE messageid='$message'";
319 $result = mysql_query($sql);
320 $usename = getusername($uname);
321 $sql = "INSERT INTO moderators (modby,modid,type,action) VALUES ('$usename','$marked','Moderate','Remove 10 Aura')";
322 $result = mysql_query($sql);
323 echo "<font color=black>User lost 10 aura points. Return to marked <a href=modme.php>messages</a>.</style></font>";
326 if ($myrow["level"] >= 50)
328 $sql = "SELECT * FROM boards WHERE boardid='$board'";
329 $result = mysql_query($sql);
330 $myrow = mysql_fetch_array($result);
331 $boardname = $myrow["boardname"];
332 $sql = "SELECT * FROM topics WHERE topicid='$topic'";
333 $result = mysql_query($sql);
334 $myrow = mysql_fetch_array($result);
335 $topicname = $myrow["topicname"];
336 $reason = getreason($marked);
337 $reason = getreason2($reason, $marked);
338 echo "<font color=black><center><b>Board:</b> ".$boardname."<br><b>Topic: </b><a href=messagelist.php?board=".$board."&topic=".$topic.">".$topicname."</a></style><br><b>Reason:</b> ".$reason."</center>";
339 $sql = "SELECT * FROM messages WHERE messageid='$message'";
340 $result = mysql_query($sql);
341 $myrow = mysql_fetch_array($result);
342 $thetime = timetime($myrow["messageid"]);
343 $mes = stripslashes($myrow["messbody"]);
344 echo "<br><table width=100%>";
345 printf("<tr><td bgcolor=".$secondcolor."><font face=arial><b>From: </b>%s | <b>Posted:</b> %s | <a href=modnotice.php?board=%s&topic=%s&message=%s>Mark</a> for moderation</font></td></tr><tr><td bgcolor=".$firstcolor."><font face=arial>%s</font></td></tr></table>", $myrow["messby"], $thetime, $board, $topic, $myrow["messageid"], $mes);
347 <form method=post action=dosum.php?board=$board&topic=$topic&message=$message&marked=$marked><center>
348 <input type=submit name=nothing value=\"Do nothing\"> <input type=submit name=delete value=\"..And Delete Post\"> <input type=submit name=suspend value=\"..And Suspend User\"><br><br>
349 <input type=submit name=deltopic value=\"Delete Topic\"> <input type=submit name=suspend2 value=\"..And Suspend User\">
351 <input type=submit name=close value=\"Close Topic\">
352 <br><br><font color=black>Or<br><br><input type=submit name=one value=\"Remove One Point\"> <input type=submit name=two value=\"Remove Two Points\"> <input type=submit name=three value=\"Remove Five Points\"> <input type=submit name=four value=\"Remove Ten Points\">