<!--#include file="../check.asp"--><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>商户后台 - 直接发货记录 (无实际交易支付)</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link type="text/css" rel="stylesheet" href="/css/reset.css" />
<link type="text/css" rel="stylesheet" href="/css/main.css" />
<link type="text/css" rel="stylesheet" href="/css/template_vendor.css" />
<script type="text/javascript" src="/scripts/common.js"></script>
<script type="text/javascript" src="/scripts/nav.js"></script>
<script type="text/javascript" src="/scripts/footerdock.js"></script>
</head>
<body>
<!--#include file="top.asp"-->

                <%


Action = Request("Action")

if Action="reback" then

num=trim(YeSqlStr(request("num"),3))
set rss=server.CreateObject("adodb.recordset")
rss.open "select * from [MirMoUrl1] Where num='"&num&"' and flag=2 and userid="&Session("Usr_userid")&"",conn,1,3	  	
		  if not rss.eof then
			Rss("flag")=0
			Rss.update
			Rss.close
			ErrStr="操作成功"
		  else
			ErrStr="操作失败"
		  end if
response.write "<script language='JavaScript'>{window.alert('"&ErrStr&"');window.location='"&Request.ServerVariables("HTTP_REFERER")&"';}</script>"

end if



Usr_userid=Session("Usr_userid")
Nowpage=cint(request.QueryString("page"))


startdate=ClearSQL(request("startdate"))
enddate=ClearSQL(request("enddate"))


'if startdate="" or isnull(startdate) then startdate=date()
'if enddate="" or isnull(enddate) then enddate=date()


wanjia=ClearSQL(request("wanjia"))




		   searchstr=""
		   dateparam="d"

		if Usr_userid<>"" then searchstr="userid='"&Usr_userid&"'"
		   
		if isdate(startdate) then 
			if not searchstr="" then searchstr=searchstr+" and "
			searchstr=searchstr+"datediff("&dateparam&",sendDate,'"&startdate&"')<=0"
		end if
		  	
		if isdate(enddate) then 
			if not searchstr="" then searchstr=searchstr+" and "
			searchstr=searchstr+"datediff("&dateparam&",sendDate,'"&enddate&"')>=0"
		end if
				
		if wanjia<>"" then 
		      if not searchstr="" then searchstr=searchstr+" and "
 		      searchstr=searchstr+"userName='"&wanjia&"'"
		end if

		if not searchstr="" then searchstr=searchstr+" and num like '1230321%'"
		if not searchstr="" then searchstr=" where "+searchstr

%>

	<div id="mainborder">
		<div id="main">
			
		<h3 class="bigico bigico_calendar">直接发货记录 (无实际交易支付)</h3>
		<div class="vspace"></div>

		<form method="post" action="paidlessdeliverylist.asp" id="ctl01">

<script src="/scripts/time.js" type="text/javascript"></script>

			<div class="fl">
				日期从 <input name="startdate" type="text" value="<%=startdate%>" id="fromDate" onclick="javascript:__calendar.setHook(this);" style="width:75px;" />
				到 <input name="enddate" type="text" value="<%=enddate%>" id="toDate" onclick="javascript:__calendar.setHook(this);" style="width:75px;" /> &nbsp;
				帐号ID <input name="wanjia" type="text" id="buyerOuterId" style="width:80px;" /> &nbsp;
				<input type="submit" name="search" value="搜索" id="search" class="button" style="width:50px;" />
				<div class="vspace"></div>
			</div>
			<div class="fr">
				<div class="vspace"></div>
				<!-- a href="paidlesslydeliver.asp" class="underline">新的直接发货</a -->
			</div>
			<div class="clear"></div>

			<div cellpadding="5" cellspacing="0" class="gridwrap">
				<table class="grid">
					<thead>
						<th width="110">时间</th>
						<th>分区</th>
						<th width="105">帐号ID</th>
						<th width="115">模拟支付金额</th>
						<th width="90">是否成功</th>
						<th width="100">操作</th>
					</thead>


<%
		   sqlInfo = "Select *,(select wooolName from [L_woool] where id=codeNum) as wooolName from MirMoUrl1 "&searchstr&" order by id desc"


		   set Rs=GrateRs(sqlInfo,1)
		   Rs.PageSize=15
		   if not Rs.eof then 
		   If Nowpage=0 then Nowpage=1
		   Rs.AbsolutePage=Nowpage
		   i=1
		   do while not Rs.eof and i<=Rs.pagesize
		   	
	If rs("flag")<>1 then
	result="<span style='color:Red'>否</span>"
	result2="<a href='?action=reback&num="&rs("num")&"' onClick=""return confirm('确定执行操作吗？')"">重发</a>"
	else
	result="<span style='color:Green'>是</span>"
	result2="<a class=""gray"">重发</a>"
	end if

		   %>
					


					
							<tr class="alt">
								<td><%=rs("sendDate")%></td>
								<td><%=rs("wooolName")%></td>
								<td><%=rs("userName")%></td>
								<td><%=rs("Money")%> <span class="gray">元</span></td>
								<td><%=result%></td>
								<td><%=result2%></td>
							</tr>


                <%
		   i=i+1
		   Rs.movenext
		   loop
		  %>

						
					<tr>
						<td colspan="7"><div id="p" class="p_left">
<%
  myurl="?wanjia="&wanjia&"&startdate="&startdate&"&enddate="&enddate&"&"

  response.write("<div class=""p_navigates""><a class=""aspNetDisabled p_current"" href='"&myurl&"page=1'>"&"首页</a></div>")
  if NowPage>1 then response.write("<div class=""p_navigates""><a class=""aspNetDisabled p_current"" href='"&myurl&"page="&Nowpage-1&"'>上一页</a></div>")
  if NowPage<Rs.PageCount then response.write("<div class=""p_navigates""><a class=""aspNetDisabled p_current"" href='"&myurl&"page="&Nowpage+1&"'>下一页</a></div>")
  response.write("<div class=""p_navigates""><a class=""aspNetDisabled p_current"" href='"&myurl&"page="&Rs.PageCount&"'>尾页</a></div>")

  response.write("<div class=""p_stat"">页数: <span class=""p_counter"">"&NowPage&"</span>/<span class=""p_counter"">"&Rs.PageCount&"</span>")

  response.write("&nbsp; &nbsp;记录数: <span class=""p_counter"">"&Rs.recordcount&"</span></div><div class=""clear""></div>")
		%>
</div></td>
					</tr>


  
                <%else%>
					<tr id="zero">
	<td colspan="6" class="t3">没有符合条件的记录。</td>
</tr>

                        
   
                <%end if%>

				</table>
			</div>
		</form>
	
		</div>
	</div>
</div>

</body>
</html>
