<!--#include file="../Include/Head.asp"-->

<style type="text/css">
.rolinList{ width:100%; height:auto; text-align:left}
.rolinList li{margin-bottom:5px;border:1px solid #ddd}
.rolinList li h2{ width:99%; height:40px;  background:#fff; font-size:14px; line-height:40px; padding-left:1%; color:#333; cursor:pointer}
.rolinList li .contact{float:right;}
.rolinList li .contact i{float:right; font-style:normal; padding-right:15px; color:#666}
.content{ height:auto; display:inline-block; width:100%;  background:#fff;  background:#FAFAFA;}
.content span{ display:block; width:48%; color:#666; padding:10px 1%; float:left;}
.content span p{text-indent:29px; line-height:20px;}
-->d
</style>

<script type="text/javascript">
	function DoSearch() {
		if (document.getElementById("Keyword").value != "") {
			//location.href = "search.asp?" + encodeURI(document.getElementById("search_keyword").value);
			location.href = "Index1.asp?Keyword=" + document.getElementById("Keyword").value ;
		}
		else {
			alert("请输入搜索关键字")
		}
	}
</script>

	<div class="place">
    <span>位置：</span>
    <ul class="placeul">
    <li><a href="../Main/Right.asp">首页</a></li>
    <li><a href="#">待处理留言管理</a></li>
    </ul>
    </div>
    
    <div class="rightinfo">
    
    <div class="tools">
    <%
	Keyword=Request.QueryString("Keyword")
	%>    
        <ul class="seachform">
            <li><label>综合查询</label></li>
            <li><input name="Keyword" id="Keyword" type="text" value="<%=Keyword%>" class="newinput200" /></li>
        <li><input name="" type="button" class="newbtn" onClick="DoSearch();" value="查找" style="width:75px; height:31px;"/></li>
        </ul>
    
    </div>
		
	<ul class="rolinList" id="rolin">
	
	<%
	If Keyword<>"" Then Wherestr="And title like '%"&Keyword&"%' or Content like '%"&Keyword&"%' or Username like '%"&Keyword&"%' or Remark like '%"&Keyword&"%'  " else Wherestr=""
	Page=Max(Cnum(sqlshow(Request("page"))),1)
	Set Rs=server.createobject("adodb.recordSet")
	Sql="select * from Jin_Message where Verify "&Wherestr&" order by sysID desc"
	Rs.Open Sql,Conn,1,3
	ListPageSize=5
	'显示页数
	AllCount=Rs.RecordCount
	Pages=Fix(AllCount/ListPageSize)
	If Pages*ListPageSize<AllCount Then Pages=Pages+1	
	PastCount=(Page-1)*ListPageSize
	If AllCount>PastCount Then Rs.Move PastCount
	ShowCount=Min(AllCount-PastCount,ListPageSize)
	For i=1 To ShowCount
	%>    
	<li>
	<h2><input name="chk_ids" type="checkbox" class="chk_ids" value="<%= Rs("sysID") %>" /> <%=Rs("Username")%>：<%=Rs("Title")%>
		<span class="contact">
		<i title="QQ"><a href="http://wpa.qq.com/msgrd?v=3&uin=<%=Rs("QQ")%>&site=qq&menu=yes" target="_blank"><%=Rs("QQ")%></a></i>
		<i title="邮箱"><a href="mailto:<%=Rs("Email")%>"><%=Rs("Email")%></a></i>
		<i title="电话"><%=Rs("Tel")%></i>
		<i title="来源IP"><%=Rs("IP")%></i>
		</span>
	</h2>
	<div class="content">
		<span class="left"><p><%=Rs("Content")%></p><p style="color:#999">留言时间:<%=Rs("Addtime")%>  &nbsp;&nbsp; 地址:<%=Rs("Addr")%></p></span>
		<span class="right">
		<textarea name="Remark" cols="" rows="" class="textinput msgReply" id2="<%=Rs("sysID")%>" style="width:90%; height:55px;"><%=Rs("Reply")%></textarea>
		<br>回复时间:<%=Rs("Replytime")%>
		</span>
	</div>
	</li>
	<%
	Rs.MoveNext
	Next
	Rs.Close
	Set Rs=nothing
	%>    
	
	</ul>

    
    <div class="pagin">
    	<div class="message"><input name="chk_all" type="checkbox" class="chk_all" /> <a href="javascript:;" id="msgplsc"><font color="#B50000">批量删除</font></a> &nbsp; 共<i class="blue"> <%=AllCount%> </i>条记录</div>
        <ul class="paginList">
        <%Response.write ShowPages(Pages,Page,"Index1.asp?Keyword="&Keyword&"&Pid="&Pid&"&Order="&Order&"")%>
        </ul>
    </div>
    
    
    
    
    </div>
    
    <script type="text/javascript">
	$('.tablelist tbody tr:odd').addClass('odd');
	</script>

    
<%
if Trim(Request.QueryString("Action"))="Verifyno" then
	conn.execute "UPDATE [Jin_Article] SET Verify = false WHERE SysID = "&Trim(Request.QueryString("id"))
	Response.Write ("<script language=javascript>window.location=document.referrer;</script>")
end if
if Trim(Request.QueryString("Action"))="Verify" then
	conn.execute "UPDATE [Jin_Article] SET Verify = true WHERE SysID = "&Trim(Request.QueryString("id"))
	Response.Write ("<script language=javascript>window.location=document.referrer;</script>")
end if
%>


<script>
$(document).ready(function(e){
autoSave("msgReply");
autoClick("msgView");
autoDel("msgDel");
autoChkAll("msgplsc");
});
</script>

<%Call BackFoot()%>

