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

📄 addmayjor.asp

📁 网络考试系统最终备份
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<link rel="stylesheet" type="text/css" href="css.css">
<!--#include file="conn.inc"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<script language="javascript">
function addit()
{

 manMayjor.action="majoradd.asp";
 addd.submit();
}
function csubmit()
{
manMayjor.sdepartment.value="-请选择系部-";
manMayjor.submit();
}


function confirmit(myform,id)
{
 
  
  if (confirm("将删除该系部下的所有单位?"))
  {  
      myform.action="mayjordel.asp?v_id="+id;
	
  myform.submit();
  }
  else
  {
  return ;
  }

}
</script>
</head>

<body>
<table border="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber2" height="25">
  <tr>
    <td width="100%"><p>&nbsp;</p></td>
  </tr>
</table>
<table border="1" cellpadding="0" cellspacing="1" style="border-collapse: collapse" bordercolor="#C0C0C0" width="100%" id="AutoNumber3" height="20">
  <form method="POST"   name="manMayjor" action="addmayjor.asp" onSubmit="return addit();">

    <tr>
      <td nowrap width="265" align="center" bgcolor="#E1E1E1"><input  type="submit" name="Submit" value="专业添加" >
        学校: 
           <select size="1" name="scollege" onchange="csubmit();">
             <option value="-请选择院校-">-请选择院校-</option>
             <%
		  v_cid = request("scollege")
		  if v_cid = "-请选择院校-" or v_cid="" then
		sql = "select * from college_info"
		else
		sql = "select * from college_info where CollegeID <>"&v_cid
		end if
		
        set rs = server.CreateObject("adodb.recordset")
		rs.open sql,conn,3,2
		do while not rs.eof
		if not rs.eof then
		  
		%>
             <option  value="<%=rs("CollegeID")%>" ><%=rs("CollegeName")%></option>
             <%
		rs.movenext
		end if
		loop
		v_cid = request("scollege")

		if v_cid <> "-请选择院校-" and v_cid<>"" then
		
		sql = "select * from college_info where CollegeID = "&v_cid
        set rs = server.CreateObject("adodb.recordset")
		rs.open sql,conn,3,2
		%>
             <option value="<%=rs("CollegeID")%>" selected><%=rs("CollegeName")%></option>
             <%
		  rs.close
		set rs = nothing
		end if
		
		
		
		
		%>
      </select>        </td>
      <td  align="left" nowrap bgcolor="#E1E1E1"> 系部:
            <select size="1" name="sdepartment" onchange="this.form.submit();">
        
	           <option value="-所有系部-"  selected>-所有系部-</option>
              <%
			v_cid = request("scollege")
		    v_dep = request("sdepartment")
			if v_dep = "-请选择系部-" or v_dep = "-所有系部-" or v_dep="" then
		    sql = "select * from department_info where  College_ID like '"&v_cid&"' "
			else
		    sql = "select * from department_info where  College_ID like '"&v_cid&"'and DepID <> "&v_dep&" "
			end if
		
       	   set rs = server.CreateObject("adodb.recordset")
		   rs.open sql,conn,3,2
		   do while not rs.eof
		   if not rs.eof then
		%>
              <option  value="<%=rs("DepID")%>"><%=rs("DepName")%></option>
              <%
		rs.movenext
		end if
		loop
		rs.close
		set rs = nothing
		
		if v_dep <> "-请选择系部-" and v_dep <> "-所有系部-" and v_dep <> "" then
		   sql = "select * from department_info where  College_ID like '"&v_cid&"'and DepID = "&v_dep&" "
		   set rs = server.CreateObject("adodb.recordset")
		   rs.open sql,conn,3,2
		
		%>
              <option  selected value="<%=rs("DepID")%>"><%=rs("DepName")%></option>
              <% end if%>
              <input name="incollege" type="hidden" value="<%=v_cid%>">
            </select>      
        <div align="left"></div></td>
      </tr>
  </form>
</table>
 <p></p>
 <table border="1" cellpadding="0" cellspacing="1" style="border-collapse: collapse" bordercolor="#C0C0C0" width="100%" id="AutoNumber1">
   <form name="mayjorform" method="post" onSubmit="return submitit(this)">
     <tr>
       <td width="20%" height="20" align="left" bgcolor="#E1E1E1">&nbsp;<b>专业名称</b></td>
       <td width="20%" align="left" bgcolor="#E1E1E1"><strong>专业描述</strong></td>
       <td width="25%" height="20" align="left" bgcolor="#E1E1E1"><strong>所属系部</strong></td>
       <td height="20" colspan="2" align="left" bgcolor="#E1E1E1"><strong>所属院校</strong></td>
     </tr>
     <%
	v_depid = request("sdepartment")
	v_cid = request("scollege")
	if v_cid = "-请选择院校-" or v_cid = "" then
	response.End()
	else
	  if v_depid = "-所有系部-" or v_depid ="" then 
	  sql = "select * from mayjor_info where College_ID = "&v_cid
	
	  else
	  sql = "select * from mayjor_info where Dep_ID like '"&v_depid&"'  and College_ID ="&v_cid
	  end if
	end if
    set rs = server.CreateObject("adodb.recordset")
    rs.open sql,conn,3,2
 	do while not rs.eof
	if not rs.eof then
	%>
     <tr>
       <td   nowrap  align="left"><%=rs("MayjorName")%></td>
       <td   nowrap  align="left"><%=rs("MayjorDesc")%></td>
       <td   nowrap align="left">
         <%
	  sql1 = "select * from department_info where  DepID ="&rs("Dep_ID")
	  set rs1 = server.CreateObject("adodb.recordset")
	  rs1.open sql1,conn,3,2
	  v_DepName = rs1("DepName")
	  response.Write(v_DepName)
	  rs1.close
	  set rs1 = nothing
	  %>
       </td>
       <td width="22%" align="left"   nowrap>
         <%
	  sql1 = "select * from college_info where  CollegeID ="&rs("College_ID")
	  set rs1 = server.CreateObject("adodb.recordset")
	  rs1.open sql1,conn,3,2
	  v_collName = rs1("CollegeName")
	  response.Write(v_collName)
	  rs1.close
	  set rs1 = nothing
	  %></td>
       <td width="13%" align="left"   nowrap><a href="mayjoredit.asp?collID=<%=v_cid%>&collName=<%=v_collName%>&depaID=<%=rs("Dep_ID")%>&depaName=<%=v_DepName%>&mayID=<%=rs("MayjorID")%>&mayName=<%=rs("MayjorName")%>&mayDesc=<%=rs("MayjorDesc")%>">更改</a>/<a href="javascript:confirmit(mayjorform,<%=rs("MayjorID")%>)"> 删除</a></td>
     </tr>
     <%
  rs.movenext
  end if
  loop

  %>
   </form>
 </table>
</body>
</html>

⌨️ 快捷键说明

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