<!--#include file="../checkLogin.asp"-->
<!--#include file="../SQLconn.asp"-->
<!doctype html>
<html>
<head><title></title><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"/>
<script src="../laydate/laydate.js"></script>
<body>
<%
strftype=request("ftype")
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
 
 %>
<table width="100%" height="495" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="27">
	<div class="header">
	<div class="nav">
        <ul>
		   <li><a href="addfile.asp?ftype=校园活动剪影" target="_self">添加活动剪影</a></li>
            <li class="on">活动剪影管理</li>
            
        </ul>
    </div>	
	</td>
  </tr>

  <tr>
     <td height="470" valign="top"   class="NemuMainBox">
	 <br>

<FORM ACTION="manage.asp?ftype=<%=strftype%>" METHOD="post"  NAME="form1">	
<table width="95%" height="33" border="1" align="center" cellpadding="3"   cellspacing="0"  bordercolor="#6D8DD8" style="border-collapse:collapse"  class="mtablehui">
  <tr style="background-color:#D6E4FF"  class="TableHeader">
    <td height="31" colspan="3" align="center" nowrap class="NemuNot">

	<table width="750" border="0" align="center" cellspacing="0">
      <tr>
        <td width="52" class="STYLE1"><div align="right"><span class="STYLE1 STYLE2">开始&nbsp;</span></div></td>
        <td width="84" class="STYLE1"><b><b>
         <input name=date1  placeholder="请输入日期"  style="width:90px"  value=<%=strdate1%> class="laydate-icon" onClick="laydate()">
        </b></b></td>
        <td width="50" class="STYLE1"><div align="right"><span class="STYLE2">结束&nbsp;</span></div></td>
        <td width="91" class="STYLE1"><b><b>
         <input name=date2  placeholder="请输入日期"  style="width:90px"  value=<%=strdate2%> class="laydate-icon" onClick="laydate()">
        </b></b></td>
        <td width="43" 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"  class="text"  value=<%=title%>>
        </span></td>
        <td width="54" class="STYLE1"><div align="right"><span class="STYLE2">关键词&nbsp;</span></div></td>
        <td width="123" class="STYLE1"><span class="STYLE2">
          <input name="guanjianci" type="text" id="guanjianci" size="15"  class="text"  value=<%=guanjianci%>>
        </span></td>
        <td width="70" class="STYLE1 STYLE2"><input name="Submit" type="submit" class="topanniu" value="搜索" /></td>
      </tr>
    </table>
	
	</td>
  </tr>
</table>
</FORM>
 
<script>

<!--打开公告-->
function open_notify(NOTIFY_ID,FORMAT)
{
 URL="openFile.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>

<%






'检查权限,如果是系统管理员，就显示所有的通知，否则只显示自己的通知。
 set RsPowder=Conn.Execute("select p.powderdetail  from teachers t,teacherpowder p  where t.powdergroup=p.powdergroup and tname='"&request.cookies("tname")&"' and powderdetail='系统参数'")
if  RsPowder.eof and  RsPowder.bof then
	  sql="Select * from gonggao where    upName='"&tname&"'  and  (fDate BETWEEN '"&strdate1&"'  AND   '"&strdate2&"') AND (Title like  '%"&title&"%')  AND (Content like  '%"&guanjianci&"%') and     (ftype='"&strftype&"')   order by ontop desc, id  desc"
else
      sql="Select * from gonggao where   (fDate BETWEEN '"&strdate1&"'  AND   '"&strdate2&"') AND (Title like  '%"&title&"%')  AND (Content like  '%"&guanjianci&"%') and     (ftype='"&strftype&"')   order by ontop desc, id  desc"
end if


Set rs=Server.CreateObject("Adodb.Recordset")
rs.open sql,conn,1,1
%>

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

%> 
<table width="95%" border="1" align="center" cellpadding="3"   cellspacing="0"  bordercolor="#6D8DD8"  style="border-collapse:collapse"  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"><span class="STYLE1">类别</span></td>
	  <td align="center" nowrap class="STYLE1"><span class="STYLE1">标题</span></td>
      <td align="center" nowrap class="STYLE1">操 作</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="117" height="30" class="STYLE1"><div align="center"><%=formatdatetime(rs("fdate"),2)%></div></td>
      <td width="177" class="STYLE1"><div align="center"><%=left(rs("ftype"),9)%></div></td>
      <td width="663" class="STYLE1"><a href="javascript:open_notify(<%=rs("id")%>,'0');">&nbsp;<%=rs("title")%><a></td> 
	<td width="240" class="STYLE1">
	
	<div align="center">
	  
	 
	 <a href="modifyfile.asp?curpage=<%=curpage%>&id=<%=rs("id")%>"  target="_self" class="STYLE1">修改内容</a>&nbsp;&nbsp;
<a href="picture.asp?curpage=<%=curpage%>&id=<%=rs("id")%>"  target="_self" class="STYLE1">编辑图片</a>
	 
	 <a   href= "# " target="_self"   onclick= "javascript:if(confirm( '您真的要删除记录？ '))href= 'delete.asp?ftype=<%=ftype%>&curpage=<%=curpage%>&id=<%=rs("id")%>'; "> 删除 </a>&nbsp;      </div></td>
    </tr>
<%  rs.movenext
    next%>
</table>
  <br>
  <div>
  <div align="center"></div>
</div>
<div align="center" class="STYLE1">
<%if curpage=1 then%>
首页
<%else%>
<a href="?ftype=<%=ftype%>&curpage=1">首页</a>
<%end if%>

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

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

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