熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> .NET編程 >> 正文

asp 在線調查系統

2022-06-13   來源: .NET編程 

  <head>
<meta httpequiv="ContentLanguage" content="zhcn">
<meta httpequiv="ContentType" content="text/html; charset=gb">
<meta name="GENERATOR" content="Microsoft FrontPage ">
<meta name="ProgId" content="FrontPageEditorDocument">
<LINK href="newcss" rel=stylesheet type=text/css>
<title>asp 在線調查系統</title>
<meta name="Microsoft Border" content="none">
<style type="text/css">
<!
test {  fontsize: px}
>
</style>
</head>

  <body>
<%
   dim conn  
   dim connstr
   connstr="DBQ="+servermappath("votemdb")+";DefaultDir=;DRIVER={Microsoft Access Driver (*mdb)};"
     set conn=servercreateobject("ADODBCONNECTION")
     connopen 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=servercreateobject("adodbrecordset")
sql="select * from vote where id="
rsopen sqlconn
if not rseof 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)*
selectb=(rs("selectb")/total)*
selectc=(rs("selectc")/total)*
selectd=(rs("selectd")/total)*
selecte=(rs("selecte")/total)*
selectf=(rs("selectf")/total)*
selectg=(rs("selectg")/total)*
selecth=(rs("selecth")/total)*
selecti=(rs("selecti")/total)*
selectj=(rs("selectj")/total)*
      responsewrite "<table  cellspacing= cellpadding= border= valign=middle width=% height=% align=center bordercolor=#ffffff ><tr><td bgcolor=#fff bordercolor=#>"
      responsewrite "<p align=center>::: 調 查 結 果 :::</p>" %>
<span class="test"><br>
</span>
<p class="test">[目前共有<b><font color="#FF"><%=total%></font></b>人參與本站調查]<br>
  <br>
  &nbsp;
<table width="" border="" cellspacing="" cellpadding="">
  <tr>
    <td width="" class="test" height="">
      <div align="right">城市花園:</div>
    </td>
    <td width="" class="test" height=""><img src=redbargif width=<%=int(selecta*)%> height=>&nbsp;<%=rs("selecta")%>人
      占<%=round(selecta)%>% </td>
  </tr>
  <tr>
    <td width="" class="test" height="">
      <div align="right">新世界花園:</div>
    </td>
    <td width="" class="test" height=""><img src=redbargif width=<%=int(selectb*)%> height=>&nbsp;<%=rs("selectb")%>人
      占<%=round(selectb)%>% </td>
  </tr>
  <tr>
    <td width="" class="test" height="">
      <div align="right">景湖花園:</div>
    </td>
    <td width="" class="test" height=""><img src=redbargif width=<%=int(selectc*)%> height=>&nbsp;<%=rs("selectc")%>人
      占<%=round(selectc)%>% </td>
  </tr>
  <tr>
    <td width="" class="test" height="">
      <div align="right">東泰花園:</div>
    </td>
    <td width="" class="test" height=""><img src=redbargif width=<%=int(selectd*)%> height=>&nbsp;<%=rs("selectd")%>人
      占<%=round(selectd)%>% </td>
  </tr>
  <tr>
    <td width="" class="test" height="">
      <div align="right">新世紀豪園:</div>
    </td>
    <td width="" class="test" height=""><img src=redbargif width=<%=int(selecte*)%> height=>&nbsp;<%=rs("selecte")%>人
      占<%=round(selecte)%>% </td>
  </tr>
  <tr>
    <td width="" class="test" height="">
      <div align="right">景峰高爾夫別墅:</div>
    </td>
    <td width="" class="test" height=""><img src=redbargif width=<%=int(selectf*)%> height=>&nbsp;<%=rs("selectf")%>人
      占<%=round(selectf)%>% </td>
  </tr>
  <tr>
    <td width="" class="test" height="">
      <div align="right">時富花園:</div>
    </td>
    <td width="" class="test" height=""><img src=redbargif width=<%=int(selectg*)%> height=>&nbsp;<%=rs("selectg")%>人
      占<%=round(selectg)%>% </td>
  </tr>
  <tr>
    <td width="" class="test" height="">
      <div align="right">雍華庭花園:</div>
    </td>
    <td width="" class="test" height=""><img src=redbargif width=<%=int(selecth*)%> height=>&nbsp;<%=rs("selecth")%>人
      占<%=round(selecth)%>% </td>
  </tr>
  <tr>
    <td width="" class="test" height="">
      <div align="right">金澤花園:</div>
    </td>
    <td width="" class="test" height=""><img src=redbargif width=<%=int(selecti*)%> height=>&nbsp;<%=rs("selecti")%>人
      占<%=round(selecti)%>% </td>
  </tr>
  <tr>
    <td width="" class="test" height="">
      <div align="right">東湖花園:</div>
    </td>
    <td width="" class="test" height=""><img src=redbargif width=<%=int(selectj*)%> height=>&nbsp;<%=rs("selectj")%>人
      占<%=round(selectj)%>%
      <% 
else 
  responsewrite "目前還沒有人投票歡迎您投票!" 
end if 
rsclose 
set rs=nothing 
connclose 
set conn=nothing 
%>
    </td>
  </tr>
</table>
</body>


From:http://tw.wingwit.com/Article/program/net/201311/14075.html
    推薦文章
    Copyright © 2005-2022 電腦知識網 Computer Knowledge   All rights reserved.