" . __("Username does not exist.") . "";
} else {
$qcheck = "SELECT * FROM TU_VoteInfo WHERE User = '" . mysql_real_escape_string($_POST['user']) . "'";
$qcheck.= " AND End > UNIX_TIMESTAMP()";
$check = mysql_num_rows(db_query($qcheck, $dbh));
if ($check != 0) {
$error.= "
" . __("%s already has proposal running for them.", htmlentities($_POST['user'])) . "
";
}
}
}
if (!empty($_POST['length'])) {
if (!is_numeric($_POST['length'])) {
$error.= "" . __("Length must be a number.") . "
";
} else if ($_POST['length'] < 1) {
$error.= "" . __("Length must be at least 1.") . "
";
} else {
$len = (60*60*24)*$_POST['length'];
}
} else {
$len = 60*60*24*7;
}
if (empty($_POST['agenda'])) {
$error.= "" . __("Proposal cannot be empty.") . "
";
}
}
if (!empty($_POST['addVote']) && empty($error)) {
$q = "INSERT INTO TU_VoteInfo (Agenda, User, Submitted, End, SubmitterID) VALUES ";
$q.= "('" . mysql_real_escape_string($_POST['agenda']) . "', ";
$q.= "'" . mysql_real_escape_string($_POST['user']) . "', ";
$q.= "UNIX_TIMESTAMP(), UNIX_TIMESTAMP() + " . mysql_real_escape_string($len);
$q.= ", " . uid_from_sid($_COOKIE["AURSID"]) . ")";
db_query($q, $dbh);
print "" . __("New proposal submitted.") . "
\n";
} else {
?>
"; } ?>
" . __("Back") . "";
} else {
print __("You are not allowed to access this area.");
}
html_footer(AUR_VERSION);