⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main2.asp

📁 应用程序利用ASP做的一个可以实现登陆
💻 ASP
📖 第 1 页 / 共 5 页
字号:
else
    gbynt1rate=clng(gbynt1)/clng(gbnowcount)
end if
%>
<%
'求得战士的对口率=战士对口数/战士实力数
if zsnowcount="0" then
    zsynt1rate=0
else
    zsynt1rate=clng(zsynt1)/clng(zsnowcount)
end if
%>
<%
'求得干部的称职率=干部称职数/干部实力数
if gbnowcount="0" then
    gbynt2rate=0
else
    gbynt2rate=clng(gbynt2)/clng(gbnowcount)
end if
%>
<%
'求得战士的称职率=战士称职数/战士实力数
if zsnowcount="0" then
    zsynt2rate=0
else
    zsynt2rate=clng(zsynt2)/clng(zsnowcount)
end if
%>

<body bgcolor="#567D30" leftmargin="0" topmargin="0">
<form name="form1" method="post" action="main2.asp" onSubmit="return validate()">
<table width="995" height="91" border="0" align="center" cellpadding="0" cellspacing="0" background="images/fixnote.gif">
    <tr>
    <td height="91"><div align="center"></div></td>
  </tr>
  </table>
 <table width="995" height="3" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td height="3"></td>
  </tr>
  </table>
  <table width="995" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#2D5300" class="text">
    <tr align="center" bgcolor="#567D30"> 
      <td height="20" colspan="14" nowrap><div align="left">&nbsp;值班员:
          <input name="personname" type="text" id="personname" style="background:#efebef;width:100;border-style:insert;border-width:1px;border-color:#efebef">
          <input type="button" value="提交" onClick="return check()" style="background:#efebef;border-style:insert;border-width:1px;border-color:#efebef">
      </div></td>
    </tr>
    <tr align="center" bgcolor="#567D30">
      <td width="30" rowspan="3" nowrap>人员<br>
情况</td>
      <td width="133" height="20">类别内容项目</td>
      <td width="88" height="20" align="center" valign="middle">编制数</td>
      <td width="80" height="20">实力数</td>
      <td width="80" height="20" align="center">在位数</td>
      <td width="65" height="20">指技合一</td>
      <td width="58" height="20">一专多能</td>
      <td width="55" height="20">四会型</td>
      <td width="65" height="20">专家型</td>
      <td width="65" height="20">对口数</td>
      <td width="73" height="20">称职数</td>
      <td height="20">满编率</td>
      <td height="20">对口率</td>
      <td height="20">称职率</td>
    </tr>
    <tr bgcolor="#567D30">
      <td width="133" height="20"> 
        <div align="center">干部</div></td>
      <td width="88" height="20" align="center" valign="middle"> 
        <div align="center"><%=gbauthorized%></div></td>
      <td width="80" height="20">
       <div align="center"><%=gbnowcount%></div></td>
      <td width="80" height="20" align="center">
        <div align="center"><%=gbnownum%></div></td>
      <td width="65" height="20"> 
        <div align="center"><%=gbptype1%></div></td>
      <td width="58" height="20"> 
        <div align="center"><%=gbptype2%></div></td>
      <td width="55" height="20">
       <div align="center"><%=gbptype3%></div></td>
      <td width="65" height="20"> 
        <div align="center"><%=gbptype4%></div></td>
      <td width="65" height="20"> 
        <div align="center"><%=gbynt1%></div></td>
      <td width="73" height="20">
       <div align="center"><%=gbynt2%></div></td>
      <td height="20">
       <div align="center"><%=FormatNumber(gbauthorizedrate*100,1)%>%</div></td>
      <td height="20">
       <div align="center"><%=FormatNumber(gbynt1rate*100,1)%>%</div></td>
      <td height="20">
      <div align="center"><%=FormatNumber(gbynt2rate*100,1)%>%</div></td>
    </tr>
    <tr bgcolor="#567D30">
      <td width="133" height="20"> 
        <p align="center">战士</p></td>
      <td width="88" height="20" align="center" valign="middle"> 
        <div align="center"><%=zsauthorized%></div></td>
      <td width="80" height="20">
      <div align="center"><%=zsnowcount%></div></td>
      <td width="80" height="20" >
      <div align="center"><%=zsnownum%></div></td>
      <td width="65" height="20"> 
        <div align="center">
          <div align="center"><%=zsptype1%></div>
        </div></td>
      <td width="58" height="20"> 
        <div align="center"><%=zsptype2%></div></td>
      <td width="55" height="20">
      <div align="center"><%=zsptype3%></div></td>
      <td width="65" height="20"> 
        <div align="center"><%=zsptype4%></div></td>
      <td width="65" height="20"> 
        <div align="center"><%=zsynt1%></div></td>
      <td width="73" height="20">
      <div align="center"><%=zsynt2%></div></td>
      <td height="20">
      <div align="center"><%=FormatNumber(zsauthorizedrate*100,1)%>%</div></td>
      <td height="20">
      <div align="center"><%=FormatNumber(zsynt1rate*100,1)%>%</div></td>
      <td height="20">
      <div align="center"><%=FormatNumber(zsynt2rate*100,1)%>%</div></td>
    </tr>
    <tr bgcolor="#567D30"> 
      <td width="30" height="80" rowspan="4" align="center">装备<br>
        情况</td>
      <td width="133" height="20" align="center"> 
        <div align="center">类别内容项目</div></td>
      <td width="88" height="20" align="center" valign="middle">编制数</td>
      <td width="80" height="20" align="center">现有数</td>
      <td width="80" height="20" align="center">完好数</td>
      <td width="65" height="20"> 
        <div align="center">&nbsp;在修数</div></td>
      <td width="58" height="20"> 
        <div align="center">待修数</div></td>
      <td width="55" height="20"> &nbsp; 配套数</td>
      <td width="65" height="20"> 
        <div align="center">编配率</div></td>
      <td width="65" height="20"> 
        <div align="center">&nbsp;完好率</div></td>
      <td width="73" height="20"> 
        <div align="center">配套率</div></td>
      <td height="20" colspan="3"> 
        <div align="center">
          <table width="153" height="26" border="0">
            <tr>
              <td height="20" background="images/backbon1.gif"> 
                <div align="center"><a href="../personinquire/personinquire.asp">装备人员查询</a></div></td>
            </tr>
          </table>
        </div></td>
    </tr>
    <tr bgcolor="#567D30"> 
      <td width="133" height="23" align="center"> 
        <div align="center"> 
          <select name="macname" onChange="javascript:document.form1.submit();" style="background:#efebef;border-style:solid;border-width:1px;border-color:#efebef">
            <option value="选择轻武器名称" >&nbsp;选择轻武器名称&nbsp;</option>
            <%
			'选择轻武器的名称
			 set rs = server.createobject("adodb.recordset")
             sql = "select distinct macname from msa_smallarm "&condition
             rs.open sql,conn, 1,1
             do while not (rs.eof or rs.bof) 
			 %>
            <option value="<%=rs("macname")%>" <% if trim(rs("macname"))=trim(request("macname")) then %>selected  <%end if%>><%=rs("macname")%></option>
            <%
             rs.movenext
			 loop
			 set rs=nothing
			%>
          </select>
        </div></td>
      <%
	  '得到提交过来的轻武器名称
	  macname=request("macname")
	  'response.Write(macname)
	  
	  %>
      <%
	  '获得轻武器的编制数
      set rs = server.createobject("adodb.recordset")
	  if macname="" or macname="选择轻武器名称" then
          sql = "select authorized from msa_authorized "&condition
	  else
	      sql = "select authorized from msa_authorized "&condition&" and macname='"&macname&"'"
	  end if
      rs.open sql,conn, 1,1
	  saauthorized="0"
      do while not (rs.eof or rs.bof)
      saauthorized=cstr(cint(saauthorized)+cint(rs("authorized")))
      rs.movenext
	  loop
      set rs=nothing
	  %>
      <%
	  '获得轻武器的现有数
      set rs = server.createobject("adodb.recordset")
	  if macname="" or macname="选择轻武器名称" then
          sql = "select count(*) from msa_smallarm "&condition
	  else
	      sql = "select count(*) from msa_smallarm "&condition&" and macname='"&macname&"'"
	  end if
	  'response.Write(sql)
      rs.open sql,conn, 1,1
	  sanowcount="0"
      if not (rs.eof or rs.bof) then
      sanowcount=rs(0)
	  end if
      set rs=nothing
	  %>
      <%
	  '获得轻武器的完好数
      set rs = server.createobject("adodb.recordset")
	  if macname="" or macname="选择轻武器名称" then
          sql = "select count(*) from msa_smallarm "&condition&" and style='完好'"
	  else
	      sql = "select count(*) from msa_smallarm "&condition&" and macname='"&macname&"' and style='完好'"
	  end if
	 'response.Write(sql)
	  'response.End()
      rs.open sql,conn, 1,1
	  sawellcount="0"
      if not (rs.eof or rs.bof) then
      sawellcount=rs(0)
	  end if
      set rs=nothing
	  %>
      <%
	  '获得轻武器的在修数
      set rs = server.createobject("adodb.recordset")
	  if macname="" or macname="选择轻武器名称" then
          sql = "select count(*) from msa_smallarm "&condition&" and style='在修'"
	  else
	      sql = "select count(*) from msa_smallarm "&condition&" and macname='"&macname&"' and style='在修'"
	  end if
	 'response.Write(sql)
      rs.open sql,conn, 1,1
	  safixcount="0"
      if not (rs.eof or rs.bof) then
      safixcount=rs(0)
	  end if
      set rs=nothing
	  %>
      <%
	  '获得轻武器的待修数
      set rs = server.createobject("adodb.recordset")
	  if macname="" or macname="选择轻武器名称" then
          sql = "select count(*) from msa_smallarm "&condition&" and style='待修'"
	  else
	      sql = "select count(*) from msa_smallarm "&condition&" and macname='"&macname&"' and style='待修'"
	  end if
	  'response.Write(sql)
      rs.open sql,conn, 1,1
	  sawellfixcount="0"
      if not (rs.eof or rs.bof) then
      sawillfixcount=rs(0)
	  end if
	  'response.Write(sanowcount)
      set rs=nothing
	  %>
      <%
	  '获得轻武器的配套数
      set rs = server.createobject("adodb.recordset")
	  if macname="" or macname="选择轻武器名称" then
          sql = "select count(*) from msa_smallarm "&condition&" and isfix='是'"
	  else
	      sql = "select count(*) from msa_smallarm "&condition&" and macname='"&macname&"' and isfix='是'"
	  end if
	  'response.Write(sql)
      rs.open sql,conn, 1,1
	  samatchcount="0"
      if not (rs.eof or rs.bof) then
      samatchcount=rs(0)
	  end if
	 'response.Write(sanowcount)
      set rs=nothing
	  %>
      <%
      '求得轻武器的编配率=配套数/编制数
      if saauthorized="0" then
          samarate=0
      else
          samarate=clng(samatchcount)/clng(saauthorized)
      end if
      %>
      <%
      '求得轻武器的完好率=完好数/现有数
      if sanowcount="0" then
          sawellrate=0
      else
          sawellrate=clng(sawellcount)/clng(sanowcount)
      end if
      %>
      <%
      '求得轻武器的配套率=配套数/现有数
      if sanowcount="0" then
          samatchrate=0
      else
          samatchrate=clng(samatchcount)/clng(sanowcount)
      end if
      %>
      <td width="88" height="23" align="center" valign="middle"> 
        <div align="center"><%=saauthorized%></div></td>
      <td width="80" height="23" align="center"> 
        <div align="center"><%=sanowcount%></div></td>
      <td width="80" height="23" align="center"> 
        <div align="center"><%=sawellcount%></div></td>
      <td width="65" height="23"> 
        <div align="center"><%=safixcount%></div></td>
      <td width="58" height="23"> 
        <div align="center"><%=sawillfixcount%></div></td>
      <td width="55" height="23"> 
        <div align="center"><%=samatchcount%></div></td>
      <td width="65" height="23"> 
        <div align="center"><%=FormatNumber(samarate*100,1)%>%</div></td>
      <td width="65" height="23"> 
        <div align="center"><%=FormatNumber(sawellrate*100,1)%>%</div></td>
      <td width="73" height="23"> 
        <div align="center"><%=FormatNumber(samatchrate*100,1)%>%</div></td>
      <td height="23" colspan="3"> 
        <div align="center"> 
          <table width="153" height="26" border="0">
            <tr> 
              <td width="149" height="22" background="images/backbon1.gif"> 
                <div align="center"><a href="../xlqs/xlqs.asp">轻武器查询</a></div></td>
            </tr>
          </table>
        </div></td>
    </tr>
     <tr bgcolor="#567D30"> 
      <td width="133" height="22" align="center"> <select name="eqname" onChange="javascript:document.form1.submit();" style="background:#efebef;border-style:solid;border-width:1px;border-color:#efebef">
          <option value="选择大型装备名称">选择大型装备名称</option>
          <%
			'选择大型装备的名称_坦克装、甲车装备
			 set rs = server.createobject("adodb.recordset")
             sql = "select distinct equipname from mtk_equipment "&condition 
			 rs.open sql,conn, 1,1
             do while not (rs.eof or rs.bof) 
			 %>
            <option value="1<%=rs(0)%>" <% if "1"+trim(rs(0))=request("eqname") then %> selected <%end if%>><%=rs(0)%></option>
             <%
             rs.movenext
			 loop
			 set rs=nothing
			%>
             <%
			'选择大型装备的名称_高、低炮装备
			 set rs = server.createobject("adodb.recordset")
             sql = "select distinct equipname from mca_equipment "&condition
			 rs.open sql,conn, 1,1
             do while not (rs.eof or rs.bof) 
		  	 %>
             <option value="2<%=rs(0)%>" <% if "2"+trim(rs(0))=request("eqname") then %>selected  <%end if%>><%=rs(0)%></option>
            <%
             rs.movenext
			 loop
			 set rs=nothing
			%>
            <%
			'选择大型装备的名称_车辆装备
			 set rs = server.createobject("adodb.recordset")
             sql = "select distinct equipname from mvo_equipment "&condition
			 rs.open sql,conn, 1,1
             do while not (rs.eof or rs.bof) 
			 %>
          <option value="3<%=rs(0)%>" <% if "3"+trim(rs(0))=request("eqname") then %>selected  <%end if%>><%=rs(0)%></option>
          <%
             rs.movenext
			 loop
			 set rs=nothing
			%>
          <%
			'选择大型装备的名称_工程装备
			 set rs = server.createobject("adodb.recordset")
             sql = "select distinct enname from men_vehicle "&condition
			 rs.open sql,conn, 1,1
             do while not (rs.eof or rs.bof) 
			 %>
          <option value="4<%=rs(0)%>" <% if "4"+trim(rs(0))=request("eqname") then %>selected  <%end if%>><%=rs(0)%></option>
          <%
             rs.movenext
			 loop
			 set rs=nothing
			%>
          <%
			'选择大型装备的名称_防化装备
			 set rs = server.createobject("adodb.recordset")
             sql = "select distinct equipname from mfh_equipment "&condition
			 rs.open sql,conn, 1,1
             do while not (rs.eof or rs.bof) 
			 %>
          <option value="5<%=rs(0)%>" <% if "5"+trim(rs(0))=request("eqname") then %>selected  <%end if%>><%=rs(0)%></option>
          <%
             rs.movenext
			 loop

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -