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

<html>
<head><title></title><meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="../css/style.css" />

<style type="text/css">
<!--
.STYLE3 {color: #990033}
-->
</style>
<body>
 
<script>

<!--打开公告-->
function open_notify(NOTIFY_ID,FORMAT)
{
 URL="viewfile.asp?id="+NOTIFY_ID;
 myleft=(screen.availWidth-700)/2;
 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>
 



<%

 
tname=request.cookies("tname")

'检查权限
        Set MyOAASPObj = Server.CreateObject("YFSchoolOApro.YFSchoolDll")
            if MyOAASPObj.QuanXian(tname,"公文处理")=0 then 
		    response.redirect  "../NoPower.asp"
           end if 
		   set MyOAASPObj=nothing
'检查权限结束

 strdate1=request("date1")
 strdate2=request("date2")
 title=request("title")
 guanjianci=request("guanjianci")
 if strdate1="" then 
   strdate1=date()-150
 end if
 if strdate2="" then 
   strdate2=date()
  
 end if


 
	 
   sql="Select * from GongWen where   (发布日期 BETWEEN '"&strdate1&"'  AND   '"&dateadd("d",1,strdate2)&"') AND (标题 like  '%"&title&"%')  AND (内容 like  '%"&guanjianci&"%') and    (upName ='"&tname&"')   and    (是否签署 ='已批示') order by   id  desc"
   set rs=Server.CreateObject("Adodb.Recordset")
   rs.open sql,conn,1,1
%>
 
<%
rs.pagesize=13 '每页记录条数
curpage=Request.QueryString("curpage") '将URL参数curpage传给curpage变量
rs.absolutepage=curpage '将本页设为curpage设置的页数
if curpage=0 then
   curpage=1
end if 


%>

 <table width="95%" height="30" border="1" align="center" cellpadding="3"   cellspacing="0"  bordercolor="#6D8DD8"  class="mtablehui">
  <tr style="background-color:#D6E4FF"  class="TableHeader">
    <td height="30" colspan="3" align="center" nowrap class="NemuNot">

	<table width="690" border="0" align="center" cellspacing="0">
      <tr><FORM ACTION="LiuZhuan.asp" METHOD="post"  NAME="form1">	
        <td width="45" class="STYLE1"><div align="right"><span class="STYLE1 STYLE2">开始&nbsp;</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="12" readonly  value=<%=strdate1%>>
        </b></b></td>
        <td width="51" class="STYLE1"><div align="right"><span class="STYLE2">结束&nbsp;</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="12" readonly  value=<%=strdate2%>>
        </b></b></td>
        <td width="52" class="STYLE1"><div align="right"><span class="STYLE1 STYLE2">标题&nbsp;</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">关键词&nbsp;</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="78" class="STYLE1 STYLE2"><input name="Submit" type="submit" class="topanniu" value="搜索" /></td>
     </FORM> </tr>
    </table>
	
	</td>
  </tr>
</table>
<br>
 <table width="95%" border="1" align="center" cellpadding="3"   cellspacing="0"  bordercolor="#6D8DD8"  class="mtable">
 <tr style="background-color:#D6E4FF"  class="TableHeader">
   <td  width="8%" align="center" nowrap class="STYLE1">校内编号</td>
     
      <td  width="8%" align="center" nowrap class="STYLE1">发布日期</td>
      <td  width="8%" align="center" nowrap class="STYLE1"><span class="STYLE1">归档类别</span></td>  	  
	  <td  width="30%" align="center" nowrap class="STYLE1"><span class="STYLE1">标题</span></td>  	  
      <td width="8%"  align="center" nowrap class="STYLE1">校长批示</td>
      <td width="15%" height="27" align="center" nowrap class="STYLE1">处理人列表</td>
	  
      <td width="18%"  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><div align="center" class="STYLE1"><%=rs("编号")%> </div></td>
	 
      <td><div align="center" class="STYLE1"><%=rs("发布日期")%> </div></td>
      <td>	  
	  <div   class="STYLE1" align="center"><%=rs("公文归档类别")%> </div>	  </td> 
      <td  class="STYLE1">
	  <a href="javascript:open_notify(<%=rs("id")%>,'0');">&nbsp;<%=rs("标题")%><a></td> 
	  <td>	  
	  <div   class="STYLE1" align="center"><%=rs("是否签署")%> </div>	  </td>
	  <td height="28" class="STYLE1"><div align="center">
	  

<%  
		set rssee=Server.CreateObject("Adodb.Recordset")
		seesql="select * from GongWenSee  where fid ='"&rs("id")& "'   order by 处理人"
		rssee.open seesql,conn,1
		while not rssee.eof and not rssee.bof
		%>		
		<%=rssee("处理人")%>&nbsp;
		<%
		rssee.movenext
		wend
		
		rssee.close
		set rssee=nothing  
		
		
		
		%>





	  
	  
	  
	  
	  </div>	    <div align="center"></div>	    <div align="center"></div></td>
	  <td   class="STYLE1">
	
	<div align="center">
	 
	 <a href="zhuanfamain.asp?curpage=<%=curpage%>&id=<%=rs("id")%>"  target="main" class="STYLE1">转发处理</a>&nbsp;
	 <a href="guidang.asp?curpage=<%=curpage%>&id=<%=rs("id")%>"  target="main" class="STYLE1">归档</a>&nbsp;	
	 
	 <a   href= "# "   onclick= "javascript:if(confirm( '您真的要撤销校长批示？ '))href= 'QianShuCheXiao.asp?curpage=<%=curpage%>&id=<%=rs("id")%>'; "> 撤销批示 </a></div></td>
    </tr>
<%  rs.movenext
    next%>
</table>
 
 
   
<label></label>
<table width="100%" border="1" align="center" cellpadding="3"   cellspacing="0"  bordercolor="#6D8DD8"  class="mtable">
</table>
</div> <br>
<div align="center" class="STYLE1">
<%if curpage=1 then%>
首页
<%else%>
<a href="?ftype=<%=strftype%>&curpage=1">首页</a>
<%end if%>

<%if curpage=1 then%>
上一页
<%else%>
<a href="?ftype=<%=strftype%>&curpage=<%=curpage-1%>">上一页</a>
<%end if%>

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

<%if rs.pagecount<curpage+1 then%>
尾页
<%else%>
<a href="?ftype=<%=strftype%>&curpage=<%=rs.pagecount%>">尾页</a>
<%end if%>
<span class="STYLE2">(当前第<%=curpage%>页，共有<%=rs.pagecount%>页，共有：<%=rs.recordcount%>条记录)</span></div>

	     
 
</body>
</html>
