<%Call SiteInfo()%> 查看留言 - <% =SiteTitle %>
首页 - <%=WebLocation()%>

所有留言

<%=WebContent()%>
<% Function WebMenu() response.Write "
  • 签写留言
  • " response.Write "
  • 所有留言
  • " response.Write "
  • 我的留言
  • " End Function Function WebLocation() WebLocation = "留言反馈 - 查看留言"&vbCrLf End Function Function WebContent() Dim idCount Dim pages pages = MessageInfo Dim pagec Dim page page = CLng(request("Page")) Dim pagenc pagenc = 5 Dim pagenmax Dim pagenmin Dim pageprevious Dim pagenext Dim datafrom datafrom = "Message " Dim datawhere datawhere = "where ViewFlag " Dim sqlid Dim Myself, PATH_INFO, QUERY_STRING PATH_INFO = request.servervariables("PATH_INFO") QUERY_STRING = request.ServerVariables("QUERY_STRING")' If QUERY_STRING = "" Then Myself = PATH_INFO & "?" ElseIf InStr(PATH_INFO & "?" & QUERY_STRING, "Page=") = 0 Then Myself = PATH_INFO & "?" & QUERY_STRING & "&" Else Myself = Left(PATH_INFO & "?" & QUERY_STRING, InStr(PATH_INFO & "?" & QUERY_STRING, "Page=") -1) End If Dim taxis taxis = "order by id desc " Dim i Dim rs, sql Set rs = server.CreateObject("adodb.recordset") sql = "select count(ID) as idCount from ["& datafrom &"]" & datawhere Set rs = server.CreateObject("adodb.recordset") rs.Open sql, conn, 0, 1 idCount = rs("idCount") If(idcount>0) Then If(idcount Mod pages = 0)Then pagec = Int(idcount / pages) Else pagec = Int(idcount / pages) + 1 End If sql = "select id from ["& datafrom &"] " & datawhere & taxis Set rs = server.CreateObject("adodb.recordset") rs.Open sql, conn, 1, 1 rs.pagesize = pages If page < 1 Then page = 1 If page > pagec Then page = pagec If pagec > 0 Then rs.absolutepage = page For i = 1 To rs.pagesize If rs.EOF Then Exit For If(i = 1)Then sqlid = rs("id") Else sqlid = sqlid &","&rs("id") End If rs.movenext Next End If If(idcount>0 And sqlid<>"") Then sql = "select * from ["& datafrom &"] where id in("& sqlid &") "&taxis Set rs = server.CreateObject("adodb.recordset") rs.Open sql, conn, 0, 1 While Not rs.EOF Response.Write ""&vbCrLf Response.Write " "&vbCrLf Response.Write " "&vbCrLf Response.Write " "&vbCrLf Response.Write " "&vbCrLf Response.Write " "&vbCrLf Response.Write "
    "&rs("ID")&""&rs("Company")&"("&rs("Linkman")&""&rs("Sex")&")留言时间:"&rs("Addtime")&"
    "&vbCrLf Response.Write ""&vbCrLf Response.Write " "&vbCrLf Response.Write " "&vbCrLf Response.Write " "&vbCrLf Response.Write " "&vbCrLf Response.Write " "&vbCrLf Response.Write " "&vbCrLf Response.Write " "&vbCrLf Response.Write " "&vbCrLf If rs("ReplyContent") <> "" Then Response.Write " "&vbCrLf Response.Write " "&vbCrLf Response.Write " "&vbCrLf Response.Write " "&vbCrLf End If Response.Write " "&vbCrLf Response.Write " "&vbCrLf Response.Write " "&vbCrLf Response.Write "
    主题:"&rs("MesName")&"
    内容:"&MessageContent(rs("MemID"), rs("SecretFlag"), HtmlStrReplace(rs("Content")))&"
     回复:
    "&MessageReply (rs("MemID"), rs("MesName"), rs("SecretFlag"), rs("ReplyContent"))&"
    "&vbCrLf rs.movenext Wend Else response.Write "
    暂无相关信息
    " Exit Function End If Response.Write ""&vbCrLf Response.Write " "&vbCrLf Response.Write " "&vbCrLf Response.Write " "&vbCrLf Response.Write "
    "&vbCrLf Response.Write "共"&idcount&"条记录 页次:"&page&"/"&pagec&" 每页:"&pages&"条记录" & vbCrLf pagenmin = page - pagenc pagenmax = page+pagenc If(pagenmin<1) Then pagenmin = 1 If(page>1) Then response.Write ("9 ") If page - (pagenc * 2 + 1)<= 0 Then pageprevious = 1 Else pageprevious = page - (pagenc * 2 + 1) End If If(pagenmin>1) Then response.Write ("3 ") If(pagenmax>pagec) Then pagenmax = pagec For i = pagenmin To pagenmax If(i = page) Then response.Write (" "& i &" ") Else response.Write ("["& i &"]") End If Next If page+(pagenc * 2 + 1)>= pagec Then pagenext = pagec Else pagenext = page+(pagenc * 2 + 1) End If If(pagenmax: ") If(page:") Response.Write "
    "&vbCrLf rs.Close Set rs = Nothing End Function Function MessageContent(MemID, SecretFlag, Content) If SecretFlag Then Dim rs, sql Set rs = server.CreateObject("adodb.recordset") sql = "select * from Members where ID="&MemID rs.Open sql, conn, 1, 1 If rs("MemName") = session("MemName") And session("MemLogin") = "Succeed" Then MessageContent = Content Else MessageContent = "隐秘内容" End If rs.Close Set rs = Nothing Else MessageContent = Content End If End Function Function MessageReply(MemID, MesName, SecretFlag, ReplyContent) If ReplyContent<>"" Then If SecretFlag Then Dim rs, sql Set rs = server.CreateObject("adodb.recordset") sql = "select * from Members where ID="&MemID rs.Open sql, conn, 1, 1 If rs("MemName") = session("MemName") And session("MemLogin") = "Succeed" Then MessageReply = MessageReply&HtmlStrReplace(ReplyContent) Else MessageReply = MessageReply&"回复已隐藏,请登录后查看。" End If rs.Close Set rs = Nothing Else MessageReply = MessageReply&HtmlStrReplace(ReplyContent) End If End If End Function %>