<!--#include file="../checkLogin.asp"-->
<!--#include file="../SQLconn.asp"-->
<!doctype html>
<html>
<head><title></title><meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script src="../laydate/laydate.js"></script>
<link rel="stylesheet" type="text/css" href="../images/<%=request.cookies("imgdir")%>/css/style.css" media="all"/>
<style type="text/css">
<!--
.STYLE3 {color: #990033}
-->
</style>
<body>

<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="ShenQing.asp" target="_self">用车申请</a></li>
            <li class="on">我的申请</li>
            <li><a href="shenpilist.asp" target="_self">申请审批</a></li>
			<li><a href="ShenPiComplete.asp" target="_self">我的审批</a></li>
			          
        </ul>
    </div>	
	</td>
  </tr>

  <tr>
   <td height="470" valign="top"   class="NemuMainBox">
          
	<br>
<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")

 strdate1=request("date1")
 strdate2=request("date2")
 title=request("title")

 if strdate1="" then 
   strdate1=date()-150
 end if
 if strdate2="" then 
   strdate2=date()
  
 end if


 
	 
   sql="Select * from ShenQingChe where   (申请日期 BETWEEN '"&strdate1&"'  AND   '"&dateadd("d",1,strdate2)&"') AND (标题 like  '%"&title&"%')  and    (申请人 ='"&tname&"')  order by   id  desc"
   set rs=Server.CreateObject("Adodb.Recordset")
   rs.open sql,conn,1,1
%>
 
<%
rs.pagesize=11 '每页记录条数
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" style="border-collapse:collapse"  class="mtablehui">
  <tr style="background-color:#D6E4FF"  class="TableHeader">
    <td height="30" colspan="3" align="center" nowrap class="NemuNot">

	<table   border="0" align="center" cellspacing="0">
      <tr><FORM ACTION="ShenQingList.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  placeholder="请输入日期"  style="width:90px"  value=<%=strdate1%> class="laydate-icon" onClick="laydate()">
        </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  placeholder="请输入日期"  style="width:90px"  value=<%=strdate2%> class="laydate-icon" onClick="laydate()">
        </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="78" class="STYLE1 STYLE2"><input name="Submit" type="submit" class="topanniu" value="搜索" /></td>
     </FORM> </tr>
    </table>
	
	</td>
  </tr>
</table>
<table width="881" height="7" border="0">
  <tr>
    <td height="3"></td>
  </tr>
</table>
  <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="27" align="center" nowrap class="STYLE1">组织部门</td>  
	  <td align="center" nowrap class="STYLE1"><span class="STYLE1">申请标题<%=fid%></span></td>  	  
      <td align="center" nowrap class="STYLE1">请示日期</td>
      <td align="center" nowrap class="STYLE1"><span class="STYLE1">审批人</span></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="10%" height="28" class="STYLE1"><div align="center"><%=rs("组织部门")%></div></td>
	 
      
      <td  width="52%" class="STYLE1">
	  <a href="javascript:open_notify(<%=rs("id")%>,'0');">&nbsp;<%=rs("标题")%><a></td> 
	  <td width="11%" class="STYLE1"><div align="center"><%=rs("申请日期")%></div></td>
	  <td width="13%" class="STYLE1">
	  <div align="center">
	  

<%      shenpi=""
		set rssee=Server.CreateObject("Adodb.Recordset")
		seesql="select * from ShenQingChuLi  where fid ='"&rs("id")& "'   order by 审批人"
		rssee.open seesql,conn,1
		while not rssee.eof and not rssee.bof
		%>		
		<%if  rssee("审批完成")="未审批" then   %>		
		   <%=rssee("审批人")%>&nbsp;
       <%else %>	
	      <span  style="color:#0000FF"><%=rssee("审批人")%>完成</span>&nbsp;
		  
	   <%
	   shenpi="已审批"
	   end if%>		
		<%
		rssee.movenext
		wend		
		rssee.close
		set rssee=nothing 			
		%>  
	  
	  
	  </div>	 
	  
	  
	  
	  
	  
	  
	  </td>
	<td width="14%" class="STYLE1">
	
	<div align="center">
	
	 <%if shenpi="" then   %>	
	    <a href="modifyfile.asp?curpage=<%=curpage%>&id=<%=rs("id")%>"  target="main" class="STYLE1">修改</a>&nbsp;	 
	    <a   href= "# "   onclick= "javascript:if(confirm( '您真的要删除记录？ '))href= 'delete.asp?ftype=<%=strftype%>&curpage=<%=curpage%>&id=<%=rs("id")%>'; "> 删除 </a></div>
		<%	else %>	
		<div align="center">
	 <a href="SendTo.asp?curpage=<%=curpage%>&id=<%=rs("id")%>"  target="main" class="STYLE1">向上级递交</a>&nbsp;
	</div>
	 <% end if%>		
	 
	 
	 </td>
    </tr>
<%  rs.movenext
    next%>
</table>
 
 
   
<label></label>
<table width="100%" border="1" align="center" cellpadding="3"   cellspacing="0"  bordercolor="#6D8DD8" style="border-collapse:collapse" class="mtable">
</table>
</div> <br>
<div align="center" class="STYLE1">
<%if curpage=1 then%>
首页
<%else%>
<a href="?date1=<%=strdate1%>&date2=<%=strdate2%>&ftype=<%=strftype%>&curpage=1">首页</a>
<%end if%>

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

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

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

	     
                </p></td>
  </tr>
</table>
</body>
</html>
