home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
221.214.14.186
/
221.214.14.186.tar
/
221.214.14.186
/
zb
/
Notepad-zb
/
admin_userModify.asp
< prev
next >
Wrap
Text File
|
2005-12-26
|
7KB
|
244 lines
<!--#include file=conn.asp-->
<!--#include file=const.asp -->
<!--#include file=md5.asp -->
<%
if not theUser.admin then
connclose()
response.redirect ("index.asp")
end if
dim rs , exec %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=sitetitle%></title>
<META name="Author" content="─╛─±">
<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
dim userid
userid=request("userid")
backInput= "<br><br><input type=button value=╖╡╗╪╟░╥│ onClick=history.back() class=input2 name=button ><br>"
homeInput="<br><br><input type=button value=╣╪▒╒┤░┐┌ onClick=""window.close() "" class=input2><br>"
if request.form="" then
exec="select * from [user] where userid="& userid
set rs=conn.execute(exec)
%>
<form name="form" method="post">
<table width="80%" border="0">
<tr>
<td width="30%">╙├ ╗º ├√ú║</td>
<td width="70%">
<%=rs("username")%>
<input type="hidden" name="userid" value="<%=userid%>" >
</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 rs("sex")="1" then response.write "checked" %>>─╨
<input type="radio" name="male" value="0" <% if not rs("sex")="1" 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 rs("GBface")<>"" then response.write rs("GBface") else response.write "face/m01.gif"%>" border=0 id="faceImg"></a>
<input class="input1" type="text" onchange="document.all.faceImg.src=this.value" name="face" value="<%if rs("GBface")<>"" then response.write rs("GBface") else response.write "face/m01.gif"%>">
</td>
</tr>
<tr>
<td>╡τ╫╙╙╩╝■ú║</td>
<td>
<input type="text" name="email" size="20" class="input1" value="<%=rs("useremail")%>">
</td>
</tr>
<tr>
<td>íí QQ ííú║</td>
<td>
<input type="text" name="qq" size="20" class="input1" value="<%=rs("oicq")%>">
</td>
</tr>
<tr>
<td>íí ICQ ú║</td>
<td>
<input type="text" name="icq" size="20" class="input1" value="<%=rs("icq")%>">
</td>
</tr>
<tr>
<td>íí MSN ú║</td>
<td>
<input type="text" name="msn" size="20" class="input1" value="<%=rs("msn")%>">
</td>
</tr>
<tr>
<td>╓≈╥│╡╪╓╖ú║</td>
<td>
<input type="text" name="url" size="30" value="<% if rs("homepage")="" then response.write "http://" else response.write rs("homepage")%>" class="input1">
</td>
</tr>
<tr>
<td>╣▄└φ╚¿╧▐ú║</td>
<td>
<select name="gbuserclass" >
<option value="0" >╬▐╚¿╧▐</option>
<option value="1" <%if rs("gbuserclass")=1 then response.write "selected" %> > ░µ ╓≈</option>
<option value="2" <%if rs("gbuserclass")=2 then response.write "selected" %> >╣▄└φ╘▒</option>
</select>
</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,gbuserclass
name=Encodestr(request.form("name"))
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"))
gbuserclass=int(request.form("gbuserclass"))
if npass1<>npass2 then
response.write "<font color=red>╖ó╔·┤φ╬≤</font><br><br>╨┬├▄┬δ║═╚╖╚╧├▄┬δ╥¬╧α═¼úíúíúí"
response.write backInput
exit sub
end if
exec="select * from [user] where userid="& userid
set rs=server.createobject("adodb.recordset")
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
name=rs("username")
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
email=null
end if
rs("useremail")=email
exec="update ly set email='"&email&"' where bl=1 and name='"&name&"'"
conn.execute(exec)
end if
if isNull(rs("oicq")) or rs("oicq")<>qq then
if qq="" then
qq=null
end if
rs("oicq")=qq
exec="update ly set qq='"&qq&"' where bl=1 and name='"&name&"'"
conn.execute(exec)
end if
if isNull(rs("homepage")) or rs("homepage")<>url then
if url="" then
url=null
end if
rs("homepage")=url
exec="update ly set url='"&url&"' where bl=1 and name='"&name&"'"
conn.execute(exec)
end if
if isNull(rs("icq")) or rs("icq")<>icq then
if icq="" then
icq=null
end if
rs("icq")=icq
if isNull(icq) then
exec="update ly set icq=null where bl=1 and name='"&name&"'"
else
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
msn=null
end if
rs("msn")=msn
if isnull(msn) then
exec="update ly set msn=null where bl=1 and name='"&name&"'"
else
exec="update ly set msn='"&msn&"' where bl=1 and name='"&name&"'"
end if
conn.execute(exec)
end if
if isNull(rs("gbuserclass")) or rs("gbuserclass")<>gbuserclass then
rs("gbuserclass")=gbuserclass
end if
rs.update
rsclose()
response.write "<font color=red>╨▐╕─│╔╣ªúíúíúí</font>"
response.write homeInput
end if
end sub %>
</td>
</tr>
</table>
<!--#include file="foot.asp"-->
</body>
</html>