📄 yz.asp
字号:
<!--#include file="config.asp"-->
<!--#include file="Session.asp"-->
<%
IF Request("menu")="del" Then
Conn.Execute("Delete From [T_Yz] Where Yz_Id="&Request("id")&"")
Conn.Execute("Delete From [T_Yz] Where Yz_FollowId="&Request("id")&"")
End IF
%>
<%
If Request("menu")="lanmu" Then
If Request("id")="" Then
Conn.Execute("Insert into [T_Yz] (Yz_FollowId,Yz_Name,Yz_SortNum) values ("&int(Request("X_Yz_Id"))&",'"&Request("X_Yz_Name")&"',"&int(Request("X_Yz_SortNum"))&")")
Else
Set Rs_LanMu=Conn.Execute("Update [T_Yz] set Yz_FollowId="&int(Request("X_Yz_Id"))&",Yz_Name='"&Request("X_Yz_Name")&"',Yz_ClassNum="&Request("X_Yz_ClassNum")&",Yz_EClassNum="&Request("X_Yz_EClassNum")&",Yz_SortNum="&int(Request("X_Yz_SortNum"))&" where Yz_Id="&int(Request("id"))&" ")
End If
End If
%>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%response.write webname%>-----栏目:专业管理中心</title>
<link rel="stylesheet" href="images/vpei.css">
<script>
function checkclick(msg){if(confirm(msg)){event.returnValue=true;}else{event.returnValue=false;}}
</script>
<body topmargin=10 leftmargin=5>
<% Call top() %>
<center><br>
<table width="100%" cellspacing="1" cellpadding="6" bgcolor="#000000" align="center"><Form method=POST Action="Yz.asp?menu=lanmu&id=<%=Request("id")%>">
<%
If Request("id")<>"" and Request("menu")<>"del" Then
Set Rs_Edit=Conn.Execute("Select * From T_Yz Where Yz_Id="&Request("id")&"")
X_Yz_Id=Rs_Edit("Yz_FollowId")
X_YZ_Name=Rs_Edit("Yz_Name")
X_Yz_ClassNum=Rs_Edit("Yz_ClassNum")
X_Yz_EClassNum=Rs_Edit("Yz_EClassNum")
X_Yz_SortNum=Rs_Edit("Yz_SortNum")
End If
%>
<tr bgcolor=#FFFFFF><td width=4% background=images/cent.gif align=left colspan=3>
院系或专业名称:<input type="text" name="X_YZ_Name" size=10 value=<%=X_Yz_Name%>> 最少需选修<input type="text" name="X_Yz_ClassNum" <%
If X_Yz_ClassNum="" Then
Response.Write "value=5"
Else
Response.Write "value="&X_Yz_ClassNum
End If
%> onkeyup=if(isNaN(this.value))this.value='请填写数字' size=5>门课程 每次最多选修<input type="text" name="X_Yz_EClassNum" <%
If X_Yz_EClassNum="" Then
Response.Write "value=2"
Else
Response.Write "value="&X_Yz_EClassNum
End If
%> onkeyup=if(isNaN(this.value))this.value='请填写数字' size=5>门课程 排序:<input type="text" name="X_Yz_SortNum"
<%
If X_Yz_SortNum="" Then
Response.Write "value=0"
Else
Response.Write "value="&X_Yz_SortNum
End If
%> size=5 maxlength=3 onkeyup=if(isNaN(this.value))this.value='请填写数字'> 所在系院:<select name="X_Yz_Id">
<%
Response.Write "<option value=0>默认为学院</option>"
Set Rs_Yz=Conn.Execute("select * from T_Yz where Yz_FollowId=0 order by Yz_SortNum")
do until Rs_Yz.eof
Response.Write "<option value="&Rs_Yz("Yz_Id")&" "
If Rs_Yz("Yz_Id")=X_Yz_Id Then Response.Write " selected"
Response.Write ">"&Rs_Yz("Yz_Name")&"</option>"
Set Rs_YzF=Conn.Execute("Select * from T_Yz where Yz_FollowId="&Rs_Yz("Yz_Id")&" order by Yz_SortNum")
do until Rs_YzF.eof
Response.Write "<option value="&Rs_YzF("Yz_Id")&" "
If Rs_YzF("Yz_Id")=X_Yz_Id Then Response.Write " selected"
Response.Write ">|-"&Rs_YzF("Yz_Name")&"</option>"
Rs_YzF.movenext
loop
Rs_YzF.close
set Rs_YzF=nothing
Rs_Yz.movenext
loop
Rs_Yz.close
Set Rs_Yz=nothing
%></select> <INPUT type=submit value=提交></td></tr></FORM>
<tr bgcolor=#FFFFFF><td colspan=3 align=left height=10></td></tr>
<%
Set Rs_Yz=Conn.Execute("select * from T_Yz where Yz_FollowId=0 order by Yz_SortNum")
do until Rs_Yz.eof
Yz_ZY_Id=Rs_Yz("Yz_Id")
Response.Write "<tr bgcolor=#FFFFFF><td colspan=3 background=images/cent.gif align=left><a href=Yz.asp?id="&Rs_Yz("Yz_Id")&"><font color=red>改</font></a><a onclick=checkclick('您确定要删除该专业的所有资料!') href=Yz.asp?menu=del&id="&Rs_Yz("Yz_Id")&"><font color=green>删</font></a> "&Rs_Yz("Yz_Name")&"</td></tr><tr bgcolor=#FFFFFF><td colspan=3 align=left>"
Set Rs_YzF=Conn.Execute("Select * from T_Yz where Yz_FollowId="&Rs_Yz("Yz_Id")&" order by Yz_SortNum")
do until Rs_YzF.eof
Response.Write "<a href=Yz.asp?id="&Rs_YzF("Yz_Id")&"><font color=red>改</font></a><a onclick=checkclick('您确定要删除该专业的所有资料!') href=Yz.asp?menu=del&id="&Rs_YzF("Yz_Id")&"><font color=green>删</font></a> |-"&Rs_YzF("Yz_Name")&" (最少需选修"&Rs_YzF("Yz_ClassNum")&"门 每次最多可选修"&Rs_YzF("Yz_EClassNum")&"门 共有学生"&Conn.Execute("Select Count(Id) from T_Stu where xy="&Rs_YzF("Yz_Id")&" ")(0)&"人)<BR>"
Yz_ZY_Id=Yz_ZY_Id&","&Rs_YzF("Yz_Id")
Rs_YzF.movenext
loop
Rs_YzF.close
set Rs_YzF=nothing
Response.Write "</td></tr><tr bgcolor=#FFFFFF><td colspan=3 align=left><font color=red>"&Rs_Yz("Yz_Name")&"</font>共设置专业"&Conn.Execute("Select Count(Yz_Id) from T_Yz where Yz_Id in ("&Yz_ZY_Id&")")(0)-1&"个; 共有学生"&Conn.Execute("Select Count(Id) from T_Stu where xy in ("&Yz_ZY_Id&")")(0)&"人</td></tr>"
Response.Write "<tr bgcolor=#FFFFFF><td colspan=3 align=left> </td></tr>"
Rs_Yz.movenext
loop
Rs_Yz.close
Set Rs_Yz=nothing
%>
</tr>
<tr bgcolor=#FFFFFF><td width=4% background=images/cent.gif align=center colspan=3> </td></tr>
</table><br>
<table width="100%" cellspacing="0" cellpadding="3" bgcolor="#000000">
<tr bgcolor=#FFFFFF><td align="right"> </td></tr></table>
<% Call bottom() %>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -