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

📄 editinfo.asp

📁 里面说明详细
💻 ASP
字号:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>蓝雨聊天室(修改个人资料)</title>
<style type="text/css"><!--
.p9 {  font-size: 9pt; line-height: 14pt}
-->
</style>
</head>
<script language="javascript" src="register.js">
</script>
<body bgcolor="#DAE7E4">
<!--#include file="admin/conn.asp"-->
<%
username=trim(request.form("username"))
password=trim(request.form("password"))
reg_err=""
if username="" or password="" then
  reg_err="参数不全。名字和密码不能为空。"
elseif Instr(username,"=")>0 or Instr(username,"%")>0 or Instr(username,chr(32))>0 or Instr(username,"?")>0 or Instr(username,"&")>0 or Instr(username,";")>0 or Instr(username,",")>0 or Instr(username,"'")>0 or Instr(LCase(username)," or")>0 or Instr(username,chr(34))>0 then
  reg_err="用户名中含有非法字符,请重新输入。"
else
 reg_err=""
 Conn = DBCN()
 set rs = Server.CreateObject("ADODB.Recordset")
 sql="select * from [user] where username='" & username & "'"
 rs.open sql,conn,3,3
 if Not rs.eof then
   if rs("password")=password then
    reg_err=""
   else
    reg_err="密码不对。"
   end if
 else
   reg_err="没有找到用户[" & username & "]的注册资料。"
 end if
end if
if reg_err="" then 
   session("userid")=rs("userid")
%>
<script language="javascript">
function changepassword()
{
  if(regform.changepsw.checked)
  {
    regform.password.disabled="";
    regform.password.style.background="#ffffff";
    regform.passwordconfirm.disabled="";
    regform.passwordconfirm.style.background="#ffffff";
    regform.pswstate.value="on";
  }
  else
  {
    regform.password.disabled="true";
    regform.passwordconfirm.disabled="true";
    regform.password.style.background="#C0C0C0";
    regform.passwordconfirm.style.background="#C0C0C0";
    regform.pswstate.value="off";
  }
}
function formreset()
{
  regform.reset();
  changepassword();
}
</script>
<form name="regform" METHOD=POST ACTION="editinfo_save.asp" onsubmit="return verify();">
<input type="hidden" name="userid" value="<%=rs("userid")%>">
<input type="hidden" name="pswstate" value="off">
<table border="1" width="100%" height="100%" bordercolor="#008080" bordercolorlight="#008080"
bordercolordark="#008080" cellspacing="0" cellpadding="5">
  <tr>
    <td width="100%" bgcolor="#B8D3CE" height="10%"><table border="0" width="100%">
      <tr>
        <td width="50%"><strong>修改个人资料</strong></td>
        <td width="50%" align="right"><input type="button" value="关闭窗口" onclick="window.close()"></td>
      </tr>
    </table>
    </td>
  </tr>
  <tr>
    <td width="100%"><table border="0" width="100%" height="50%">
      <tr>
        <td width="16%" class="p9">名字:</td>
        <td width="84%"><input type="text" name="username" size="20" maxlength="12" value="<%=rs("username")%>">*</td>
      </tr>
      <tr>
          <td width="16%" class="p9"></td>
          <td width="84%" class="p9"><input type="checkbox" name="changepsw" onclick="changepassword()">是否修改密码?</td>
      </tr>
      <tr>
          <td width="16%" class="p9">新密码:</td>
          <td width="84%" class="p9"><input type="password" name="password" size="20" maxlength="12" value="" style="background-color: #C0C0C0" disabled></td>
        </tr>
        <tr>
          <td width="16%" class="p9">确认新密码:</td>
          <td width="84%" class="p9"><input type="password" name="passwordconfirm" size="20" maxlength="12" value="" style="background-color: #C0C0C0" disabled></td>
      </tr>
      <tr>
        <td width="16%" class="p9">电子邮箱:</td>
        <td width="84%"><input type="text" name="email" size="20" maxlength="40" value="<%=rs("email")%>">*</td>
      </tr>
      <tr>
        <td width="16%" class="p9">个人主页:</td>
        <td width="84%"><input type="text" name="homepage" size="40" maxlength="50" value="<%=rs("homepage")%>"></td>
      </tr>
      <tr>
        <td width="16%" class="p9">OICQ:</td>
        <td width="84%"><input type="text" name="oicq" size="20" maxlength="12" value="<%=rs("oicq")%>"></td>
      </tr>
      <tr>
        <td width="16%" class="p9" valign="top">个人简介:</td>
        <td width="84%"><textarea rows="6" name="biography" cols="39"><%=htmldecode(rs("biography"))%></textarea></td>
      </tr>
    </table>
    <div align="center"><center><p><br>
      <input type="submit" value="提 交"> 
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type="button"
      value="复 原" onclick="formreset()"></p>
      </center></div><div align="center"><center><p><br>
    </td>
  </tr>
</table>
<%
 else
   response.write reg_err & "&nbsp;&nbsp;<a href=""javascript:history.back();"">返回</a>"
 end if
%>
</body>
</html>

⌨️ 快捷键说明

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