42 lines
1.3 KiB
PHP
42 lines
1.3 KiB
PHP
<?php
|
|
|
|
/* $Id: index.php 8 2009-01-11 06:02:53Z john $ */
|
|
$page="general";
|
|
include("header.php");
|
|
|
|
|
|
|
|
function general()
|
|
{ global $user, $url, $database;
|
|
if(isset($_POST["addsuggestion"]))
|
|
{
|
|
$query=$database->database_query("SELECT * FROM se_users WHERE user_username='".$database->database_real_escape_string(trim($_POST["nominate"]))."'");
|
|
|
|
|
|
$row=$database->database_fetch_array($query);
|
|
|
|
$database->database_query("INSERT INTO bateworldcom_zips.nominations SET user_id='".$database->database_real_escape_string($user->user_info["user_id"])."', why='".$database->database_real_escape_string($_POST["why"])."', nominated='".$database->database_real_escape_string($row["user_id"])."'");
|
|
|
|
$id=$database->database_insert_id();
|
|
?>
|
|
Your nomination has been submitted. <br /><br />
|
|
|
|
<?php
|
|
}
|
|
else{
|
|
?>
|
|
Want to nominate someone as a Bate Hero? Do it here!<form method="post" action="nominate.php">
|
|
<table>
|
|
<tr>
|
|
<td class="form1">User:</td><td class="form2">
|
|
<input type="text" name="nominate">
|
|
</td></tr>
|
|
<tr>
|
|
<td class="form1">Why:</td><td class="form2"><textarea name="why" style="width:350px; height:250px;"></textarea></td></tr>
|
|
<tr><td class="form1"></td><td class="form2"><input type="submit" name="addsuggestion" value="Add Nomination">
|
|
</td></tr>
|
|
</table></form>
|
|
<? }}
|
|
|
|
include("footer.php");
|
|
?>
|