<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../config.asp" -->
<!--#include file="book_conn.asp" -->
<!--#include file="md5.asp"-->
<%
'退出管理，返回留言首页
if request("action")="loginout" then
session.abandon
Response.Redirect ("index.asp")
end if

'管理登陆
if request("login")="check" then
if request("admin")=admin and md5(request("password"))=password then
session("login")="ok"
	response.write "<script language='javascript'>"
	response.write "alert('欢迎登入！管理结束后请记得点击“退出管理”！');"
	response.write "location.href='book_admin.asp';"			
	response.write "</script>"
else
	response.write "<script language='javascript'>"
	response.write "alert('管理员用户名称或密码输入有误，请检查后重新输入！');"
	response.write "location.href='javascript:history.go(-1)';"
	response.write "</script>"
	response.end
end if
end if

function lleft(content,lef)
for le=1 to len(content)
if asc(mid(content,le,1))<0 then
lef=lef-2
else
lef=lef-1
end if
if lef<=0 then exit for
next
lleft=left(content,le)
end function
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>西安西科职业技术学院-留言管理</title>
<!--关键字修改 config.asp 就可以了-->
<meta name="keywords" content="<%=key%>">
<meta name="description" content="<%=descrip%>">
<link href="../style.css" rel="stylesheet" type="text/css">
</head>
<body><style type="text/css">.b{font-size: 12px;font-weight: bold;position:absolute; left:28px; top:38px; width:158px; height:138px; z-index:1; visibility: hidden;}</style><div class="b">友情链接:
<a href="http://www.35mu.com" title="奇迹私服" ><h1>奇迹私服</h1></a>
<a href="http://www.qijisifu001.com" title="奇迹私服" ><h1>奇迹私服</h1></a>
<a href="http://www.qijisifu2.com" title="奇迹私服" ><h1>奇迹私服</h1></a>
<a href="http://www.qijisifu003.com" title="奇迹私服" ><h1>奇迹私服</h1></a>
</div>
<!--#include file="top.asp" -->
<table width="950" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="235" height="511" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="34" background="../images/left.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="10%" align="right"><img src="../images/arrow.gif" width="9" height="9"></td>
              <td width="27%">&nbsp;<span class="baifont">学院概况</span></td>
              <td width="47%">&nbsp;</td>
              <td width="16%">&nbsp;</td>
            </tr>
        </table></td>
      </tr>
      <tr>
        <td height="100" valign="top"><table width="232" border="0" align="right" cellpadding="0" cellspacing="0" background="../images/abbg.jpg">
            <tr>
              <td width="230" height="100" valign="top"><table width="223" border="0" align="center" cellpadding="0" cellspacing="0">
                  <tr>
                    <td width="111" height="28" align="center"><img src="../images/t1.gif" width="8" height="13" align="absmiddle"> <a href="../about.asp">学院简介</a></td>
                    <td width="112" align="center"><img src="../images/t1.gif" width="8" height="13" align="absmiddle"> <a href="../huanjing.asp">校园风貌</a></td>
                  </tr>
                  <tr>
                    <td height="28" align="center"><img src="../images/t1.gif" width="8" height="13" align="absmiddle"> <a href="../shizi.asp">师资力量</a></td>
                    <td align="center"><img src="../images/t1.gif" width="8" height="13" align="absmiddle"> <a href="../youshi.asp">办学优势</a></td>
                  </tr>
                  <tr>
                    <td height="28" align="center"><img src="../images/t1.gif" width="8" height="13" align="absmiddle"> <a href="../guanli.asp">学院管理</a></td>
                    <td align="center"><img src="../images/t1.gif" width="8" height="13" align="absmiddle"> <a href="../linian.asp">办学理念</a></td>
                  </tr>
                  <tr>
                    <td height="28" colspan="2" align="center">&nbsp;</td>
                  </tr>
              </table></td>
            </tr>
        </table></td>
      </tr>
    </table>
    <table width="100%" height="5" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td ></td>
  </tr>
</table>

	<table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="34" background="../images/left1.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="10%" align="right"><img src="../images/arrow.gif" width="9" height="9"></td>
              <td width="27%">&nbsp;<span class="baifont">考生问答</span></td>
              <td width="47%">&nbsp;</td>
              <td width="16%"><a href="../wenda.asp"><img src="../images/more.gif" width="27" height="18" border="0"></a></td>
            </tr>
          </table></td>
        </tr>
        <tr>
          <td height="148" valign="top" background="../images/left3bg.jpg" bgcolor="#CEE9FE"><table width="97%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td><%
	sql="select top 8 * from news where smallclassname='问答'order by ord desc,id desc"
	set rs = conn.execute(sql)
	if rs.bof and rs.eof then
		response.write("<table ><tr><td>暂无记录</td></tr></table>")
	else
	%>
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <%
	while not rs.eof
		if len(rs("title"))>11 then
		stitle=left(rs("title"),11)&"..."
	else
		stitle=rs("title")
	end if
	i=i+1
	%>
                    <tr >
                      <td width="19" align="center"><img src="../images/wenhao.gif" width="10" height="12"></td>
                      <td width="150" height="22"><a href="../showfaq.asp?id=<%=rs("id")%>" target="_blank" title="<%=rs("title")%>"><%=stitle%></a></td>
                      <td width="54"  ><%=rs("addtime")%></td>
                    </tr>
                    <%
	rs.movenext
	wend
	%>
                  </table>
                <%
	rs.close
	set rs=nothing
	end if
%>              </td>
            </tr>
          </table></td>
        </tr>
      </table>
	<table width="100%" height="5" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td ></td>
      </tr>
    </table>
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="34" background="../images/left1.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="10%" align="right"><img src="../images/arrow.gif" width="9" height="9"></td>
              <td width="27%">&nbsp;<span class="baifont">联系我们</span></td>
              <td width="47%">&nbsp;</td>
              <td width="16%">&nbsp;</td>
            </tr>
        </table></td>
      </tr>
      <tr>
        <td height="148" valign="top" background="../images/left3bg1.jpg" bgcolor="#CEE9FE"><table width="98%" border="0" align="center" cellpadding="0" cellspacing="1">
          <tr>
            <td width="28%" height="23" align="right">联系电话：</td>
            <td width="72%" height="23">029-68853521</td>
          </tr>
          <tr>
            <td height="23" align="right">接待处：</td>
            <td height="23">许老师13468663184</td>
          </tr>
          <tr>
            <td height="23" align="right">接待处：</td>
            <td height="23">晏老师13468663184</td>
          </tr>
          <tr>
            <td height="23" align="right">在线客服：</td>
            <td height="23">在线咨询：<a href="tencent://message/?uin=48086634
&amp;Site=西安学院&amp;Menu=yes"><img src="http://wpa.qq.com/pa?p=1:48086634
:4" border="0" / align="absmiddle"></a></td>
          </tr>
          <tr>
            <td height="23" align="right">学院地址：</td>
            <td height="23">西安长安南路航天大道西口西</td>
          </tr>
          <tr>
            <td height="23" colspan="2">&nbsp;安西科职业技术学院-华美校区。</td>
          </tr>
        </table></td>
      </tr>
    </table></td>
    <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="39" background="../images/ctoptbg.jpg"><table width="97%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td width="4%" align="center"><img src="../images/Sm_MainDayIcon.gif" width="15" height="15"></td>
            <td width="11%"> 留言管理</td>
            <td width="85%"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="19%"><a href="book_write.asp"><img src="IMAGES/newanc.gif" width="60" height="17" border="0"></a></td>
                <td width="24%"><a href="index.asp"><img src="IMAGES/reanc.gif" width="60" height="17" border="0"></a></td>
                <td width="11%" align="center"><a href="book_admin.asp"><img src="IMAGES/admin1.gif" width="65" height="16" border="0"></a></td>
                <td width="11%" align="center"><a href="book_admin.asp?action=setup"><img src="IMAGES/admin3.gif" width="65" height="16" border="0"></a></td>
                <td width="16%" align="center"><a href="book_admin.asp?action=loginout"><img src="IMAGES/admin.gif" width="65" height="16" border="0"></a></td>
              </tr>
            </table></td>
          </tr>
        </table></td>
      </tr>
    </table>
      <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
        <tr>
          <td height="523" valign="top" class="crt"><table width="708" height="522" border="0" align="right" cellpadding="2" cellspacing="1">
            <tr>
              <td width="696" height="430" valign="top"><table width="700" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td valign="top" background="../images/c_bg1.jpg">
			  
			  <table width="98%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><table width="700" border=0 cellspacing=0 cellpadding=0 align=center bgcolor="#FFFFFF">
<tr><td align=center>
<%
if session("login")<>"ok" then 
%>
<br>
<form action="" method=post name=booklogin>
<table width="300" border="1" cellpadding="3" bordercolor="#CCCCCC" style="border-collapse: collapse;" align=center>
<tr><td align=center>用户名</td><td><input type="text" name="admin" value="" title="请填写用户名"></td></tr>
<tr><td align=center>密&nbsp;&nbsp;码</td><td><input type="password" name="password" value="" title="请填写登陆密码"></td></tr>
<tr><td colspan=2 align=center><input type="submit" value="管理登陆"><input type="hidden" name="login" value="check"></td></tr>
</table>
</form>

<%
else
action=request("action")

'管理首页
if action="" then%>
<form name=book action=book_admin.asp method=post>
<table width="700" border="1" cellpadding="0" cellspacing="0" bordercolorlight="#808080" bordercolor="#FFFFFF" bordercolordark="#FFFFFF" style="table-layout:fixed;word-break:break-all">
	<tr><td align=center width=5% height=25>选</td>
	<td align=center width=11%>姓名</td> 
	<td align=center width=45%>内容（编辑与回复）</td>
	<td align=center width=18%>日期</td>
	<td align=center width=10%>状态</td>
	<td align=center width=11%>审核</td>
	</tr>
<%
dim rs,msg_per_page
dim sql
msg_per_page = 10 '每页显示记录数
Set rs=Server.CreateObject("ADODB.Recordset")
sql="select * from Feedback where del=false order by top desc, PostDate desc"

rs.cursorlocation = 3 
rs.pagesize = msg_per_page '每页显示记录数
rs.open sql,conn,1,1 

	if rs.eof and rs.bof then
	response.write "<tr><td colspan=6 align=center height=50>暂时没有留言</td></tr>"
	end if

	if not (rs.eof and rs.bof) then '检测记录集是否为空
		totalrec = RS.RecordCount '总记录条数
		if rs.recordcount mod msg_per_page = 0 then '计算总页数,recordcount:数据的总记录数
		n = rs.recordcount\msg_per_page 'n:总页数
		else 
		n = rs.recordcount\msg_per_page+1 
		end if 

		currentpage = request("page") 'currentpage:当前页
		If currentpage <> "" then
			currentpage = cint(currentpage)
			if currentpage < 1 then 
				currentpage = 1
			end if 
			if err.number <> 0 then 
				err.clear
				currentpage = 1
			end if
		else
			currentpage = 1
		End if 
		if currentpage*msg_per_page > totalrec and not((currentpage-1)*msg_per_page < totalrec)then 
			currentPage=1
		end if
		rs.absolutepage = currentpage 'absolutepage：设置指针指向某页开头
		rowcount = rs.pagesize 'pagesize：设置每一页的数据记录数
		dim i
		dim k

		Do while not rs.eof and rowcount>0
	content=rs("Comments")	
	replay=rs("replay")
	UserName=rs("UserName")

	if rs("top")="0" then
	Response.write "<tr><td align=center><input type='checkbox' value='"&rs("ID")&"' name=id>"
		else
	Response.write "<tr><td><font color=red title='固顶信息不能直接删除，请先解除固顶属性再删除'>TOP</font>"
	end if
	Response.write "</td><td>"&UserName&"</td><td><a href='book_admin.asp?action=replay&id="&rs("ID")&"'>"
	response.write lleft(server.htmlencode(content),50)
	response.write "</a></td><td  align=center>"&rs("Postdate")&"</td><td  align=center>"
	if Isnull(Replay) then
		response.write "<font color=red>新留言</font>"
	else				
		response.write "已回复"
	end if
		response.write "</td><td align=center>"
		if rs("Online")="0" then response.write "<font color=red>隐藏</font>" else response.write "公开"  end if
		response.write "</td></tr>"
	rowcount=rowcount-1
	rs.movenext		
	loop
	end if

	rs.close
	conn.close
	set rs=nothing
	set conn=nothing
%>
<tr><td colspan=6><input type='checkbox' name=chkall onclick='CheckAll(this.form)'> 全选 
	<input type="submit" name="action" value="删除" onClick="{if(confirm('该操作不可恢复！\n\n确实删除选定的留言？')){this.document.book.submit();return true;}return false;}"> 	
	</td></tr>
</table>
</form>
<%
call listPages()
end if

if request("action")="删除" then
	delid=replace(request("id"),"'","")
	call delfeedback()
end if

if request("action")="replay" then
	id=request("id")
	call detailfeedback()
end if

if request("action")="setup" then
	call setup()
end if

end if


%>                     
</td></tr>

</table>   

<!--</body></html> -->

<%
sub setup()
Set rs=Server.CreateObject("ADODB.Recordset")
sql="select * from book_setup"
rs.open sql,conn,1,3

if request("save")="ok" then

	if trim(request.form("sitename"))="" or trim(request.form("admin"))="" or trim(request.form("maxlength"))="" or trim(request.form("pages"))="" or trim(request.form("huifucolor"))="" or trim(request.form("huifutishi"))="" or trim(request.form("book_jianju"))="" then
	response.write "<script language='javascript'>"
	response.write "alert('资料填写不完整或有错误，请检查后重新提交。');"
	response.write "location.href='javascript:history.go(-1)';"
	response.write "</script>"
	response.end
	end if

	if (not isNumeric(request.form("maxlength"))) or (not isNumeric(request.form("pages"))) or (not isNumeric(request.form("book_jianju"))) then
	response.write "<script language='javascript'>"
	response.write "alert('资料填写不完整或有错误，请检查后重新提交。');"
	response.write "location.href='javascript:history.go(-1)';"
	response.write "</script>"
	response.end
	end if


rs("sitename")=request("sitename")		'站点名称
rs("admin")=request("admin")			'管理员姓名
if trim(request("password"))<>"" then rs("password")=md5(trim(request("password")))	'密码
rs("view")=request("view")			'留言审核
rs("maxlength")=request("maxlength")		'留言最大长度
rs("pages")=request("pages")			'每页留言数
rs("html")=request("html")			'是否屏蔽html
rs("mailyes")=request("mailyes")		'是否必填邮箱
rs("huifutishi")=trim(request("huifutishi"))	'回复提示
rs("huifucolor")=trim(request("huifucolor"))	'回复颜色
rs("book_jianju")=request("book_jianju")	'表格间距
if request("bad")<>"" then rs("bad")=request("bad")		'脏话过滤
rs.update

	response.write "<script language='javascript'>"
	response.write "alert('您提交的设置已保存。');"
	response.write "location.href='book_admin.asp?action=setup';"
	response.write "</script>"
	response.end
else
%>
<table width="600" border="1" align="center" cellpadding="3" bordercolor="#F2F2F2" style="border-collapse: collapse;">
	<form name=book action=book_admin.asp?action=setup method=post>
	<tr><td  width=25% align=right>网站名称 &nbsp; &nbsp; </td><td><input type=text name=sitename value="<%=rs("sitename")%>" maxlength=20></td></tr>
	<tr><td  width=25% align=right>管理员姓名 &nbsp; &nbsp; </td><td><input type=text name=admin value="<%=rs("admin")%>" maxlength=16></td></tr>
	<tr><td  width=25% align=right>管理员密码 &nbsp; &nbsp; </td><td><input type=password name=password value="" maxlength=16> [若不修改密码，请留空]</td></tr>
	<tr><td  width=25% align=right>留言必填Email &nbsp; &nbsp; </td><td>是<input type=radio name=mailyes value="0" <%if rs("mailyes")="0" then%> checked<%end if%>> 否<input type=radio name=mailyes value="1" <%if rs("mailyes")="1" then%> checked<%end if%> > [留言时是否必须填写有效E-mail地址]</td></tr>
	<tr><td  width=25% align=right>屏蔽html功能 &nbsp; &nbsp; </td><td>是<input type=radio name=html value="0" <%if rs("html")="0" then%> checked<%end if%>> 否<input type=radio name=html value="1" <%if rs("html")="1" then%> checked<%end if%> > [是否屏蔽用户留言中的html代码]</td></tr>
	<tr><td  width=25% align=right>留言审核开关 &nbsp; &nbsp; </td><td>是<input type=radio name=view value="0" <%if rs("view")="0" then%> checked<%end if%>> 否<input type=radio name=view value="1" <%if rs("view")="1" then%> checked<%end if%> > [留言是否需要审核]</td></tr>
	<tr><td  width=25% align=right>留言内容长度 &nbsp; &nbsp; </td><td><input type=text name=maxlength value="<%=rs("maxlength")%>" maxlength=3> [留言内容的最多字符数，例如200]</td></tr>
	<tr><td  width=25% align=right>每页留言条数 &nbsp; &nbsp; </td><td><input type=text name=pages value="<%=rs("pages")%>" maxlength=2>  [推荐10]</td></tr>
	<tr><td  width=25% align=right>留言表格间距 &nbsp; &nbsp; </td><td><input type=text name=book_jianju value="<%=rs("book_jianju")%>" maxlength=2> [合适的间距可使版面更美观，推荐10]</td></tr>
	<tr><td  width=25% align=right>管理员回复提示 &nbsp; &nbsp; </td><td><input type=text name=huifutishi value="<%=rs("huifutishi")%>" maxlength=10> [例如：“客服回复”]</td></tr>
	<tr><td  width=25% align=right>管理员回复颜色 &nbsp; &nbsp; </td><td><input type=text name=huifucolor value="<%=rs("huifucolor")%>" maxlength=10> [可使用英文单词或16进制数，如：red、#CCFF00”]</td></tr>
	<tr><td  width=25% align=right>脏话过滤 &nbsp; &nbsp; </td><td><input type=text name=bad value="<%=rs("bad")%>" size=50 maxlength=255><br> [用/隔开]</td></tr>
	<tr><td colspan=2 align="center"><INPUT name="save" TYPE="hidden" value="ok"><INPUT TYPE="submit" value="保存设置"></td></tr>
	</form>
</table>
<%
end if
rs.close
set rs=nothing
end sub



sub delfeedback()
	if delid="" or isnull(delid) then

	response.write "<script language='javascript'>"
	response.write "alert('操作失败，没有选择合适参数，请单击“确定”返回！');"
	response.write "location.href='book_admin.asp';"
	response.write "</script>"
	response.end

	else
		conn.execute("delete from Feedback where ID in ("&delid&")")
		conn.close
		set conn=nothing

	response.write "<script language='javascript'>"
	response.write "alert('留言删除成功，请单击“确定”返回！');"
	response.write "location.href='book_admin.asp';"
	response.write "</script>"
	response.end

	end if
end sub

sub detailfeedback()
if id="" then
	response.write "<script language='javascript'>"
	response.write "alert('无此留言编号，请单击“确定”返回！');"
	response.write "location.href='book_admin.asp';"
	response.write "</script>"
	response.end
end if

	'修改留言资料
if request("send")="ok" then

		if trim(request.form("comments"))="" then 
		response.write "<script language='javascript'>"
		response.write "alert('出错了，留言内容不能为空！');"
		response.write "location.href='javascript:history.go(-1)';"
		response.write "</script>"
		response.end
		end if

	set rs=server.createobject("adodb.recordset")
	sql = " select * from feedback where del=false and ID="&id
	rs.open sql,conn,1,3

		if not (rs.eof and rs.bof) then
		rs("comments")=request.form("comments")
		rs("Replay")=replace(request.form("Replay"),vbCRLF,"<BR>")
		rs("ReplayDate") = Now()
		rs("Online")=request("Online")
		rs("top")=request("top")
		rs.update
		end if

	rs.close

	response.write "<script language='javascript'>"
	response.write "alert('留言已经修改或回复成功，请单击“确定”返回！');"
	response.write "location.href='book_admin.asp';"
	response.write "</script>"
	response.end
end if

	'显示详细资料
	set rs = server.createobject("adodb.recordset")
	sql = "select * from feedback where ID="&id
	rs.open sql,conn,1,1

		if rs.eof and rs.bof then 
		response.write "<script language='javascript'>"
		response.write "alert('无此留言，请单击“确定”返回！');"
		response.write "location.href='book_admin.asp';"
		response.write "</script>"
		response.end
		end if

		if not (rs.eof and rs.bof) then 
			Comments=replace(rs("Comments"),"<BR>",vbCRLF)
			if rs("replay")<>"" then replay=replace(rs("Replay"),"<BR>",vbCRLF) else repley=""  end if

		%>

   <table width="600" border="1" align="center" cellpadding="3" bordercolor="#333333" style="border-collapse: collapse;">
		 <form name="repl" method="post" action='book_admin.asp?action=replay&id=<%=id%>'>
		 <tr><TD align="right" width=20% height=15>留言者IP地址</TD><td><%=rs("IP")%></td></tr>
		 <tr><TD align="right" width=20%>留言日期</TD><td><%=rs("PostDate")%></td></tr>		 
		 <tr><TD align="right" width=20%>留言人姓名</TD><td><%=rs("UserName")%>&nbsp;</td></tr>
		<tr><TD align="right" width=20%>留言邮箱</TD><td><%=rs("UserMail")%>&nbsp;</td></tr>
		<tr><TD align="right" width=20%>留言网址</TD><td><%=rs("url")%>&nbsp;</td></tr>
		<tr><TD align="right" width=20%>其它联系方式</TD><td><%=rs("qq")%>&nbsp;</td></tr>
		 <tr><TD align="right" width=20%>内容</TD><td><textarea style="overflow:auto" name="comments" cols="60" rows="8"><%=Comments%></textarea></td></tr>
		 <tr><TD align="right" width=20% valign=top>回复内容</TD><td><textarea style="overflow:auto" name="Replay" cols="60" rows="8"><%=replay%></textarea>&nbsp;</td></tr>

		<tr><TD align="right" width=20%>是否固顶</TD><td><input type="radio" name="top" value="1" <%if rs("top")="1" then%>checked<%end if%>>
			  固顶<input type="radio" name="top" value="0" <%if rs("top")="0" then%>checked<%end if%>>
			  普通 </td></tr>


		<tr><TD align="right" width=20%>是否隐藏</TD><td><input type="radio" name="Online" value="0" <%if rs("Online")="0" then%>checked<%end if%>>
			  隐藏<input type="radio" name="Online" value="1" <%if rs("Online")="1" then%>checked<%end if%>>
			  公开 </td></tr>
			<TR><TD align="right" width=20%>&nbsp;<INPUT TYPE="hidden" name=send value=ok></TD><TD>
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				<input type="submit" name="action" value=" 提 交 "></TD></TR>
			</form></TABLE>
		<%
		end if	

	rs.close
	set rs=nothing

end sub


'分页
sub listPages() 
if n <= 1 then exit sub 
%>
共<%=totalrec%>条留言 
<%if currentpage = 1 then%>
<font color=darkgray>首页 前页</font>
<%else%> 
<a href="<%=request.ServerVariables("script_name")%>?page=1">
首页</font></a> <a href="<%=request.ServerVariables("script_name")%>?page=<%=currentpage-1%>">前页</a>
<%end if%>
<%if currentpage = n then%> 
<font color=darkgray >下页 末页</font>
<%else%> 
<a href="<%=request.ServerVariables("script_name")%>?page=<%=currentpage+1%>">下页</a> <a href="<%=request.ServerVariables("script_name")%>?page=<%=n%>">末页</a>
<%end if%>
  第<%=currentpage%>页 共<%=n%>页
<%end sub%></td>
  </tr>
</table>
			  </td>
            </tr>
          </table></td>
            </tr>
          </table></td>
        </tr>
      </table></td>
  </tr>
</table>
<!--#include file="end.asp" -->
</body>
</html>
