一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

asp 在线调查系统

时间:2009-07-07 编辑:简简单单 来源:一聚教程网







css" rel=stylesheet type=text/css>




<%
   dim conn  
   dim connstr
   connstr="DBQ="+server.mappath("vote.mdb")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
     set conn=server.createobject("ADODB.CONNECTION")
     conn.open connstr

dim rs
dim sql
dim selecta
dim selectb
dim selectc
dim selectd
dim selecte
dim selectf
dim selectg
dim selecth
dim selecti
dim selectj
dim total
set rs=server.createobject("adodb.recordset")
sql="select * from vote where id=1"
rs.open sql,conn,1,1
if not rs.eof then
total=rs("selecta")+rs("selectb")+rs("selectc")+rs("selectd")+rs("selecte")+rs("selectf")+rs("selectg")+rs("selecth")+rs("selecti")+rs("selectj")
selecta=(rs("selecta")/total)*100
selectb=(rs("selectb")/total)*100
selectc=(rs("selectc")/total)*100
selectd=(rs("selectd")/total)*100
selecte=(rs("selecte")/total)*100
selectf=(rs("selectf")/total)*100
selectg=(rs("selectg")/total)*100
selecth=(rs("selecth")/total)*100
selecti=(rs("selecti")/total)*100
selectj=(rs("selectj")/total)*100
      response.write ""
      response.write "

::: 调 查 结 果 :::

" %>



[目前共有<%=total%>人参与本站调查]

 

   


 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
 

     
城市花园:

   
height=10> <%=rs("selecta")%>人
      占:<%=round(selecta,2)%>%

     
新世界花园:

   
height=10> <%=rs("selectb")%>人
      占:<%=round(selectb,2)%>%

     
景湖花园:

   
height=10> <%=rs("selectc")%>人
      占:<%=round(selectc,2)%>%

     
东泰花园:

   
height=10> <%=rs("selectd")%>人
      占:<%=round(selectd,2)%>%

     
新世纪豪园:

   
height=10> <%=rs("selecte")%>人
      占:<%=round(selecte,2)%>%

     
景峰高尔夫别墅:

   
height=10> <%=rs("selectf")%>人
      占:<%=round(selectf,2)%>%

     
时富花园:

   
height=10> <%=rs("selectg")%>人
      占:<%=round(selectg,2)%>%

     
雍华庭花园:

   
height=10> <%=rs("selecth")%>人
      占:<%=round(selecth,2)%>%

     
金泽花园:

   
height=10> <%=rs("selecti")%>人
      占:<%=round(selecti,2)%>%

     
东湖花园:

   
height=10> <%=rs("selectj")%>人
      占:<%=round(selectj,2)%>%
      <% 
else 
  response.write "目前还没有人投票,欢迎您投票!" 
end if 
rs.close 
set rs=nothing 
conn.close 
set conn=nothing 
%>
   

 

热门栏目