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

📄 admin_adds.asp

📁 一个用ASP编写的 关于火车售票的系统 写得还很详细的值得借鉴阿
💻 ASP
字号:
<%if session("password")<>"" then
%>

<!-- #include file="inc/top.asp"-->
<%
 bj100=request.Form("bj100")
 bj101=left(bj100,3)
 for t=4 to len(bj100)
 if mid(bj100,t,1)>="0" and mid(bj100,t,1)<="9" then exit for
 bj101=bj101&mid(bj100,t,1)
 next
 fs100=request.Form("fs100")
 xh100=request.Form("xh100")
 user100=request.Form("user100")
 beizhu100=request.Form("beizhu100")
 cj100=request.Form("cj100")
 kc100=request.Form("kc100")
 xq100=request.Form("xq100")
if xq100="" then xq100="第一学期"
 lx100=request.Form("lx100")
%>
 <table width="810"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="810">
      <div align=center>
        <form name="form1" method="post" action="admin_adddata.asp?type=news">
          <table width="794" border="0" cellpadding="0" cellspacing="0" class="unnamed1_rld">
            <tr class="unnamed_rld2">
              <td height="25" align="center" bgcolor="#CCCCCC">班级</td>
              <td align="center" bgcolor="#E4E4E4">序号</td>
              <td align="center" bgcolor="#CCCCCC">日期</td>
              <td align="center" bgcolor="#CCCCCC">车次</td>
              <td align="center" bgcolor="#E4E4E4">中转站</td>
              <td align="center" bgcolor="#CCCCCC">终点站</td>
              <td align="center" bgcolor="#E4E4E4">校区</td>
              <td align="center" bgcolor="#CCCCCC">类型</td>
			 <td align="center" bgcolor="#E4E4E4">备注</td>
            </tr>
            <%
if fs100="" then fs100="1"
for j=1 to fs100

nn=0

set rs=server.createobject("adodb.recordset")

conn = "DBQ=" + server.mappath("#25175class_cj.asp") + ";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
    sql="select * from kcb where bj='"&bj101&"' and xq='"&xq100&"' and lx='"&lx100&"'"

rs.Open sql,conn,1,3

if rs.EOF and  rs.BOF then
    Response.Write "为了减少输入量,请选择当前数据库中可选参数的分类,批量生成为数字的4倍~~~~~~~~~~"
else

    do while not rs.eof
nn=nn+1
%>
            <tr>
              <td width="117"><select name="bj<%=j&nn%>">
                  <option>--==请选择==--</option>
                  <%
set rs1=server.createobject("adodb.recordset")
    sql1="select * from bjb"
rs1.Open sql1,conn,1,1
do while not rs1.eof
%>
                  <option <% if bj100=rs1("bj") then response.Write(" selected")%>><%=rs1("bj")%></option>
                  <%
rs1.movenext
loop
rs1.Close
set rs1=nothing
%>
                </select>
              </td>
              <td width="77"><div align="center">
                <input name="xh<%=j&nn%>" type="text" id="bj1" size="10" value="<%=xh100%>">
</div></td>
              <td width="61"><input name="user<%=j&nn%>" type="text" id="user<%=j&nn%>2" size="12" value="<%=user100%>">
              </td>
              <td width="61"><input name="beizhu<%=j&nn%>" type="text" id="user<%=j&nn%>" size="12" value="<%=beizhu100%>"></td>
              <td width="89"><input name="kc<%=j&nn%>" type="text" id="kc1" value="<% if kc100="" then response.Write(rs("kc")) else response.Write(kc100) end if%>" size="15">
              </td>
              <td width="77" height="25"><div align="center">
                  <input name="cj<%=j&nn%>" type="text" id="cj<%=j&nn%>2" size="10" value="<%=cj100%>">
              </div></td>
              <td width="91"><select name="xq<%=j&nn%>">
                  <option<%if xq100="第一学期" then response.Write(" selected")%>>第一学期</option>
                  <option<%if xq100="第二学期" then response.Write(" selected")%>>第二学期</option>
                  <option<%if xq100="第三学期" then response.Write(" selected")%>>第三学期</option>
                  <option<%if xq100="第四学期" then response.Write(" selected")%>>第四学期</option>
                  <option<%if xq100="第五学期" then response.Write(" selected")%>>第五学期</option>
                  <option<%if xq100="第六学期" then response.Write(" selected")%>>第六学期</option>
                  <option<%if xq100="第七学期" then response.Write(" selected")%>>第七学期</option>
                  <option<%if xq100="第八学期" then response.Write(" selected")%>>第八学期</option>
                </select>
              </td>
              <td width="100"><select name="lx<%=j&nn%>">
                  <option<%if lx100="必修课" then response.Write(" selected")%>>必修课</option>
                  <option<%if lx100="选修课" then response.Write(" selected")%>>选修课</option>
                  <option<%if lx100="限修课" then response.Write(" selected")%>>限修课</option>
                </select>
              </td>
              <td width="116"><input name="xxx<%=j&nn%>" type="text" id="user<%=j&nn%>" size="16" value="<%=xxx100%>"></td>
              <td width="3">          
            </tr>
            <%
    rs.movenext
    loop
end if
rs.Close 

set rs=nothing
next
%>
            <tr>
              <td height="25" colspan="8"><div align="center">
                  <input type="hidden" name="max" value="<%=nn%>">
                  <input type="hidden" name="number" value="<%=fs100%>">
                  <input type="submit" name="Submit" value="提交">
                  <input type="reset" name="Submit2" value="重置">
              </div></td>
            </tr>
          </table>
        </form>
    </div></td>
  </tr>
<tr>
  <td>

      <div align=center>
        <form name="form2" method="post" action="admin_adds.asp">
          <table width="805" border="0" align="center" cellpadding="0" cellspacing="0" class="unnamed1_rld">
            
            
            <tr align="center">
              
              <td width="88" height="25" bgcolor="#E4E4E4">&nbsp;批量</td>
              <td>班级</td>
            <td width="29">份数</td>
            
            <td width="60">序号</td>
            <td width="64">日期</td>
            <td width="66">车次</td>
            <td width="65">中转站</td>
            <td width="64">终点站</td>
            <td width="92">校区</td>
            <td width="99">类型</td>
            <td width="104">备注</td>
            </tr>
            <tr align="center">
            <td height="30"><input type="submit" name="Submit3" value="提交">
              <input type="reset" name="Submit22" value="重置"></td>
              <td width="80">
                <select name="bj100" id="bj100">
                  <%
set rs1=server.createobject("adodb.recordset")
    sql1="select * from bjb"
rs1.Open sql1,conn,1,1
do while not rs1.eof
%>
                  <option <%if bj100=rs1("bj") then response.write(" selected")%>><%=rs1("bj")%></option>
                  <%
rs1.movenext
loop
rs1.Close
set rs1=nothing
%>
                </select>              </td>
              <td><input name="fs100" type="text" id="fs100" size="1" value="1"></td>
              <td><input name="xh100" type="text" id="xh100" size="10"></td>
              <td><input name="user100" type="text" id="user100" size="10"></td>
              <td><input name="beizhu100" type="text" id="beizhu100" size="10"></td>
              <td><input name="kc100" type="text" id="kc100" size="10"></td>
              <td><input name="cj100" type="text" id="cj100" size="10"></td>
              <td><select name="xq100" id="xq100">
                <option<%if xq100="第一学期" then response.write(" selected")%>>第一学期</option>
                <option<%if xq100="第二学期" then response.write(" selected")%>>第二学期</option>
                <option<%if xq100="第三学期" then response.write(" selected")%>>第三学期</option>
                <option<%if xq100="第四学期" then response.write(" selected")%>>第四学期</option>
                <option<%if xq100="第五学期" then response.write(" selected")%>>第五学期</option>
                <option<%if xq100="第六学期" then response.write(" selected")%>>第六学期</option>
                <option<%if xq100="第七学期" then response.write(" selected")%>>第七学期</option>
                <option<%if xq100="第八学期" then response.write(" selected")%>>第八学期</option>
              </select></td>
              <td><select name="lx100" id="lx100">
                <option>必修课</option>
                <option>选修课</option>
                <option>限修课</option>
              </select></td>
              <td><input name="xxx100" type="text" id="xxx100" size="10"></td>
            </tr>
            <tr align="center">

              <td colspan="11"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="80%">&nbsp;</td>
                  <td width="20%" align=center><a href="admin_add.asp?kind=new">添加单个成绩</a></td>
                </tr>
              </table></td>
            </tr>
          </table>
        </form>
      </div>

</td></tr>
</table>
<%
set conn=nothing
%>
<!--#include file="inc/copyright.asp"-->

⌨️ 快捷键说明

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