3 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)) return 0;
8 $query_data=mysql_fetch_row($result);
12 $username=auth($uname,$pword);
15 echo "You are not <a href=login.php>logged in</a>.";
21 <form method
=post action
=modapp
.php
>
22 What time of day
do you browse GameFAQ
's Hell? (Include your timezone): <input type=text name=timeofday><br>
23 Write here what you think would make you a good moderator and a postitive contributor to GameFAQ's Hell
:<br
><textarea cols
=60 rows
=6 name
=bodbod2
></textarea
><br
>
24 <br
><Input type
=submit name
=submit value
="Apply!">
32 echo "You must enter an application essay to apply.<br><br>";
34 <form method
=post action
=modapp
.php
>
35 What time of day
do you browse GameFAQ
's Hell? (Include your timezone): <input type=text name=timeofday><br>
36 Write here what you think would make you a good moderator and a postitive contributor to GameFAQ's Hell
:<br
><textarea cols
=60 rows
=6 name
=bodbod2
></textarea
><br
>
37 <br
><Input type
=submit name
=submit value
="Apply!">
44 echo "You must enter the time of day you browse GameFAQs Hell.<br><br>";
46 <form method
=post action
=modapp
.php
>
47 What time of day
do you browse GameFAQ
's Hell? (Include your timezone): <input type=text name=timeofday><br>
48 Write here what you think would make you a good moderator and a postitive contributor to GameFAQ's Hell
:<br
><textarea cols
=60 rows
=6 name
=bodbod2
></textarea
><br
>
49 <br
><Input type
=submit name
=submit value
="Apply!">
54 $bodbod="<b>Browses at:</b> ".$timeofday."\n\n<b>Application:</b> ".$bodbod2;
55 $bodbod=ereg_replace("\n","<br>",$bodbod);
56 $bodbod=ereg_replace("<i>","<i>",$bodbod);
57 $bodbod=ereg_replace("</i>","</i>",$bodbod);
58 $bodbod=ereg_replace("<b>","<b>",$bodbod);
59 $bodbod=ereg_replace("<B>","<b>",$bodbod);
60 $bodbod=ereg_replace("</B>","</b>",$bodbod);
61 $bodbod=ereg_replace("<I>","<i>",$bodbod);
62 $bodbod=ereg_replace("</I>","</i>",$bodbod);
63 $bodbod=ereg_replace("</b>","</b>",$bodbod);
64 $sql="SELECT * FROM users WHERE username='$uname'";
65 $result=mysql_query($sql);
66 $myrow=mysql_fetch_array($result);
67 $usename=$myrow["username"];
68 $hasaura=$myrow["cookies"];
69 $toptit="Application for ".$usename." with ".$hasaura." aura.";
70 $sql="SELECT * FROM topics WHERE topicname='$toptit' AND boardnum=19";
71 $result=mysql_query($sql);
72 if (mysql_num_rows($result)>=1)
74 echo "A topic with this title has already been posted.";
78 $datedate=date("Y-n-j H:i");
79 $sql="INSERT INTO topics (topicname,boardnum,topicby,timesec,active,postdate) VALUES ('$toptit','19','$usename','$posttime','1','$datedate')";
80 $result=mysql_query($sql);
81 $topicid=mysql_insert_id($db);
82 $sql="INSERT INTO messages (topic,messby,messsec,messbody,mesboard,theorder,postdate) VALUES ('$topicid','$usename','$posttime','$bodbod','19','1','$datedate')";
83 $result=mysql_query($sql);
84 $datedate=date("n/j/y H:i:s");
85 $sql="UPDATE users SET lastactivity='$datedate' WHERE username='$uname'";
86 $result=mysql_query($sql);
87 echo "Your application is now to be processed. Return to <a href=index.php>home</a>.";