
<!-- #include file="../conn.asp" -->
<!-- #include file="admin.asp" -->
<%call ling()
Call Head()
Call saycardd("文章详情")

Dim id,ids,TP
TP=request("TP")
id=request("id")
if id="" or IsNumeric(id)=False then
  Call Error("ID无效！")
  end if
   ids=request("ids") 
        set rs = server.createobject("adodb.recordset")
	sql="select * from sms where id="&id
	rs.open sql,conn,1,1
	if rs.eof and rs.bof then
	response.write "文章不存在<br/>"
	else
dim Counts
Counts=rs("smspin")
Response.Write	"["&ubb(fordate(rs("yd_date")))&"]<br/>"
Response.Write	""&ubb(rs("title"))&"<br/>"
Response.Write	"文章ID:"&ubb(rs("id"))&"<br/>"
if rs("pic")<>"" then
Response.Write	"<img src='"&rs("pic")&"' alt='load...'/><br/>"
end if
Content=rs("test")
if request.querystring("o")<>1 then
dim pageWordNum,StartWord,Content,Length,PageAll,i,ii
pageWordNum=viewtnums
StartWord = 1
Length=len(Content)
PageAll=(Length+PageWordNum-1)\PageWordNum
ii=clng(request("ii"))
i=clng(request("i"))
if ii<>0 then i=ii-1
if isnull(i) or i="" then i=0

	dim ccc,sss
	ccc=instr(content,"||")
	if ccc>0 then
	sss=split(content,"||")
	PageAll=ubound(sss)+1
		if i>PageAll-1 then i=PageAll-1
	content = sss(i)

	else
		if clng(i)>int(PageAll) then i=PageAll-1
	Content = mid(Content,StartWord+i*PageWordNum,PageWordNum)
	end if
response.write("-----------<br/>" &ubb1(content)& "")
if 0<=i<PageAll then
       Response.Write "<br/>"
end if
   if cint(i)<cint(PageAll)-1 then
       Response.Write "<a href='smsview.asp?ids="&ids&"&amp;id=" &  rs("id") & "&amp;i=" & i+1 & "&amp;p=" & p & "&amp;TP="&TP&"&amp;sid="&sid&"&amp;saytk="&saytk&"'>下页</a>"
   End if
   if cint(i)>0 then 
   Response.Write "&nbsp;" & "<a href='smsview.asp?ids="&ids&"&amp;id=" &  rs("id") & "&amp;i=" & i-1 & "&amp;p=" & p & "&amp;TP="&TP&"&amp;sid="&sid&"&amp;saytk="&saytk&"'>上页</a>"
		if  i<pageall-1 then Response.Write "&nbsp;<a href='smsview.asp?ids="&ids&"&amp;id=" &  rs("id") & "&amp;i=100&amp;p=" & p & "&amp;TP="&TP&"&amp;sid="&sid&"&amp;saytk="&saytk&"'>尾页</a>"
   End if
if PageAll>1 then
response.write ("&nbsp;<a href='smsview.asp?id=" &  rs("id") & "&amp;ids="&ids&"&amp;p="&p&"&amp;o=1&amp;TP="&TP&"&amp;sid="&sid&"&amp;saytk="&saytk&"'>全文</a>")
       response.write "(" & i+1 & "/" & PageAll & ")"
if saytk=1 then%>
<br/>第<input name="i<%=minute(now)%><%=second(now)%>" title="页码" type="text" format="*N" emptyok="true" size="2" value="<%response.write(i+2)%>" maxlength="2"/>
<anchor>跳页
    <go href="smsview.asp?id=<%=id%>&amp;ids=<%=ids%>&amp;p=<%=p%>&amp;TP=<%=TP%>&amp;sid=<%=sid%>&amp;saytk=<%=saytk%>" accept-charset='utf-8'>
        <postfield name="ii" value="$(i<%=minute(now)%><%=second(now)%>)"/>
    </go>
</anchor><br/>
<%end if
end if
else
response.write("-----------<br/>" & ubb1(content) & "")
response.write ("<br/><a href='smsview.asp?id=" &  rs("id") & "&amp;ids="&ids&"&amp;p="&p&"&amp;TP="&TP&"&amp;sid="&sid&"&amp;saytk="&saytk&"'>分页显示</a><br/>")
end if 
end if 
rs.close
set rs=nothing
conn.close
set conn=nothing%>
<br/>----------<br/>
<a href="adminsmscl.asp?sid=<%=sid%>&amp;id=<%=ids%>&amp;saytk=<%=saytk%>">[文章列表]</a>
<br/><a href="wzclass.asp?sid=<%=sid%>&amp;saytk=<%=saytk%>">[返回分类]</a><br/>
<%if TP<>"" then%>
<a href="wzcl.asp?sid=<%=sid%>&amp;saytk=<%=saytk%>">[文章管理]</a><br/>
<%end if%>
<%call head3()%>