buyuser.asp
上传用户:qyswxdl
上传日期:2013-06-01
资源大小:1373k
文件大小:11k
源码类别:

家庭/个人应用

开发平台:

ASP/ASPX

  1. <!--#include file="../checkpost.asp"-->
  2. <!--#include file="articleconn.asp"-->
  3. <!--#include file="home1.asp"-->
  4. <!--#include file="security.asp"-->
  5. <%if session("flag")>3 then
  6.     response.write "<br><p align=center>您的操作权限不够!</p>"
  7.     response.end
  8. end if
  9. %>
  10. <html>
  11. <head>
  12. <meta http-equiv="Content-Language" content="zh-cn">
  13. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  14. <meta name="GENERATOR" content="Microsoft FrontPage 5.0">
  15. <meta name="ProgId" content="FrontPage.Editor.Document">
  16. <link rel="stylesheet" type="text/css" href="inc/Admin_STYLE.CSS">
  17. <title>订单管理页</title>
  18. </head>
  19. <body leftmargin="0" topmargin="0">
  20. <script language="javascript">
  21. <!--
  22. function winopen(url)                    
  23.      {                    
  24.         window.open(url,"search","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=yes,width=540,height=380,top=1,left=1");                    
  25.       }
  26. function MM_openBrWindow(theURL,winName,features) { //v2.0
  27.   window.open(theURL,winName,features);
  28. }
  29. //-->
  30. </script>
  31. <script language="javascript">
  32. <!--
  33. function emailopen(url)                    
  34.      {                    
  35.         window.open(url,"search","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=yes,width=500,height=350,top=1,left=1");                    
  36.       }
  37. function MM_openBrWindow(theURL,winName,features) { //v2.0
  38.   window.open(theURL,winName,features);
  39. }
  40. //-->
  41. </script>
  42. <%
  43.    MaxPerPage=20
  44.    dim totalPut   
  45.    dim CurrentPage
  46.    dim TotalPages
  47.    dim i,j
  48.    dim money
  49.    money=0
  50.    dim typename
  51.    
  52.    typename=""
  53.    if not isempty(request("page")) then
  54.       currentPage=cint(request("page"))
  55.    else
  56.       currentPage=1
  57.    end if
  58.    dim sql
  59.    dim rs
  60.    dim rstype
  61.    dim typesql
  62.    dim typeid,typename1
  63.    if not isEmpty(Replace(request("typeid"), "'", "''")) then
  64. typeid=Replace(request("typeid"), "'", "''")
  65.    else
  66. typeid=0
  67.    end if
  68.   
  69. %>
  70. <!--#include file="top1.asp"-->
  71. <%
  72.  if request("name23")="" and request("date01")="" and request("date02")="" then
  73.  sql="select * from buy where baoyue=1 order by id desc"
  74.  else if request("name23")<>"" and request("date01")="" and request("date02")="" then
  75.  sql="select * from buy where baoyue=1 and userid like '%"&request("name23")&"%'"
  76.   else if request("date01")<>"" and request("date02")<>"" then
  77.    sql="select * from buy where baoyue=1 and datetime>='"&request("date01")&"' and datetime<='"&request("date02")&"' "
  78.  end if
  79.  end if
  80.  end if
  81.  Set rs= Server.CreateObject("ADODB.Recordset")
  82.  rs.open sql,conn,1,1
  83.   if rs.eof and rs.bof then
  84.        response.write "<p align='center'> 还 没 有 任 何 购 买 会 员</p>"
  85.    else
  86.   totalPut=rs.recordcount
  87.       totalPut=rs.recordcount
  88.       if currentpage<1 then
  89.           currentpage=1
  90.       end if
  91.       if (currentpage-1)*MaxPerPage>totalput then
  92.    if (totalPut mod MaxPerPage)=0 then
  93.      currentpage= totalPut  MaxPerPage
  94.    else
  95.       currentpage= totalPut  MaxPerPage + 1
  96.    end if
  97.       end if
  98.        if currentPage=1 then
  99.            showpage totalput,MaxPerPage,"buyuser.asp"
  100.             showContent
  101.             showpage totalput,MaxPerPage,"buyuser.asp"
  102.        else
  103.           if (currentPage-1)*MaxPerPage<totalPut then
  104.             rs.move  (currentPage-1)*MaxPerPage
  105.             dim bookmark
  106.             bookmark=rs.bookmark
  107.            showpage totalput,MaxPerPage,"buyuser.asp"
  108.             showContent
  109.              showpage totalput,MaxPerPage,"buyuser.asp"
  110.         else
  111.         currentPage=1
  112.            showpage totalput,MaxPerPage,"buyuser.asp"
  113.            showContent
  114.            showpage totalput,MaxPerPage,"buyuser.asp"
  115.       end if
  116.    end if
  117.    end if
  118.         
  119.   
  120.    sub showContent
  121.        dim i
  122.    i=0
  123.   %> <center>
  124.   <font color=#FF0000><b>包月会员订单管理</b></font><br>
  125.   <a href="buyuser01.asp"><font color=#ffffff><font color="#000000">查看未处理的订单</font></font></a><font color="#000000">  <a href="buyuser02.asp"> 
  126.   查看已处理订单</a></font><br>
  127.   <table border="0" cellspacing="1" width="100%" class="border" cellpadding="2" height="33" style="border-collapse: collapse" bordercolor="#111111">
  128.     <tr bgcolor="#429AEF"> 
  129.       <td width="62" height="20" align="center"><font color="#FFFFFF">用户名</font></td>
  130.       <td width="66" height="20" align="center"><font color="#FFFFFF">姓<span lang="en-us">&nbsp;&nbsp;&nbsp; 
  131.         </span>名</font></td>
  132.       <td width="39" height="20" align="center"><font color="#FFFFFF">天<span lang="en-us"> 
  133.         </span>数</font></td>
  134.       <td width="66" align="center"><font color="#FFFFFF">购买等级</font></td>
  135.       <td width="61" height="20" align="center"><font color="#FFFFFF">应收金额</font></td>
  136.       <td width="80" height="20" align="center"><font color="#FFFFFF">付款方式</font></td>
  137.       <td width="57" height="20" align="center"><font color="#FFFFFF">代理会员</font></td>
  138.       <td width="94" height="20" align="center"> <p align="center"><font color="#FFFFFF">购买时间</font></td>
  139.       <td width="50" height="20" align="center"><font color="#FFFFFF">回复会员</font></td>
  140.       <td width="42" height="20" align="center"><font color="#FFFFFF">处理</font></td>
  141.       <td width="45" height="20" align="center"><font color="#FFFFFF">操作</font></td>
  142.     </tr>
  143.    <%do while not rs.eof%>
  144.     <form method="POST" action="userbuyserver.asp?id=<%=rs("id")%>&userid=<%=rs("userid")%>&askmejoin=<%=rs("askmejoin")%>">
  145.      
  146.       <tr bgcolor="#E1F4EE"> 
  147.         <td width="62" height="4"> 
  148.           <p align="center"> 
  149.             </a><a href="useredit.asp?userid=<%=rs("userid")%>"><font color="#0000FF"><u><%=rs("userid")%></u></font></a>
  150.             <input type="hidden" name="id" value="<%=rs("id")%>">
  151. </td>
  152.         <td width="66" height="4" align="center"><%=rs("name")%></td>
  153.         <td width="39" height="4" align="center"> 
  154.           <input type="text" name="money" size="3" value="<%=rs("money")%>"></td>
  155.         <td width="66" align="center"> 
  156.         <% select case rs("oklook")
  157.     case 1
  158. response.write"普通会员"
  159. case 2
  160. response.write"白银会员"
  161. case 3
  162. response.write"黄金会员"
  163. case 4
  164. response.write"钻石会员"
  165.    end select
  166. %>        </td>
  167.         <td width="61" height="4" align="center">&yen;<%=rs("paymoney")%>
  168.           <input type="hidden" name="paymoney" value="<%=rs("paymoney")%>">
  169. 元</td>
  170.         <% money=money+rs("paymoney") %>
  171.         <td width="80" height="4" align="center"><%=rs("giveme")%></td>
  172.         <td width="57" height="4" align="center"> <% if rs("askmejoin")<>"" then%> <%=rs("askmejoin")%> <%else%> 没有 <%end if%>
  173.           <input type="hidden" name="askmejoin" size="1" value="<%=rs("askmejoin")%>">
  174.           <input type="hidden" name="oklook" size="1" value="<%=rs("oklook")%>"></td>
  175.         <td width="94" height="4" align="center"> <%=month(rs("datetime"))%>月<%=day(rs("datetime"))%>日<%=hour(rs("datetime"))%>时</td>
  176.         <td width="50" height="4" align="center" bgcolor="#E1F4EE"> <a href="javascript:emailopen('sendmail.asp?email=<%=rs("email")%>')">回复</a></td>
  177.         <td width="42" height="4"><p align="center"> <% if rs("pay")=0 then %>
  178.             <input type="submit" value="确认" name="add">
  179.             <% else if rs("pay")=1 then
  180. response.write"已处理"
  181. end if
  182.    end if
  183. %></td>
  184.         <td width="45" height="4"><p align="center"> <% if rs("pay")=0 then %>
  185.             <input type="submit" value="删除" name="del">
  186.             <% else if rs("pay")=1 then
  187. response.write"已付款"
  188.    end if
  189.    end if
  190. %></td>
  191.       </tr>
  192.     </form>
  193.        <% i=i+1
  194.       if i>=MaxPerPage then exit do
  195.       rs.movenext
  196.    loop
  197.   %>
  198.   </table>
  199. </center>
  200. <%
  201.    end sub 
  202. function showpage(totalnumber,maxperpage,filename)
  203.   dim n
  204.   if totalnumber mod maxperpage=0 then
  205.      n= totalnumber  maxperpage
  206.   else
  207.      n= totalnumber  maxperpage+1
  208.   end if
  209.   response.write "<p align=""center""><form method=Post action="&filename&"?typeid="&typeid&">"
  210.     if CurrentPage<2 then
  211.     response.write "<font color='#000080'>首页 上一页</font>&nbsp;"
  212.   else
  213.     response.write "<a href="&filename&"?page=1&typeid="&typeid&">首页</a>&nbsp;"
  214.     response.write "<a href="&filename&"?page="&CurrentPage-1&"&typeid="&typeid&">上一页</a>&nbsp;"
  215.   end if
  216.   if n-currentpage<1 then
  217.     response.write "<font color='#000080'>下一页 尾页</font>"
  218.   else
  219.     response.write "<a href="&filename&"?page="&(CurrentPage+1)&"&typeid="&typeid&">"
  220.     response.write "下一页</a> <a href="&filename&"?page="&n&"&typeid="&typeid&">尾页</a>"
  221.   end if
  222.    response.write "<font color='#000080'>&nbsp;页次:</font><strong><font color=red>"&CurrentPage&"</font><font color='#000080'>/"&n&"</strong>页</font> "
  223.     response.write "<font color='#000080'>&nbsp;共<b>"&totalnumber&"</b>个订单 <b>"&maxperpage&"</b>个订单/页</font> "
  224.    response.write " <font color='#000080'>转到:</font><input type='text' name='page' size=4 maxlength=10 class=smallInput value="&currentpage&">"
  225.    response.write " <input class=buttonface type='submit'  value='Goto'  name='cndok'></span></p></form></p>"
  226.        
  227. end function
  228.    rs.close
  229.    set rs=nothing  
  230.    conn.close
  231.    set conn=nothing
  232.   %>
  233. <form method="POST" action="buyuser.asp">
  234.   <table class="border" width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  235.     <tr class="title"> 
  236.       <td align="center" height="22" valign="middle"><font color="#FF0000"><b>按用户名查询</b></font></td>
  237.     </tr>
  238.     <tr class="tdbg"> 
  239.       <td align="center" height="19" valign="middle"><font color="#000000">用户名: 
  240.         <input type="text" name="name23" size="20">
  241.         <input name="submit" type="submit" value="查询">
  242.         </font></td>
  243.     </tr>
  244.   </table>
  245. </form>
  246. <form method="POST" action="buyuser.asp">
  247.   <table class="border" width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  248.     <tr class="title"> 
  249.       <td align="center" height="22" valign="middle"><font color="#FFFFFF"><b><font color="#FF0000">按日期查询(输入格式:年-月-日)</font></b></font></td>
  250.     </tr>
  251.     <tr class="tdbg"> 
  252.       <td align="center" height="19" valign="middle"><font color="#FFFFFF"> <font color="#000000">起始日期: 
  253.         <input type="text" name="date01" size="20">
  254.           终止日期:</font></font> <font color="#000000"> 
  255.         <input type="text" name="date02" size="20">
  256.         <input name="submit2" type="submit" value="查询">
  257.         </font></td>
  258.     </tr>
  259.   </table>
  260. </form>
  261.  
  262. <p align="center"><font color=#00FFFF><b><font color="#FF0000">当前页面金额:</font></b></font><font color="#FF0000"><b> 
  263.   </b></font><font color=#0033FF><b><% response.write(money) %></b></font><font color="#FF0000"><b>  元<br>
  264.   </b></font><a href="DELbuy.ASP"><font color=#ffffff><b><font color="#3333FF">删除3天未处理的定单</font></b></font></a> 
  265. </p>
  266. <form method="POST" action="delbuy.asp">
  267.   <table class="border" width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  268.     <tr class="title"> 
  269.       <td align="center" height="22" valign="middle"><font color=#FF0000><b>按日期删除未处理的定单(输入格式:年-月-日)</b></font></td>
  270.     </tr>
  271.     <tr class="tdbg"> 
  272.       <td align="center" valign="middle"><font color=#000000>&nbsp;</font><font color=#000000>起始日期: 
  273.         <input type="text" name="date03" size="20">
  274.           终止日期: 
  275.         <input type="text" name="date04" size="20">
  276.         <input name="submit3" type="submit" value="确定">
  277.         </font></td>
  278.     </tr>
  279.   </table>
  280. </form>
  281. </body>
  282. </html>