<!--#include file="../checkLogin.asp"-->
<!--#include file="../SQLconn.asp"-->
<html>

<head>

<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<link rel="stylesheet" type="text/css" href="../images/<%=request.cookies("imgdir")%>/css/style.css" media="all"/>
<title>文件列表</title>



<style type="text/css">
<!--
body {
	background-color: #FFFFFF;
}
-->
</style></head>
<body topmargin="5" leftmargin="5">

<% '登陆控制，放置未登录查看
    if request.cookies("tname")="" then
        response.redirect("../Index.asp")
     end if
    %>

<%
  
  strftype=request("ftype")
	

 tname=request.cookies("tname")
 strdate1=request("date1")
 strdate2=request("date2")
 title=request("title")
 guanjianci=request("guanjianci")
 if strdate1="" then 
   strdate11="2000-1-1"
 else 
   strdate11=strdate1
 end if
 if strdate2="" then 
   strdate22="2500-1-1"
 else 
   strdate22=strdate2
 end if
 
 
 
Set rs=Server.CreateObject("Adodb.Recordset")
 
sql="SELECT *   FROM gonggao   where (fDate BETWEEN '"&strdate11&"'  AND   '"&strdate22&"') AND (Title like  '%"&title&"%')  AND (Content like  '%"&guanjianci&"%')  and  (ftype='"&strftype&"') order by  id  desc"
rs.open sql,conn,1,1

rs.pagesize=15 '每页记录条数
curpage=Request.QueryString("curpage") '将URL参数curpage传给curpage变量
rs.absolutepage=curpage '将本页设为curpage设置的页数
if curpage=0 then
   curpage=1
end if 

%>
<form id="form1" name="form1" method="post" action="filelist.asp?ftype=<%=strftype%>">


<script>

</script>
<br>
<table width="784" border="0" align="center" cellspacing="0">
  <tr>
    <td width="45" class="STYLE1"><div align="right"><span class="STYLE1 STYLE2">开始</span></div></td>
    <td width="105" class="STYLE1"><b><b>
      <input name=date1 onClick="javascript:window.open('day.asp?form=form1&field=date1&oldDate='+this.value,'','directorys=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,width=250,height=200,top=220,left=250');"  size="15" readonly  value=<%=strdate1%>>
    </b></b></td>
    <td width="51" class="STYLE1"><div align="right"><span class="STYLE2">结束</span></div></td>
    <td width="105" class="STYLE1"><b><b>
      <input name=date2 onClick="javascript:window.open('day.asp?form=form1&field=date2&oldDate='+this.value,'','directorys=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,width=250,height=200,top=220,left=250');"  size="15" readonly  value=<%=strdate2%>>
    </b></b></td>
    <td width="52" class="STYLE1"><div align="right"><span class="STYLE1 STYLE2">标题</span></div></td>
    <td width="105" class="STYLE1"><span class="STYLE2">
      <input name="title" type="text" id="title" size="15" value=<%=title%>>
    </span></td>
    <td width="68" class="STYLE1"><div align="right"><span class="STYLE2">关键词</span></div></td>
    <td width="132" class="STYLE1"><span class="STYLE2">
      <input name="guanjianci" type="text" id="guanjianci" size="15" value=<%=guanjianci%>>
    </span></td>
    <td width="103" class="STYLE1 STYLE2">
      <input name="Submit" type="submit" class="topanniu" value="搜索" />
     </td>
  </tr>
</table>
<br>
<script><!--打开公告-->
function open_notify(NOTIFY_ID,FORMAT)
{
 URL="openFile.asp?id="+NOTIFY_ID;
 myleft=80;
 mytop=80
 mywidth=(screen.availWidth-160);
 myheight=(screen.availHeight-120);
 if(FORMAT=="1")
 {
    myleft=0;
    mytop=0
    mywidth=screen.availWidth-10;
    myheight=screen.availHeight-40;
 }
 window.open(URL,'_blank',"height="+myheight+",width="+mywidth+",status=1,toolbar=no,menubar=no,location=no,scrollbars=yes,top="+mytop+",left="+myleft+",resizable=yes");
}
</script>


<table width="95%" border="1" align="center" cellpadding="3"   cellspacing="0"  bordercolor="#6D8DD8"  class="mtable">
 <tr style="background-color:#D6E4FF"  class="TableHeader">
  
	  <td height="30" align="center" nowrap class="STYLE1"><span class="STYLE1">标题</span></td>
      <td align="center" nowrap class="STYLE1">发布人</td>
      <td align="center" nowrap class="STYLE1"><span class="STYLE1">日期/点击</span></td>
  </tr>
<%
   for i= 1 to rs.pagesize
      if rs.eof then
         exit for
      end if
%>
    <tr onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#EFF8FF'">
	<td width="453" height="30">
	
	
	
	&nbsp;
	
	<%if rs("Havesee")="已经查阅"   then  
	 else  %>
				    <img src="../images/<%=request.cookies("imgdir")%>/gonggaoNew.gif" width="22" height="9"> 
        <%end if %>
	<%if trim(rs("ontop"))<>"顶置" then  
				else  %>
                <img src="../images/<%=request.cookies("imgdir")%>/ding.gif" width="15" height="13">
                <%end if  %>
     <span class="STYLE1"> <a href="javascript:open_notify(<%=rs("id")%>,'0');"><%=rs("title")%><a></td>
    <td width="202" class="STYLEname"><div align="center"><%=rs("author")%></div></td>
    <td width="202"><div align="center" class="STYLEDATE"><%=left(rs("fdate"),9)%>&nbsp;&nbsp;<span class="STYLEHIT">(<%=rs("hits")%>)</span></div></td> 
	</tr>
<%  rs.movenext
    next%>
</table>
  <br>
  <div>
<div align="center" class="STYLETITLE">
  <span class="STYLE1">
  <%if curpage=1 then%>
首页
<%else%>
<a href="?date1=<%=strdate1%>&date2=<%=strdate2%>&title=<%=title%>&guanjianci=<%=guanjianci%>&ftype=<%=strftype%>&curpage=1">首页</a>
<%end if%>

<%if curpage=1 then%>
上一页
<%else%>
<a href="?date1=<%=strdate1%>&date2=<%=strdate2%>&title=<%=title%>&guanjianci=<%=guanjianci%>&ftype=<%=strftype%>&curpage=<%=curpage-1%>">上一页</a>
<%end if%>

<%if rs.pagecount<curpage+1 then%>
下一页
<%else%>
<a href="?date1=<%=strdate1%>&date2=<%=strdate2%>&title=<%=title%>&guanjianci=<%=guanjianci%>&ftype=<%=strftype%>&curpage=<%=curpage+1%>">下一页</a>
<%end if%>

<%if rs.pagecount<curpage+1 then%>
尾页
<%else%>
<a href="?date1=<%=strdate1%>&date2=<%=strdate2%>&title=<%=title%>&guanjianci=<%=guanjianci%>&ftype=<%=strftype%>&curpage=<%=rs.pagecount%>">尾页</a>
<%end if%>
(当前第<%=curpage%>页，共有<%=rs.pagecount%>页，共有：<%=rs.recordcount%>条记录)</span></div>
<br>
<p align="center"><br>
</p>
</form>

</body>  
  
</html>  