📄 voteup.asp
字号:
<!-- #include file="conn.asp" -->
<%
'程序演示地址:http://www.5i58.net/diary.htm
'● 程序名:flash日记本和flash留言本 v1.2
'● 语言:ASP & as
'● 运行环境:Win2000 IIS,ASP+Access。
'● 开发者: www.5i58.net 我爱我吧学习网
'● 联系方式(技术支持):QQ:50810089 MSN: jingping_123456@hotmail.com(VIP技术支持)
'如果您想用作商业用途,请与我们联系,升级为 VIP 版本
set rs=server.CreateObject("ADODB.Recordset")
SQL="select * from TPvote"
rs.open SQL,conn,1,1
'得票数
rs.MoveFirst
Response.Write("TPcer1="&rs("TPcer")&"&")
rs.MoveNext
Response.Write("TPcer2="&rs("TPcer")&"&")
rs.MoveNext
Response.Write("TPcer3="&rs("TPcer")&"&")
rs.MoveNext
Response.Write("TPcer4="&rs("TPcer")&"&")
rs.MoveNext
Response.Write("TPcer5="&rs("TPcer")&"&")
rs.close
set rs=Nothing
%>
<%
'占百分比
Set tempRs = Server.CreateObject("ADODB.Recordset")
tempRs.ActiveConnection = conn
tempRs.Open "SELECT sum(TPcer) AS abc FROM TPvote"
if tempRs("abc")<>0 Then
tot_num=tempRs("abc")
'总票数
Response.Write("tot_num="&tot_num&"&")
tempRs.Close
tempRs.Open "SELECT * FROM TPvote"
tempRs.MoveFirst
Response.Write("TP1="&int(tempRs("TPcer")/tot_num*100)&"&")
tempRs.MoveNext
Response.Write("TP2="&int(tempRs("TPcer")/tot_num*100)&"&")
tempRs.MoveNext
Response.Write("TP3="&int(tempRs("TPcer")/tot_num*100)&"&")
tempRs.MoveNext
Response.Write("TP4="&int(tempRs("TPcer")/tot_num*100)&"&")
tempRs.MoveNext
Response.Write("TP5="&int(tempRs("TPcer")/tot_num*100)&"&")
tempRs.close
set tempRs=Nothing
end if
%>
<%
CloseDataConn
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -