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

📄 admin_adds.asp

📁 学生文件管理系统主要介绍SQL语言程序开发系列
💻 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")
 cj100=request.Form("cj100")
 kc100=request.Form("kc100")
 xq100=request.Form("xq100")
if xq100="" then xq100="第一学期"
 lx100=request.Form("lx100")
%>
<table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td>
      <div align=center>
        <form name="form1" method="post" action="admin_adddata.asp?type=news">
          <table width="100%" 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="#E4E4E4">课程</td>
              <td align="center" bgcolor="#CCCCCC">成绩</td>
              <td align="center" bgcolor="#E4E4E4">学期</td>
              <td align="center" bgcolor="#CCCCCC">类型</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,1

if rs.EOF and  rs.BOF then
    Response.Write "请选择当前数据库中课程的分类,即相对应的<font color=red>班级</font>跟<font color=red>学期</font>~~~~~~~~~~"
else

    do while not rs.eof
nn=nn+1
%>

            <tr>
              <td width="100">
<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="100">
                <div align="center">
                  <input name="xh<%=j&nn%>" type="text" id="bj1" size="10" value="<%=xh100%>">
              </div></td>
              <td width="100">
                <input name="user<%=j&nn%>" type="text" id="user<%=j&nn%>2" size="12" value="<%=user100%>">
              </td>
              <td width="100">
                <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="100" 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="100">
                <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>
            </tr>




        <%
    rs.movenext
    loop
end if
rs.Close 

set rs=nothing
next
%>

            <tr>
              <td height="25" colspan="7">
                <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="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="unnamed1_rld">
            <tr align="center">
              
              <td width="100" height="25" bgcolor="#E4E4E4">&nbsp;快速填表:</td>
              <td>班级</td>
            <td>份数</td><td>学号</td>
            <td>姓名</td>
            <td>课程</td>
            <td>成绩</td>
            <td>学期</td>
            <td>类型</td>
            </tr>
            <tr align="center">
            <td height="30"><input type="submit" name="Submit3" value="提交">
              <input type="reset" name="Submit22" value="重置"></td>
              <td width="100">
                <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="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>
            
            </tr>
            <tr align="center">

              <td colspan="9"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="80%">&nbsp;</td>
                  <td width="20%" align=center></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 + -