![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Talking Point Can we trust weather forecasters? Your reaction <% ballot="224980" ' Check nothing is broken broken = 0 if ballot = "" then broken = 1 end if set vt = Server.Createobject("mps.Vote") openresult = vt.Open("Vote", "sa", "") ' Created object? if IsObject(vt) = TRUE then ' Opened db? if openresult = True AND broken = 0 then ballotresult = vt.SetBallotName(ballot) ' read the vote votetotal=(vt.GetVoteCount(ballot, "yes")+vt.GetVoteCount(ballot, "no")) if votetotal <> 0 then ' there are votes in the database numberyes = vt.GetVoteCount(ballot, "yes") numberno = vt.GetVoteCount(ballot, "no") percentyes = Int((numberyes/votetotal)*100) percentno = 100 - percentyes ' fix graph so funny graph heights dont appear 'if percentyes = 0 then ' percentyes = 1 'end if 'if percentno = 0 then ' percentno = 1 'end if else ' summut went wrong frig it numberyes = 0 numberno = 0 percentyes = 50 percentno = 50 end if end if end if %> Votes so far:
Tell us what you think
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||