Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require(__DIR__."/globals.php");
- $titles = array(
- 'Gangs',
- 'Gym',
- 'Players',
- 'Staff',
- 'Crimes',
- 'Profiles',
- 'Referrals',
- 'General',
- 'Other'
- );
- function mres($str) {
- return mysql_real_escape_string($str);
- }
- if(isset($_POST['suggestions'])) {
- $_POST['title'] = isset($_POST['title']) && ctype_alpha($_POST['title']) && in_array($_POST['title'], $titles) ? $_POST['title'] : null;
- if(empty($_POST['title']))
- echo "Invalid Choice.";
- mysql_query("INSERT INTO `suggestions`
- VALUES('','".$_POST['title']."',unix_timestamp(),'".mres($_POST['suggestions'])."','No','N/A','{$ir['username']}
- [{$ir['userid']}]')",$c) or die("Your suggestion processing has sensed an error, please click back and fix it.<br />
- -<a href='suggestion.php'>Back</a><br />");
- print "Your suggestion has been added!<br />
- <a href='suggestions.php'>> Back</a><br />";
- }
- else {
- print "<h3>Add Suggestion</h3><br />
- <hr width=50% /><b><font color=red>Do not post things that are NOT ideas or suggestions!</font></b><hr width=50% /><br />
- Suggestion Category:
- <select name='title' type='dropdown'>
- ".foreach($titles as $opt)
- printf("<option value='%1\$s'>%1\$s</option>", $opt)."
- </select><br /><br />
- <form method='post' action=''>
- Suggestion:<br />
- <textarea rows='7' cols='40' name='suggestions'></textarea><br />
- <input type='submit' name='suggestions' value='Process' />
- </form>";
- }
- $h->endpage();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment