<!--#include file="const.asp"-->

<%Call head()
	dim rs,sql,i,name,listid,page




	listid=Request.QueryString("listid")
	if listid="" then listid=0
	if not isnumeric(listid) then listid=0
	listid=listid

dim sy,sid
sy=request.QueryString("sy")
sid=request.QueryString("sid")
if sy="" then sy="say"
	Set Rs = Server.CreateObject("Adodb.Recordset")

	Sql = "select name from xywap_sms_class where id="&listid
	Rs.Open Sql,connsmss3,1,1
	if not (rs.bof and rs.eof)  then
		Name=rs("Name")
	end if
	Rs.close
Call saycarda(""&name&"")
	

		if xy="Null" then
		%><%
		else
		xywap.info
		end if


		Sql = "select [id],[name] from [xywap_sms_list] where   classid="&listid&"   order by id desc"


		Rs.Open Sql,connsmss3,1,1



			
	PageSize=listnums
		
	gopage="list.asp?listid="&listid&"&amp;run=" & Int((9999) * Rnd() + 1) & "&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	
		

			%><%=(page-1)*Rs.PageSize+i%>.<a href="view.asp?id=<%=rs("id")%>&amp;sid=<%=sid%>&amp;saytk=<%=saytk%>&amp;sy=<%=sy%>&amp;backurl=index.asp"><%=rs("name")%></a><br/><%
	 	Rs.MoveNext
	  	Next

       
    		'分页
    		If Page < rs.PageCount Then
    		    Response.Write("<a href='list.asp?listid="&listid&"&amp;page="&Page+1 & "&amp;sid="&sid&"&amp;saytk="&saytk&"&amp;sy="&sy&"'>下一页</a>")
    		End If
       
    		If Page > 1 And Page < rs.PageCount Then
    		    Response.Write("|")
    		End If
        
    		If Page > 1 Then
    		    Response.Write("<a href='list.asp?listid="&listid&"&amp;page=" & Page - 1 & "&amp;sid="&sid&"&amp;saytk="&saytk&"&amp;sy="&sy&"'>上一页</a><br/>")
    		Elseif rs.PageCount >1 then
    		    Response.Write("<br/>")
    		End If
            
    		Randomize()
    
    		
     		    Response.Write("[第"&Page&"/总"&rs.PageCount&"页/"&rs.RecordCount&"条]<br/>")
	
		Rs.close

			
	set rs=nothing


  		Response.Write("<a href='index.asp?sid="&sid&"&amp;saytk="&saytk&"&amp;sy="&sy&"'>短信首页</a>|<a href='/index.asp?sid=" & sid & "'>网站首页</a><br/>")

Call headsay()
%>