F
foxmail
Unregistered / Unconfirmed
GUEST, unregistred user!
<%
u_input=request("u_input")
u_ip=request.servervariables("remote_addr")
set conn=Server.CreateObject("ADODB.Connection")
conn.open"DSN=poll;UID=sa;PWD=sa"
sql= "select distinctrow sum(selection1) as sum_selection1, "
sql= sql &
"sum(selection2) AS sum_selection2, sum(selection3) AS sum_selection3, sum(selection4) AS sum_selection4,"
sql= sql &
" count(*) AS total_votes "
sql= sql &
"FROM wanyong;"
set rs=Server.Createobject("ADODB.Recordset")
rs.open sql
total1=rs("sum_selection1")
total2=rs ("sum_selection2")
total3=rs("sum_selection3")
total4=rs ("sum_selection4")
count=rs("total_votes")
if count=0 then
count=1
%>
<br>
<center>
<h2>结果:</h2>
</center>
<p align="center">很好:有<%=total1%>人,占
<%= formatnumber((total1/count)*100,1) %>%<img src="red.jpg" height="10" width="<%= (total1/count)*100 %>">
<p align="center">较好:有<%=total2%>人,占
<%= formatnumber((total2/count)*100,1) %>%<img src="yellow.jpg" height="10" width="<%= (total2/count)*100 %>"><br>
一般:有<%=total3%>人,占
<%= formatnumber((total3/count)*100,1) %>%<img src="green.jpg" height="10" width="<%= (total3/count)*100 %>"><br>
较差:有<%=total4%>人,占
<%= formatnumber((total4/count)*100,1) %>%<img src="blue.jpg" height="10" width="<%= (total4/count)*100 %>"><br>
<BR>
<BR>
共有投票人: <%= formatnumber(count,0,0) %><br>
你来自: <%= u_ip %>
<% set rs=nothing%>
<br>
<input type=button value="关闭" onclick="window.close();"></p>
u_input=request("u_input")
u_ip=request.servervariables("remote_addr")
set conn=Server.CreateObject("ADODB.Connection")
conn.open"DSN=poll;UID=sa;PWD=sa"
sql= "select distinctrow sum(selection1) as sum_selection1, "
sql= sql &
"sum(selection2) AS sum_selection2, sum(selection3) AS sum_selection3, sum(selection4) AS sum_selection4,"
sql= sql &
" count(*) AS total_votes "
sql= sql &
"FROM wanyong;"
set rs=Server.Createobject("ADODB.Recordset")
rs.open sql
total1=rs("sum_selection1")
total2=rs ("sum_selection2")
total3=rs("sum_selection3")
total4=rs ("sum_selection4")
count=rs("total_votes")
if count=0 then
count=1
%>
<br>
<center>
<h2>结果:</h2>
</center>
<p align="center">很好:有<%=total1%>人,占
<%= formatnumber((total1/count)*100,1) %>%<img src="red.jpg" height="10" width="<%= (total1/count)*100 %>">
<p align="center">较好:有<%=total2%>人,占
<%= formatnumber((total2/count)*100,1) %>%<img src="yellow.jpg" height="10" width="<%= (total2/count)*100 %>"><br>
一般:有<%=total3%>人,占
<%= formatnumber((total3/count)*100,1) %>%<img src="green.jpg" height="10" width="<%= (total3/count)*100 %>"><br>
较差:有<%=total4%>人,占
<%= formatnumber((total4/count)*100,1) %>%<img src="blue.jpg" height="10" width="<%= (total4/count)*100 %>"><br>
<BR>
<BR>
共有投票人: <%= formatnumber(count,0,0) %><br>
你来自: <%= u_ip %>
<% set rs=nothing%>
<br>
<input type=button value="关闭" onclick="window.close();"></p>