<% userPageRights="{plane}" %>
<!--#include file="check.asp"-->
<!--#include file="../Include/Char.asp" -->
<%
'Define Variable 
dim i
dim rs,rs1,rst
dim mCityName,mGrade,mSql

'Delect Records
if request("action")="delete" then
  mSql = "DELETE FROM Plane_OrderTicket WHERE F_ID=" &Request.QueryString("CityID")
  conn.execute mSql
  Response.Redirect "ClientOrderManage2.asp"
end if

'确定
if Request.Querystring("action")="Confirm" then
  mSql="Update Plane_OrderTicket set F_IsConfirm=0 Where F_ID="&Request.QueryString("ID")
  conn.Execute(mSql)
  Response.Redirect "ClientOrderManage2.asp"
end if
%>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../Files/Style.css" rel="stylesheet" type="text/css">
<SCRIPT language="JavaScript">
function jDelete(url)
{
  if((confirm(" 警告:请确定是否删除,删除后不能恢复! "))==true) 
	self.location=url+'&action=delete';
}
</SCRIPT>


</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="44%"><b>功能：[已确认客户订单管理]</b></td>
    <td width="81%" align="right">&nbsp;</td>
  </tr>
</table>
<table width="96%" border="0" cellspacing="1" cellpadding="1" align="center">
  <tr bgcolor="#CCCCCC" align="center"> 
    <td height="11" width="17%"><b><font color="#FFFFFF">姓名</font></b></td>
    <td width="10%"><b><font color="#FFFFFF">终点站</font></b></td>
    <td width="12%"><b><font color="#FFFFFF">班期</font></b></td>
    <td width="7%"><b><font color="#FFFFFF">票价</font></b></td>
    <td width="7%"><b><font color="#FFFFFF">数量</font></b></td>
    <td width="7%"><b><font color="#FFFFFF">合计</font></b></td>
    <td width="18%"><b><font color="#FFFFFF">订购时间</font></b></td>
    <td width="7%"><b><font color="#FFFFFF">确认</font></b></td>
    <td width="8%"><b><font color="#FFFFFF">打印</font></b></td>
    <td height="11"><b><font color="#FFFFFF">管理</font></b></td>
  </tr>
</table>
<% 
	Set rs=Server.createobject("Adodb.RecordSet")
    pageno=request.querystring("pageno")
    pmcount=20  
	mSql="Select * From Plane_OrderTicket Where F_IsConfirm=1 order by F_Addtime Desc"
	rs.open mSql,conn,1,1
	if rs.eof then
	   response.write "<p align=center><font color=red><B> 暂无数据！</B></font></p>"
    	  'response.end
    else
	
    rs.pagesize=pmcount
    mpage=rs.pagecount
    if isempty(pageno) or cint(pageno)<1 or cint(pageno)>mpage then
        pageno=1
    end if
   rs.absolutepage=pageno
 Dim rc,re
 rc=rs.pagesize
 re=1
 do while not rs.eof and rc>0
%>
<table width="96%" border="0" cellspacing="1" cellpadding="1" align="center">
  <tr bgcolor="f2f2f2"> 
    <td height="20" width="17%" align="center"><%=rs("F_RealName")%></td>
    <td width="10%" align="center" bgcolor="f2f2f2"> <%=rs("F_EndStation")%></td>
    <td width="12%" align="center" bgcolor="f2f2f2"><%response.write trim(rs("F_Year"))+"/"+Trim(rs("F_Month"))+"/"+Trim(rs("F_Day"))+":"+Trim(rs("F_Week"))%></td>
    <td width="7%" align="center" bgcolor="f2f2f2"><%=rs("F_MemberPrice")%></td>
    <td width="7%" align="center" bgcolor="f2f2f2"><%=rs("F_OrderNumber")%></td>
    <td width="7%" align="center" bgcolor="f2f2f2"><%=rs("F_TotalAmount")%></td>
    <td width="18%" align="center" bgcolor="f2f2f2"><%=rs("F_Addtime")%></td>
    <td width="7%" align="center" bgcolor="f2f2f2"><a href="ClientOrderManage2.asp?action=Confirm&ID=<%=rs("F_ID")%>">取消</a></td>
    <td width="8%" align="center" bgcolor="f2f2f2"><a href="../Tour/Plane_Print.asp?ID=<%=rs("F_ID")%>" target="_blank">打印</a></td>
    <td height="20" align="center"> <a href="javascript:jDelete('ClientOrderManage2.asp?CityID=<%=rs("F_ID")%>&Page=<%=cstr(pageno)%>')">删除</a></td>
  </tr>
</table>
<%
 rs.movenext
 re=re+1
 rc=rc-1
 loop

%>
<table width="96%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#f6f6f6">
  <tr> 
    <td width="35%" height="22">[共<font color=red><%=rs.recordcount %></font>条记录 
      当前第<font color=red><%=pageno %></font>页/共<font color=red><%=mpage %></font>页] 
    </td>
    <td width="65%" align="right"> 
      <%if pageno>1 then
   response.write "<a href='ClientOrderManage2.asp'>[首 页]</a>"
  else
   response.write "[首 页]"
  end if
%>
      <%if pageno>1 then
   response.write "<a href='ClientOrderManage2.asp?pageno="&pageno-1&"'>[上一页]</a>"
  else
   response.write "[上一页]"
  end if
%>
      [ 
      <%
add=5'数字分页个数+1
if pageno-int(add/2)<=1 then m=1 else m=pageno-int(add/2)
if m+add>mpage then 
   n=mpage
   if mpage-add<=1 then m=1 else m=mpage-add
 else
   n=m+add
end if
for pno=m to n
 if pno=cint(pageno) then
  response.write "&nbsp;<font color=red>"&pno&"</font>"
 else

   response.write "<b>&nbsp;<a href='ClientOrderManage2.asp?pageno="&pno&"'>"&pno&"</a></b>"
 end if
next
response.write "&nbsp"
%>
      ] 
      <%
 if int(pageno) < int(rs.pagecount) then
   response.write "<a href='ClientOrderManage2.asp?pageno="&pageno+1&"'>[下一页]</a>"
 else 
   response.write "[下一页]"
 end if
%>
      <%if int(pageno) < int(rs.pagecount) then
   response.write "<a href='ClientOrderManage2.asp?pageno="&mpage&"'>[末 页]</a>"
  else
   response.write "[末 页]"
  end if
  
  
end if
%>
    </td>
  </tr>
</table> 
<hr size="1" width="96%">
</body>
</html>
