?? lfshow.asp
字號:
<!--#include file="conn.asp"-->
<!-- #include file="../inc/const.asp" -->
<%if not founduser then
response.write "<script>alert('請您先登陸!');window.close();</script>"
else
stats="虛擬形象"%>
<HTML>
<HEAD>
</HEAD>
<BODY><%
dim username,brs,sex,rs1,rs2,rs3,rs4
if mysex=1 then
sex="boy"
else
sex="girl"
end if
set rs=server.createobject("adodb.recordset")
sql="select titlepic,face,face_1,face_2,face_3,face_4,face_5,face_6 from [User] where username='"&membername&"'"
rs.open sql,connshop,1,1
if rs.eof and rs.bof then
set rs=server.createobject("adodb.recordset")
sql="select * from [user] where (userid is null)"
rs.open sql,connshop,1,3
rs.addnew
rs("username")=membername
rs("titlepic")="userface/back/0000.gif"
if mysex=1 then
rs("face")="userface/face1.gif"
else
rs("face")="userface/face2.gif"
end if
rs("face_1")="userface/face.gif"
rs("face_2")="userface/face.gif"
rs("face_3")="userface/face.gif"
rs("face_4")="userface/face.gif"
rs("face_5")="userface/face.gif"
rs("face_6")="userface/face.gif"
rs.update
rs.close
end if
set rs=server.createobject("adodb.recordset")
sql="select face from [User] where username='"&membername&"'"
rs.open sql,connshop,1,3
if mysex=1 then
rs("face")="userface/face1.gif"
else
rs("face")="userface/face2.gif"
end if
rs.update
rs.close
set rs=server.createobject("adodb.recordset")
sql="select titlepic,face,face_1,face_2,face_3,face_4,face_5,face_6 from [User] where username='"&membername&"'"
rs.open sql,connshop,1,1
%>
<center>
<%
if request("action")="updat" then
call update()
else
call userinfo()
end if
sub update()
username=trim(request("username"))
if username="" then
response.write "<script>alert('非法操作!');history.go(-1);</script>"
response.end
else
set brs=server.createobject("adodb.recordset")
sql="select username from [user] where username='"&username&"'"
brs.open sql,connshop,1,1
if brs.eof then
response.write "<script>alert('非法操作!');history.go(-1);</script>"
response.end
elseif brs(0)<>membername then
response.write "<script>alert('非法操作!');history.go(-1);</script>"
response.end
end if
end if
set brs=server.createobject("adodb.recordset")
sql="select * from [user] where username='"&username&"'"
brs.open sql,connshop,1,3
brs("titlepic")=request("face_0")
brs("face_1")=request("face_1")
brs("face_2")=request("face_2")
brs("face_3")=request("face_3")
brs("face_4")=request("face_4")
brs("face_5")=request("face_5")
brs("face_6")=request("face_6")
brs.Update
brs.close
set brs=nothing
%>
恭喜,您的虛擬形象已經成功保存!<%response.write "<meta http-equiv=refresh content=""1;url=lfshow.asp"">"%>
<%end sub
sub userinfo()
%>
<table width="831" bgcolor="#FFFFFF" cellpadding=0 cellspacing=0 height=9 style="border-collapse: collapse" bordercolor="#111111">
<tr><td width=146 height="1"></td><form action="?action=updat&username=<%=htmlencode(membername)%>" method=POST name="theForm">
<td height="1" width="352" align="left" valign="top"><font size="2">背景 </font><select name="face_0" onChange="document.images['face_0'].src=options[selectedIndex].value;" size=1>
<option value="userface/back/0000.gif">None</option>
<option value=userface/back/0001.gif <%if rs("titlepic")="userface/back/0001.gif" then%>selected<%end if%>>0001</option>
<option value=userface/back/0002.gif <%if rs("titlepic")="userface/back/0002.gif" then%>selected<%end if%>>0002</option>
<option value=userface/back/0003.gif <%if rs("titlepic")="userface/back/0003.gif" then%>selected<%end if%>>0003</option>
<option value=userface/back/0004.gif <%if rs("titlepic")="userface/back/0004.gif" then%>selected<%end if%>>0004</option>
<option value=userface/back/0005.gif <%if rs("titlepic")="userface/back/0005.gif" then%>selected<%end if%>>0005</option>
<option value=userface/back/0006.gif <%if rs("titlepic")="userface/back/0006.gif" then%>selected<%end if%>>0006</option>
<option value=userface/back/0007.gif <%if rs("titlepic")="userface/back/0007.gif" then%>selected<%end if%>>0007</option>
<option value=userface/back/0008.gif <%if rs("titlepic")="userface/back/0008.gif" then%>selected<%end if%>>0008</option>
<option value=userface/back/0009.gif <%if rs("titlepic")="userface/back/0009.gif" then%>selected<%end if%>>0009</option>
<option value=userface/back/0010.gif <%if rs("titlepic")="userface/back/0010.gif" then%>selected<%end if%>>0010</option>
<option value=userface/back/0011.gif <%if rs("titlepic")="userface/back/0011.gif" then%>selected<%end if%>>0011</option>
<option value=userface/back/0012.gif <%if rs("titlepic")="userface/back/0012.gif" then%>selected<%end if%>>0012</option>
<option value=userface/back/0013.gif <%if rs("titlepic")="userface/back/0013.gif" then%>selected<%end if%>>0013</option>
<option value=userface/back/0014.gif <%if rs("titlepic")="userface/back/0014.gif" then%>selected<%end if%>>0014</option>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -