%
OPTION EXPLICIT
Response.Buffer = True
%>
<%
'Some before doings...
'Lets get the current poll...
Dim sTitle
Dim sQuestion
Dim vAnswers(9)
Dim vCount(9), sID
Dim vPercent(9)
sID = Request.QueryString("id")
If sID = "" Then
sID = -1
End If
Dim sError
'Are we trying to vote?
If Request.Form("R1") <> "" Then
'First try to vote...
sError = PollMentor_TryToVote(sID,Request.Form("R1") )
End If
'Get active one...
Dim nRet
nRet = PollMentor_GetPollInfo( sID, sTitle, sQuestion, vAnswers, vCount )
%>
香港明星籃球賽 2007
香港明星籃球賽 2007 |
<%=FAQ_GetAd( 1 )%> |
<%=sError%>
<%=sQuestion%> |
<%
Dim nCount, nMaxValue, nLowValue
'First of all get max value and nLowValue
nMaxValue = 0
For nCount=1 To 9
If vAnswers(nCount)<>"" And vCount(nCount)>nMaxValue Then
nMaxValue = vCount(nCount)
End If
Next
If nMaxValue = 0 Then
nMaxValue = 1
End If
Dim nMaxWidth
nMaxWidth = 200 'This is number of pixels for maxvalue
Dim nThisVal, nTotal, nPercent
nTotal = 0
'1. Go through all and get total
For nCount=1 To 9
If vAnswers(nCount)<>"" Then
nTotal = nTotal + vCount(nCount)
End If
Next
If nTotal = 0 Then
nTotal = 1
End If
'2. Go through all and get percent
For nCount=1 To 9
If vAnswers(nCount)<>"" Then
vPercent(nCount) = FormatNumber(vCount(nCount)/nTotal*100,1)
End If
Next
For nCount=1 To 9
If vAnswers(nCount)<>"" Then
nThisVal = FormatNumber(vCount(nCount)/nMaxValue * nMaxWidth,0)
%>
<%=vAnswers(nCount)%> |
(<%=vPercent(nCount)%> %) |
<%=vCount(nCount)%> 票 |
<%
End If
Next
%>
合共票數: <%=nTotal%>
|
|
©
2007 basketball.org.hk All Rights Reserved. |
<%=FAQ_GetAd( 2 )%> |