View.asp
上传用户:qfkgdy
上传日期:2020-06-18
资源大小:1888k
文件大小:2k
- <!--#include file="../wml.ini"-->
- <%
- id=cint(request.QueryString("id"))
- dim page,PageCount
- Const pagesize=400
- page = cint(Request.QueryString("Page"))
- IF Not IsEmpty(Page) Then
- IF Not IsNumeric(Page) Then
- Page=1
- Else
- Page=Cint(Page)
- End IF
- Else
- Page = 1
- End IF
- '-------------------------------------------------------------------------------------
- set rs=Server.CreateObject("ADODB.Recordset")
- rsstr="select * from [Message] WHERE id=" & id
- rs.open rsstr,conn,1,2
- call wmlbegin(outHTM(rs("Title")),"wrap")
- call wmlwrite(""&rs("Content")&"",true)
- call wmlwrite("作者:(" & outHTM(rs("Name")) & ")",true)
- call wmlwrite("发表时间:(" & rs("Time") & ")",true)
- if rs("Whether")="0" then
- call wmlwrite("站长还没回复呢!",true)
- else
- call wmlwrite("站长回复:" & outHTM(rs("Reply")) & "",true)
- end if
- call wmllink("Admin_Message.Asp?id=" & rs("id") & "","管理留言",false)
- call wmllink("Del_Message.Asp?id=" & rs("id") & "","删除",true)
- if page>=PageCount then
- 'Response.Write ("下页")
- else
- Response.Write("<a href='View.Asp?id="&rs("id")&"&page=" & (page+1) & "'>下页</a> ")
- end if
- if page<=1 then
- 'Response.Write ("上页")
- else
- Response.Write("<a href='View.Asp?id="&rs("id")&"&page=" & (page-1) & "'>上页</a>")
- end if
- if PageCount>1 then
- %>
- (<%=page%>/<%=PageCount%>页)<br/>
- <%
- end if
- if PageCount>2 then%>
- <input name="Page" format="*N" maxlength="5" size="3"/>
- <a href="View.Asp?id=<%=id%>&page=$(Page)">跳页</a><br/>
- <%end if%>
-
- <%
- ids=cint(request.QueryString("id"))-1
- ida=cint(request.QueryString("id"))+1
- Set Rs1 = Server.CreateObject("Adodb.Recordset")
- Sql1 = "SELECT * FROM Message WHERE id="&ids&" order by id desc"
- Rs1.Open Sql1,conn,1,1
- if not (rs1.bof and rs1.eof) then
- Response.Write("<a href='View.Asp?id="&rs1("id")&"'>上条:"&outHTM(rs1("Title"))&"</a>(作者:"&outHTM(rs1("Name"))&")<br/>")
- end if
- Rs1.close
- set rs1=nothing
- Set Rs1 = Server.CreateObject("Adodb.Recordset")
- Sql1 = "SELECT * FROM Message WHERE id="&ida&" order by id asc"
- Rs1.Open Sql1,conn,1,1
- if not (rs1.bof and rs1.eof) then
- Response.Write("<a href='View.Asp?id="&rs1("id")&"'>下条:"&outHTM(rs1("Title"))&"</a>(作者:"&outHTM(rs1("Name"))&")<br/>")
- end if
- Rs1.close
- set rs1=nothing
- call wap.navs("留言本,index.asp|预览留言,")
- call wmlend
- %>