📄 main2.asp
字号:
set rs=nothing
%>
</select>
</div></td>
<%
'获得大型装备的名称
eqname=mid(request("eqname"),2)
'response.Write(eqname)
'response.End()
%>
<%
'获得大型装备的编制数
if (eqname="" or eqname="择大型装备名称")then
set rs1 = server.createobject("adodb.recordset")
sql1="select * from mtk_authorized "&condition
'response.Write(sql1)
rs1.open sql1,conn, 1,1
eqauthorized1="0"
do while not (rs1.eof or rs1.bof)
eqauthorized1=cstr(cint(eqauthorized1)+rs1("authorized"))
rs1.movenext
loop
set rs1=nothing
set rs2 = server.createobject("adodb.recordset")
sql2="select * from mca_authorized "&condition
'response.write(sql2)
rs2.open sql2,conn, 1,1
eqauthorized2="0"
do while not (rs2.eof or rs2.bof)
eqauthorized2=cstr(cint(eqauthorized2)+rs2("authorized"))
rs2.movenext
loop
set rs2=nothing
set rs3 = server.createobject("adodb.recordset")
sql3="select * from mvo_authorized "&condition
'response.Write(sql3)
rs3.open sql3,conn, 1,1
eqauthorized3="0"
do while not (rs3.eof or rs3.bof)
eqauthorized3=cstr(cint(eqauthorized3)+rs3("authorized"))
rs3.movenext
loop
set rs3=nothing
set rs4 = server.createobject("adodb.recordset")
sql4="select * from men_authorized "&condition
'response.write(sql4)
rs4.open sql4,conn, 1,1
eqauthorized4="0"
do while not (rs4.eof or rs4.bof)
eqauthorized4=cstr(cint(eqauthorized4)+rs4("authorized"))
rs4.movenext
loop
set rs4=nothing
set rs5 = server.createobject("adodb.recordset")
sql5="select * from mfh_authorized "&condition
'response.write(sql5)
rs5.open sql5,conn, 1,1
eqauthorized5="0"
do while not (rs5.eof or rs5.bof)
eqauthorized5=cstr(cint(eqauthorized5)+rs5("authorized"))
rs5.movenext
loop
set rs5=nothing
eqauthorized=cstr(cint(eqauthorized1)+cint(eqauthorized2)+cint(eqauthorized3)+cint(eqauthorized4)+cint(eqauthorized5))
else
'选择此大型装备来自哪个表,并选择该大型装备的编制数
tableid=left(request("eqname"),1)
if tableid="1" then
sql = "select authorized from mtk_authorized "&condition&" and equipname='"&eqname&"'"
else if tableid="2" then
sql = "select authorized from mca_authorized "&condition&" and equipname='"&eqname&"'"
else if tableid="3" then
sql = "select authorized from mvo_authorized "&condition&" and equipname='"&eqname&"'"
else if tableid="4" then
sql = "select authorized from men_authorized "&condition&" and enname='"&eqname&"'"
else if tableid="5" then
sql = "select authorized from mfh_authorized "&condition&" and equipname='"&eqname&"'"
end if
end if
end if
end if
end if
set rs = server.createobject("adodb.recordset")
rs.open sql,conn, 1,1
eqauthorized="0"
do while not (rs.eof or rs.bof)
eqauthorized=cstr(cint(eqauthorized)+rs("authorized"))
rs.movenext
loop
set rs=nothing
end if
%>
<%
'获得大型装备的现有数
if (eqname="" or eqname="择大型装备名称")then
set rs1 = server.createobject("adodb.recordset")
sql1="select count(*) from mtk_equipment "&condition
rs1.open sql1,conn, 1,1
eqnowcount1="0"
do while not (rs1.eof or rs1.bof)
eqnowcount1=cstr(cint(eqnowcount1)+rs1(0))
rs1.movenext
loop
set rs1=nothing
set rs2 = server.createobject("adodb.recordset")
sql2="select count(*) from mca_equipment "&condition
rs2.open sql2,conn, 1,1
eqnowcount2="0"
do while not (rs2.eof or rs2.bof)
eqnowcount2=cstr(cint(eqnowcount2)+rs2(0))
rs2.movenext
loop
set rs2=nothing
set rs3 = server.createobject("adodb.recordset")
sql3="select count(*) from mvo_equipment "&condition
rs3.open sql3,conn, 1,1
eqnowcount3="0"
do while not (rs3.eof or rs3.bof)
eqnowcount3=cstr(cint(eqnowcount3)+rs3(0))
rs3.movenext
loop
set rs3=nothing
set rs4 = server.createobject("adodb.recordset")
sql4="select count(*) from men_vehicle "&condition
rs4.open sql4,conn, 1,1
eqnowcount4="0"
do while not (rs4.eof or rs4.bof)
eqnowcount4=cstr(cint(eqnowcount4)+rs4(0))
rs4.movenext
loop
set rs4=nothing
set rs5 = server.createobject("adodb.recordset")
sql5="select count(*) from mfh_equipment "&condition
rs5.open sql5,conn, 1,1
eqnowcount5="0"
do while not (rs5.eof or rs5.bof)
eqnowcount5=cstr(cint(eqnowcount5)+rs5(0))
rs5.movenext
loop
set rs5=nothing
eqnowcount=cstr(cint(eqnowcount1)+cint(eqnowcount2)+cint(eqnowcount3)+cint(eqnowcount4)+cint(eqnowcount5))
else
'选择此大型装备来自哪个表,并选择改大型装备的现有数
tableid=left(request("eqname"),1)
if tableid="1" then
sql = "select count(*) from mtk_equipment "&condition&" and equipname='"&eqname&"'"
else if tableid="2" then
sql = "select count(*) from mca_equipment "&condition&" and equipname='"&eqname&"'"
else if tableid="3" then
sql = "select count(*) from mvo_equipment "&condition&" and equipname='"&eqname&"'"
else if tableid="4" then
sql = "select count(*) from men_vehicle "&condition&" and enname='"&eqname&"'"
else if tableid="5" then
sql = "select count(*) from mfh_equipment "&condition&" and equipname='"&eqname&"'"
end if
end if
end if
end if
end if
set rs = server.createobject("adodb.recordset")
rs.open sql,conn, 1,1
eqnowcount="0"
do while not (rs.eof or rs.bof)
eqnowcount=cstr(cint(eqnowcount)+cint(rs(0)))
rs.movenext
loop
set rs=nothing
end if
%>
<%
'获得大型装备的完好数
if (eqname="" or eqname="择大型装备名称")then
set rs1 = server.createobject("adodb.recordset")
sql1="select count(*) from mtk_equipment "&condition&" and wellornot='完好'"
rs1.open sql1,conn, 1,1
eqwellcount1="0"
do while not (rs1.eof or rs1.bof)
eqwellcount1=cstr(cint(eqwellcount1)+rs1(0))
rs1.movenext
loop
set rs1=nothing
set rs2 = server.createobject("adodb.recordset")
sql2="select count(*) from mca_equipment "&condition&" and style='完好'"
rs2.open sql2,conn, 1,1
eqwellcount2="0"
do while not (rs2.eof or rs2.bof)
eqwellcount2=cstr(cint(eqwellcount2)+rs2(0))
rs2.movenext
loop
set rs2=nothing
set rs3 = server.createobject("adodb.recordset")
sql3="select count(*) from mvo_equipment "&condition&" and style='完好'"
rs3.open sql3,conn, 1,1
eqwellcount3="0"
do while not (rs3.eof or rs3.bof)
eqwellcount3=cstr(cint(eqwellcount3)+rs3(0))
rs3.movenext
loop
set rs3=nothing
set rs4 = server.createobject("adodb.recordset")
sql4="select count(*) from men_vehicle "&condition&" and skillcondition='完好'"
rs4.open sql4,conn, 1,1
eqwellcount4="0"
do while not (rs4.eof or rs4.bof)
eqwellcount4=cstr(cint(eqwellcount4)+rs4(0))
rs4.movenext
loop
set rs4=nothing
set rs5 = server.createobject("adodb.recordset")
sql5="select count(*) from mfh_equipment "&condition&" and skcondition='完好'"
rs5.open sql5,conn, 1,1
eqwellcount5="0"
do while not (rs5.eof or rs5.bof)
eqwellcount5=cstr(cint(eqwellcount5)+rs5(0))
rs5.movenext
loop
set rs5=nothing
eqwellcount=cstr(cint(eqwellcount1)+cint(eqwellcount2)+cint(eqwellcount3)+cint(eqwellcount4)+cint(eqwellcount5))
else
'选择此大型装备来自哪个表,并选择改大型装备的完好数
tableid=left(request("eqname"),1)
if tableid="1" then
sql = "select count(*) from mtk_equipment "&condition&" and equipname='"&eqname&"' and wellornot='完好'"
else if tableid="2" then
sql = "select count(*) from mca_equipment "&condition&" and equipname='"&eqname&"' and style='完好'"
else if tableid="3" then
sql = "select count(*) from mvo_equipment "&condition&" and equipname='"&eqname&"' and style='完好'"
else if tableid="4" then
sql = "select count(*) from men_vehicle "&condition&" and enname='"&eqname&"' and skillcondition='完好'"
else if tableid="5" then
sql = "select count(*) from mfh_equipment "&condition&" and equipname='"&eqname&"' and skcondition='完好'"
end if
end if
end if
end if
end if
'response.Write(sql)
set rs = server.createobject("adodb.recordset")
rs.open sql,conn, 1,1
eqwellcount="0"
do while not (rs.eof or rs.bof)
eqwellcount=cstr(cint(eqwellcount)+cint(rs(0)))
rs.movenext
loop
set rs=nothing
end if
%>
<%
'获得大型装备的在修数
if (eqname="" or eqname="择大型装备名称")then
set rs1 = server.createobject("adodb.recordset")
sql1="select count(*) from mtk_equipment "&condition&" and wellornot='在修'"
rs1.open sql1,conn, 1,1
eqfixcount1="0"
do while not (rs1.eof or rs1.bof)
eqfixcount1=cstr(cint(eqfixcount1)+rs1(0))
rs1.movenext
loop
set rs1=nothing
set rs2 = server.createobject("adodb.recordset")
sql2="select count(*) from mca_equipment "&condition&" and style='在修'"
rs2.open sql2,conn, 1,1
eqfixcount2="0"
do while not (rs2.eof or rs2.bof)
eqfixcount2=cstr(cint(eqfixcount2)+rs2(0))
rs2.movenext
loop
set rs2=nothing
set rs3 = server.createobject("adodb.recordset")
sql3="select count(*) from mvo_equipment "&condition&" and style='在修'"
rs3.open sql3,conn, 1,1
eqfixcount3="0"
do while not (rs3.eof or rs3.bof)
eqfixcount3=cstr(cint(eqfixcount3)+rs3(0))
rs3.movenext
loop
set rs3=nothing
set rs4 = server.createobject("adodb.recordset")
sql4="select count(*) from men_vehicle "&condition&" and skillcondition='在修'"
rs4.open sql4,conn, 1,1
eqfixcount4="0"
do while not (rs4.eof or rs4.bof)
eqfixcount4=cstr(cint(eqfixcount4)+rs4(0))
rs4.movenext
loop
set rs4=nothing
set rs5 = server.createobject("adodb.recordset")
sql5="select count(*) from mfh_equipment "&condition&" and skcondition='在修'"
rs5.open sql5,conn, 1,1
eqfixcount5="0"
do while not (rs5.eof or rs5.bof)
eqfixcount5=cstr(cint(eqfixcount5)+rs5(0))
rs5.movenext
loop
set rs5=nothing
eqfixcount=cstr(cint(eqfixcount1)+cint(eqfixcount2)+cint(eqfixcount3)+cint(eqfixcount4)+cint(eqfixcount5))
else
'选择此大型装备来自哪个表,并选择改大型装备的在修数
tableid=left(request("eqname"),1)
if tableid="1" then
sql = "select count(*) from mtk_equipment "&condition&" and equipname='"&eqname&"' and wellornot='在修'"
else if tableid="2" then
sql = "select count(*) from mca_equipment "&condition&" and equipname='"&eqname&"' and style='在修'"
else if tableid="3" then
sql = "select count(*) from mvo_equipment "&condition&" and equipname='"&eqname&"' and style='在修'"
else if tableid="4" then
sql = "select count(*) from men_vehicle "&condition&" and enname='"&eqname&"' and skillcondition='在修'"
else if tableid="5" then
sql = "select count(*) from mfh_equipment "&condition&" and equipname='"&eqname&"' and skcondition='在修'"
end if
end if
end if
end if
end if
'response.Write(sql)
set rs = server.createobject("adodb.recordset")
rs.open sql,conn, 1,1
eqfixcount="0"
do while not (rs.eof or rs.bof)
eqfixcount=cstr(cint(eqfixcount)+cint(rs(0)))
rs.movenext
loop
set rs=nothing
end if
%>
<%
'获得大型装备的待修数
if (eqname="" or eqname="择大型装备名称")then
set rs1 = server.createobject("adodb.recordset")
sql1="select count(*) from mtk_equipment "&condition&" and wellornot='待修'"
rs1.open sql1,conn, 1,1
eqwillfixcount1="0"
do while not (rs1.eof or rs1.bof)
eqwillfixcount1=cstr(cint(eqwillfixcount1)+rs1(0))
rs1.movenext
loop
set rs1=nothing
set rs2 = server.createobject("adodb.recordset")
sql2="select count(*) from mca_equipment "&condition&" and style='待修'"
rs2.open sql2,conn, 1,1
eqwillfixcount2="0"
do while not (rs2.eof or rs2.bof)
eqwillfixcount2=cstr(cint(eqwillfixcount2)+rs2(0))
rs2.movenext
loop
set rs2=nothing
set rs3 = server.createobject("adodb.recordset")
sql3="select count(*) from mvo_equipment "&condition&" and style='待修'"
rs3.open sql3,conn, 1,1
eqwillfixcount3="0"
do while not (rs3.eof or rs3.bof)
eqwillfixcount3=cstr(cint(eqwillfixcount3)+rs3(0))
rs3.movenext
loop
set rs3=nothing
set rs4 = server.createobject("adodb.recordset")
sql4="select count(*) from men_vehicle "&condition&" and skillcondition='待修'"
rs4.open sql4,conn, 1,1
eqwillfixcount4="0"
do while not (rs4.eof or rs4.bof)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -