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

📄 edit.asp

📁 东营人家多用户留言本 2.2 版 留言本演示地址:http://www.860546.net/gbook/index.asp 留言本下载地址:http://www.860546.net/8
💻 ASP
字号:
<html>
<head>
<%if session("user")<>"" and session("pwd")<>"" then%>
<!--#include file="config.asp"--> 
<% 
user=session("user") 
set rs=server.createobject("adodb.recordset") 
sql="select * from user where user='"&user&"'" 
rs.open sql,conn,1,3 
if not rs.eof then 
 if session("pwd")=rs("pwd") then%>
 
<%
if request("edit")="ok" then

pwd1=request.form("pwd1")
pwd2=request.form("pwd2")
email=request.form("email")
web=request.form("web")
url=request.form("url")
gbname=request.form("gbname")
rword=request.form("rword")

'**********检查是否填写了所有项,如果不是侧自动返回申请页面
if user="" or pwd1="" or pwd2="" or email="" or web="" or url="" or gbname="" then
errmsg=errmsg & "△ 请填写所有内容!\n"
end if
if pwd1<>pwd2 then
errmsg=errmsg & "△ 两次输入的密码不相同!\n"
end if


if errmsg<>"" then
    Conn.Close
    Set conn = nothing
    Set rsc = nothing
    response.write("<script>alert('" & errmsg & "');history.go(-1)</script>")
    response.end
end if
'**********检查结束**********
session("pwd")=pwd1
rs("pwd")=pwd1
rs("email")=email
rs("web")=web
rs("url")=url
rs("gbname")=gbname
rs("rword")=rword
rs.update

%>
<meta http-equiv="Refresh" content="2; URL=index.asp?user=<%=user%>">
<%end if%>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<title>修改注册资料</title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>

<body background="pic/a1bf.gif">
<%if request("edit")="ok" then%>
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="100%">
  <tr>
                
    <td width="100%" height="50"> 
      <p align="center"><img src="pic/mai2n.gif" width="522" height="350">
      <p align="center"><font color="#CC9999" size="2">修改资料<b>成功!</b></font><br>
        <br>
        2 秒后自动<a href="index.asp?user=<%=user%>">返回留言本首页</a><br>
        <br>
    </td>              
  </tr>     
</table>            
<%else%>            
             
<div align="center">             
  <center>             
             
             
    <table border="0" width="556" cellpadding="0" cellspacing="0">
      <tr> 
        <td align="center">&nbsp; </td>
      </tr>
    </table>                    
  </center>            
</div>            
<div align="center">            
  <center>            
  <table class=table border="0" width="556" cellspacing="0" cellpadding="6">            
    <tr>            
      <td width="100%">            
          <table border="0" width="100%" cellpadding="4">
            <form action="edit.asp?edit=ok" method="POST">                
      <tr>                
        <td width="20%" align="right">用户名:</td>                
        <td width="80%"><font color="#FF0000"><%=rs("user")%></font></td>                           
      </tr>                           
      <tr>                           
        <td width="20%" align="right">密码:</td>                            
        <td width="80%">                             
                <input onmouseover="style.backgroundColor='#ffffff'"  onmouseout="style.backgroundColor='#ECECFF'" type="password" name="pwd1" size="20" maxlength="15" value="<%=rs("pwd")%>">                            
                * 1-15个字节,不要有空格</td>                              
      </tr>                             
      <tr>                             
        <td width="20%" align="right">重复密码:</td>                             
        <td width="80%">                              
                <input onmouseover="style.backgroundColor='#ffffff'"  onmouseout="style.backgroundColor='#ECECFF'" type="password" name="pwd2" size="20" maxlength="15" value="<%=rs("pwd")%>">                             
                * 1-15个字节,不要有空格</td>                              
      </tr>                             
      <tr>                             
        <td width="20%" align="right">E-mail:</td>                             
        <td width="80%"><input onmouseover="style.backgroundColor='#ffffff'"  onmouseout="style.backgroundColor='#ECECFF'" type="text" size="50" maxlength="100" name="email" value="<%=rs("email")%>">                             
          *</td>                               
      </tr>                               
      <tr>                               
        <td width="20%" align="right">站&nbsp; 名:</td>                             
        <td width="80%"><input onmouseover="style.backgroundColor='#ffffff'"  onmouseout="style.backgroundColor='#ECECFF'" type="text" size="50" maxlength="20" name="web" value="<%=rs("web")%>">                             
          *</td>                             
      </tr>                             
      <tr>                             
        <td width="20%" align="right">主&nbsp; 页:</td>                             
        <td width="80%"><input onmouseover="style.backgroundColor='#ffffff'"  onmouseout="style.backgroundColor='#ECECFF'" type="text" name="url" size="50" maxlength="100" value="<%=rs("url")%>">                             
          *</td>                             
      </tr>                             
      <tr>                             
        <td width="20%" align="right">留言本标题:</td>                            
        <td width="80%"><input onmouseover="style.backgroundColor='#ffffff'"  onmouseout="style.backgroundColor='#ECECFF'" type="text" size="50" maxlength="20" name="gbname" value="<%=rs("gbname")%>">                            
          *                          
        </td>                          
      </tr> 
  <tr>                             
        <td width="20%" align="right">留言本公告:</td>                            
        <td width="80%"><textarea onMouseOver="style.backgroundColor='#ffffff'" 
            onMouseOut="style.backgroundColor='#ECECFF'" rows="4" cols="48" name="rword"><%=rs("rword")%></textarea>                    
        </td>                          
      </tr>   

                         
      <tr>                          
        <td width="20%" colspan="2" align="right">                          
          <p align="center"><input style="width:80;height:18" onmouseover="style.backgroundColor='#ffffff'"  onmouseout="style.backgroundColor='#ECECFF'" type="submit" value="写完了">                           
          <input style="width:80;height:18" onmouseover="style.backgroundColor='#ffffff'"  onmouseout="style.backgroundColor='#ECECFF'" type="reset" value="重新写" name="reset">                          
        </td>                          
      </tr>                          
      </form>                     
    </table>
          <div align="center"></div>
        </td>                 
    </tr>                 
  </table>                 
    <br>
  </center>                 
</div>                 
                     
<div align="center">                 
  <center>                 
                     
    <table border="0" width="560" cellpadding="0">
      <tr> 
        <td width="100%"></td>
      </tr>
      <tr> 
        <td width="100%"> 您的位置:<a href="<%=rs("url")%>" target="_self"><%=rs("web")%></a> 
          &gt;&gt; <a href="index.asp?user=<%=user%>" target="_self"> 留言本</a>&gt;&gt; 
          修改注册资料 </td>
      </tr>
    </table>                                        
                   
    <br>
    <table style="BORDER-BOTTOM: #d2e8b5 1px dotted" cellspacing=0 cellpadding=0 
width=570 border=0>
      <tbody> 
      <tr> 
        <td></td>
      </tr>
      </tbody> 
    </table>
    <table border="0" cellpadding="0" width="500" cellspacing="0">
      <tr> 
        <td nowrap> 
         <p align="center"><font face="Verdana">免费服务由<a href="http://www.860546.net" target="_blank">东营人家</a>提供<br>
            </font> 
        </td>
      </tr>
    </table>
  </center>               
</div>    
<%end if   
end if   
end if   
end if 
rs.close 
set rs=nothing   
conn.close      
set conn=nothing%>     
</body>                   
</html>

⌨️ 快捷键说明

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