📄 viewjl.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 hxrcount,fhxrcount
set hxrcount = cnn.execute("select count(*) from hxr")
set fhxrcount = cnn.execute("select count(*) from fhxr")
dim hxrnum,fhxrnum
dim Fhxr,Ffhxr
hxrnum=hxrcount(0)
fhxrnum=fhxrcount(0)
%>
<html>
<title>查看唱票记录</title>
<body>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="100%">
<p align="center"><u><font size="4"><b>选举唱票原始记录</b></font></u></td>
</tr>
</center>
<tr>
<td width="100%" height="48">
<p align="center"><%=now%></td>
</tr>
</table>
</div>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td style="border-style: outset; border-width: 1" bgcolor="#C0C0C0">序号</td>
<td style="border-style: outset; border-width: 1" bgcolor="#C0C0C0">类型</td>
<%
if hxrnum>0 then
set Fhxr = cnn.execute("select hxr_name from hxr")
do while not Fhxr.eof
%>
<td style="border-style: outset; border-width: 1" bgcolor="#C0C0C0"><%=Fhxr(0)%></td>
<%
Fhxr.movenext
loop
set Fhxr=nothing
end if
%>
<%
if fhxrnum>0 then
set Ffhxr = cnn.execute("select fhxr_name from fhxr")
do while not Ffhxr.eof
%>
<td style="border-style: outset; border-width: 1" bgcolor="#C0C0C0"><%=Ffhxr(0)%></td>
<%
Ffhxr.movenext
loop
set Ffhxr=nothing
end if
%>
</tr>
<%
dim Fcp,Fcpcount,xhi
set Fcpcount = cnn.execute("select count(*) from changpiao")
if Fcpcount(0)>0 then
set Fcp = cnn.execute("select * from changpiao")
do while not Fcp.eof
%>
<tr>
<%
for xhi=1 to (hxrnum+fhxrnum+2)
%>
<td style="border-style: solid; border-width: 1" align="center">
<%
if xhi<=2 then
response.write Fcp(xhi)
else
if strcomp(trim(Fcp(2)),"弃权")=0 then
response.write "<font color='#FFFFFF'>.</font>"
else
if isnull(Fcp(xhi)) then
response.write "X"
end if
if strcomp(trim(Fcp(xhi)),"0")=0 then
response.write "X"
end if
if strcomp(trim(Fcp(xhi)),"1")=0 then
response.write "O"
end if
end if
end if
%></td>
<%
next
Fcp.movenext
%>
</tr>
<%
loop
end if
set Fcpcount=nothing
set Fcp=nothing
dim Fhxrpscount,Ffhxrpscount
dim Fhxrps,Ffhxrps
dim psxhi
set Fhxrpscount = cnn.execute("select count(*) from hxrps")
set Ffhxrpscount = cnn.execute("select count(*) from fhxrps")
%>
<td style="border-style: solid; border-width: 1" align="center">个人票数</td>
<td style="border-style: solid; border-width: 1" align="center">统计</td>
<%
if Fhxrpscount(0)>0 then
set Fhxrps=cnn.execute("select hxr_ps from hxrps")
do while not Fhxrps.eof
%>
<td style="border-style: solid; border-width: 1" align="center"><%=Fhxrps(0)%></td>
<%
Fhxrps.movenext
loop
set Fhxrps=nothing
end if
set Fhxrpscount=nothing
%>
<%
if Ffhxrpscount(0)>0 then
set Ffhxrps=cnn.execute("select fhxr_ps from fhxrps")
do while not Ffhxrps.eof
%>
<td style="border-style: solid; border-width: 1" align="center"><%=Ffhxrps(0)%></td>
<%
Ffhxrps.movenext
loop
set Ffhxrps=nothing
end if
set Ffhxrpscount=nothing
dim Ftj
set Ftj=cnn.execute("select * from tongji where id='tongji'")
%>
</table>
<tr><td>总票数:[<%=Ftj(1)%>] 有效票:[<%=Ftj(2)%>] 无效票:[<%=Ftj(3)%>] 弃权票:[<%=Ftj(4)%>]<td></tr>
<br>
<%set Ftj=nothing%>
</center>
</div>
</body>
</html>
<%
cnn.close
set hxrcount=nothing
set fhxrcount=nothing
set cnn=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -