
<title><%=webname%>--发货通知</title> 
<%
Dim Intcatid,strOrder,strcat,strcategory
Intcatid = 0
Intcatid=SafeRequest("catid",1)
strcat = "<a href=chknews.asp>综合新闻</a>"
 set rs=server.CreateObject("adodb.recordset")
If Intcatid <> 0 Then
rs.open "select category from category where categoryid="&Intcatid&" ",conn,1,1 
strcategory = trim(rs("category"))
rs.close 
strcat = strcat &"－><a href=chknews.asp?catid="&Intcatid&" target=_blank>"& strcategory &"</a> "
Else

End If
%>
<%
				Const MaxPerPage=20
   				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 
	'If Intcatid = 0 Then
	'rs.open "select newsid,newsname,newscontent,addname,adddate from news Order By adddate desc",conn,1,1
	'Else
	'rs.open "select newsid,newsname,newscontent,addname,adddate from news Where categoryid = "& Intcatid &" Order By adddate desc ",conn,1,1
	'End If
	rs.open "select * from SendGoodsMsg Order by ID desc",conn,1,1
				
  				if rs.eof And rs.bof then
       				Response.Write "<p align='center' class='contents'> 您还没有添加新闻！</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,"fhtz.asp"
       				else
          				if (currentPage-1)*MaxPerPage<totalPut then
            				rs.move  (currentPage-1)*MaxPerPage
            				dim bookmark
            				bookmark=rs.bookmark
            				showContent
             				showpage totalput,MaxPerPage,"fhtz.asp"
        				else
	        				currentPage=1
           					showContent
           					showpage totalput,MaxPerPage,"fhtz.asp"
	      				end if
	   				end if
   				   				end if

   				sub showContent
       			dim i
	   			i=0

			%> 
<TABLE WIDTH="98%" BORDER="0" align="center" CELLPADDING="5" CELLSPACING="1" bgcolor="#f2f2f2">
<TR ALIGN="center" bgcolor="#f7f7f7" height=30> 
<TD width="22%"><strong>用户名</strong></TD>
<TD width="26%"><strong>配送单位</strong></TD>
<TD width="28%"><strong>发货单号</strong></TD>
<TD width="24%"><strong>发货日期</strong></TD>
</TR> 
<%do while not rs.eof%>
 <TR bgcolor="#FFFFFF" height=25>
 <TD align="left" onmouseover="this.style.backgroundColor='#f2f2f2'; this.style.color='#ff0000' " onmouseout="this.style.backgroundColor='';this.style.color=''">
<% = rs("RecevieName") %></TD>
 <TD align="center" onmouseover="this.style.backgroundColor='#f2f2f2'; this.style.color='#ff0000' " onmouseout="this.style.backgroundColor='';this.style.color=''"> <%=trim(rs("SendCompany"))%></TD>
 <TD align="center" onmouseover="this.style.backgroundColor='#f2f2f2'; this.style.color='#ff0000' " onmouseout="this.style.backgroundColor='';this.style.color=''"><%=rs("OrderNO")%></TD>
 <TD align="center" onmouseover="this.style.backgroundColor='#f2f2f2'; this.style.color='#ff0000' " onmouseout="this.style.backgroundColor='';this.style.color=''"><%=rs("SendDate")%></TD>
 </TR> 
<%i=i+1
			if i>=MaxPerPage then Exit Do
			rs.movenext
		  loop
		  rs.close
		  set rs=nothing%><tr bgcolor="#FFFFFF"><td colspan="4"><%  
				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 %>
				
	  <br>
	  <form method=Post action= <% = filename %>>
		<p align='center'> 
		  <%
				If CurrentPage<2 Then  %>
		  首 页 上一页
		  <%
				Else   %>
		  <a href=<% = filename %>?page=1>首 页</a>
		  <a href=<% = filename %>?page=<% = CurrentPage-1 %>>上一页</a>
		  <%
				End If	
				If n-currentpage<1 Then  %>
		  下一页 末 页
		  <%
				Else   %>
		  <a href=<% = filename %>?page=<% = (CurrentPage+1) %>>下一页</a>
		  <a href=<% = filename %>?page=<% = n %>>末 页</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></TABLE>
<script language=javascript>
function mm()
{
   var a = document.getElementsByTagName("input");
   if(a[0].checked==true){
   for (var i=0; i<a.length; i++)
      if (a[i].type == "checkbox") a[i].checked = false;
   }
   else
   {
   for (var i=0; i<a.length; i++)
      if (a[i].type == "checkbox") a[i].checked = true;
   }
}
</script>