<!--#include file="conn.asp"-->
<!--#include file="config.asp"-->
<%

webtitle="发货清单"
webkeywords="发货清单"
webdescription="发货清单|"&webname
%> 


<!--#include file="include/header.asp"--> 
<%
dim selectm,selectkey,selectid
selectkey=trim(request.form(trim("selectkey")))
if selectkey="" then
selectkey=FormatSQL(request.QueryString("selectkey"))
end if

%>
<SCRIPT LANGUAGE="JavaScript">
<!--
function search()
{
   if(checkspace(document.searchemsform.searchkey.value))  {
	document.searchemsform.searchkey.focus();
	alert("请输入查询关键字！");
	return false;
  }
   document.searchemsform.submit();
}

//-->
</script>
<TABLE width="980" BORDER="0" CELLSPACING="0" CELLPADDING="0" class=table-zuoyou align="center" bgcolor="#FFFFFF">
<TR><TD HEIGHT="30" bgcolor="#f1f1f1" width="100" class=table-xia>&nbsp;<font color="#999999"><b>您的位置：</b></FONT></TD>
<td bgcolor="#FFFFFF" class=table-xia>&nbsp;<a href="index.asp"><b><%=webname%></b></a>&nbsp;-&gt;&nbsp;<a href="emslist.asp">发货清单</a></td></TR></table>




<TABLE width="980" BORDER="0" CELLSPACING="0" CELLPADDING="0" class=table-zuoyou align="center" bgcolor="#FFFFFF">
 <TR>





<TD  VALIGN="TOP" >
   <TABLE WIDTH="98%" BORDER="0" ALIGN="center" CELLPADDING="2" CELLSPACING="2" class=table-zuoyou   >
	<TR> 
          <td  class=table-xia ALIGN="CENTER"><a href="http://www.EMS.com.cn" target=_blank><img src="images/EMS.gif" border="0"  WIDTH="900"></a> </td>
      </TR>	
        
      </TABLE>
  <TABLE WIDTH="98%" BORDER="0" ALIGN="center" CELLPADDING="2" CELLSPACING="2" class=table-zuoyou  >
	<TR>  <form name="searchemsform" method="post" action="searchemslist.asp" >
          <td  class=table-xia ALIGN="CENTER"><input class=shopinput1 name="searchkey" type="text" size="20" maxlength="20" value="关键字"  onFocus="this.value='' ">  
                   格式：YYYY-MM-DD <input class=shopinput1 type="submit" name="Submit2" value="立即查询" onClick="return search();" > </td>
      </TR>	
        	
		</form>	
      </TABLE>
   <TABLE WIDTH="98%" BORDER="0" ALIGN="center" CELLPADDING="2" CELLSPACING="2"  bgcolor="#f1f1f1">
	<TR bgcolor="#ffffff" HEIGHT="30"> 
          <td WIDTH="15%"  ALIGN="CENTER"><b>发货日期</b> </td>
            <td WIDTH="15%"  ALIGN="CENTER"><b>收货人</b></td>
            <td WIDTH="20%"  ALIGN="CENTER"><b>发货方式 </b></td>
             <td WIDTH="20%" ALIGN="CENTER"><b>发货单号</b></td>
            <td WIDTH="30%"  ALIGN="CENTER"><b>收货人地址 </b></td>
            
        </TR>	
        
     


      <%
				Const MaxPerPage=10
   				dim totalPut   
   				dim CurrentPage
   				dim TotalPages
   				dim j
   				dim sql
    			if Not isempty(SafeRequest("page",1)) then
      				currentPage=Cint(SafeRequest("page",1))
   				else
      				currentPage=1
   				end if 
 set rs=server.CreateObject("adodb.recordset")


		  rs.open "select  dvydate,count(*) as emsid  from sdx_ems group by dvydate order by  dvydate desc  ",conn,1,1


		  
				if err.number<>0 then
				response.write ""
				end if
				if rs.eof And rs.bof then
       				Response.Write "<p align='center'> 对不起，目前还没有货单！</p>"
  				
   				else
	  				totalPut=rs.recordcount

      				if currentpage<1 then
          				currentpage=1
      				end if

      				if (currentpage-1)*MaxPerPage>totalput then
	   					if (totalPut mod MaxPerPage)=0 then
	     					currentpage= totalPut \ MaxPerPage
	   					else
	      					currentpage= totalPut \ MaxPerPage + 1
	   					end if
      				end if

       				if currentPage=1 then
            			showContent
            			showpage totalput,MaxPerPage,"emslist.asp"
       				else
          				if (currentPage-1)*MaxPerPage<totalPut then
            				rs.move  (currentPage-1)*MaxPerPage
            				dim bookbrand
            				bookbrand=rs.bookbrand
            				showContent
             				showpage totalput,MaxPerPage,"emslist.asp"
        				else
	        				currentPage=1
           					showContent
           					showpage totalput,MaxPerPage,"emslist.asp"
	      				end if
	   				end if
   				   				end if

   				sub showContent
       			dim i
	   			i=0

			%>
      <%do while not rs.eof%>

  <TR bgcolor="#ffffff" HEIGHT="30"> 
        <td   ALIGN="CENTER" colspan="5"><FONT COLOR=#930000><b><%=trim(rs("dvydate"))%> <b></FONT> </td>    
        </TR>
    <TR bgcolor="#ffffff"> 
          <td class=table-xia colspan="5"  ALIGN="CENTER">

       
        <TABLE WIDTH="98%" BORDER="0" ALIGN="center" CELLPADDING="2" CELLSPACING="2"  bgcolor="#f1f1f1">
      
                <% set rs1=server.CreateObject("adodb.recordset")
		  rs1.open "select  * from sdx_ems where  dvydate like '%"&rs("dvydate")&"%' ",conn,1,1

do while not rs1.eof
    %>
        
          
        
         <TR bgcolor="#ffffff" HEIGHT="30"> 
          <td WIDTH="15%"  ALIGN="CENTER"><%=trim(rs1("dvydate"))%> </td>
            <td WIDTH="15%"  ALIGN="CENTER"><%=trim(rs1("username"))%></td>
            <td WIDTH="20%"  ALIGN="CENTER"><a href="<%=trim(rs1("emsurl"))%>" target=_blank><%=trim(rs1("deliverymethord"))%></a> </td>
             <td WIDTH="20%"  ALIGN="CENTER"><font color="#0000ff"><%=trim(rs1("emsnum"))%></font> </td>
            <td WIDTH="30%"  ALIGN="CENTER"><%=trim(rs1("address"))%> </td>
            
        </TR>
      <%               all=rs1.recordcount
			rs1.movenext
			loop
			rs1.close
			set rs1=nothing
        %>
         </TABLE>
     
         
        
      </td>
            
        </TR>
      
      
      <%      i=i+all

               
                     
                   
			if i>=MaxPerPage then Exit Do

                       
			rs.movenext
			loop
			rs.close
			set rs=nothing%>

       

   <TR bgcolor="#ffffff"> 
          <td class=table-xia colspan="5" ALIGN="CENTER">
      <%  
				End Sub   
  
				Function showpage(totalnumber,maxperpage,filename)  
  				Dim n
  				
				If totalnumber Mod maxperpage=0 Then  
					n= totalnumber \ maxperpage  
				Else
					n= totalnumber \ maxperpage+1  
				End If %>
				<form method=Post action=<%=filename%>>
				<p align="center">
				<%
				If CurrentPage<2 Then  %>
				<span class=page>首 页</span> <span class=page>上一页</span>
				<% Else  %>
				<a href=<% = filename %>?page=1><span class=page>首 页</span></a>
				<a href=<% = filename %>?page=<% = CurrentPage-1 %>><span class=page>上一页</span></a> 
				<% End If 
				If n-currentpage<1 Then  %>
				<span class=page>下一页</span><span class=page>末 页</span>
				<%  Else  %>
				<a href=<% = filename %>?page=<% = (CurrentPage+1) %>><span class=page>下一页</span></a> 
				<a href=<% = filename %>?page=<% = n %>><span class=page>末 页</span></a>
				<% End If  %>
				 第 <b><% = CurrentPage %></b> 页 共 <b><% = n %></b> 页
				共&nbsp;<b><% = totalnumber %></b>&nbsp;条　每页 <b><% = maxperpage %></b> 条
				转到第：<input type='text' name='page' size=2 maxlength=10 class=smallInput value=<% = currentpage %>>
				页<input type='submit'  class='contents' value='跳转' name='cndok'></form>
				<%
				End Function  
			%>
    </td>
            
        </TR>


 <TR bgcolor="#ffffff"> 
          <td class=table-xia colspan="5" style='PADDING-LEFT: 20px'>
 <br><b>注意事项：</b>
<p>&nbsp;&nbsp;&nbsp;&nbsp;客户如收到货物时发现包装纸箱有被拆开过的痕迹，可拒绝签收邮件!客户请务必本人签收货物并当场拆包检查机器与配件无误再允许邮政投递员离开! </p> 
 



 </td>
            
        </TR>
</TABLE>
  </TD>
  </TR>
</TABLE>
<!--#include file="include/footer.asp"--> 