<% dim writecode,logincode,replycode,curpage,maxpage,totalnote,maxnote,i maxnote=8 i=0 if request("page") = "" then curpage = 1 else curpage=request("page") end if writecode = request("writecode") logincode = request("logincode") replycode = request("replycode") if writecode = "" then writecode = 0 else writecode = request("writecode") end if if logincode = "" then logincode = 0 else logincode = request("logincode") end if if replycode = "" then replycode = 0 else replycode = request("replycode") end if %>
<% if writecode = 0 then%> 我要留言 <%else%> 我要留言 <%end if%>    <% if logincode = 0 then%> 管理员入口 <%else%> 管理员入口 <%end if%>
<%if writecode = 1 then%>
 
您的姓名:

您的邮箱:  

您的留言:


 
 
 
<%end if%> <%if logincode = 1 then%>
 
用户名: 密  码:
 
<%end if%> <%if replycode = 1 then%> <% dim id id = request("id") Set rst= Server.CreateObject("ADODB.Recordset") sqll = "select * from book where id = "+CStr(id) rst.open sqll,conn,1,1 if not rst.eof then %>
" name=replynote>
您在回复<%=rst("name")%>的留言(即:总第<%=rst("id")%>条留言)。

 
 
<%end if rst.close%> <%end if%>
<% Set rs= Server.CreateObject("ADODB.Recordset") sql = "select * from book order by id desc" rs.open sql,conn,1,1 if rs.eof then%>
-- 暂时还没有留言
<%else totalnote=rs.recordcount if totalnote mod maxnote = 0 then maxpage = totalnote \ maxnote else maxpage = totalnote \ maxnote + 1 end if rs.move (curpage - 1) * maxnote %> <%do while not rs.eof%>
  <%if rs("reply")<>"" then%> <%end if%>
<%end if%> <%end if%>
<%=rs("name")%> ] <%if session("admin")="admin" then%> &page=<%=curpage%>"> <%if session("admin")="admin" then%> ">"> <%if rs("email")<>"" then%> "> <%end if%> <%=rs("dateandtime")%>

<%=rs("content")%>

回复:<%=rs("reply")%>

 
<% i=i+1 rs.movenext if i>maxnote then exit do loop end if %> <%dim n,smallpage,bigpage,numpage numpage=2 if maxpage<=5 then smallpage = 1 bigpage = maxpage else if curpage-1<=numpage then smallpage = 1 bigpage = curpage + numpage + numpage - (curpage - 1) end if if maxpage - curpage <= numpage then smallpage = curpage - numpage - numpage + (maxpage - curpage) bigpage = maxpage end if if curpage-1>numpage and maxpage-curpage>numpage then smallpage = curpage - numpage bigpage = curpage + numpage end if end if %>
共<%=maxpage%>页  第<%=curpage%>页   <%if smallpage>1 then%> ... <%end if%> <%for n=smallpage to bigpage %> <%if n=curpage then%> [<%=n%>] <%else%> [<%=n%>] <%end if%> <%next%> <%if bigpage ... <%end if%>
<%rs.close%>