<% '检查用户权限 call checkuser(GetQueryString("WindowName")) %> <% '读取留言本的属性,以确定显示那个字段 strCurrMenu=GetVariable("mnid") isDW=GetKey("g_dw",WebUserID,"guestbook_" & strCurrMenu ) isTel=GetKey("g_tel",WebUserID,"guestbook_" & strCurrMenu ) isEmail=GetKey("g_email",WebUserID,"guestbook_" & strCurrMenu ) isAdrr=GetKey("g_adrr",WebUserID,"guestbook_" & strCurrMenu ) isOICQ=GetKey("g_oicq",WebUserID,"guestbook_" & strCurrMenu ) isIP=GetKey("g_ip",WebUserID,"guestbook_" & strCurrMenu ) %> <%=GetQueryString("WindowName")%> <% '从这开始读数据 strSQL="Select * From web_guestbook1 Where mn_id=" & strCurrMenu & " Order By id Desc" rs.open strSQL,conn,1,1 '分页显示初始化 page=GetVariable("page") if page="" then page=1 else page=Cint(page) end if Section=GetVariable("section") if Section="" then Section=1 else Section=Cint(Section) end if '变量赋值 intPageSize=15 '每页显示记录数 intSectionSize=5 '多少页为一段,像GOOGLE一样 PrevSectionText="7" '上一段的链接文字 NextSectionText="8" '下一段的链接文字 PrevPageText="3" '上页的链接文字 NextPageText="4" '下页的链接文字 strPageUrl="?mnid=" & GetVariable("mnid") & "&WindowName=" & GetQueryString("WindowName") rs.pagesize=intPageSize intCount=rs.RecordCount intPageCount=rs.pagecount intSectionCount=(intPageCount - 1) \ intSectionSize + 1 if intCount>0 then rs.AbsolutePage=page end if %> <% '循环输出 for i=1 to intPageSize if rs.eof then exit for if i mod 2=0 then strColor="#eeeeee" else strColor="#f9f9f9" end if %> <% rs.movenext next %>
留言板管理
<%if isDW<>"none" then%> <%End if%> <%if isEmail<>"none" then%> <%End if%> <%if isAdrr<>"none" And isAdrr<>"Null" then%> <%End if%> <%if isTel<>"none" then%> <%End if%> <%if isOICQ<>"none" And isOICQ<>"Null" then%> <%End if%> <%if isIP<>"none" then%> <%End if%>

姓 名: <%=trim(rs("g_Name"))%>
单 位: <%=trim(rs("g_dw"))%>
电子邮件: <%=trim(rs("g_email"))%>
地 址: <%=trim(rs("g_addr"))%>
电 话: <%=trim(rs("g_tel"))%>
OICQ: <%=trim(rs("g_oicq"))%>
IP地址: <%=trim(rs("g_ip"))%>
留言时间: <%=year(rs("g_time")) & "年" & month(rs("g_time")) & "月" & day(rs("g_time")) & "日 " & hour(rs("g_time")) & "时" & minute(rs("g_time")) & "分"%>
留 言: <%=trim(rs("g_msg"))%>
回复内容:
" style="display:''"> <% if trim(rs("g_hfmsg"))<>"" then response.Write(trim(rs("g_hfmsg"))) else response.Write("[未回复]") end if %>
" style="display:none">
&WindowName=<%=GetQueryString("WindowName")%>" method="post" name="form<%=rs("ID")%>" target="BackFrame">
[)">回复留言]  [&WindowName=<%=GetQueryString("WindowName")%>" target="BackFrame">删除留言]

共有<%=intCount%>记录,分<%=intPageCount%>页,当前页<%=Page%>,每页显示<%=intPageSize%>条记录 <% '计算每一段的开始页 intStarPage=(Section-2) * intSectionSize + 1 '前一段 if Section<=1 then response.Write(PrevSectionText & " ") else response.Write("" & PrevSectionText & " ") end if '显示页码列表 response.Write("第") intStarPage=(Section-1) * intSectionSize + 1 for p=intStarPage to intStarPage + intSectionSize - 1 if p > intPageCount then exit for if p=page then response.Write("[" & p & "] ") else response.Write("[" & p & "] ") end if next response.Write("页") '后一段 intStarPage=(Section) * intSectionSize + 1 if Section>=intSectionCount then response.Write(" " & NextSectionText) else response.Write(" " & NextSectionText & " ") end if %>