1 <?php
include ("config.php");
2 function auth($userid, $password)
4 $sql = "SELECT username FROM users WHERE username='$userid' AND userpass='$password'";
5 $result = mysql_query($sql);
6 if (!mysql_num_rows($result))
10 $query_data = mysql_fetch_row($result);
11 return $query_data[0];
14 function timetime($topicid)
16 $sql = "SELECT * FROM messages WHERE messageid='$topicid'";
17 $result = mysql_query($sql);
18 $myrow = mysql_fetch_array($result);
19 $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);
22 $username = auth($uname, $pword);
25 echo "You cannot mark messages.";
30 echo "Invalid boardID.";
35 echo "Invalid topicID.";
40 echo "Invalid messageID.";
45 echo "You cannot suggest messages for aura on the asshole board.";
48 include ("colors.inc");
52 $sql = "SELECT * FROM suggest WHERE message='$message'";
53 $result = mysql_query($sql);
54 if (mysql_num_rows($result) >= 1)
56 $myrow = mysql_fetch_array($result);
57 $sugtimess = $myrow["sugtimes"] +
1;
58 $sql = "UPDATE suggest SET sugtimes='$sugtimess' WHERE message='$message'";
59 $result = mysql_query($sql);
60 echo "<font color=black>Thank you for suggesting this probobly hilarious message. Return to from which you <a href=messagelist.php?board=".$board."&topic=".$topic."><font color=blue>came</font></a>.";
65 $sql = "SELECT * FROM users WHERE username='$uname'";
66 $result = mysql_query($sql);
67 $myrow = mysql_fetch_array($result);
68 $usename = $myrow["username"];
69 $other = htmlspecialchars($other);
70 $sql = "INSERT INTO suggest (reason,sugwho,message,topic,board,active,reason2,sugtimes) VALUES ('$reason','$usename','$message','$topic','$board','1','$other','1')";
71 $result = mysql_query($sql);
72 echo "<font color=black>Thank you for suggesting this probobly hilarious message. Return to from which you <a href=messagelist.php?board=".$board."&topic=".$topic."><font color=blue>came</font></a>.";
75 $sql = "SELECT * FROM users WHERE username='$uname'";
76 $result = mysql_query($sql);
77 $myrow = mysql_fetch_array($result);
78 $usename = $myrow["username"];
79 $sql = "INSERT INTO suggest (reason,sugwho,message,topic,board,active,sugtimes) VALUES ('$reason','$usename','$message','$topic','$board','1','1')";
80 $result = mysql_query($sql);
82 echo "<font color=black>Thank you for suggesting this person for Aura. Return to from which you <a href=messagelist.php?board=".$board."&topic=".$topic."><font color=blue>came</font></a>.";
86 $sql = "SELECT * FROM boards WHERE boardid='$board'";
87 $result = mysql_query($sql);
88 $myrow = mysql_fetch_array($result);
89 $boardname = $myrow["boardname"];
90 $sql = "SELECT * FROM topics WHERE topicid='$topic'";
91 $result = mysql_query($sql);
92 $myrow = mysql_fetch_array($result);
93 $topicname = $myrow["topicname"];
94 $sql = "SELECT * FROM messages WHERE messageid='$message'";
95 $result = mysql_query($sql);
96 $myrow = mysql_fetch_array($result);
97 echo "<center><font color=black face=arial>Board: ".$boardname."<br>Topic Name: ".$topicname."</center>";
98 $thetime = timetime($myrow["messageid"]);
99 $mes = stripslashes($myrow["messbody"]);
100 echo "<br><b><font color=black>Do not mark yourself, you will only lose points. If you suggest yourself from an alternate account, both of them will lose points.</b><br></font><table width=100%>";
101 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 color=white>%s</font></td></tr></table>", $myrow["messby"], $thetime, $board, $topic, $myrow["messageid"], $mes);
104 <form method
=post action
=suggestcook
.php?board
=<?
= $board ?
>&topic
=<?
= $topic ?
>&message
=<?
= $message ?
>>
105 <input type
=radio name
=reason value
=1> <?
if (
108 echo "<font color=white>";
111 echo "<font color=black>";
113 ?
> Intelligent
.<br
></font
>
114 <input type
=radio name
=reason value
=2> <?
if (
117 echo "<font color=white>";
120 echo "<font color=black>";
122 ?
> Informative
.<br
></font
>
123 <input type
=radio name
=reason value
=3> <?
if (
126 echo "<font color=white>";
129 echo "<font color=black>";
132 <Input type
=radio name
=reason value
=4> <?
if (
135 echo "<font color=white>";
138 echo "<font color=black>";
140 ?
> Other
:</font
> <input type
=text name
=other
><br
><br
>
141 <input type
=submit name
=submit Value
="Suggest this person.">