📄 pssort.asp
字号:
<% @language=VBScript %>
<%
option explicit
dim cnn,strcnn
set cnn=server.createobject("ADODB.Connection")
strcnn="Provider = Microsoft.Jet.OLEDB.4.0; Data Source = "&Server.Mappath("xjdb.mdb")
cnn.open strcnn
dim Fhxrps,Ffhxrps
dim hxrpscount,fhxrpscount
set hxrpscount=cnn.execute("select count(*) from hxrps")
set fhxrpscount=cnn.execute("select count(*) from fhxrps")
dim hnum,fhnum
hnum=hxrpscount(0)
fhnum=fhxrpscount(0)
set hxrpscount=nothing
set fhxrpscount=nothing
%>
<html>
<head>
<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">
<title>选举报告单排序结果</title>
</head>
<body>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" >
<td width="100%" colspan="3" height="22">
<p align="center"><u><font size="5">候选人选举报告单</font></u></td>
</tr>
<tr>
<td width="100%" colspan="3" height="22">
<p align="center"><%=now%></td>
</tr>
<tr>
<td width="100%" colspan="3" height="44">
<p align="center"><font size="4">*候选人票数如下*</font></td>
</tr>
<tr>
<td width="34%" height="18" style="border-style: solid; border-width: 1" align="center"><font size="4">序号</font></td>
<td width="33%" height="18" style="border-style: solid; border-width: 1" align="center"><font size="4">姓名</font></td>
<td width="33%" height="18" style="border-style: solid; border-width: 1" align="center"><font size="4">票数</font></td>
</tr>
<%
if hnum>0 then
dim xhi
xhi=1
set Fhxrps=cnn.execute("select * from hxrps order by hxr_ps DESC")
do while not Fhxrps.eof
%><tr>
<td width="34%" height="18" style="border-style: solid; border-width: 1" align="center"><font size="4"><%=xhi%></font></td>
<td width="33%" height="18" style="border-style: solid; border-width: 1" align="center"><font size="4"><%=Fhxrps(1)%></font></td>
<td width="33%" height="18" style="border-style: solid; border-width: 1" align="center"><font size="4"><%=Fhxrps(2)%></font></td>
</tr>
<%
xhi=xhi+1
Fhxrps.movenext
loop
set Fhxrps=nothing
end if
%>
<tr>
<td width="100%" colspan="3" height="48">
<p align="center"><font size="4">*另选人票数如下*</font></td>
</tr>
<tr>
<td width="34%" height="18" style="border-style: solid; border-width: 1" align="center"><font size="4">序号</font></td>
<td width="33%" height="18" style="border-style: solid; border-width: 1" align="center"><font size="4">姓名</font></td>
<td width="33%" height="18" style="border-style: solid; border-width: 1" align="center"><font size="4">票数</font></td>
</tr>
<%
if fhnum>0 then
dim xhj
xhj=1
set Ffhxrps=cnn.execute("select * from fhxrps order by fhxr_ps DESC")
do while not Ffhxrps.eof
%>
<tr>
<td width="34%" height="18" style="border-style: solid; border-width: 1" align="center"><font size="4"><%=xhj%></font></td>
<td width="33%" height="18" style="border-style: solid; border-width: 1" align="center"><font size="4"><%=Ffhxrps(1)%></font></td>
<td width="33%" height="18" style="border-style: solid; border-width: 1" align="center"><font size="4"><%=Ffhxrps(2)%></font></td>
</tr>
<%
xhj=xhj+1
Ffhxrps.movenext
loop
set Ffhxrps=nothing
end if
cnn.close
set cnn=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -