\n"; $step = 0; } $verify_token = ""; if (($_POST["verify_token"])) { $verify_token = $_POST["verify_token"]; } $anon_token_id = elec_verify_voted_token ($handle, $verify_token); if ($verify_token && $anon_token_id > 0) { $error .= "The vote verification token provided does not appear in the votes database. Please check that you entered it correctly.
\n"; } if (!$verify_token || $error) { echo "

Verify your ballot

\n"; echo "

Please enter your ballot verification token.

\n"; echo "
\n"; echo "

\n"; echo "\n"; echo " \n"; echo "
\n"; } else { $votes = elec_get_votes_for_anon_token ($handle, $anon_token_id); echo "\n"; echo "".htmlspecialchars($verify_token)."\n"; echo ""; if ($votes === FALSE) { echo "Can not access votes
for this anonymous token."; $error .= "Can not get votes for anonymous token ".htmlspecialchars($anon_token["anon_token"])."
\n"; } else if (count ($votes) == 0) { echo "This voter chose to vote for
none of the possible choices."; } else { echo "
    "; foreach ($votes as $vote) { if (array_key_exists ($vote["choice_id"], $choices_name)) echo "
  1. ".htmlspecialchars($votes["preference"])." ".htmlspecialchars($choices_name[$vote["choice_id"]])."
  2. \n"; else { echo "
  3. Unknown value (".htmlspecialchars($vote["choice_id"]).")
  4. \n"; $error .= "There was an unkown vote for anonymous token ".htmlspecialchars($anon_token["anon_token"]).": ".htmlspecialchars($vote["choice_id"])."
    \n"; } } echo "
"; } echo "\n"; echo "\n"; echo "\n"; } global $committee_name; global $committee_email; if (isset ($error) && $error != "") { echo "
".$error."
\n";; echo "

If you don't understand the error, you should probably contact the $committee_name, which can be reached at $committee_email.

\n"; } if (isset ($handle)) elec_sql_close ($handle); ?>