<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%> <% if session("admin")="" then conn.close set conn = nothing response.Write "" response.End end if call flagstr("常规管理","../error.htm") %> <% selectid=request.form("selectid") if selectid<>"" then conn.execute "delete from liuyan where id in ("&selectid&")" response.Redirect("gbook.asp") end if %> 管理客房
  留言管理

<% Const MaxPerPage=20 dim totalPut dim CurrentPage dim TotalPages dim j dim sql if Not isempty(SafeRequest("page",1)) then currentPage=Cint(SafeRequest("page",1)) else currentPage=1 end if set rs=server.CreateObject("adodb.recordset") rs.open "select * from liuyan order by addtime desc",conn,1,1 if err.number<>0 then response.write "数据库中暂时无数据" end if if rs.eof And rs.bof then Response.Write "

数据库中暂时无数据!

" else totalPut=rs.recordcount if currentpage<1 then currentpage=1 end if if (currentpage-1)*MaxPerPage>totalput then if (totalPut mod MaxPerPage)=0 then currentpage= totalPut \ MaxPerPage else currentpage= totalPut \ MaxPerPage + 1 end if end if if currentPage=1 then showContent showpage totalput,MaxPerPage,"liuyanmanage.asp" else if (currentPage-1)*MaxPerPage

 

<% do while not rs.eof%> <%i=i+1 if i>=MaxPerPage then Exit Do rs.movenext loop rs.close set rs=nothing%>
公司名称 留言内容 提交时间 留言状态 选 择
 > <% =rs("name")%> > <%=left(rs("content"),20) %> <%=rs("addtime")%> <%=rs("zhuangtai")%> ">
全选     

 

<% End Sub Function showpage(totalnumber,maxperpage,filename) Dim n If totalnumber Mod maxperpage=0 Then n= totalnumber \ maxperpage Else n= totalnumber \ maxperpage+1 End If Response.Write "" Response.Write "

" If CurrentPage<2 Then Response.Write "首 页 上一页 " Else Response.Write "首 页 " Response.Write "上一页 " End If If n-currentpage<1 Then Response.Write "下一页 末 页" Else Response.Write "" Response.Write "下一页 末 页" End If Response.Write " 页次:"&CurrentPage&"/"&n&"页 " Response.Write " 共有"&totalnumber&"条信息 " Response.Write "转到第:页" Response.Write " " End Function %>

 


powered by <%=CompanyUrl%>, you can contact us.