📄 stud_e.asp
字号:
<!--#include file="config.asp"-->
<!--#include file="Session.asp"-->
<!--#include file="md5.asp"-->
<%
If Request("Menu")="addKe" and Request("Ke_Id")<>"" then
Conn.Execute("insert into [T_Class] (C_KeId,C_KeName,C_Xhao) values ('"&Request("Ke_Id")&"','"&Conn.Execute("Select * from [T_Ke] Where C_Id="&int(Request("Ke_Id"))&" ")("C_Name")&"','"&Request("xhao")&"')")
Response.write"<script language='javascript'>alert(""选课成功!\n\n返回请刷新!"");location.href='StuD.asp?se="&Conn.Execute("Select * from [T_Stu] where id="&int(Request("X_Id"))&" ")("xhao")&"';</script>"
End If
set Rs=server.createobject("adodb.recordset")
rs.open "select * from T_Stu where id="&int(Request("X_Id"))&" ",conn,1,3
If Request("Menu")="edit" then
If not rs.eof or rs.bof then
If Trim(Request("S_Pwd"))="" Then
Response.write("<script>alert('对不起,密码不能为空!');history.go(-1)</script>")
Response.End
End If
set rsedit=server.createobject("adodb.recordset")
sqledit="select * from T_Stu where id="&int(Request("X_Id"))&" "
rsedit.open sqledit,conn,1,3
rsedit("name")=request("name")
If len(Trim(Request("S_Pwd")))<>32 Then
Rsedit("S_Pwd")=md5(Trim(Request("S_Pwd")))
End If
rsedit("xy")=request("xy")
Rsedit("S_Rschool")=Request("S_Rschool")
rsedit("S_XClass")=request("X_S_XClass")
rsedit("S_Tel")=request("S_Tel")
rsedit("S_Email")=request("email")
Rsedit("S_Lock")=Request("X_S_Lock")
rsedit("lastlogin")=now()
rsedit.update
rsedit.close
set rsedit=nothing
Response.write"<script language='javascript'>alert(""资料修改成功!\n\n返回请刷新!"");location.href='StuD.asp?se="&Rs("xhao")&"';</script>"
Response.End
Else
Response.write("<script>alert('对不起,该用户资料不存在!');location.href=""StuD.asp"";</script>")
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() %>
<br><table width=100% align=center cellspacing=1 cellpadding=1 border=0 bgcolor=#000000>
<tr bgcolor=#FFFFFF><td height=25 background=images/cent.gif align='left' colspan=2> 学生<font color='red'><b><%=Rs("name")%></b></font>(<%=Rs("xhao")%>)的选修课情况:</td></tr>
<tr bgcolor=#FFFFFF><td height="28" colspan=2> <%
Response.Write "该生所在专业最少选修<font color=red>"&Conn.Execute("Select * From T_Yz Where Yz_Id="&Rs("xy")&" ")("Yz_ClassNum")&"</font>门课程; 目前已选修<font color=red>"&Conn.Execute("Select count(C_Id) from [T_Class] Where C_Xhao='"&Session("xhao")&"' and C_Pass<>0")(0)&"</font>门课程; 通过<font color=red>"&Conn.Execute("Select count(C_Id) from [T_Class] Where C_Xhao='"&Session("xhao")&"' and C_Pass>=60")(0)&"</font>门课程; "
If Conn.Execute("Select count(C_Id) from [T_Class] Where C_Xhao='"&Session("xhao")&"' and C_Pass>=60")(0)>=Conn.Execute("Select * From T_Yz Where Yz_Id="&Rs("xy")&" ")("Yz_ClassNum") Then
Response.Write "您选课已满,您若有兴趣可以再选修其他课程"
Else
Response.Write "您大学期间至少还需选修<font color=red>"&int(A_XCount)-Conn.Execute("Select count(C_Id) from [T_Class] Where C_Xhao='"&Session("xhao")&"' and C_Pass>=60")(0)&"</font>门课程"
End If
%></td></tr>
<form method="POST" action="StuD_E.asp?Menu=addKe&X_Id=<%=Request("X_Id")%>">
<tr bgcolor=#FFFFFF><td height=25 background=images/cent.gif align='left' colspan=2> 学号<font color='red'><b><%=Rs("xhao")%></b></font>添加选修科目</td></tr>
<tr bgcolor=#FFFFFF><td height="28">
<input type="hidden" value="<%=Rs("xhao")%>" name="xhao">
请先选择好班级后,再点后面的提交!
<select name="Ke_Id" size="1">
<option value="">请选择班级</option>
<%
Set Rs_XClass=Conn.Execute("Select * from T_Ke order by C_Id")
do until Rs_XClass.eof
Response.Write "<option value="&Rs_XClass("C_Id")&" "
' If Rs_XClass("C_Id")=Session("X_C_Id") Then Response.Write " selected"
Response.Write ">"&Rs_XClass("C_Name")&"("&Rs_XClass("C_Class")&")</option>"
Rs_XClass.movenext
loop
Rs_XClass.close
set Rs_XClass=nothing
%>
</select></td><td height="28" align="center"><input type="submit" value="提交更新" style="border: 1 solid #000000"></td></tr></form>
</table>
<br><table width=100% align=center cellspacing=1 cellpadding=1 border=0 bgcolor=#000000>
<form method="POST" action="StuD_E.asp?Menu=edit&X_Id=<%=Request("X_Id")%>">
<tr bgcolor=#FFFFFF><td height=25 background=images/cent.gif align='left' colspan=4> 学号<font color='red'><b><%=Rs("xhao")%></b></font>个人资料修改</td></tr>
<tr bgcolor=#FFFFFF><td height=25 align='left' colspan=4> <font color=red>注意事项:</font>1.红色字体的必须填写,否则选课无效;2.密码不更改时可保持不变;3.改动入学时间,则选课资料将全部清空。</td></tr>
<tr bgcolor=#FFFFFF><td height=10 colspan=4></td></tr>
<tr bgcolor=#FFFFFF>
<td align="left"> <font color=red>姓 名:</font><input type="text" name="name" size="12" maxlength="10" value='<%=rs("name")%>'></td>
<td> <font color=red>密 码:</font><input type="password" name="S_Pwd" size="12" maxlength="10" value='<%=rs("S_Pwd")%>' onclick="this.value=''"></td>
<td> <font color=red>所在系院:</font><select name="xy">
<%
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")=Rs("xy") 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")=Rs("xy") 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></td>
<td> <font color=red>入学时间:</font><select name="S_Rschool"><%dim X_Year,i:i=0
Do until i=int(XX_A_ZGXZ)
X_Year=DatePart("yyyy",now())-i
Response.Write "<option value="&X_Year
If X_Year=Rs("S_Rschool") Then Response.Write " selected"
Response.Write ">于"&X_Year&"入学</option>"
i=i+1
loop
%>
</select></td>
</tr>
<tr bgcolor=#FFFFFF><td height=10 colspan=4></td></tr>
<tr bgcolor=#FFFFFF>
<td> <font color=red>小 班:</font><input type="text" name="X_S_XClass" size="12" maxlength="50" value='<%=Rs("S_XClass")%>' onkeyup=if(isNaN(this.value))this.value='请填写数字'></td>
<td> 联系电话:<input type="text" name="S_Tel" size="12" maxlength="50" value='<%=Rs("S_Tel")%>'></td>
<td> 电子邮件:<input type="text" name="email" size="12" maxlength="50" value='<%=Rs("S_Email")%>'></td>
<td> 帐号状态:<select name="X_S_Lock">
<option value="False" <%If Rs("S_Lock")=False Then Response.Write " selected"%>>显示帐号</option>
<option value="True" <%If Rs("S_Lock")=True Then Response.Write " selected"%>>锁定帐号</option>
</select></td>
</tr>
<tr bgcolor=#FFFFFF><td height=10 colspan=4></td></tr>
<tr bgcolor=#FFFFFF><td height="28" align="center" colspan=4 background=images/cent.gif><input type="submit" value="提交更新" style="border: 1 solid #000000"></td></tr></form>
</table>
<% Call bottom() %>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -