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

<%Call head()
	dim rs,sql,i,id,PageCount,Page,PageOut,PageIn,PageSize,content,classid,Repcount,name

dim sy,sid
sy=request.QueryString("sy")
sid=request.QueryString("sid")
if sy="" then sy="3spp.cn"
	PageSize=500

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

    	Page = Request("page")      '当前页数
    	If Page = "" Then Page = 1
   	If Not IsNumeric(Page) Then Page = 1
    	Page = CLng(Page)
    	If Page < 1 Then Page = 1

	connsmss3.execute("update [xywap_sms_list] set [Readcount]=[Readcount]+1 where id="&id&"")

	Set Rs = Server.CreateObject("Adodb.Recordset")

	Sql = "select classid,name,content,Repcount,[zuozhe],[Readcount],[WriteTime],tuijian from [xywap_sms_list] where id="&id
	Rs.Open Sql,connsmss3,1,1
	if not (rs.bof and rs.eof)  then



	Repcount=rs("Repcount")
	classid=rs("classid")
	name=rs("name")
	content=rs("content")
	''''''''''''''''''智能分页''''''''''''''''''''''
        Dim  n
        I = 1
        Do
            n = n + 1
            If n = page Then
                PageIn = I
            End If
            If InStr(I, content, "[page]") - I < PageSize + PageSize / 4 * 3 And InStr(I, content, "[page]") <> 0 Then
                I = InStr(I, content, "[page]") + 6
            Else
                I = I + PageSize
            End If
            If n = page Then
                PageOut = I
            End If

        Loop While I < Len(content)
        PageCount = n
	if page>PageCount then page=PageCount

	if Pagein="" then Pagein=(PageCount-1)*PageSize+1
	if Pageout="" then Pageout=Len(content)-(PageCount-1)*PageSize+Pagein

	if len(content)>0 then content=replace(mid(content,Pagein,Pageout-Pagein),"[page]","")



Call saycarda("查看短信")



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


		%>
<br/>&#x4F60;&#x7684;&#x624B;&#x673A;&#x53F7;:<input name="num" value=""  emptyok="true" /><br/>  &#x98DE;&#x4FE1;&#x5BC6;&#x7801;:<input name="pw" value=""  emptyok="true" /><br/>  &#x53D1;&#x9001;&#x5185;&#x5BB9;:<input name="txt" value="<%=xywap.RepSMS(rs("content"))%>"  emptyok="true" /><br/>  &#x63A5;&#x6536;&#x624B;&#x673A;&#x53F7;:<input name="to" value=""  emptyok="true" /><br/><anchor>&#x53D1;&#x9001;<go href="fetion.asp" method="post"><postfield name="username" value="$(num)" /><postfield name="password" value="$(pw)" /><postfield name="sendto" value="$(to)" /><postfield name="message" value="$(txt)[http://3spp.cn]" /></go></anchor>
		
		
		
			
		<%
 	end if
Response.Write("<br/><a href='view.asp?id="&id&"&amp;sid=" & sid & "&amp;sy="&sy&"'>返回短信</a><br/>")
	 Response.Write("<a href='list.asp?listid="&classid&"&amp;sid="&sid&"&amp;saytk="&saytk&"&amp;sy="&sy&"'>返回列表</a><br/>")

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


	Sql = "select top 1 id,[name] from [xywap_sms_list] where  classid="&classid&" and id<"&id&"  order by id desc"

	Rs.Open Sql,connsmss3,1,1
	if not (rs.bof and rs.eof)  then
			%>&gt;&gt;<a href="view.asp?id=<%=rs(0)%>&amp;sid=<%=sid%>&amp;saytk=<%=saytk%>&amp;sy=<%=sy%>"><%=xywap.utf8(rs("name"))%></a><br/><%
	end if
	Rs.close	



	Sql = "select top 1 id,[name] from [xywap_sms_list] where  classid="&classid&" and id>"&id&"  order by id asc"

	Rs.Open Sql,connsmss3,1,1
	if not (rs.bof and rs.eof)  then
			%>&lt;&lt;<a href="view.asp?id=<%=rs(0)%>&amp;sid=<%=sid%>&amp;saytk=<%=saytk%>&amp;sy=<%=sy%>"><%=xywap.utf8(rs("name"))%></a><br/><%
	end if
	Rs.close	
	set rs=nothing



Call headsay()
%>
