"; edit_statement($nomination_id); } else { update_statement($username,$password,$nomination_id,$statement); } } elseif (!$nomination_id) { $query = "select * from nominations where status = 'Y' order by class_year='firstyear' ASC, class_year='sophomore' ASC, class_year='junior' ASC, class_year='senior' ASC, class_year='ada' ASC, position ASC"; $query_result = mysql_query ($query); $query_numrows = mysql_num_rows ($query_result); if ($query_numrows < 1) { echo ""; } else { echo ""; echo ""; echo ""; while ($row = mysql_fetch_row ($query_result)) { if ($row[2] == "ada") {$class = "Ada Class";} if ($row[2] == "firstyear") {$class = "Class of $firstyear_year";} if ($row[2] == "sophomore") {$class = "Class of $sophomore_year";} if ($row[2] == "junior") {$class = "Class of $junior_year";} if ($row[2] == "senior") {$class = "Class of $senior_year";} if ($row[7] == "") { $position_list .= "\n"; } else { $position_list .= "\n"; } } echo "$position_list"; } } else { if (!$action) { echo ""; $query = "select * from nominations where status = 'Y' AND nomination_id = '$nomination_id'"; $query_result = mysql_query ($query); while ($row = mysql_fetch_row ($query_result)) { if ($row[2] == "ada") {$class = "Ada Class";} if ($row[2] == "firstyear") {$class = "Class of $firstyear_year";} if ($row[2] == "sophomore") {$class = "Class of $sophomore_year";} if ($row[2] == "junior") {$class = "Class of $junior_year";} if ($row[2] == "senior") {$class = "Class of $senior_year";} $statement = nl2br($row[7]); $candidate_info .= ""; } echo "$candidate_info"; } else { if ($action == "edit") { edit_statement($nomination_id); } } } function update_statement($username,$password,$nomination_id,$statement) { # 1. Use LDAP to check their username/password include ("ldap_check.php"); if ($check == "true") { # 2. Check that their username matches the email address on the submission $query_email = "select email from nominations where nomination_id = \"$nomination_id\""; $query_email_result = mysql_query ($query_email); $row = mysql_fetch_row ($query_email_result); //$email = $row[0]; $email = substr($row[0], 0, strpos($row[0], "@")); if ($email == $username) { # 3. update the entry $query_text = "update nominations set statement = \"$statement\" where nomination_id = \"$nomination_id\""; // print ("$query_text"); $result = mysql_query ($query_text) or exit (mysql_error()); if (!$result) { print("\n"); } else { echo ""; } } else { echo ""; edit_statement($nomination_id); } } else { echo""; edit_statement($nomination_id); } } function edit_statement($nomination_id) { $today_date = date("Ym"); $today_year = substr($today_date,0,4); $today_month = substr($today_date,4,2); if ($today_month < 07) {} else {$today_year += 1;} $senior_year = $today_year; $junior_year = $today_year + 1; $sophomore_year = $today_year +2; $firstyear_year = $today_year +3; $query_text = "select name, email, class_year, position, statement from nominations where nomination_id = \"$nomination_id\""; $query_result = mysql_query ($query_text); while ($row = mysql_fetch_row ($query_result)) { $name = $row[0]; $email = $row[1]; $email_username = substr($email, 0, strpos($email, "@")); $class_year = $row[2]; $position = $row[3]; $statement = $row[4]; } if ($class_year == "ada") {$class = "Ada Class";} if ($class_year == "firstyear") {$class = "Class of $firstyear_year";} if ($class_year == "sophomore") {$class = "Class of $sophomore_year";} if ($class_year == "junior") {$class = "Class of $junior_year";} if ($class_year == "senior") {$class = "Class of $senior_year";} echo ""; echo ""; echo ""; echo "\n"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; } ?>
Approved SGA Candidates
 
You must enter a username and password.
There are currently no approved candidates.
To view a candidate's statement, click on the candidate's name.
Candidates can click on the \"Add/Edit Statement\" link next to their name to add or update their statement.
Statements need to be text-only without formatting or images.
 
Class Year Position NameCandidates Only
$class $row[3] $row[1]Add/Edit Statement
$class $row[3] $row[1]Add/Edit Statement
Candidate Statements

Class: $class
Position: $row[3]
Name: $row[1]
Statement:

$statement

There was an error updating your statement.
Your statement has been updated
\n
Your Groupwise username must match the email address username you signed up with.
Example:
Email: jdoe@email.smith.edu / Groupwise Username: jdoe
Your Groupwise username and password were not in the system. Please check that you typed them in correctly and try again.
Candidate Statement Update Form
$name
$email
$class
$position
 
Please enter your Groupwise username (the part to the left of @email.smith.edu) and password, then add or edit your statement.
Groupwise Username: @email.smith.edu
Groupwise Password:
 
Statement:


Back to the Candidate Statements page

Return to the voting homepage