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

📄 admin_user_edit.asp

📁 汕头育新学校学籍与成绩管理平台是集学籍管理与成绩管理于一体的网络互动平台。功能强大、使用简单、高效速成、安全方便
💻 ASP
字号:
<!--#include file="user_err.asp"-->
<!--#include file="conn.asp"-->
<!--#include file="char.asp"-->
<%
b1=request("b1")

if b1="" then
u_id=request("u_id")
sql="select * from users where u_id="&u_id
set rs=conn.execute(sql)
u_no=rs("u_no")
u_id=rs("u_id")
u_password=rs("u_password")
u_name=rs("u_name")
u_email=rs("u_email")
u_type=rs("u_type")
if rs.eof and rs.bof then
	response.write "<script>alert(""出现异常错误"");window.close();</script>"
End if

%>
<HTML><HEAD><TITLE>汕头育新学校 - 成绩管理系统管理员页面</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<LINK 
href="images/style.css" type=text/css rel=stylesheet>
<STYLE type=text/css>.pinkstar {
	COLOR: #ed5460
}
<STYLE type=text/css>BODY {
	FONT-SIZE: 12px; COLOR: #000080; LINE-HEIGHT: 12pt
}
INPUT {
	FONT-SIZE: 12px; COLOR: #000080
}
SELECT {
	FONT-SIZE: 12px; COLOR: #000080
}
TH {
	FONT-SIZE: 12px; COLOR: #000080
}
TD {
	FONT-SIZE: 12px; COLOR: #000080; LINE-HEIGHT: 12pt
}
A:link {
	FONT-SIZE: 12px; COLOR: #0000e0; TEXT-DECORATION: none
}
A:visited {
	FONT-SIZE: 12px; COLOR: #0000e0; TEXT-DECORATION: none
}
A:active {
	FONT-SIZE: 12px; COLOR: #0000ff; TEXT-DECORATION: none
}
A:hover {
	FONT-SIZE: 12px; COLOR: #ff0000; TEXT-DECORATION: underline
}
</STYLE>

<META content="Microsoft FrontPage 4.0" name=GENERATOR></HEAD>
<BODY>
<!--#include file="up.inc"-->
<!--#include file="upadmin.inc"-->
<TABLE cellSpacing=0 cellPadding=0 width=750 align=center border=0>          
  <TBODY>          
  <TR>          
    <TD vAlign=top width=200>          
      <DIV align=center><IFRAME id=hotarea border=0           
      marginWidth=0 frameSpacing=0 marginHeight=0           
      src="hotsite.htm" frameBorder=0 width=200 scrolling=no           
      height=250></IFRAME>          
      <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>          
        <TBODY>          
        <TR>          
          <TD height=15></TD></TR></TBODY></TABLE></DIV></TD>          
    <TD width=20>&nbsp;</TD>          
    <TD vAlign=top width=530>          
      <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>          
        <TBODY>          
        <TR>          
              <TD class=tdTit_p>汕头育新学校用户资料修改</TD>
            </TR>         
        <TR>         
          <TD class=tdBor_p>         
            <DIV align=center>
			<TABLE cellSpacing=4 cellPadding=0 width=521 align=center bgColor=#fff7f7 
border=0><form action="admin_user_edit.asp" method="POST">
  <TBODY>
  <TR>
    <TD width=521>
      <DIV align=center>
      <TABLE cellSpacing=0 cellPadding=0 width=400 border=0>
        <TBODY>
        <TR bgColor=#ffe8e8>
          <TD class=p14 colSpan=4 height=23>
            <DIV align=center><STRONG>用户信息</STRONG></DIV></TD></TR>
        <TR>
          <TD class=p12 vAlign=top width=60 height=23>&nbsp;&nbsp;用 户 名</TD>         
          <TD colSpan=3>
                                      <input name="u_id" type="hidden" id="u_id" value="<%=u_id%>">
                                      <%=u_name%> &nbsp;&nbsp;&nbsp;<SPAN          
            class=gray_text>(用户名不能修改)</SPAN></TD>
                                  </TR>        
        <TR>        
          <TD class=p12 vAlign=top height=23>&nbsp;&nbsp;密  码</TD> 
          <TD colSpan=3><INPUT name=u_password type=password class=txBox_p id=u_password value="<%=u_password%>" size=24  
            maxLength=30> &nbsp;<SPAN          
            class=pinkstar>*</SPAN>&nbsp;&nbsp;<SPAN          
          class=gray_text>6~14位</SPAN></TD></TR>        
        <TR>        
          <TD class=p12 vAlign=top height=23>&nbsp;&nbsp;确认密码</TD>        
          <TD colSpan=3><INPUT name=reu_password type=password class=txBox_p id=reu_password value="<%=u_password%>" size=24         
            maxLength=30> &nbsp;<SPAN          
            class=pinkstar>*</SPAN>&nbsp;&nbsp;<SPAN          
          class=gray_text>再输入一遍密码</SPAN></TD></TR>     
          <TR>        
          <TD class=p12 vAlign=top height=23>&nbsp;&nbsp;联系mail</TD>        
          <TD colSpan=3><INPUT name=u_email class=txBox_p id=u_email value="<%=u_email%>" size=24         
            maxLength=30> &nbsp; <SPAN         
            class=pinkstar>*</SPAN>&nbsp;&nbsp;<SPAN         
          class=gray_text>6~20个位,用于取回密码</SPAN></TD></TR> 
		  <TR>        
          <TD class=p12 vAlign=top height=23>&nbsp;&nbsp;用户类别</TD>        
          <TD colSpan=3> 管理员&nbsp;&nbsp; 
                                      <SPAN         
            class=pinkstar>* (用户类型不能更改)</SPAN></TD>
                                  </TR>
        <TR>        
          <TD height=10></TD>        
          <TD colSpan=3></TD></TR>        
        <TR vAlign=top>        
          <TD colSpan=4 height=26>        
            <DIV align=center><INPUT class=Button_p type=submit value="修 改" name="B1">         
<INPUT class=Button_p type=reset value="重 置"> <INPUT type=hidden         
            name=lm> </DIV></TD></TR></TBODY></TABLE></DIV></TD></TR></TBODY></FORM>
			                    </TABLE>



			</DIV></TD></TR>         
        <TR>         
          <TD class=tdBott_p>对汕头育新学校有任何意见和问题,<a href="../note.asp">请给我们留言</a>。</TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>         
<!--#include file="down.inc"-->
</BODY></HTML>
<%elseif b1="修 改" then  
Dim u_id,u_name,u_password,u_email,reu_password,Ipaddr
u_id=Request.Form("u_id")
u_name=Request.Form("u_name")
u_password=Request.Form("u_password")
u_email=Request.Form("u_email")
reu_password=Request.Form("reu_password")
Ipaddr=Request.ServerVariables("REMOTE_ADDR")

If u_password="" Then Response.write "<script>alert(""密码没有填写!"");history.back();</script>"
If Len(u_password)<6 Then Response.write "<script>alert(""密码不能少于6位!"");history.back();</script>"
If Len(u_password)>14 Then Response.write "<script>alert(""密码不能超过14位!"");history.back();</script>"
If reu_password="" Then Response.write "<script>alert(""确认密码没有填写!"");history.back();</script>"
If u_password<>reu_password Then Response.write "<script>alert(""两次输入的密码不一致!"");history.back();</script>"
If u_email="" Then Response.write "<script>alert(""电子邮件不能为空!"");history.back();</script>"
If Len(u_email)<6 Then Response.write "<script>alert(""电子邮件地址不能少于6位!"");history.back();</script>"
If Len(u_email)>28 Then Response.write "<script>alert(""电子邮件不能超过28位!"");history.back();</script>"
If Not IsValidEmail(u_email) Then Response.write "<script>alert(""电子邮件地址有错误!"");history.back();</script>"

Dim sql 
sql="update users set u_password='"&u_password&"',u_email='"&u_email&"',u_ip='"&Ipaddr&"',u_now='"&Now&"' where u_id="&u_id
Conn.Execute sql

Session("u_name") = u_name
Session("u_password") = u_password
Session("u_type") = u_type
Session("u_no") = u_no
Session("u_id") = u_id
Response.write "<script>alert('修改成功!点确定返回!');location.href('admin_display.asp');</script>" 

conn.close  
end if  
%>          

⌨️ 快捷键说明

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