home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
221.214.14.186
/
221.214.14.186.tar
/
221.214.14.186
/
zb
/
Notepad-zb
/
userModify.asp
< prev
Wrap
Text File
|
2005-12-26
|
8KB
|
258 lines
<!--#include file=conn.asp-->
<!--#include file=const.asp -->
<!--#include file=md5.asp -->
<% dim rs , exec %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=sitetitle%></title>
<link rel="stylesheet" href="style/<%=skin%>.css" type="text/css">
</head>
<body>
<!--#include file="head.asp"-->
<br>
<table border="0" width="400" cellspacing="0" cellpadding="10" bordercolorlight="#000000" bordercolordark="#FFFFFF" align="center" class="table004">
<tr>
<td class=table003 align=center>╫ó▓ß╙├╗º╫╩┴╧╨▐╕─
</td>
</tr>
<tr>
<td class="table001" align="center">
<%
main()
connclose()
sub main()
dim backInput, homeInput
backInput= "<br><br><input type=button value=╖╡╗╪╟░╥│ onClick=history.back() class=input2 name=button ><br>"
homeInput="<br><br><input type=button value=╜°╚δ┴⌠╤╘▒╛╩╫╥│ onClick=""location.href='index.asp' "" class=input2><br>"
if request.form="" then
%>
<form name="form1" method="post">
<table width="80%" border="0">
<tr>
<td width="30%">╙├ ╗º ├√ú║</td>
<td width="70%">
<input type="text" name="name" size="20" class="input1" value="<%=theUser.name%>" <%if not theUser.admin then response.write "readonly" end if%> maxlength="20">
</td>
</tr>
<tr>
<td>╛╔ ├▄ ┬δú║</td>
<td>
<input type="password" name="pass" size="20" class="input1" value="" maxlength="20" >
</td>
</tr>
<tr>
<td>╨┬ ├▄ ┬δú║</td>
<td>
<input type="password" name="npass1" size="20" class="input1" maxlength="20" >
</td>
</tr>
<tr>
<td>├▄┬δ╚╖╚╧ú║</td>
<td>
<input type="password" name="npass2" size="20" class="input1" maxlength="20" >
</td>
</tr>
<tr>
<td>╨╘íííí▒≡ú║</td>
<td >
<input type="radio" name="male" value="1" <% if theUser.male then response.write "checked" %>>─╨
<input type="radio" name="male" value="0" <% if not theUser.male then response.write "checked" %> >Ů
ú¿╥╤╫ó▓ß╙├╗º▓╗╙├╠εú⌐
</td>
</tr>
<tr>
<td>═╖íííí╧±ú║</td>
<td >
<a href=### onclick=window.open("face.asp","face","width=400,height=400,resizable=1,scrollbars=1") title=╡π╗≈╤í╘±═╖╧±>
<img src="<%if theUser.face<>"" then response.write theUser.face else response.write "face/m01.gif"%>" border=0 id="faceImg"></a>
<input class="input1" <%if theUser.master then response.write "type=text onchange=document.all.faceImg.src=this.value" else response.write "type=hidden"%> name="face" value="<%if theUser.face<>"" then response.write theUser.face else response.write "face/m01.gif"%>">
</td>
</tr>
<tr>
<td>╡τ╫╙╙╩╝■ú║</td>
<td>
<input type="text" name="email" size="20" class="input1" value="<%=theUser.email%>">
</td>
</tr>
<tr>
<td>íí QQ ííú║</td>
<td>
<input type="text" name="qq" size="20" class="input1" value="<%=theUser.qq%>">
</td>
</tr>
<tr>
<td>íí ICQ ú║</td>
<td>
<input type="text" name="icq" size="20" class="input1" value="<%=theUser.icq%>">
</td>
</tr>
<tr>
<td>íí MSN ú║</td>
<td>
<input type="text" name="msn" size="20" class="input1" value="<%=theUser.msn%>">
</td>
</tr>
<tr>
<td>╓≈╥│╡╪╓╖ú║</td>
<td>
<input type="text" name="url" size="30" value="<% if theUser.url="" then response.write "http://" else response.write theUser.url%>" class="input1">
</td>
</tr>
<tr align="center">
<td colspan="2" height="40">
<input type="submit" value=" ╕ⁿ ╕─ " class="input2" name="Submit" >
</td>
</tr>
</table>
</form>
<%
else
dim name, pass, npass1, npass2,male,face,email,qq,url,icq,msn
name=Encodestr(request.form("name"))
pass=Encodestr(request.form("pass"))
npass1=Encodestr(request.form("npass1"))
npass2=Encodestr(request.form("npass2"))
male=Encodestr(request.form("male"))
face=Encodestr(request.form("face"))
email=Encodestr(request.form("email"))
qq=Encodestr(request.form("qq"))
url=Encodestr(request.form("url"))
icq=Encodestr(request.form("icq"))
msn=Encodestr(request.form("msn"))
if not theUser.reged then
response.write "<font color=red>╖ó╔·┤φ╬≤</font><br><br>─π╗╣├╗╙╨╡╟┬╜ú¼▓╗─▄╨▐╕─╫╩┴╧úí"
response.write backinput
exit sub
end if
if name="" or pass="" then
response.write "<font color=red>╖ó╔·┤φ╬≤</font><br><br>╟δ╩Σ╚δ╙├╗º├√║═├▄┬δúíúíúí"
response.write backInput
exit sub
end if
if npass1<>npass2 then
response.write "<font color=red>╖ó╔·┤φ╬≤</font><br><br>╨┬├▄┬δ║═╚╖╚╧├▄┬δ╥¬╧α═¼úíúíúí"
response.write backInput
exit sub
end if
pass=MD5(pass)
set rs=server.createobject("adodb.recordset")
if theUser.admin and theUser.name<>name then
exec="select userid from [user] where username='"& replace(name,"'","") &"' and userid<>"& theUser.id
rs.open exec,conn,1,1
if not rs.eof then
response.write "<font color=red>╖ó╔·┤φ╬≤</font><br><br>╨┬╙├╗º├√╥╤╛¡╙╨╚╦╩╣╙├úíúíúí"
response.write backInput
exit sub
end if
rs.close
end if
exec="select * from [user] where userid="&theUser.id
rs.open exec,conn,1,3
if rs.eof then
rsclose()
response.write "<font color=red>╖ó╔·┤φ╬≤</font><br><br>╙├╗º├√▓╗┤µ╘┌╗≥├▄┬δ┤φ╬≤úíúíúí"
response.write backInput
exit sub
end if
if name<>theUser.name then
rs("username")=name
end if
if npass1<>"" then
pass=MD5(npass1)
rs("userpassword")=pass
end if
if rs("sex")="1" and male="0" or rs("sex")<>"1" and male="1" then
rs("sex")=male
exec="update ly set male='"&male&"' where bl=1 and name='"&name&"'"
conn.execute(exec)
end if
if rs("GBface")="" or rs("GBface")<>face then
rs("GBface")=face
exec="update ly set face='"&face&"' where bl=1 and name='"&name&"'"
conn.execute(exec)
end if
if isNull(rs("useremail")) or rs("useremail")<>email then
if email="" then
rs("useremail")=null
exec="update ly set email=null where bl=1 and name='"&name&"'"
else
rs("useremail")=email
exec="update ly set email='"&email&"' where bl=1 and name='"&name&"'"
end if
conn.execute(exec)
end if
if isNull(rs("oicq")) or rs("oicq")<>qq then
if qq="" then
rs("oicq")=null
exec="update ly set qq=null where bl=1 and name='"&name&"'"
else
rs("oicq")=qq
exec="update ly set qq='"&qq&"' where bl=1 and name='"&name&"'"
end if
conn.execute(exec)
end if
if isNull(rs("homepage")) or rs("homepage")<>url then
if url="" then
rs("homepage")=null
exec="update ly set url=null where bl=1 and name='"&name&"'"
else
rs("homepage")=url
exec="update ly set url='"&url&"' where bl=1 and name='"&name&"'"
end if
conn.execute(exec)
end if
if isNull(rs("icq")) or rs("icq")<>icq then
if icq="" then
rs("icq")=null
exec="update ly set icq=null where bl=1 and name='"&name&"'"
else
rs("icq")=icq
exec="update ly set icq='"&icq&"' where bl=1 and name='"&name&"'"
end if
conn.execute(exec)
end if
if isNull(rs("msn")) or rs("msn")<>msn then
if msn="" then
rs("msn")=null
exec="update ly set msn=null where bl=1 and name='"&name&"'"
else
rs("msn")=msn
exec="update ly set msn='"&msn&"' where bl=1 and name='"&name&"'"
end if
conn.execute(exec)
end if
rs.update
rsclose()
response.write "<font color=red>╨▐╕─│╔╣ªúíúíúí</font>"
response.write homeInput
if cookiePath<>"" then
response.cookies("gbook").Path=cookiePath
end if
response.cookies("gbook")("username")=vbescape(name)
response.cookies("gbook")("password")=pass
end if
end sub %>
</td>
</tr>
</table>
<!--#include file="foot.asp"-->
</body>
</html>