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

📄 user_infoedit.asp

📁 俄罗斯方块源码 俄罗斯方块源码 俄罗斯方块源码
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="top.asp"-->
<%
if session("username")="" then
  call mb("对不起,您还没有登陆!","login.asp",1)
end if

if request("action")="save" then
 dim password,sex,email,question,answer
 dim oicq,icq,msn,homepage,tel,zipcode,address,remark
 
 password=checkstr(trim(request.form("password")))
 sex=request.form("sex")
 email=checkstr(trim(request.form("email")))
 question=checkstr(trim(request.form("question")))
 answer=checkstr(trim(request.form("answer")))
 
 oicq=checkstr(trim(request.form("oicq")))
 icq=checkstr(trim(request.form("icq")))
 msn=checkstr(trim(request.form("msn")))
 homepage=checkstr(trim(request.form("homepage")))
 tel=checkstr(trim(request.form("tel")))
 zipcode=checkstr(trim(request.form("zipcode")))
 address=checkstr(trim(request.form("address")))
 remark=checkstr(trim(request.form("remark")))
 
 '数据检查
 if password="" or strlength(password)>30 then
   call mb("密码不能为空或大于30字长!","",0)
 end if
  
 if sex="" then
   sex="男"
 end if
 
 if not isemail(email) then
   call mb("请正确输入电子邮件地址!","",0)
 end if
 
 if question="" or answer="" then
   call mb("请完整输入密码问题与答案!","",0)
 end if
 
 '保存数据
 set rs=server.createobject("adodb.recordset")
 sql="select * from author where username='"&session("username")&"'"
 rs.open sql,conn,1,3
 
 if not(rs.bof and rs.eof) then
   rs("password")=password
   rs("sex")=sex
   rs("email")=email
   rs("question")=question
   rs("answer")=answer
   rs("oicq")=oicq
   rs("icq")=icq
   rs("msn")=msn
   rs("tel")=tel
   rs("homepage")=homepage
   rs("zipcode")=zipcode
   rs("address")=address
   rs("remark")=remark
   rs.update
 else
   call mb("对不起,找不到您的帐号!","",0)
 end if
 rs.close
 set rs=nothing 
%>
<table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="190" valign="top" background="index3/flash_bg4.gif" bgcolor="#F7F7F7" class="regbg"> 
      <!--#include file="user_menu.asp"-->
    </td>
    <td valign="top" bgcolor="#FFFFFF"> &nbsp
      <TABLE align=center 
      background="images/line01.gif" 
      border=0 cellPadding=0 cellSpacing=0 width="100%">
        <TR> 
          <TD height=24 width="55%">&nbsp;<IMG height=12 
            src="images/A3.gif" width=12> 当前位置:<A 
            href="index.asp" title="联盟首页">闪闪之家</A> -&gt; 资料修改</TD>
          <TD height=21 width="45%">&nbsp;</TD>
        </TR>
      </TABLE> 
      <br>
      <TABLE align=center border=0 borderColor=#000000 cellPadding=0 cellSpacing=0 width="98%">
        <TR> 
          <TD background="images/T_back.gif" width="18%"><IMG src="images/T_1.gif" width=90 height=24 border="0"></TD>
          <TD 
          background="images/T_back.gif" 
          width="78%"><strong>作 者 资 料</strong> - 资料修改</TD>
          <TD width="4%"><IMG height=24 
            src="images/T_2.gif" 
          width=29></TD>
        </TR>
      </TABLE>
      <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC">
        <tr> 
          <td height="116" align="center" bgcolor="#FFFFFF"><font color="#FF0000">恭 
            喜 您 , 修改个人资料成功!</font></td>
        </tr>
      </table></td>
  </tr>
</table>
<%else
set rs=conn.execute("select * from author where username='"&session("username")&"'")
if rs.bof and rs.eof then
  call mb("对不起,找不到您的个人资料信息!","",0)
else
%>
<table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="190" valign="top" background="index3/flash_bg4.gif" bgcolor="#F7F7F7" class="regbg"> 
      <!--#include file="user_menu.asp"-->
    </td>
    <td valign="top" bgcolor="#FFFFFF"> <TABLE align=center 
      background="images/line01.gif" 
      border=0 cellPadding=0 cellSpacing=0 height=24 width="100%">
        <TR> 
          <TD height=21 width="55%">&nbsp;<IMG height=12 
            src="images/A3.gif" width=12> 当前位置:<A 
            href="index.asp" title="联盟首页">闪闪之家</A> -&gt; 资料修改</TD>
          <TD height=21 width="45%">&nbsp;</TD>
        </TR>
      </TABLE> 
      <form action="?action=save" method="post" name="reg" id="reg">
        <TABLE align=center border=0 borderColor=#000000 cellPadding=0 cellSpacing=0 width="98%">
          <TR> 
            <TD background="images/T_back.gif" width="18%"><IMG src="images/T_1.gif" width=90 height=24 border="0"></TD>
            <TD 
          background="images/T_back.gif" 
          width="78%"><strong>作 者 资 料</strong> - 资料修改</TD>
            <TD width="4%"><IMG height=24 
            src="images/T_2.gif" 
          width=29></TD>
          </TR>
        </TABLE>
        <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC">
          <tr bgcolor="#FFFFFF"> 
            <td width="122" height="25" align="center">帐  号:</td>
            <td width="378" height="25"><font color=red><b><%=session("username")%></b></font></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td height="25" align="center">密  码:</td>
            <td height="25"> 
              <input name="password" type="password" class="input" id="password" value="<%=rs("password")%>" size="30"></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td height="25" align="center">性  别:</td>
            <td height="25"> 
              <input name="sex" type="radio" value="男" <%if rs("sex")="男" then response.write " checked"%>>
              阳光男孩  
              <input type="radio" name="sex" value="女" <%if rs("sex")="女" then response.write " checked"%>>
              青春女孩 </td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td height="25" align="center">电子邮件:</td>
            <td height="25"> 
              <input name="email" type="text" class="input" id="email" value="<%=rs("email")%>" size="30"></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td height="25" align="center">密码问题:</td>
            <td height="25"> 
              <input name="question" type="text" class="input" id="question" value="<%=rs("question")%>" size="30"></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td height="25" align="center">密码答案:</td>
            <td height="25"> 
              <input name="answer" type="text" class="input" id="answer" value="<%=rs("answer")%>" size="30"></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td height="25" colspan="2" align="center">以下为可选项</td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td height="25" align="center">Oicq:</td>
            <td height="25"> 
              <input name="oicq" type="text" class="input" id="oicq" value="<%=rs("oicq")%>" size="30"></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td height="25" align="center">Icq:</td>
            <td height="25"> 
              <input name="icq" type="text" class="input" id="icq" value="<%=rs("icq")%>" size="30"></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td height="25" align="center">Msn:</td>
            <td height="25"> 
              <input name="msn" type="text" class="input" id="msn" value="<%=rs("msn")%>" size="30"></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td height="25" align="center">个人主页:</td>
            <td height="25"> 
              <input name="homepage" type="text" class="input" id="homepage" value="<%=rs("homepage")%>" size="30"></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td height="25" align="center">联系电话:</td>
            <td height="25"> 
              <input name="tel" type="text" class="input" id="tel" value="<%=rs("tel")%>" size="30"></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td height="25" align="center">邮政编码:</td>
            <td height="25"> 
              <input name="zipcode" type="text" class="input" id="zipcode" value="<%=rs("zipcode")%>" size="30"></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td height="25" align="center">详细地址:</td>
            <td height="25"> 
              <input name="address" type="text" class="input" id="address" value="<%=rs("address")%>" size="40"></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td height="25" align="center">个人简介:</td>
            <td height="25"> 
              <textarea name="remark" cols="40" rows="10" class="input" id="remark"><%=rs("remark")%></textarea></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td height="25" colspan="2" align="center"> 
              <input name="Submit" type="submit" class="button" value=" 修 改 ">
                
              <input name="Submit2" type="reset" class="button" value=" 清 除 "></td>
          </tr>
        </table>
      </form></td>
  </tr>
</table>
<%
 end if
 rs.close
 set rs=nothing
end if
%>
<!--#include file="bottom.asp"-->
</DIV>
</BODY></HTML>

⌨️ 快捷键说明

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