PageRenderTime 45ms CodeModel.GetById 15ms RepoModel.GetById 1ms app.codeStats 0ms

/admin/art/smsview.asp

https://github.com/74hu/74hujz
ASP | 88 lines | 87 code | 1 blank | 0 comment | 13 complexity | d470efe2062e85cac813b050219dc8bc MD5 | raw file
  1. <!-- #include file="../ding.asp" -->
  2. <!-- #include file="mymin.asp" -->
  3. <%Call Head()%>
  4. <card title="文章详情">
  5. <p>
  6. <% Dim id,ids,TP
  7. TP=request("TP")
  8. id=request("id")
  9. if id="" or IsNumeric(id)=False then
  10. Call Error("ID无效!")
  11. end if
  12. ids=request("ids")
  13. call conndata
  14. set rs=server.createobject("adodb.recordset")
  15. rs.open "select * from 74hu_article where id="&id,conn,1,1
  16. if rs.eof and rs.bof then
  17. response.write "文章不存在<br/>"
  18. else
  19. Counts=rs("smspin")
  20. Response.Write "["&noubb(fordate(rs("HU_date")))&"]<br/>"
  21. Response.Write noubb(rs("title"))&"<br/>"
  22. Content=rs("test")
  23. if request.querystring("o")<>1 then
  24. pageWordNum=viewtnums
  25. StartWord = 1
  26. Length=len(Content)
  27. PageAll=(Length+PageWordNum-1)\PageWordNum
  28. ii=clng(request.querystring("ii"))
  29. i=clng(request.querystring("i"))
  30. if ii<>0 then i=ii-1
  31. if isnull(i) or i="" then i=0
  32. dim ccc,sss
  33. ccc=instr(content,"||")
  34. if ccc>0 then
  35. sss=split(content,"||")
  36. PageAll=ubound(sss)+1
  37. if i>PageAll-1 then i=PageAll-1
  38. content = sss(i)
  39. else
  40. if clng(i)>int(PageAll) then i=PageAll-1
  41. Content = mid(Content,StartWord+i*PageWordNum,PageWordNum)
  42. end if
  43. response.write("-----------<br/>" &ubbcode(content)& "")
  44. if 0<=i<PageAll then
  45. Response.Write "<br/>"
  46. end if
  47. if cint(i)<cint(PageAll)-1 then
  48. 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&"'>下页</a>"
  49. End if
  50. if cint(i)>0 then
  51. Response.Write i&"&nbsp;" & "<a href='smsview.asp?ids="&ids&"&amp;id=" & rs("id") & "&amp;i=" & i-1 & "&amp;p=" & p & "&amp;TP="&TP&"&amp;sid="&sid&"'>上页</a>"
  52. 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&"'>尾页</a>"
  53. End if
  54. if PageAll>1 then
  55. 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&"'>全文</a>")
  56. response.write "(" & i+1 & "/" & PageAll & ")"
  57. %>
  58. <br/><input name="i<%=minute(now)%><%=second(now)%>" title="页码" type="text" format="*N" emptyok="true" size="2" value="<%response.write(i+2)%>" maxlength="2"/>
  59. <anchor>跳页
  60. <go href="smsview.asp?id=<%=id%>&amp;ids=<%=ids%>&amp;p=<%=p%>&amp;TP=<%=TP%>&amp;sid=<%=sid%>" accept-charset='utf-8'>
  61. <postfield name="ii" value="$(i<%=minute(now)%><%=second(now)%>)"/>
  62. </go>
  63. </anchor><br/>
  64. <%
  65. end if
  66. else
  67. response.write("-----------<br/>" & ubbcode(content) & "")
  68. response.write ("<br/><a href='smsview.asp?id=" & rs("id") & "&amp;ids="&ids&"&amp;p="&p&"&amp;TP="&TP&"&amp;sid="&sid&"'>分页显示</a><br/>")
  69. end if
  70. end if
  71. %>
  72. <br/>----------<br/>
  73. <a href="wzgl.asp?sid=<%=sid%>&amp;id=<%=rs("id")%>&amp;classid=<%=ids%>">[文章管理]</a><br/>
  74. <a href="adminsmscl.asp?sid=<%=sid%>&amp;id=<%=ids%>">[文章列表]</a>
  75. <br/><a href="wzclass.asp?sid=<%=sid%>">[返回分类]</a><br/>
  76. <%if TP<>"" then%>
  77. <a href="wzcl.asp?sid=<%=sid%>">[文章管理]</a><br/>
  78. <%end if%>
  79. <a href="../index.asp?sid=<%=sid%>">[后台管理]</a>
  80. </p>
  81. </card>
  82. </wml>
  83. <%
  84. rs.close
  85. set rs=nothing
  86. conn.close
  87. set conn=nothing%>