<!--#include file="Inc.asp"-->
<!--#include file="ydzq.asp"-->
<%call head()

Call saycarda("社区个性秀")
%>

<%dim Action
Action=Request.QueryString("Action")

dim TP,b,i
TP=request.querystring("TP")
if TP="" then TP=1

IF  Action<>"save" Then

b=request("b")
if b="" or Isnumeric(b)=Falsh then b=1
for i=b to b+2
if TP=1 then
if i>20 then exit for
else
if i>15 then exit for
end if
	img=""&i
if TP=1 then

img="images/boy/"&img&".jpg"
else
img="images/mm/"&img&".jpg"
end  if

response.write "<img src="""&img&""" alt=""photo"" /><br/>"
If saytk<>1 Then
%><form name="form" method="post" action="kat.asp?action=save&amp;TP=<%=TP%>&amp;pic=<%=img%>&amp;saytk=<%=saytk%>&amp;sid=<%=sid%>">
<%
response.write "<input type=""hidden"" name=""pic"" value="""&img&"""/>"
response.write "<input type=""submit"" name=""Submit"" value=""选择作为头像""></form><br/>"

else


response.write "<anchor title=""选择作为头像"">选择作为头像"
response.write "<go href=""kat.asp?action=save&amp;TP="&TP&"&amp;pic="&img&"&amp;sid="&sid&"&amp;saytk="&saytk&""" method=""post"">"
response.write "<postfield name=""pic"" value="""&img&"""/>"
response.write "</go></anchor><br/>"

End if



next
if TP=1 then
if b<20 then response.write "<a href=""kat.asp?TP="&TP&"&amp;b="&b+3&"&amp;sid="&sid&""">下页</a>"
else
if b<15 then response.write "<a href=""kat.asp?TP="&TP&"&amp;b="&b+3&"&amp;sid="&sid&""">下页</a>"
end if
if b>2 then response.write " <a href=""kat.asp?TP="&TP&"&amp;b="&b-2&"&amp;sid="&sid&""">上页</a> "
response.write "<br/>------------"
response.write "<br/><a href='kat.asp?TP=1&amp;sid="&sid&"'>帅哥头像</a>|"
response.write "<a href='kat.asp?TP=2&amp;sid="&sid&"'>MM 头像</a>"
%><br/><a href='sctou.asp?CONTSE=<%=dlid%>&amp;sid=<%=sid%>&amp;saytk=2'>本地上传添加</a><%
else
dim pic
pic=Request.QueryString("pic")
conn.Execute("update users set photo='"&pic&"' where id="&myid)
if myid<>0 then
mz="[url=/bbs/uinfo.asp?id="&myid&"&amp;sid=[sid]]"&myni&"[/url]"
else
mz="游客"
end if
conn.execute("insert into sqdt(shijian,dz)values('"&now&"','"&mz&"更换了(url=/bbs/kat.asp?sid=[sid])个性秀(/url)')")
response.write "头像更改成功！<br/>"
end if

%>
<!--#include file="fanhui.asp"-->
<%
conn.close
set conn=nothing%>
<%Call headsay()
%>