<!--#include file="Inc.asp"-->
<!--#include file="ydzq.asp"-->
<%
call head()
call saycardd("内线处理")

dim TP
TP=request("TP")
  if TP="1" then
dim num,book,gettxt
num=request("num")
book=request("book")
if num="" or Isnumeric(num)=False then
  Call Error("天数无效！")
  end if
if book="" or Isnumeric(book)=False then
  Call Error("选择类型出错！")
book=clng(book)
  end if

if book=0 then
gettxt="Where book<>1 and datediff('d',ftm,Now())>"&num&""
else
gettxt="Where datediff('d',ftm,Now())>"&num&""
end if

 '删除n天前内线
 conn.Execute"delete from guest "&gettxt&""
response.write"内线清空成功！"
elseIF TP="2" then
 conn.Execute"delete from guest  where fid=0"
 
 response.write"系统内线清空成功！"
 else

response.write"清空N天前的内线:<br/>"
if saytk>1 then
Response.write "<form name=""form"" method=""post"" action=""adminguestdel.asp?sid="&sid&"&amp;saytk="&saytk&""">"
response.write"<input name='num' value='0' size='3'/>天前的内线:<br/>"
response.write"会员收藏信息:<select name='book' value='0'>"
response.write"<option value='0'>保留</option>"
response.write"<option value='1'>清空</option>"
response.write"</select><br/>"
response.write "<input type=""hidden"" name=""tp"" value=""1""/>"
response.write "<input type=""submit"" name=""Submit"" value=""确定清空""></form><br/>"
else
response.write"<input name='num"&tt&"' value='0' size='3'/>天前的内线:<br/>"
response.write"会员收藏信息:<select name='book"&tt&"' value='0'>"
response.write"<option value='0'>保留</option>"
response.write"<option value='1'>清空</option>"
response.write"</select><br/>"
response.write"<anchor>[确定清空]<go href='adminguestdel.asp?sid="&sid&"&amp;saytk="&saytk&"' method='post' accept-charset='utf-8'>"
response.write"<postfield name='num' value='$(num"&tt&")'/>"
response.write"<postfield name='book' value='$(book"&tt&")'/>"
response.write"<postfield name='TP' value='1'/>"
response.write"</go></anchor><br/>"
end if
if saytk>1 then
Response.write "<form name=""form"" method=""post"" action=""adminguestdel.asp?sid="&sid&"&amp;saytk="&saytk&""">"
response.write "<input type=""hidden"" name=""tp"" value=""2""/>"
response.write "<input type=""submit"" name=""Submit"" value=""清空系统内线""></form><br/>"
else
response.write"<anchor>[清空系统内线]<go href='adminguestdel.asp?sid="&sid&"&amp;saytk="&saytk&"' method='post' accept-charset='utf-8'>"
response.write"<postfield name='TP' value='2'/>"
response.write"</go></anchor><br/>"
end if
end if
response.write"<br/><a href='adminguest.asp?id="&ids&"&amp;sid="&sid&"&amp;saytk="&saytk&"'>内线管理</a>"%>
<!--#include file="fanhui.asp"-->
<%response.write""
call headsay()%>
