<% OPTION EXPLICIT Response.Buffer = True %> <% 'Some before doings... 'Lets get the current poll... Dim sTitle Dim sQuestion Dim vAnswers(8) Dim vCount(8), sID Dim vPercent(8) 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 ) %> 2005香港籃球聯賽–主席盃甲一組籃球明星對抗賽

2005香港籃球聯賽

主席盃甲一組籃球明星對抗賽
 

<%=FAQ_GetAd( 1 )%>
<%=sError%> <% Dim nCount, nMaxValue, nLowValue 'First of all get max value and nLowValue nMaxValue = 0 For nCount=1 To 8 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 8 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 8 If vAnswers(nCount)<>"" Then vPercent(nCount) = FormatNumber(vCount(nCount)/nTotal*100,1) End If Next For nCount=1 To 8 If vAnswers(nCount)<>"" Then nThisVal = FormatNumber(vCount(nCount)/nMaxValue * nMaxWidth,0) %> <% End If Next %>

<%=sQuestion%>

<%=vAnswers(nCount)%>  (<%=vPercent(nCount)%> %) <%=vCount(nCount)%> 票

合共票數: <%=nTotal%>

 


© 2005 basketball.org.hk All Rights Reserved. <%=FAQ_GetAd( 2 )%>