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

📄 addbiaoc.asp

📁 教务系统主要是老师和学生的一个平台
💻 ASP
字号:
<!--#include file ="connection.asp"-->
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>添加教师信息</title>
<style type="text/css">
<!--
.STYLE1 {
	color: #FFFFFF;
	font-size: 18px;
	font-weight: bold;
}
-->
</style>
</head>
<body bgcolor="#FBC2AD">
<div align=center>
<% 
user=session("user")
lb=session("lb")
if user=""or lb<>"admin" then
	response.redirect"index.asp"
else 
  sqlstr="select distinct xino, xiname from 系"
  set rs=Server.CreateObject("ADODB.Recordset") 
  rs.open sqlstr,CN,1,3
%>
<%
select case request("action")
	case "添加课程表详细信息"
		add()
	case else
		list()
end select
%>	
<%
sub list()
%>
<%
xino=request.QueryString("xino")
if xino <> "--选择系--"  then

if xino="" then
sql = "select * from 专业 "
else
sql = "select * from 专业 where xino='"&xino & "'"
end if
set rs1=Server.Createobject("ADODB.RecordSet")
rs1.Open sql,CN

sql = "select * from 教师 where xino='"&xino & "'"
set rs2=Server.Createobject("ADODB.RecordSet")
rs2.Open sql,CN

if rs1.Eof  then 
response.Write "尚无系部信息,请先添加一级分类"
response.End()
end if


%>
 <table width="144" height="84">
  <tr>
  <td>&nbsp;</td>
  </tr>
  </table>
  <form action="" method="post">
  <table width="334" border="0" cellpadding="3" cellspacing="1" bordercolor="#000000" bgcolor="#000000" class="sft">
    <tr>
      <td height="30" colspan="2" bgcolor="#FF903C"><div align="center" class="STYLE1">添加课程表信息</div>        </td>
      </tr>
    <tr>
      <td width="83" height="30" bgcolor="#FF903C"><div align="center">系部:</div></td>
      <td width="236" height="30" bgcolor="#FFFFFF"><select name="xino" size="1" style="border-style: dotted; border-width: 0; background-color: #FCB4BC" onChange="self.location.href=options[selectedIndex].value">
        <option value="--选择系--" selected>--选择系--</option>
        <% 
			do while not rs.eof  
		  %>
        <%
			if xino=rs("xino") then
		  %>
        <option value="?xino=<%=rs("xino")%>" selected><%=rs("xiname")%></option>
        <%
		    else
		  %>
        <option value="?xino=<%=rs("xino")%>"><%=rs("xiname")%></option>
        <% 
		  	end if 
			rs.movenext
			loop
		  %>
      </select></td>
    </tr>

    <tr>
      <td height="31" bgcolor="#FF903C"><div align="center">专业:</div></td>
      <td height="31" bgcolor="#FFFFFF"><select name="zhuanyeno" size="1" id="zhuanyeno" style="border-style: dotted; border-width: 0; background-color: #FCB4BC">
        <option value="--选择专业--" selected>--选择专业--</option>
        <% do while not rs1.eof  
		%>
        <option value="<%=rs1("zhuanyeno")%>"><%=rs1("zhuanye")%></option>
        <% rs1.movenext
			 loop
		 %>
      </select></td>
    </tr>
    <tr>
      <td height="31" bgcolor="#FF903C"><div align="center">学期:</div></td>
      <td height="31" bgcolor="#FFFFFF"><select name="xueqi" size="1" id="xueqi" style="border-style: dotted; border-width: 0; background-color: #FCB4BC">
        <option value="--选择专业--" selected>--选择学期--</option>
        <option value="2007-2008(1)">2007-2008(1)</option>
        <option value="2007-2008(2)">2007-2008(2)</option>
        <option value="2008-2009(1)">2008-2009(1)</option>
        <option value="2008-2009(2)">2008-2009(2)</option>
        <option value="2009-2010(1)">2009-2010(1)</option>
        <option value="2009-2010(2)">2009-2010(2)</option>
      </select></td>
    </tr>
    

    <tr>
      <td height="20" colspan="2" bgcolor="#FFFFFF"><div align="center">
          <div align="center">
            <input type="submit" name="action" value="添加课程表详细信息" style="border-style: dotted; border-width: 0; background-color: #FCB4BC"> 
                  </div>
      </table>
  </form>
  <p class=sft>
  
</div>

<%  end if
	end sub
%>


</body>

</html>
<%
  sub add()
  	xino=trim(request.QueryString("xino"))
	zhuanyeno=trim(request.Form("zhuanyeno"))
	xueqi=trim(request.Form("xueqi"))
	sql="addbiao.asp?xino=" & xino & "&zy=" & zhuanyeno &"&xq=" &xueqi
	'response.write sql
	'response.end 
	response.Redirect "addbiao.asp?xino=" & xino & "&zy=" & zhuanyeno &"&xq=" &xueqi
 end sub
%>
<%

end if
rs.close
'rs1.close
'rs2.close
CN.close
set rs=nothing
'set rs1=nothing
'set rs2=nothing
set CN=nothing

%>

⌨️ 快捷键说明

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