ACE Voting Online System
An error has occurred (cannot find election).";
// error_message(sql_error());
}
else if(mysql_num_rows($findElectionRslt) == 1)
{
$electionInfo = mysql_fetch_array($findElectionRslt);
echo "
Personal Voting History for: {$electionInfo['ElectionName']}
";
echo "
Election Description: {$electionInfo['ElectionDescript']}
";
echo "
Election Date Close: ".timeconvert($electionInfo['EndDate'])."
";
if(! empty ($electionInfo['DefaultInfoPath']))
{
echo "
Link to additional information about the Election. (Note: may no longer be available)
";
}
if( $electionInfo['ElectionType'] == "Candidate" || $electionInfo['ElectionType'] == "Candidate_S" )
{
$findVotes = "select CandidateName,VoteTimestamp,CandWriteIn,CandVoteID from SessionVotes left join Candidate on (CandidateID=CandVoteID) where VoteSessMemID='$ID' and ElectVoteID='$e' and (CandVoteID > 0 || CandWriteIn is not null) order by BallotOrder";
$findVotesRslt = mysql_query($findVotes);
if(!$findVotesRslt)
{
echo "
An error has occurred (cannot find personal votes).
";
error_message(sql_error());
}
else
{
echo "
Your selected choices:
";
while($voteresults = mysql_fetch_array($findVotesRslt))
{
if( $voteresults['CandVoteID'] == 0 )
{ $CandidateName = $voteresults['CandWriteIn']; $CandidateName = $CandidateName." (Write In)"; }
else
{ $CandidateName = $voteresults['CandidateName']; }
echo "- $CandidateName (vote recorded on: {$voteresults['VoteTimestamp']})
";
}
echo "
";
}
}
else if( $electionInfo['ElectionType'] == "Ticket" )
{
$findVotes = " select CandidateName,CategoryName,VoteTimestamp from SessionVotes left join Candidate on (CandidateID=CandVoteID) left join CandidateCategory on (CategoryVote=CategoryID) where VoteSessMemID='$ID' and ElectVoteID='$e' and CandVoteID > 0 order by Category ";
$findVotesRslt = mysql_query($findVotes);
if(!$findVotesRslt)
{
echo "
An error has occurred (cannot find personal votes).
";
error_message(sql_error());
}
else
{
echo "
Your selected choices:
";
// currently coded for only Measures, not candidates
while($voteresults = mysql_fetch_array($findVotesRslt))
{
echo "- {$voteresults['CandidateName']}, {$voteresults['CategoryName']} (vote recorded on: {$voteresults['VoteTimestamp']})
";
}
echo "
";
}
}
else if( $electionInfo['ElectionType'] == "Measure" )
{
$findVotes = "select * from SessionVotes left join Measures on (MeasureID=MeasVoteID) where VoteSessMemID='$ID' and ElectVoteID='$e' order by MeasBallotOrder";
$findVotesRslt = mysql_query($findVotes);
if(!$findVotesRslt)
{
echo "
An error has occurred (cannot find personal votes).
";
// error_message(sql_error());
}
else
{
echo "
Your selected choices:
";
// currently coded for only Measures, not candidates
while($voteresults = mysql_fetch_array($findVotesRslt))
{
echo "- {$voteresults['MeasureName']}: {$voteresults['MeasVoteValue']}
";
}
echo "
";
}
}
}
}
else
{
echo "
An error has occurred. (Possible access permission problem)
Return to Main to log in.
";
}
echo "
Back | ";
echo "
Return to Elections/Ballots/Surveys main menu";
echo "
";
?>