From b462c6fc43a6efddbdd10b53e4094be6995929c3 Mon Sep 17 00:00:00 2001 From: Loui Chang Date: Mon, 23 Nov 2009 23:55:58 -0500 Subject: Bring TU addvote into the current layout. Signed-off-by: Loui Chang --- web/html/addvote.php | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) (limited to 'web/html/addvote.php') diff --git a/web/html/addvote.php b/web/html/addvote.php index 53044c0..192b396 100644 --- a/web/html/addvote.php +++ b/web/html/addvote.php @@ -15,32 +15,32 @@ if (isset($_COOKIE["AURSID"])) { if ($atype == "Trusted User" OR $atype == "Developer") { $dbh = db_connect(); - + if (!empty($_POST['addVote'])) { $error = ""; - + if (!empty($_POST['user'])) { $qcheck = "SELECT * FROM Users WHERE Username = '" . mysql_real_escape_string($_POST['user']) . "'"; $check = mysql_num_rows(db_query($qcheck, $dbh)); if ($check == 0) { - $error.= "
" . __("Username does not exist.") . "
"; + $error.= __("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'])) . "
"; + $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.") . "
"; + $error.= __("Length must be a number.") ; } else if ($_POST['length'] < 1) { - $error.= "
" . __("Length must be at least 1.") . "
"; + $error.= __("Length must be at least 1."); } else { $len = (60*60*24)*$_POST['length']; } @@ -49,7 +49,7 @@ if ($atype == "Trusted User" OR $atype == "Developer") { } if (empty($_POST['agenda'])) { - $error.= "
" . __("Proposal cannot be empty.") . "
"; + $error.= __("Proposal cannot be empty."); } } @@ -61,11 +61,17 @@ if ($atype == "Trusted User" OR $atype == "Developer") { $q.= ", " . uid_from_sid($_COOKIE["AURSID"]) . ")"; db_query($q, $dbh); - print "

" . __("New proposal submitted.") . "

\n"; + print "

" . __("New proposal submitted.") . "

\n"; } else { ?> -

-"; } ?> + + +

+ + +
+
+
'> @@ -76,14 +82,14 @@ if ($atype == "Trusted User" OR $atype == "Developer") {

-
+
'>
-
+
+
" . __("Back") . ""; } else { print __("You are not allowed to access this area."); } -- cgit v1.2.3-70-g09d2