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>asp Online Survey System </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 &lt;table cellspacing=0 cellpadding=0 border=1 ' valign= ' Middle ' width= ' 100% ' height= ' Ali gn= ' center ' bordercolor= ' #ffffff ' &gt;&lt;tr&gt;&lt;td bgcolor= ' #f7f3f7 ' bordercolor= ' #808080 ' &gt; '


Response.Write "&lt;p align=center&gt::: Investigation Results:::&lt;/p&gt;"%&gt;


&lt;span class= "test" &gt;&lt;br&gt;


&lt;/span&gt;


&lt;p class= "test" &gt;[there are &lt;b&gt;&lt;font color= "#FF0000" &gt;&lt;%=total%&gt;&lt;/font&gt;&lt;/b&gt; People participate in this site survey]&lt;br&gt;


&lt;br&gt;


&amp;nbsp;


&lt;table width= "424" border= "0" cellspacing= "0" cellpadding= "0" &gt;


&lt;tr&gt;


&LT;TD width= "147" class= "test" height= "&gt;
"

&lt;div align= "right" &gt; City Garden:&lt;/div&gt;


&lt;/td&gt;


&lt;td width= "277" class= "test" height= "&gt;&lt;img" Src=redbar.gif width=&lt;%=int (selecta*2)%&gt; height=10& Gt;&amp;nbsp;&lt;%=rs ("Selecta")%&gt; people


: &lt;%=round (selecta,2)%&gt;% &lt;/td&gt;


&lt;/tr&gt;


&lt;tr&gt;


&lt;td width= "147" class= "test" height= "&gt;
"

&lt;div align= "right" &gt; New World Garden:&lt;/div&gt;


&lt;/td&gt;


&lt;td width= "277" class= "test" height= "&gt;&lt;img" Src=redbar.gif width=&lt;%=int (selectb*2)%&gt; height=10& Gt;&amp;nbsp;&lt;%=rs ("SELECTB")%&gt; people


Account: &lt;%=round (selectb,2)%&gt;% &lt;/td&gt;


&lt;/tr&gt;


&lt;tr&gt;


&lt;td width= "147" class= "test" height= "&gt;
"

&lt;div align= "right" &gt; King Lake Garden:&lt;/div&gt;


&lt;/td&gt;


&lt;td width= "277" class= "test" height= "&gt;&lt;img" Src=redbar.gif width=&lt;%=int (selectc*2)%&gt; height=10& Gt;&amp;nbsp;&lt;%=rs ("SELECTC")%&gt; people


: &lt;%=round (selectc,2)%&gt;% &lt;/td&gt;


&lt;/tr&gt;


&lt;tr&gt;


&lt;td width= "147" class= "test" height= "&gt;
"

&lt;div align= "right" &gt; Dong Tai Garden:&lt;/div&gt;


&lt;/td&gt;


&LT;TD width= "277" class= "test" height= "" &gt;&lt;img src=redbar.gif (width=&lt;%=int) selectd*2%&gt; &amp;nbsp;&lt;%=rs ("SELECTD")%&gt; people


: &lt;%=round (selectd,2)%&gt;% &lt;/td&gt;


&lt;/tr&gt;


&lt;tr&gt;


&lt;td width= "147" class= "test" height= "&gt;
"

&lt;div align= "Right" &gt; New Century Hao Yuan:&lt;/div&gt;


&lt;/td&gt;


&lt;td width= "277" class= "test" height= "&gt;&lt;img" Src=redbar.gif width=&lt;%=int (selecte*2)%&gt; height=10& Gt;&amp;nbsp;&lt;%=rs ("selecte")%&gt; people


: &lt;%=round (selecte,2)%&gt;% &lt;/td&gt;


&lt;/tr&gt;


&lt;tr&gt;


&lt;td width= "147" class= "test" height= "&gt;
"

&lt;div align= "Right" &gt; Heights Golf Villa:&lt;/div&gt;


&lt;/td&gt;


&lt;td width= "277" class= "test" height= "&gt;&lt;img" Src=redbar.gif width=&lt;%=int (selectf*2)%&gt; height=10& Gt;&amp;nbsp;&lt;%=rs ("SELECTF")%&gt; people


: &lt;%=round (selectf,2)%&gt;% &lt;/td&gt;


&lt;/tr&gt;


&lt;tr&gt;


&lt;td width= "147" class= "test" height= "&gt;
"

&lt;div align= "right" &gt; Rich garden:&lt;/div&gt;


&lt;/td&gt;


&lt;td width= "277" class= "test" height= "&gt;&lt;img" Src=redbar.gif width=&lt;%=int (selectg*2)%&gt; height=10& Gt;&amp;nbsp;&lt;%=rs ("SELECTG")%&gt; people


: &lt;%=round (selectg,2)%&gt;% &lt;/td&gt;


&lt;/tr&gt;


&lt;tr&gt;


&lt;td width= "147" class= "test" height= "&gt;
"

&lt;div align= "Right" &gt; Yong Hua Ting garden:&lt;/div&gt;


&lt;/td&gt;


&lt;td width= "277" class= "test" height= "&gt;&lt;img" Src=redbar.gif width=&lt;%=int (selecth*2)%&gt; height=10& Gt;&amp;nbsp;&lt;%=rs ("Selecth")%&gt; people


: &lt;%=round (selecth,2)%&gt;% &lt;/td&gt;


&lt;/tr&gt;


&lt;tr&gt;


&lt;td width= "147" class= "test" height= "&gt;
"

&lt;div align= "right" &gt; Kanazawa garden:&lt;/div&gt;


&lt;/td&gt;


&LT;TD width= "277" class= "test" height= "" &gt;&lt;img src=redbar.gif (width=&lt;%=int) selecti*2%&gt; &amp;nbsp;&lt;%=rs ("Selecti")%&gt; people


: &lt;%=round (selecti,2)%&gt;% &lt;/td&gt;


&lt;/tr&gt;


&lt;tr&gt;


&lt;td width= "147" class= "test" height= "&gt;
"

&lt;div align= "right" &gt; East Lake Garden:&lt;/div&gt;


&lt;/td&gt;


&lt;td width= "277" class= "test" height= "&gt;&lt;img" Src=redbar.gif width=&lt;%=int (selectj*2)%&gt; height=10& Gt;&amp;nbsp;&lt;%=rs ("SELECTJ")%&gt; people


: &lt;%=round (selectj,2)%&gt;%


&lt;%


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


%&gt;


&lt;/td&gt;


&lt;/tr&gt;


&lt;/table&gt;


&lt;/body&gt;

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.