<!--#include file="Inc.asp"-->
<!--#include file="ydzq.asp"-->
<%
call head()
call saycardd("内线管理")
dim ids
ids=request("ids")
if ids="" or Isnumeric(ids)=False then
  Call Error("ID无效！")
  end if
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "SELECT name FROM users where id="&ids,conn,1,1
if rs.eof then
  rs.close
  set rs=Nothing
  Call Error("会员ID不存在！")
end if
  rs.close
  set rs=Nothing
gettxt="where fid="&ids

set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select * from guest "&gettxt&" order by id desc",conn,1,1
If Not rs.eof	Then
	Dim PageSize,i
	PageSize=10						
	Dim Count,page,pagecount,gopage			
	gopage="adminguest.asp?ids="&ids&"&amp;sid="&sid&"&amp;saytk="&saytk&"&amp;"
	Count=rs.recordcount	
	page=int(request.QueryString ("page"))
	if page<=0 or page="" then page=1		
	pagecount=(count+pagesize-1)\pagesize	
        if page>pagecount then page=pagecount
	rs.move(pagesize*(page-1))
	For i=1 To PageSize     						
	If rs.eof Then Exit For
response.write"[<a href='topicdel.asp?action=msgid&amp;id="&rs("id")&"&amp;ids="&ids&"&amp;sid="&sid&"&amp;saytk="&saytk&"'>删</a>]"
   Response.write ""&i+(page-1)*PageSize&"."
   Response.write "发"&rs("fid")&"\收"&rs("sid")&":"&ubb(rs("fnr"))
   Response.write "["&rs("ftm")&"]<br/>"
	rs.moveNext
 	Next
	if page-pagecount<0 then response.write "<a href="""&gopage&"page="&page+1&""">下页</a>"
	if page>1 then response.write "<a href="""&gopage&"page="&page-1&""">上页</a>"
	if pagecount>1 then response.write "<br/><b>"&page&"</b>/"&pagecount&"页"
if saytk=1 then
response.write "<input name=""page"" format=""*N"" value="""&page&""" type=""text"" maxlength=""5"" emptyok=""true"" size=""3""/><a href="""&gopage&"page=$(page)"">跳转</a>"
end if
Else
   Response.write "暂时没有TA的内线"
end if
rs.close
set rs=nothing
conn.close
set conn=Nothing
response.write"<br/><a href='show.asp?id="&ids&"&amp;sid="&sid&"&amp;saytk="&saytk&"'>用户信息</a>"%>
<!--#include file="fanhui.asp"-->
<%response.write""
call headsay()%>
