<!--#include file="Inc.asp"-->
<!--#include file="ydzq.asp"-->
<%call head()
Call saycardd("个性设置")

%>

<!--#INCLUDE file="newguest.asp"-->
<%


dim bbsid,tid,TP,listn,viewn,relistn,reviewnum
bbsid=request("bbsid")
tid=request("tid")
listn=request("listn")
viewn=request("viewn")
relistn=request("relistn")
reviewnum=request("reviewnum")
TP=clng(request("TP"))
if TP=1 then

if listn="" or IsNumeric(listn)=False then
  Call Error("无效数字！")
  end if

if viewn="" or IsNumeric(viewn)=False then
  Call Error("无效数字！")
  end if
if reviewnum="" or IsNumeric(reviewnum)=False then
  Call Error("无效数字！")
  end if
if relistn="" or IsNumeric(relistn)=False then
  Call Error("无效数字！")
  end if

if clng(listn)<1 then 
  Call Error("帖子数量太小！")
  end if
if clng(viewn)<500 then
  Call Error("帖子分页字数太小！最低限制500")
  end if
set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select * from Users where id="&myid,conn,1,2
If rs.eof Then
  Call Error("会员不存在！")
  end if
rs("listnum")=listn
rs("viewnum")=viewn
rs("review")=reviewnum
rs("relistnum")=relistn
rs.update
rs.close
set rs=Nothing
 Response.Write "设置成功！<br/>"
elseif TP=2 then
conn.Execute("update Users set listnum=8,viewnum=500,review=3,"&_
"relistnum=8  where id="&myid)

 Response.Write "恢复默认设置成功！<br/>"
else
set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select * from Users where id="&myid,conn,1,1
listn=rs("listnum")
viewn=rs("viewnum")
relistn=rs("relistnum")
reviewnum=rs("review")
rs.close
set rs=Nothing

If saytk>1 Then


Response.write "<form name=""form"" method=""post"" action=""feel.asp?bbsid="&bbsid&"&amp;tid="&tid&"&amp;saytk="&saytk&"&amp;sid="&sid&""">"

 Response.Write "显示主帖个数：<br/>"
 Response.Write "<input name=""listn"" maxlength=""2"" value="""&listnum&"""/><br/>"
 Response.Write "主帖下回帖数：<br/>"
 Response.Write "<input name=""reviewnum"" maxlength=""2"" value="""&reviewnum&"""/><br/>"
 Response.Write "回帖列表个数：<br/>"
 Response.Write "<input name=""relistn"" maxlength=""2"" value="""&relistn&"""/><br/>"

 Response.Write "显示帖子字数：<br/>"
 Response.Write "<input name=""viewn"" maxlength=""5"" value="""&viewnum&"""/><br/>"

 %>

<input type="hidden" name="TP" value="1">
<input type="submit" name="Submit" value="确定"></form><br/><%


else
 Response.Write "显示主帖个数：<br/>"
 Response.Write "<input name=""listn"" maxlength=""2"" value="""&listnum&"""/><br/>"
 Response.Write "主帖下回帖数：<br/>"
 Response.Write "<input name=""reviewnum"" maxlength=""2"" value="""&reviewnum&"""/><br/>"
 Response.Write "回帖列表个数：<br/>"
 Response.Write "<input name=""relistn"" maxlength=""2"" value="""&relistn&"""/><br/>"

 Response.Write "显示帖子字数：<br/>"
 Response.Write "<input name=""viewn"&tt&""" maxlength=""5"" value="""&viewnum&"""/><br/>"



Response.Write "<anchor>确定"
 Response.Write "<go href=""feel.asp?bbsid="&bbsid&"&amp;tid="&tid&"&amp;saytk="&saytk&"&amp;sid="&sid&""" method=""post"" accept-charset='utf-8'>"
 Response.Write "<postfield name=""listn"" value=""$(listn"&tt&")""/>"
 Response.Write "<postfield name=""reviewnum""   value=""$(reviewnum"&tt&")""/>"
 Response.Write "<postfield name=""relistn"" value=""$(relistn"&tt&")""/>"
 Response.Write "<postfield name=""viewn"" value=""$(viewn"&tt&")""/>"
 Response.Write "<postfield name=""TP"" value=""1""/>"
 Response.Write "</go></anchor>"&chr(13)
 Response.Write "<a href='feel.asp?bbsid="&bbsid&"&amp;tid="&tid&"&amp;saytk="&saytk&"&amp;sid="&sid&"&amp;TP=2'>恢复默认</a><br/>"
 End if
  end if
if tid<>"" then
 Response.Write "<a href='topic.asp?tid="&tid&"&amp;saytk="&saytk&"&amp;sid="&sid&"'>查看主帖</a><br/>"
end if
if bbsid<>"" then
 Response.Write "<a href=""board.asp?bbsid="&bbsid&"&amp;saytk="&saytk&"&amp;sid="&sid&""">返回本版</a>"
end if
conn.close
set conn=nothing
%>
<!--#include file="fanhui.asp"-->
<%call headsay()%>