📄 editmy.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="conn.asp" -->
<% dim inname
dim rs,spl
inname=session("inname")
dim WINNT_CHINESE
function strLength(str)
ON ERROR RESUME NEXT
dim WINNT_CHINESE
WINNT_CHINESE = (len("用户")=2)
if WINNT_CHINESE then
dim l,t,c
dim i
l=len(str)
t=l
for i=1 to l
c=asc(mid(str,i,1))
if c<0 then c=c+65536
if c>255 then
t=t+1
end if
next
strLength=t
else
strLength=len(str)
end if
if err.number<>0 then err.clear
end function
if inname="" then
response.write "<script>alert('对不起!只有正式用户使用本页!');window.close();</script>"
response.end
end if
Set rs= Server.CreateObject("ADODB.Recordset")
dim nickname,passwd
if request("action")="edit" then
if request("nickname")="" then
Response.write "<script>alert('昵称是必须填写的!');history.back();</script>"
Response.end
else
nickname=trim(request.form("nickname"))
end if
if request("passwd")="" then
Response.write "<script>alert('密码是必须填写的!');history.back();</script>"
Response.end
else
passwd=trim(request.form("passwd"))
end if
if request("email")<>"" then
if instr(request("email"),"@")<1 or instr(request("email"),".")<1 then
Response.write "<script>alert('请填写正确的EMAIL地址!');history.back();</script>"
Response.end
end if
end if
if request("web")<>"" then
if instr(request("web"),"http://")<1 or instr(request("web"),".")<1 then
Response.write "<script>alert('请填写正确的网站地址!');history.back();</script>"
Response.end
end if
end if
if request("soft")<>"" then
if strLength(trim(request("soft")))>50 then
Response.write "<script>alert('常用软件不能超过50个字符!');history.back();</script>"
Response.end
end if
end if
if request("techang")<>"" then
if strLength(trim(request("techang")))>50 then
Response.write "<script>alert('个人特长不能超过50个字符!');history.back();</script>"
Response.end
end if
end if
if request("oicq")<>"" then
if not isnumeric(trim(request("oicq"))) then
Response.write "<script>alert('oicq是由数字组成的!');history.back();</script>"
Response.end
end if
end if
dim srday
srday=request.Form("i1")&"-"&request.Form("i2")&"-"&request.Form("i3")
sql = "select * from [user] where userid<>"&request("id")&" and nickname='"&nickname&"'"
rs.open sql,conn,1,1
if not(rs.eof and rs.bof) then
Response.write "<script>alert('【"&nickname&"】昵称已经被别人注册了,请另外选择一个昵称!');history.back();</script>"
Response.end
end if
rs.close
sql = "select * from [user] where userid="&request("id")
rs.open sql,conn,1,3
if request("username")<>"" then
rs("username")=trim(request.Form("username"))
end if
rs("nickname")=nickname
rs("passwd")=passwd
if request("email")<>"" then
rs("email")=trim(request.Form("email"))
end if
if request("sex")=1 then
rs("sex")=true
else
rs("sex")=false
end if
if isdate(srday) then
rs("shengri")=srday
end if
if request("web")<>"" then
rs("url")=trim(request.Form("web"))
end if
if request("oicq")<>"" then
rs("oicq")=trim(request.Form("oicq"))
end if
if request("soft")<>"" then
rs("soft")=trim(request.Form("soft"))
end if
if request("techang")<>"" then
rs("techang")=trim(request.Form("techang"))
end if
rs.update
rs.close
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>修改个人资料 | WLONG3D文件上传系统wlup3.5</title>
<link href="FORUM.CSS" rel="stylesheet" type="text/css">
</head>
<body text="#000000" link="#000000" vlink="#000000" alink="#FF0000">
<table width="95%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#6699FF">
<tr>
<td colspan="2" align="center" bgcolor="#99CCFF"><img src="upfile/map/JJCBAR.GIF" width="468" height="60"></td>
</tr>
<tr>
<td colspan="2" align="center" bgcolor="#FFCC00"><strong>WLONG3D文件上传系统wlup3.5</strong></td>
</tr>
<tr>
<td width="25%" align="center" valign="top" bgcolor="#FFFFFF"><table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#6699FF">
<tr align="center" bgcolor="#99CCFF">
<td colspan="2">【用户档案】</td>
</tr>
<%
sql="select * from [user] where nickname='"&inname&"'"
rs.open sql,conn,1,1
if not(rs.eof and rs.bof) then
%>
<tr>
<td width="28%" align="right" bgcolor="#eeeeee">真名</td>
<td width="72%" bgcolor="#FFFFFF"><%=rs("username")%></td>
</tr>
<tr>
<td align="right" bgcolor="#eeeeee">昵称</td>
<td bgcolor="#FFFFFF"><%=rs("nickname")%></td>
</tr>
<tr>
<td align="right" bgcolor="#eeeeee">生日</td>
<td bgcolor="#FFFFFF"><%=rs("shengri")%></td>
</tr>
<tr>
<td align="right" bgcolor="#eeeeee">OICQ</td>
<td bgcolor="#FFFFFF"><%=rs("oicq")%></td>
</tr>
<tr>
<td align="right" bgcolor="#eeeeee">EMAIL</td>
<td bgcolor="#FFFFFF"><%=rs("email")%></td>
</tr>
<tr>
<td align="right" bgcolor="#eeeeee">主页</td>
<td bgcolor="#FFFFFF"><%=rs("url")%></td>
</tr>
<tr>
<td align="right" bgcolor="#eeeeee">软件</td>
<td bgcolor="#FFFFFF"><%=rs("soft")%></td>
</tr>
<tr>
<td align="right" bgcolor="#eeeeee">特长</td>
<td bgcolor="#FFFFFF"><%=rs("techang")%></td>
</tr>
<tr align="center" bgcolor="#99CCFF">
<td colspan="2">【<a href="editmy.asp">修改资料</a>】</td>
</tr>
<tr align="center" bgcolor="#99CCFF">
<td colspan="2">【<a href="MAKEFILE.ASP">继续上传</a>】</td>
</tr>
<tr align="center" bgcolor="#99CCFF">
<td colspan="2">【<a href="LOGIN.ASP">退出系统</a>】</td>
</tr>
</table></td>
<td width="75%" align="right" valign="top" bgcolor="#FFFFFF">
<form name="form1" method="post" action="editmy.asp?action=edit&id=<%=rs("userid")%>">
<table width="95%" border="0" cellpadding="3" cellspacing="1" bgcolor="#6699FF">
<tr align="center" bgcolor="#99CCFF">
<td colspan="2"><strong>修改用户的个人资料</strong></td>
</tr>
<tr align="center" bgcolor="#FFCC00">
<td colspan="2">【基础资料】</td>
</tr>
<tr>
<td align="right" bgcolor="#eeeeee">常用昵称:</td>
<td width="68%" bgcolor="#FFFFFF"><input name="nickname" type="text" class="buttonface" value="<%=rs("nickname")%>" size="20">
<b><font color="#FF0000"> *</font></b> 必须填写</td>
</tr>
<tr>
<td align="right" bgcolor="#eeeeee">真实姓名:</td>
<td width="68%" bgcolor="#FFFFFF"><input name="uesrname" type="text" class="buttonface" id="uesrname" value="<%=rs("username")%>" size="20">
<b></b></td>
</tr>
<tr>
<td width="32%" align="right" bgcolor="#eeeeee">登陆密码: </td>
<td width="68%" bgcolor="#FFFFFF"><input name="passwd" type="text" class="buttonface" value="<%=rs("passwd")%>" size="20">
<b><font color="#FF0000"> *</font></b> 必须填写</td>
</tr>
<tr>
<td width="32%" align="right" bgcolor="#eeeeee">性别:</td>
<td bgcolor="#FFFFFF"> <input name="sex" type="radio" class="box" value="1" <% if rs("sex")=true then %>checked<% end if %>>
男
<input name="sex" type="radio" class="box" value="0" <% if rs("sex")=false then %>checked<% end if %>>
女</td>
</tr>
<tr align="center" bgcolor="#FFCC00">
<td colspan="2">【附加资料】</td>
</tr>
<tr>
<td width="32%" align="right" bgcolor="#eeeeee">出生年月:</td>
<td bgcolor="#FFFFFF"><select name="year" id="year">
<option value="" <% if rs("shengri")="" or isnull(rs("shengri")) then %>selected<% end if %>>年</option>
<% for i1=1960 to 2000 %>
<option value="<%=i1%>" <% if year(rs("shengri"))=i1 then %>selected<% end if %>><%=i1%></option>
<% next %>
</select> <select name="month" id="month">
<option value="" <% if rs("shengri")="" or isnull(rs("shengri")) then %>selected<% end if %>>月</option>
<% for i2=1 to 12 %>
<option value="<%=i2%>" <% if month(rs("shengri"))=i2 then %>selected<% end if %>><%=i2%></option>
<% next %>
</select> <select name="day" id="day">
<option value="" <% if rs("shengri")="" or isnull(rs("shengri")) then %>selected<% end if %>>日</option>
<% for i3=1 to 31 %>
<option value="<%=i3%>" <% if day(rs("shengri"))=i3 then %>selected<% end if %>><%=i3%></option>
<% next %>
</select></td>
</tr>
<tr>
<td width="32%" align="right" bgcolor="#eeeeee">联系信箱:</td>
<td bgcolor="#FFFFFF"><input name="email" type="text" class="buttonface" id="email2" value="<%=rs("email")%>" size="40"></td>
</tr>
<tr>
<td width="32%" align="right" bgcolor="#eeeeee">OICQ:</td>
<td bgcolor="#FFFFFF"><input name="oicq" type="text" class="buttonface" id="oicq" value="<%=rs("oicq")%>" size="20"></td>
</tr>
<tr>
<td width="32%" align="right" bgcolor="#eeeeee">个人主页:</td>
<td bgcolor="#FFFFFF"><input name="web" type="text" class="buttonface" id="web" value="<%=rs("url")%>" size="40">
<br>
(请使用<font color="#FF0000">http://www.wlong3d.com</font>的形式填写) </td>
</tr>
<tr>
<td align="right" bgcolor="#eeeeee">常用软件:</td>
<td bgcolor="#FFFFFF"><input name="soft" type="text" class="buttonface" id="soft" value="<%=rs("soft")%>" size="40">
<font color="#FF0000">(限50字内)</font> </td>
</tr>
<tr>
<td align="right" bgcolor="#eeeeee">个人特长:</td>
<td bgcolor="#FFFFFF"><input name="techang" type="text" class="buttonface" id="techang" value="<%=rs("techang")%>" size="40">
<font color="#FF0000">(限50字内)</font></td>
</tr>
<tr>
<td colspan="2" bgcolor="#99CCFF"> <div align="center">
<input type="submit" name="Submit3" value="提交修改" onClick="MM_validateForm('姓名','','R','昵称','','R','year','','NisNum','icq','','NisNum','oicq','','NisNum','email','','RisEmail','tel','','NisNum','shouji','','NisNum','bp','','NisNum','soft','','R','techang','','R','密码','','R');return document.MM_returnValue" class="buttonface">
<input type="reset" name="Submit4" value="重新填写" class="buttonface">
</div>
<div align="center"> </div></td>
</tr>
</table>
</form>
</td>
</tr><% end if
rs.close
set rs=nothing %>
<tr align="center">
<td colspan="2" bgcolor="#FFCC00">版权所有 ©2003-2006 <a href="http://www.wlong3d.com/" target="_blank">www.wlong3d.com</a></td>
</tr>
</table>
</body>
</html>
<% conn.close
set conn=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -