📄 dblast.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 Fnum
set Fnum=cnn.execute("select serial from serialnumber where idkey='numkey'")
dim Fchangpiao,Fcpcount
set Fcpcount=cnn.execute("select count(*) from changpiao")
if Fcpcount(0)>0 then
set Fchangpiao=cnn.execute("select * from changpiao where 序号='"&(Fnum(0)-1)&"'")
dim Filetj
if Fchangpiao(2)="弃权" then
set Filetj=cnn.execute("select totalnum,nonum from tongji")
cnn.execute "update tongji set totalnum='"&(Filetj(0)-1)&"' where id='tongji'"
cnn.execute "update tongji set nonum='"&(Filetj(1)-1)&"' where id='tongji'"
end if
if Fchangpiao(2)="无效" then
set Filetj=cnn.execute("select totalnum,nousenum from tongji")
cnn.execute "update tongji set totalnum='"&(Filetj(0)-1)&"' where id='tongji'"
cnn.execute "update tongji set nousenum='"&(Filetj(1)-1)&"' where id='tongji'"
end if
if Fchangpiao(2)="有效" then
set Filetj=cnn.execute("select totalnum,usenum from tongji")
cnn.execute "update tongji set totalnum='"&(Filetj(0)-1)&"' where id='tongji'"
cnn.execute "update tongji set usenum='"&(Filetj(1)-1)&"' where id='tongji'"
dim hxrcount,fhxrcount
dim hxrnum,fhxrnum
set hxrcount = cnn.execute("select count(*) from hxr")
set fhxrcount = cnn.execute("select count(*) from fhxr")
hxrnum=hxrcount(0)
fhxrnum=fhxrcount(0)
set hxrcount=nothing
set fhxrcount=nothing
dim xhi,xhj
dim Fhxr,Ffhxr
dim revhxrps,revfhxrps
dim tmphk
set Fhxr=cnn.execute("select hxr_name from hxr")
for xhi=1 to hxrnum
set revhxrps=cnn.execute("select hxr_ps from hxrps where hxr_name='"&Fhxr(0)&"'")
tmphk=Fchangpiao(xhi+2)
if isnull(tmphk) then
tmphk="0"
end if
cnn.execute "update hxrps set hxr_ps="&(revhxrps(0)-Cint(tmphk))&" where hxr_name='"&Fhxr(0)&"'"
if not Fhxr.eof then
Fhxr.movenext
end if
set revhxrps=nothing
next
set Ffhxr=cnn.execute("select fhxr_name from fhxr")
for xhj=1 to fhxrnum
tmphk=Fchangpiao(hxrnum+xhj+2)
if isnull(tmphk) then
tmphk="0"
end if
set revfhxrps=cnn.execute("select fhxr_ps from fhxrps where fhxr_name='"&Ffhxr(0)&"'")
cnn.execute "update fhxrps set fhxr_ps="&(revfhxrps(0)-Cint(tmphk))&" where fhxr_name='"&Ffhxr(0)&"'"
if not Ffhxr.eof then
Ffhxr.movenext
end if
set revfhxrps=nothing
next
set Fhxr=nothing
set Ffhxr=nothing
end if
cnn.execute("delete from changpiao where 序号='"&(Fnum(0)-1)&"'")
cnn.execute("update serialnumber set serial="&(Fnum(0)-1)&" where idkey='numkey'")
set Filetj=nothing
else
response.write "<html><head><title></title><body>"
response.write vbLf
response.write "<script language="""&"VBScript"&""""&">"
response.write vbLf
response.write "alert("""&"无记录可删"&""")"
response.write vbLf
response.write "</script></body></html>"
end if
response.write "<script language='javascript'>"
response.write vbLf
response.write vbLf
response.write "window.opener=null;"
response.write vbLf
response.write "window.close();"
response.write vbLf
response.write "</script>"
cnn.close
set Fnum=nothing
set Fcpcount=nothing
set Fchangpiao=nothing
set cnn=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -