Sub DisplaySurvey(TypeNum,Qnum,hrefPage )
dim qnumber,qvalue ,strTitle
strSql="Select * From Infotype Where TypePId="&TypeNum&" Order by TypeID Desc"
adoRst.Open StrSql,adoCon
If adoRst.Eof then
adoRst.Close
response.write "暂时没有调查问题!"
exit sub
End if
strTitle=adoRst("typeName")
'处理用户递交的网站调查表单
Sub DevSurvey()
Dim TotalCount,qcount
if Request.form("type")="do" then
if not request.Form ("answer")="" then
strSql="Update information set clickcount=Clickcount+1 Where InfoID="&Request.Form("answer")
adocon.execute strSql
else
response.Write "<div align='center'><b> 注 意 </b></div><br><br> 你没有选择任何项目进行投票,请先选择后再进行投票!这样才能看到调查的结果!"
exit sub
End IF
end If
strsql="select * from InfoType where TypeId="&Request.querystring("TypeID")
adorst.Open strSql,adocon
response.write("<table height='70%'><tr><td colspan=3><div align=center><b>"&adorst("TypeName")&"</div></td></tr>")
adorst.close
strSql="select * from Information where TypeID="&Request.querystring("TypeID")& " Order By ClickCount desc"
adorst.Open strSql,adocon
totalcount=0
qcount=0
do while Not adorst.eof
totalcount=totalcount+adorst("clickcount")
qcount=qcount+1
adorst.MoveNext
Loop
adorst.MoveFirst
do while not adorst.eof
Response.Write "<tr><td width='50%'>"&adorst("title")&":</td><td><div align='left'><hr size=5 color=#FF6666 width="&((adorst("clickcount")/totalcount)*200)&"></div></td><td>"&adorst("clickcount")&"</td></tr>"
adorst.MoveNext
loop
response.write "<tr><td colspan=3><hr color='#CCCCFF'><br>现在产生的总投票数为:"&totalcount&"票</td></tr></table>"