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

📄 usereditzl.asp

📁 二手书籍系统
💻 ASP
字号:
<!--#include file="inc/conn.asp"-->
<!--#include file=usercookies.asp-->
<!--#include file="config.asp"-->
<!--#include file=inc/ipt.asp-->
<!--#include file=inc/md5.asp-->
<!--#include file=mail.asp-->
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="keywords" content="供求信息,二手网,二手商品,电子商务,供求网站,免费发布供求信息,商业信息,贸易网,求购,求购信息,出售,供应,供求信息网,招商投资 生活服务 家电家居  旅游出行 招聘求职  房产信息 
建材装饰 烟酒副食 电脑网络  餐饮酒店  医药保健  农林牧渔  安全防护  包装纸张 办公文教  电子通讯  
纺织皮革  服装服饰  工业机械 仪器仪表 交通运输 车及配件 工艺礼品 文化艺术 冶金矿产 出版印刷 能源动力 环境保护 
化工行业 玩具体育 园林绿化 广告服务 商务服务 分类广告 搜索引擎 企业行业黄页 分类信息网 集市">

<title>会员管理中心-修改资料-<%=title%></title>
</head>
<SCRIPT language=javascript>
<!--
function CheckForm()
{
if(document.thisForm.username.value.length<1)
	{
	    alert("参数错误!");
	    return false;
	}
if(document.thisForm.password.value.length<1)
	{
	    alert("参数错误!");
	    return false;
	}
if(document.thisForm.name.value.length<1)
	{
	    alert("真实姓名没有填写!");
	    return false;
	}
if(document.thisForm.idcard.value.length<1)
	{
	    alert("身份证号码没有填写!");
	    return false;
	}
if(document.thisForm.dianhua.value.length<1)
	{
	    alert("联系电话没有填写!");
	    return false;
	}
}

//-->
</SCRIPT>
<body topmargin="0">
<!--#include file="topcnmai.asp"-->
<%
dim rs,sql,username,edit,pass2,pass3
edit=Request.form("edit")
pass2=Request.form("pass2")
pass3=Request.form("pass3")
username=request.cookies("cnmai")("username")
set rs = Server.CreateObject("ADODB.RecordSet")
sql="select * from [user] where username='"&username&"'" 
rs.open sql,conn,1,1
if rs.eof then
response.write "<br>"
response.write "<li>参数错误!"
response.end
end if
%>
<div align="center">
<table width="760"bgcolor="#FFFFFF" style="border-left:1px solid #CCCCCC; border-right:1px solid #CCCCCC; padding:1px; " cellspacing="0" cellpadding="0">
<tr>
<td width="160" height="25" class=td2_muen>
<p align="center"><font color=white>会员管理系统</font></td>
<td width="1" height="322" rowspan="3"> </td>
<td height="25" class=td4_muen>
<p align="center">会员管理中心</font>-修改资料</td>
</tr>
<tr>
<td bgcolor="#F6F6F6" valign="top"><!--#include file=userleft.asp--></td>
<td valign="top"><%if edit="" then %><form method="POST" name="thisForm" action="usereditzl.asp">
<table width="100%" border="0" cellspacing="0" bordercolor="#FFFFFF" cellpadding="0">
<tr>
<td height="27" bgcolor="#F6F6F6" width="30%" align="right">
登陆帐号:</td>
<td height="25" bgcolor="#F6F6F6" width="68%"><font style="font-size: 11pt"> &nbsp;<%=rs("username")%></font></td>
</tr>                                                      
<tr>
<td height="27" bgcolor="#F6F6F6" width="30%" align="right">
原密码:</td>
<td height="25" bgcolor="#F6F6F6" width="68%">
&nbsp;<input name="pass1" size="20" value="<%=rs("password")%>" type="password"> 
不修改密码,保留不变</td>
</tr>                                                      
<tr>
<td height="27" bgcolor="#F6F6F6" width="30%" align="right">
新密码:</td>
<td height="25" bgcolor="#F6F6F6" width="68%">
&nbsp;<input type="password" name="pass2" size="20"> 
不修改密码,留空</td>
</tr>                                                      
<tr>
<td height="27" bgcolor="#F6F6F6" width="30%" align="right">
确认新密码:</td>
<td height="25" bgcolor="#F6F6F6" width="68%">
&nbsp;<input type="password" name="pass3" size="20"> 
不修改密码,留空</td>
</tr>                                                      
<tr>
<td height="23" bgcolor="#F6F6F6" width="30%" align="right">
<p>姓名:</td>
<td height="23" bgcolor="#F6F6F6" width="68%">
&nbsp;<input type="text" maxlength="12" name="name" size="20" value="<%=rs("name")%>"><font color="#FF0000"> 
*</font></td>
</tr>                                                      
<tr> 
<td height="31" bgcolor="#F6F6F6" width="30%" align="right">
<p align="right">邮件地址:</td>
<td height="31" bgcolor="#F6F6F6" width="68%">
&nbsp;<input type="text" maxlength="30" name="email" size="20" value="<%=rs("email")%>"></td>
</tr>
<tr> 
<td height="27" bgcolor="#F6F6F6" width="30%" align="right">
<p align="right">&nbsp; 身份证:</td>
<td height="25" bgcolor="#F6F6F6" width="68%">
&nbsp;<input type="text" maxlength="18" name="idcard" size="20" value="<%=rs("idcard")%>" ><font color="#FF0000"> 
*</font></td>
</tr>
<tr> 
<td height="27" bgcolor="#F6F6F6" width="30%">
<p align="right">联系电话:</td>
<td height="25" bgcolor="#F6F6F6" width="68%">
&nbsp;<input type="text" maxlength="24" name="dianhua" size="20" value="<%=rs("dianhua")%>" ><font color="#FF0000"> 
*</font></td>
</tr>
<tr> 
<td height="27" bgcolor="#F6F6F6" width="30%" align="right">
QQ:</td>
<td height="25" bgcolor="#F6F6F6" width="68%">
&nbsp;<input type="text" maxlength="10" name="qq" size="20" value="<%=rs("qq")%>" ></td>
</tr>
<tr> 
<td height="27" bgcolor="#F6F6F6" width="30%">
<p align="right">通信地址:</td>
<td height="25" bgcolor="#F6F6F6" width="68%">
&nbsp;<input type="text" maxlength="50" name="dizhi" size="35" value="<%=rs("dizhi")%>" ></td>
</tr>
<tr> 
<td height="50" bgcolor="#F3FDEA" colspan="2">
<p align="center">
<input type="submit" onclick="javascript:return CheckForm();" value="提交修改" name="edit"></td>
</tr>                                     
</table>
</form>
<%else 
if pass2="" or pass3="" then
dim email,name,idcard,dianhua,qq,dizhi,password
username=request.cookies("cnmai")("username")
name=trim(request("name"))
password=trim(request("password"))
email=trim(request("email"))
idcard=trim(request("idcard"))
dianhua=trim(request("dianhua"))
qq=trim(request("qq"))
dizhi=trim(request("dizhi"))
chkcnmai(name)
if not isnumeric(idcard) or len(idcard)<15 or len(idcard)>18 then
call errcnmai(6)
response.end
end if
set rs=server.createobject("adodb.recordset")
sql="select name,email,idcard,dianhua,qq,dizhi,zcdata from [user] where username='"&username&"'"
rs.open sql,conn,1,3
rs("name")=name
rs("email")=email
rs("idcard")=idcard
rs("dianhua")=dianhua
rs("qq")=qq
rs("dizhi")=dizhi
rs("zcdata")=now()
rs.update
rs.close
set rs=nothing
closedb
response.write "<center>用户资料修改成功!!</center>"
response.write "<meta http-equiv=refresh content=""1;URL=usereditzl.asp"">"
response.end
else%>
<%
if pass2<>pass3 then
response.write "<script language=JavaScript>" & chr(13) & "alert('两次密码输入不同,返回重新输入!!');" & "window.location='usereditzl.asp'" & "</script>"
response.end
end if
username=request.cookies("cnmai")("username")
%>
<table border="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111" width="582">
<tr>
<td valign="top" align="center" bgcolor="#FFFFFF">
<p align="left"><%
set rs=server.createobject("adodb.recordset")
sql="select password,username,email from [user] where username='"&username&"'"
rs.open sql,conn,1,3
username=trim(rs("username"))
email=trim(rs("email"))
rs("password")=md5(pass2)
rs.update
response.write "<li>修改密码成功,同时我们已经将您的新密码发送到|<b>"&email&"</b>|,请保管好您的新密码!"
call mail()
response.write "<meta http-equiv=refresh content=""1;URL=usereditzl.asp"">"
Response.cookies("cnmai")=""
rs.close
set rs=nothing
closedb
%></td></tr></table><%
sub mail()
dim mailbody,Jmail
mailbody="您好,"&username&"!<br>您已成功修改了密码!现在资料为:登陆帐号:[<b>"&username&"</b>] 您的新密码是:[<b>"&pass2&"</b>]<br> 欢迎登陆<a target=_blank  href="&web&">河南供求信息网</a> 发布供求信息!"   '邮件内容
Set Jmail=server.createobject("Jmail.Message")
Jmail.Charset ="gb2312"
JMail.ContentType = "text/html"
Jmail.Silent =true
Jmail.Priority = 3
Jmail.MailServerUserName = mailname
Jmail.MailServerPassword = mailpass
Jmail.From = mailform
Jmail.FromName =""&title&""
Jmail.Subject ="密码修改成功!-"&title&""
Jmail.AddRecipient ""&email&""
Jmail.Body = mailbody
Jmail.Send(mailsmtp)
Set Jmail=nothing
end sub
%><%
end if
end if%></td></tr></table>
</div>
<!--#include file="endcnmai.asp"-->
</body>
</html>

⌨️ 快捷键说明

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