<!--#include file="conn.asp"-->
<!--#include file="ConnUser.asp"-->
<!--#include file="config.asp"-->
<!--#include file="char.inc"-->
<!--#include file="chkuser.asp" -->
<!--#include file="ChkManage.asp" -->
<%
if not(request.cookies(echsys)("ManageKEY")="super" or request.cookies(echsys)("ManageKEY")="typemaster" or request.cookies(echsys)("ManageKEY")="bigmaster") then
	Show_Err("对不起，您的后台管理权限不够操作！")
	response.end
else
	if lymanage="1" or (request.cookies(echsys)("ManagePurview")="99999" and request.cookies(echsys)("purview")="99999") then
	
	   IF  request.QueryString("action")="del" then
		   conn.execute("delete from "& db_wygkcn_Review_Table &" where ReviewID in ("&request.form("selectdel")&")")
		   response.Redirect  "GuestReView.asp"
	   End If 	

	PageShowSize = 10            '每页显示多少个页
	MyPageSize   = 16           '每页显示多少条文章
		
	If Not IsNumeric(Request("page")) Or IsEmpty(Request("page")) Or Request("page") <=0 Then
		MyPage=1
	Else
		MyPage=Int(Abs(Request("page")))
	End if
	
	set rs=server.CreateObject("ADODB.RecordSet")
	if reviewcheckshow="1" then
		rs.Source="select * from "& db_wygkcn_Review_Table &" where EC_ArticleID is not null and EC_ArticleID < 1 order by reviewID desc"
	else
		rs.Source="select * from "& db_wygkcn_Review_Table &" where passed=0 and EC_ArticleID is not null and EC_ArticleID < 1 order by reviewID desc"
	end if
	
	rs.Open rs.Source,conn,1,1
	If Not rs.eof then
		rs.PageSize     = MyPageSize
		MaxPages        = rs.PageCount
		rs.absolutepage = MyPage
		total           = rs.RecordCount
		%>
<html><head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href=site.css rel=stylesheet>
<title><%=copyright%><%=version%>&nbsp;<%=ver%> - 留言管理</title>
<script language="JavaScript">
<!--
function CheckAll(form)  {
  for (var i=0;i<form.elements.length;i++)    {
    var e = form.elements[i];
    if (e.name != 'chkall')       e.checked = form.chkall.checked; 
   }
  }
//-->
</script>
</head>
<body topmargin="0">

<div align="center">
<table width="100%" border="1" cellpadding="3" cellspacing="0" bordercolor="#FFDFBF" bgcolor="#FFFFFF" id="AutoNumber1" style="border-collapse: collapse">
<tr class="TDtop">
	<td colspan="9" height=25 class="TDtop" align="center">┊ <B>留言管理</B> ┊ </td>
</tr>
<tr>
	<td colspan=9  align=center height=25>共 <%=total%> 条，当前第 <%=Mypage%>/<%=Maxpages%> 页，每页 <%=MyPageSize%> 条</td>
</tr>
<tr class="TDtop1" align="center">
	<td width="5%">ID号</td>
	<td width="7%">类型</td>
	<td width="33%">留言标题</td>
	<td width="10%">作者</td>
	<td width="10%">信箱</td>
	<td width="6%">日期</td>
	<td width="12%">置顶</td>		
	<td width="13%">审核</td>
    <td width="4%">选择</td>
</tr>
		<%
		for i=1 to rs.PageSize
			if not rs.EOF then
				title=trim(rs("title"))
				Displaytitle=mid(title,1,22)
				%>
<form action="GuestReview.asp?action=del" method=post name=check>
<tr bgcolor=ffffff>
	<td align=center ><%=rs("ReViewID")%></td>
	<td align=center><%if rs("EC_ArticleID")=0 then%>普通<%else%><font color=red>悄悄话</font><%end if%></td>
	<td align="left"><a href='wygkcn_GuestBook.asp?ReViewID=<%=rs("ReViewID")%>' target=_blank><%=htmlencode(Displaytitle)%>...</a></td>
	<td align=center><%=trim(rs("author"))%>　</td>
	<td align=center><a href='mailto:<%=trim(rs("email"))%>'><%=trim(rs("email"))%></a></td>
	<td align=center><%=Month(rs("UpdateTime")) %>-<%=Day(rs("UpdateTime")) %></td>
	<td align=center >
	<a href='IsTop.asp?ReviewID=<%=rs("ReviewID")%>'><%if rs("istop")=0 then%>未置顶<%else%>已置顶<%end if%></a>
	</td
	><td align=center >
		<input type=hidden name="passed" value="<%=rs("passed")%>">
		
		<a href=CheckReView.asp?ReViewID=<%=rs("ReViewID")%>&Guest=1 style="font-size: 9pt;  color: #000000; background-color: #ffffff; solid #FEEBE4" onMouseOver ="this.style.backgroundColor='#FEEBE4'" onMouseOut ="this.style.backgroundColor='#ffffff'">
		<%if rs("passed")=0 then%><font color=red>通过审核</font><%else%>取消审核<%end if%></a>

	</td>
	<td align=center>
	<input name="selectdel" type="checkbox" id="selectdel" value=<%=rs("ReViewID")%>>
	</td>
</tr>
<%
rs.MoveNext
end if
next
%>
	<tr>
	<td colspan="9" align=right height="25" width="100%">
	<input type=checkbox name=chkall value=on onClick="CheckAll(this.form)">选中所有显示留言&nbsp;
	<input type=submit name=action onClick="{if(confirm('删除选定的留言吗？')){this.document.check.submit();return true;}return false;}" value="删除留言" >
	</td>
	</tr>
</form>
<tr>
	<td colspan=9  align=center height=25>共 <%=total%> 条，当前第 <%=Mypage%>/<%=Maxpages%> 页，每页 <%=MyPageSize%> 条 
		<%
		url="GuestReView.asp?" 
		PageNextSize=int((MyPage-1)/PageShowSize)+1
		Pagetpage=int((total-1)/rs.PageSize)+1
		if PageNextSize >1 then
			PagePrev=PageShowSize*(PageNextSize-1)
			Response.write "<a  href='" & Url & "page=" & PagePrev & "' title='上" & PageShowSize & "页'>上一翻页</a> "
			Response.write "<a  href='" & Url & "page=1' title='第1页'>页首</a> "
		end if
		if MyPage-1 > 0 then
			Prev_Page = MyPage - 1
			Response.write "<a  href='" & Url & "page=" & Prev_Page & "' title='第" & Prev_Page & "页'>上一页</a> "
		end if
	
		if Maxpages>=PageNextSize*PageShowSize then
			PageSizeShow = PageShowSize
		Else
			PageSizeShow = Maxpages-PageShowSize*(PageNextSize-1)
		End if
		If PageSizeShow < 1 Then PageSizeShow = 1
		for PageCounterSize=1 to PageSizeShow
			PageLink = (PageCounterSize+PageNextSize*PageShowSize)-PageShowSize
			if PageLink <> MyPage Then
				Response.write "<a  href='" & Url & "page=" & PageLink & "'>[" & PageLink & "]</a> "
			else
				Response.Write "<B>["& PageLink &"]</B> "
			end if
			If PageLink = MaxPages Then Exit for
		Next
		if Mypage+1 <=Pagetpage  then
			Next_Page = MyPage + 1
			Response.write "<a  href='" & Url & "page=" & Next_Page & "' title='第" & Next_Page & "页'>下一页</A>"
		end if
		if MaxPages > PageShowSize*PageNextSize then
			PageNext = PageShowSize * PageNextSize + 1
			Response.write " <A  href='" & Url & "page=" & Pagetpage & "' title='第"& Pagetpage &"页'>页尾</A>"
			Response.write " <a  href='" & Url & "page=" & PageNext & "' title='下" & PageShowSize & "页'>下一翻页</a>"
		End if
		rs.close
		set rs=nothing
		conn.close
		set conn=nothing
		%>
	</td>
</tr>
</table>
</div>
</body>
</html>
<!--#include file="Admin_Bottom.asp"-->
	<%else
		Show_Message("没有要审核的留言")
		response.end
	end if
	else
		Show_Err("对不起，该功能已经被超级系统管理员关闭，您没有权限操作！")
		response.end
	end if
end if%>