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

📄 usermodify.asp

📁 顶级影视站ASP源代码系统。很全面很强大。数据库用access
💻 ASP
字号:
<% 
username=session("username")
password=session("password")
if username<>"" or password<>"" then
set modRS=server.createobject("adodb.recordset")
modSQL="select * from user where username='"&username&"' and password='"&password&"'"
modRS.open modSQL,conn,1,3
username=modRS("username")
email=modRS("email")
Question=modRS("Question")
Sex=modRS("Sex")
else%>

<script language="vbscript">
msgbox"你需要登陆后,才能进行此项操作!"
location.href="javascript:history.go(-1)"
</script>

<%
response.end
end if
modRS.close
set modRS=nothing
%>
<title>::修改资料::</title>
<table  align=center width=100% height="100%">
  <form name=reg2 action="member\UserSave.asp" method=post>
<tr>
      <td align=center valign="middle"> 
        <table border=0 cellpadding=0 cellspacing=0 width=449>
          <tr>
<td height="50">
<div align="center"><br>
                <font size="3" color="#000000">修 改 资 料</font> 
                <hr noshade size="1" width="90%">
                <table bordercolor="#262626" width="396" height="281">
                  <tr> 
                    <td width=37% align=right><font color="#000000">注 册 名: </font></td>
                    <td width="63%"> <font color="#FF0000"><%=Username%> </font></td>
                  </tr>
                  <tr> 
                    <td align=right><font color="#000000">原密码:</font></td>
                    <td><input type=password maxlength=16 size=13 name=password0 value="" style="border: 1px solid #000000">
                    </td>
                  </tr>
                  <tr> 
                    <td align=right width="37%"><font color="#000000">新密码:</font></td>
                    <td width="63%"> <font color="#000000"> 
                      <input type=password maxlength=16 size=13 name=password value="" style="border: 1px solid #000000">
                      </font></td>
                  </tr>
                  <tr> 
                    <td align=right width="37%"><font color="#000000">密码确认:</font></td>
                    <td width="63%"> <font color="#000000"> 
                      <input type=password maxlength=16 size=13 name=password2 value="" style="border: 1px solid #000000">
                      </font></td>
                  </tr>
                  <tr> 
                  <tr> 
                    <td align=right width="37%"><font color="#000000">性 别:</font></td>
                    <td width="63%"> <font color="#000000"> 
                      <input type=radio<%if sex=1 then%> CHECKED<%end if%> value="1" name=sex size="20">
                      <input type=radio<%if sex=0 then%> CHECKED<%end if%> value="0" name=sex size="20">
                      女</font></td>
                  </tr>
                  <td align=right width="37%"><font color="#000000">Email地址:</font></td>
                  <td width="63%"> <font color="#000000"> 
                    <input maxlength=50 size=20 name=Email value="<%=email%>" style="border: 1px solid #000000">
                    </font></td>
                  </tr>
                  <tr> 
                    <td align=right width="37%"><font color="#000000">提示问题:</font></td>
                    <td width="63%"> <font color="#000000"> 
                      <input maxlength=20 size=20 name=question value="<%=question%>"" style="border: 1px solid #000000" onFocus="this.value=''">
                      </font></td>
                  </tr>
                  <tr> 
                    <td align=right width="37%"><font color="#000000">提示答案:</font></td>
                    <td width="63%"> <font color="#000000"> 
                      <input maxlength=20 size=20 name=answer value="" style="border: 1px solid #000000">
                      </font></td>
                  </tr>
                  <tr align=center> 
                    <td colspan=2 height=42>
                     <input type="hidden" name="submit" value="mysubmit">
						<input onClick="return check();" type="image" border="0" name="submit" value="mysubmit" src="images/ok.gif" width="45" height="20" align=absMiddle>
                                     &nbsp;&nbsp;<a href="####" onClick=reset()><img src="images/esc.gif" width="45" height="20" border="0" align=absMiddle></a><br>
					  </td>
                  </tr>
                </table>
<br>
</div>
</td>
</tr>
</table>
      </td>
</tr>
</form>
</table>

<SCRIPT LANGUAGE="JavaScript">
<!--
function check()
{   
    if(checkspace(document.reg2.password.value) || document.reg2.password.value.length < 4||
	checkspace(document.reg2.password0.value) || document.reg2.password0.value.length < 4) {
	document.reg2.password0.focus();
	document.reg2.password0.value = '';
	document.reg2.password.value = '';
	document.reg2.password2.value = '';
    alert("密码长度不能小于4,请重新输入!");
	return false;
    }
    if(document.reg2.password.value != document.reg2.password2.value) {
	document.reg2.password.focus();
	document.reg2.password.value = '';
	document.reg2.password2.value = '';
    alert("两次输入的新密码不同,请重新输入!");
	return false;
  }
 if(document.reg2.Email.value.length!=0)
  {
    if (document.reg2.Email.value.charAt(0)=="." ||        
         document.reg2.Email.value.charAt(0)=="@"||       
         document.reg2.Email.value.indexOf('@', 0) == -1 || 
         document.reg2.Email.value.indexOf('.', 0) == -1 || 
         document.reg2.Email.value.lastIndexOf("@")==document.reg2.Email.value.length-1 || 
         document.reg2.Email.value.lastIndexOf(".")==document.reg2.Email.value.length-1)
     {
      alert("Email地址格式不正确!");
      document.reg2.useremail.focus();
      return false;
      }
   }
 else
  {
   alert("Email不能为空!");
   document.reg2.useremail.focus();
   return document.reg2.submit=false;
   }
  if(checkspace(document.reg2.question.value)) {
	document.reg2.question.focus();
    alert("提示问题不能空,请重新输入!");
	return false;
  } 
   if(checkspace(document.reg2.answer.value)) {
	document.reg2.answer.focus();
    alert("提示答案不能空,请重新输入!");
	return false;
  }
  
}


function checkspace(checkstr) {
  var str = '';
  for(i = 0; i < checkstr.length; i++) {
    str = str + ' ';
  }
  return (str == checkstr);
}
//-->
</script>

⌨️ 快捷键说明

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