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

📄 change.asp

📁 主要是优化了部分代码
💻 ASP
字号:
<!-- #include file="conn.asp" -->
<!-- #include file="ini.asp" -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=allsms%></title>
<link href="css.css" type=text/css rel=stylesheet></head>
<body>
<div id=d1><img src="logo.gif"></div>
<div id=d2 style="text-align:left;">您现在的位置&raquo;<A HREF="index.asp">首页</A>&raquo;<A HREF="change.asp">会员中心</A>&raquo;</div>
<%
set rsc=server.createobject("adodb.recordset")
sqlc="select  * from  info  where username='"&session("username")&"' and password='"&session("password")&"'"
rsc.open sqlc,conn,1,1
nr=rsc("password")
username=rsc("username")
password=rsc("password")
sex=rsc("sex")
qq=rsc("qq")
mail=rsc("mail")
quest=rsc("quest")
getpassword=rsc("getpassword")
add=rsc("add")
personalinfo=rsc("personalinfo")
vv=rsc("ntime")
set rsc=nothing
if nr="" then
response.Redirect("index.asp")
end if
if strcomp(nr,request.Form("password"))=0 then
response.Write("欢迎你!"&request.Form("username"))
response.Write("你是在"&vv&"注册的")
session("username")=request.Form("username")
end if
if session("username")="" then
response.Redirect("index.asp")
end if
%>
<form name="form1" method="post" action="change1.asp?ac=ch" style="margin:0;">
*用户名称:<input name="username" type="text" id="username" value="<%=username%>"><BR>
*登陆密码:<input name="password" type="text" id="password" value="<%=password%>"><BR>
*性别称谓:<input name="sex" type="text" id="sex" value="<%=sex%>"><BR>
*腾讯&nbsp;&nbsp;QQ:<input name="qq" type="text" id="qq" value="<%=qq%>"><BR>
*邮箱地址:<input name="mail" type="text" id="mail" value="<%=mail%>"><BR>
*提示问题:<input name="quest" type="text" id="quest" value="<%=quest%>"><BR>
*问题答案:<input name="getpassword" type="text" id="getpassword" value="<%=getpassword%>"><BR>
*通讯地址:<input name="add" type="text" id="add" value="<%=add%>"><BR>
*个人介绍:<input name="personalinfo" cols="30" rows="6" id="personalinfo" value="<%=personalinfo%>"><BR>
<div style="padding:3px;"><input type="submit" name="Submit" value="提交修改">&nbsp;<a href="change.asp?se=y" target="_self">退出系统</a></div>
<% if strcomp(request.QueryString("se"),"y")=0 then
   session("username")=""
   response.Redirect("index.asp")
   end if
%>
</form>
<%
if strcomp(request.QueryString("ac"),"ch")=0 then
set rs=server.createobject("adodb.recordset")
sql="select  * from  info  where username='"&session("username")&"'"
rs.open sql,conn,1,3
rs("username")=request.Form("username")
rs("password")=request.Form("password")
rs("mail")=request.Form("mail")
rs("sex")=request.Form("sex")
rs("qq")=request.Form("qq")
rs("add")=request.Form("add")
rs("personalinfo")=request.Form("personalinfo")
rs("quest")=request.Form("quest")
rs("getpassword")=request.Form("getpassword")

rs.update
set rs=nothing
response.Write("修改完成!")
end if
%>
<div id=copy style="text-align:center;"><a href="http://www.youwe.org/?user" target="_parent">Copyright &copy;<%=webmaster%></a><BR>有为明星加工厂 设计发布</div>
</body>
</html>

⌨️ 快捷键说明

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