Username does not exist.";
} else {
$qcheck = "SELECT * FROM TU_VoteInfo WHERE User = '" . mysql_real_escape_string($_REQUEST['user']) . "'";
$qcheck.= " AND Submitted + " . $aweek . " > UNIX_TIMESTAMP()";
$check = mysql_num_rows(db_query($qcheck, $dbh));
if ($check != 0) {
$error.= "
" . mysql_real_escape_string($_REQUEST['user']) . " already has proposal running for them.
";
}
}
}
if (empty($_REQUEST['agenda'])) {
$error.= "Proposal cannot be empty.
";
}
}
if (!empty($_POST['addVote']) && empty($error)) {
$q = "INSERT INTO TU_VoteInfo (Agenda, User, Submitted, SubmitterID) VALUES ";
$q.= "('" . mysql_real_escape_string($_REQUEST['agenda']) . "', ";
$q.= "'" . mysql_real_escape_string($_REQUEST['user']) . "', ";
$q.= "UNIX_TIMESTAMP(), " . uid_from_sid($_COOKIE["AURSID"]) . ")";
db_query($q, $dbh);
print "New proposal submitted.
\n";
} else {
?>
Submit a proposal to vote on.
"; } ?>
Back";
} else {
print "You are not allowed to access this area.\n";
}
html_footer(AUR_VERSION);
# vim: ts=2 sw=2 noet ft=php
?>