ASP online Survey System

Source: Internet
Author: User


<meta http-equiv= "Content-language" content= "ZH-CN" >
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<meta name= "generator" content= "Microsoft FrontPage 4.0" >
<meta name= "ProgId" content= "FrontPage.Editor.Document" >
<link href= "New.css" Rel=stylesheet type=text/css>
<title></title>
<meta name= "Microsoft Border" content= "None" >
<style type= "Text/css" >
<!--
. Test {FONT-SIZE:13PX}
-->
</style>

<body>
<%
Dim conn
Dim connstr
Connstr= "dbq=" +server.mappath ("Vote.mdb") + ";D efaultdir=;D river={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 "<table cellspacing=0 cellpadding=0 border=1 valign= ' middle ' width= ' 100% ' Center ' bordercolor= ' #ffffff ' ><tr><td bgcolor= ' #f7f3f7 ' bordercolor= ' #808080 ' > '
Response.Write "<p Align=center&gt::: Survey results:::</p>"%>
<span class= "Test" ><br>
</span>
<p class= "Test" >[currently has <b><font color= "#FF0000" ><%=total%></font></b> people to participate in this site survey] <br>
<br>
&nbsp;
<table width= "424" border= "0" cellspacing= "0" cellpadding= "0" >
<tr>
&LT;TD width= "147" class= "test" height= ">"
<div align= "Right" > City Garden:</div>
</td>
&LT;TD width= "277" class= "test" height= "" > &nbsp;<%=rs ("Selecta")%> person
Account: <%=round (selecta,2)%>% </td>
</tr>
<tr>
&LT;TD width= "147" class= "test" height= ">"
<div align= "Right" > New World Garden:</div>
</td>
&LT;TD width= "277" class= "test" height= "" > &nbsp;<%=rs ("SELECTB")%> person
Account: <%=round (selectb,2)%>% </td>
</tr>
<tr>
&LT;TD width= "147" class= "test" height= ">"
<div align= "Right" > King Lake Garden:</div>
</td>
&LT;TD width= "277" class= "test" height= "" > &nbsp;<%=rs ("SELECTC")%> person
Account: <%=round (selectc,2)%>% </td>
</tr>
<tr>
&LT;TD width= "147" class= "test" height= ">"
<div align= "Right" > Dong Tai Garden:</div>
</td>
&LT;TD width= "277" class= "test" height= "" > &nbsp;<%=rs ("selectd")%> person
Account: <%=round (selectd,2)%>% </td>
</tr>
<tr>
&LT;TD width= "147" class= "test" height= ">"
<div align= "Right" > New Century Hao Yuan:</div>
</td>
&LT;TD width= "277" class= "test" height= "" > &nbsp;<%=rs ("selecte")%> person
Account: <%=round (selecte,2)%>% </td>
</tr>
<tr>
&LT;TD width= "147" class= "test" height= ">"
<div align= "Right" > Heights Golf Villa:</div>
</td>
&LT;TD width= "277" class= "test" height= "" > &nbsp;<%=rs ("SELECTF")%> person
Account: <%=round (selectf,2)%>% </td>
</tr>
<tr>
&LT;TD width= "147" class= "test" height= ">"
<div align= "Right" > Rich garden:</div>
</td>
&LT;TD width= "277" class= "test" height= "" > &nbsp;<%=rs ("SELECTG")%> person
Account: <%=round (selectg,2)%>% </td>
</tr>
<tr>
&LT;TD width= "147" class= "test" height= ">"
<div align= "Right" > Yong Hua Ting Garden:</div>
</td>
&LT;TD width= "277" class= "test" height= "" > &nbsp;<%=rs ("selecth")%> person
Account: <%=round (selecth,2)%>% </td>
</tr>
<tr>
&LT;TD width= "147" class= "test" height= ">"
<div align= "Right" > Kanazawa garden:</div>
</td>
&LT;TD width= "277" class= "test" height= "" > &nbsp;<%=rs ("selecti")%> person
Account: <%=round (selecti,2)%>% </td>
</tr>
<tr>
&LT;TD width= "147" class= "test" height= ">"
<div align= "Right" > Donghu garden:</div>
</td>
&LT;TD width= "277" class= "test" height= "" > &nbsp;<%=rs ("SELECTJ")%> person
Account: <%=round (selectj,2)%>%
<%
Else
Response.Write "No one has voted yet, you are welcome to vote!"
End If
Rs.close
Set rs=nothing
Conn.close
Set conn=nothing
%>
</td>
</tr>
</table>
</body>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.