<!--#include file="../../Conn.asp" -->
<!--#include file="../../Comm/Site_Class.asp" -->
<!--#include file="../../Comm/Function.asp" -->
<%
PagePath = "../../"

Set Qsite = New Site_Class

Qsite.SiteConfig_Master()
%>
<!--#include file="../Check_Login.asp" -->
<%
Qsite.Check_AdminFlag(arrAdminFlag(4 , 2))

If Request.Form <> "" Then
	Response.Redirect("Feedback_List.asp?Title="& Qsite.chgStr(Trim(Request.Form("Title"))))
	Response.End()
End If

Dim CurrentPage,FileName
Dim Title,FeedbackId
Dim Act

Set Rs = server.createobject("ADODB.Recordset")

Title = Qsite.chgStr(Trim(Request.QueryString("Title")))
FeedbackId = Qsite.chgStr(Trim(Request.QueryString("FeedbackId")))

Sql = "select * from Feedback where Title like '%"& Title &"%' order by AddDate desc"

FileName = "Feedback_List.asp?Title="& Title &"&FeedbackId="& FeedbackId

Act = Qsite.chgStr(Trim(Request.QueryString("action")))

If Act = "del" Then
    FeedbackId = Qsite.chgStr(Trim(Request.QueryString("FeedbackId")))
	CurrentPage = Qsite.chgStr(Trim(Request.QueryString("Page")))
	If FeedbackId = "" Or Not IsNumeric(FeedbackId) Then FeedbackId = 0
	If CurrentPage = "" Or Not IsNumeric(CurrentPage) Then CurrentPage = 1
	
	Conn.Execute("delete from Feedback where FeedbackId = "& FeedbackId)
	
	Response.Redirect(FileName & "&page="& CurrentPage)
	Response.End()
End If
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>留言反馈管理</title>
<link href="../skins/css/main.css" rel="stylesheet" type="text/css">
<script language="javascript">
function FeedbackDel(FeedbackId)
{
	var question = confirm("你确定要删除此条记录吗？");
	if (question !="0")
	{
		location.href = "Feedback_List.asp?action=del&FeedbackId=" + FeedbackId;
	}
}
</script>
</head>

<body>
<form name="PosForm" method="post" action="Feedback_List.asp" style="margin:0">
	<table width="100%" border="0" cellspacing="1" cellpadding="5">
		<tr>
			<td height="25" class="td_title">资讯信息搜索</td>
		</tr>
		<tr>
			<td height="23" class="td_content">新闻标题：
				<input name="Title" type="text" class="input_1" id="Title" size="50" value="<%=Title%>">
				<input name="Submit" type="submit" class="input_1" value="搜索"></td>
		</tr>
	</table>
	<br>
</form>
	<table width="100%" border="0" cellspacing="1" cellpadding="5">
		<tr>
			<td height="25" colspan="5" class="td_title">留言反馈列表</td>
		</tr>
		<tr>
			<td width="48%" height="23" class="td_content"><strong>反馈标题</strong></td>
			<td width="15%" class="td_content"><strong>电话</strong></td>
			<td width="17%" class="td_content"><strong>反馈时间</strong></td>
			<td width="6%" class="td_content"><strong>审核</strong></td>
			<td width="14%" class="td_content"><strong>操作</strong></td>
		</tr>
<%
Rs.Open Sql , Conn , 1 , 1
If Rs.Eof Then
%>
		<tr>
			<td height="23" colspan="5" class="td_content">暂无资讯信息</td>
		</tr>
<%
Else
	Rs.PageSize = 20
	CurrentPage = Clng(Request("page"))
	If CurrentPage < 1 Then CurrentPage = 1
	If CurrentPage > Rs.PageCount Then CurrentPage = Rs.PageCount
	Rs.AbsolutePage = CurrentPage
	i = 0
	Do While Not Rs.Eof
%>
		<tr>
			<td height="23" class="td_content"><%=Rs("Title")%></td>
			<td height="23" class="td_content"><%=Rs("Tel")%></td>
			<td class="td_content"><%=Rs("AddDate")%></td>
			<td class="td_content"><%if rs("IsSh")="0" then%><font color=red>已通过</font><%elseif rs("IsSh")="1" then%><font color=#009900>未通过</font><%else%>未审核<%end if%></td>
			<td class="td_content"><a href="Feedback_Edit.asp?FeedbackId=<%=Rs("FeedbackId")%>&strTitle=<%=Title%>&strPage=<%=CurrentPage%>">修改</a> | <a href="#" onClick="FeedbackDel('<%=Rs("FeedbackId")%>');return false;">删除</a></td>
		</tr>
<%
	i = i + 1
	Rs.MoveNext
	If i >= Rs.PageSize Then Exit Do
	Loop
%>
		<tr>
			<td height="23" colspan="5" class="td_content">
<%
	Qsite.Page_Cn CurrentPage , Rs.PageCount , Rs.RecordCount , FileName
%>			</td>
		</tr>
<%
End If
Rs.Close
%>
</table>
</body>
</html>
