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

📄 edit.asp

📁 公共选修课报名及成绩查询管理系统。ASP.NET+ACCESS的组合
💻 ASP
字号:
<%@ CODEPAGE = "936" %>
<!--#include file="config.asp"-->
<!--#include file="Session.asp"-->
<!--#include file="md5.asp"-->
<%
xhao=session("xhao") 
set rs=server.createobject("adodb.recordset") 
sql="select * from T_Stu where xhao='"&xhao&"'"
rs.open sql,conn,1,3
If Request("Menu")="edit" then 
	If not rs.eof or rs.bof then 
		If session("S_Pwd")=Rs("S_Pwd") 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 xhao='"&xhao&"'"
			   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")
				If Request("S_Rschool")<>Rsedit("S_Rschool") Then
					Rsedit("S_Rschool")=Request("S_Rschool") 
					Conn.Execute("delete * From [T_Class] Where C_Xhao='"&xhao&"' ")
				Else
					Rsedit("S_Rschool")=Request("S_Rschool") 
				End If
			   rsedit("S_XClass")=request("S_XClass")
			   rsedit("S_Tel")=request("S_Tel")
			   rsedit("S_Email")=request("email")   
			   rsedit("lastlogin")=now()
			   rsedit.update 
			   rsedit.close    
			   set rsedit=nothing
			   Conn.Execute("update [T_Stu] set lasttime='"&now()&"' where xhao='"&xhao&"'")
			   Response.write"<script language='javascript'>alert(""资料修改成功!\n\n请重新登录,初始化您的资料!"");location.href=""default.asp?menu=out"";</script>"
			   Response.End
			Else
				Response.write("<script>alert('对不起,这不是您的资料,请不要进入!');location.href=""default.asp?menu=out"";</script>")
			End if
	Else
		Response.write("<script>alert('对不起,该用户资料不存在!');location.href=""default.asp?menu=out"";</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">
<body topmargin=10 leftmargin=5>
<%Call top()%>
<br>
<table width=100% align=center cellspacing=1 cellpadding=1 border=0 bgcolor=#000000>
<form method="POST" action="Edit.asp?Menu=edit">
<tr bgcolor=#FFFFFF><td height=25 background=images/cent.gif align='left' colspan=4>&nbsp;&nbsp;学号<font color='red'><b><%=session("xhao")%></b></font>个人资料修改</td></tr>
<tr bgcolor=#FFFFFF><td height=25 align='left' colspan=4>&nbsp;&nbsp;<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">&nbsp;&nbsp;<font color=red>姓  名:</font><input type="text" name="name" size="12" maxlength="10" value="<%=rs("name")%>"></td>
<td>&nbsp;&nbsp;<font color=red>密  码:</font><input type="password" name="S_Pwd" size="12" maxlength="10" value='<%=rs("S_Pwd")%>' onclick="this.value=''"></td>
<td>&nbsp;&nbsp;<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>&nbsp;&nbsp;<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>&nbsp;&nbsp;<font color=red>小  班:</font><input type="text" name="S_XClass" size="12" maxlength="50" value='<%=Rs("S_XClass")%>' onkeyup=if(isNaN(this.value))this.value='请填写数字'></td>
<td>&nbsp;&nbsp;联系电话:<input type="text" name="S_Tel" size="12" maxlength="50" value='<%=Rs("S_Tel")%>'></td>
<td>&nbsp;&nbsp;电子邮件:<input type="text" name="email" size="22" maxlength="50" value="<%=Rs("S_Email")%>"></td>
<td>&nbsp;&nbsp;</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 onclick=checkclick('您确定要更新资料吗?\n\n请您在确定前先看下上面的《注意事项》!') 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 + -