Order_Pay.asp
上传用户:jisenq
上传日期:2014-06-29
资源大小:7216k
文件大小:10k
源码类别:

数据库编程

开发平台:

ASP/ASPX

  1. <% Option Explicit %>
  2. <!--#include file="../../FS_Inc/Const.asp" -->
  3. <!--#include file="../../FS_Inc/Function.asp"-->
  4. <!--#include file="../../FS_InterFace/MF_Function.asp" -->
  5. <!--#include file="../../FS_InterFace/NS_Function.asp" -->
  6. <%'CopyRight (c) 2006 Fooun Inc. Code by Simpwind.Xie
  7. Dim Conn,User_Conn,strShowErr
  8. MF_Default_Conn
  9. MF_User_Conn
  10. 'session判断
  11. MF_Session_TF 
  12. if not MF_Check_Pop_TF("ME_Order") then Err_Show 
  13. Response.Buffer = True
  14. Response.Expires = -1
  15. Response.ExpiresAbsolute = Now() - 1
  16. Response.Expires = 0
  17. Response.CacheControl = "no-cache"
  18. Function GetFriendName(f_strNumber)
  19. Dim RsGetFriendName
  20. Set RsGetFriendName = User_Conn.Execute("Select UserName From FS_ME_Users Where UserNumber = '"& f_strNumber &"'")
  21. If  Not RsGetFriendName.eof  Then 
  22. GetFriendName = RsGetFriendName("UserName")
  23. Else
  24. GetFriendName = 0
  25. End If 
  26. set RsGetFriendName = nothing
  27. End Function 
  28. if Request.Form("Action") = "Del" then
  29. if not MF_Check_Pop_TF("ME031") then Err_Show 
  30. User_Conn.execute("Delete From FS_ME_Order  where OrderId in ("& Request.Form("Id")&")")
  31. Call MF_Insert_oper_Log("删除在线支付定单","定单ID:("& Request.Form("Id")&")",now,session("admin_name"),"ME")
  32. set User_Conn=nothing
  33. set conn=nothing
  34. strShowErr = "<li>操作定单成功!</li>"
  35. Response.Redirect("../Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=User/Order_Pay.asp")
  36. Response.end
  37. End if
  38. if Request.QueryString("type_1")="success" then
  39. User_Conn.execute("Update FS_ME_Order set isSuccess=1,M_state=1,isLock=0 where OrderId ="& Request.QueryString("Id"))
  40. Call MF_Insert_oper_Log("更新在线定单为[已支付]","定单号:("& Request.QueryString("OrderNumber")&")",now,session("admin_name"),"ME")
  41. strShowErr = "<li>更新成功!</li>"
  42. set User_Conn=nothing
  43. set conn=nothing
  44. Response.Redirect("../Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=User/Order_Pay.asp")
  45. Response.end
  46. end if
  47. %>
  48. <html xmlns="http://www.w3.org/1999/xhtml">
  49. <title>定单-网站内容管理系统</title>
  50. <meta name="keywords" content="风讯cms,cms,FoosunCMS,FoosunOA,FoosunVif,vif,风讯网站内容管理系统">
  51. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  52. <meta content="MSHTML 6.00.3790.2491" name="GENERATOR" />
  53. <meta name="Keywords" content="Foosun,FoosunCMS,Foosun Inc.,风讯,风讯网站内容管理系统,风讯系统,风讯新闻系统,风讯商城,风讯b2c,新闻系统,CMS,域名空间,asp,jsp,asp.net,SQL,SQL SERVER" />
  54. <link href="../images/skin/Css_<%=Session("Admin_Style_Num")%>/<%=Session("Admin_Style_Num")%>.css" rel="stylesheet" type="text/css">
  55. <head>
  56. <body>
  57. <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  58.   <tr class="hback"> 
  59.     <td class="hback"><a href="Order_Pay.asp">在线支付定单</a></td>
  60.   </tr>
  61.   <tr class="hback">
  62.     <td class="hback"><a href="Order_Pay.asp">全部</a>┆<a href="Order_Pay.asp?success=1">成功定单</a>┆<a href="Order_Pay.asp?success=0">失败定单</a></td>
  63.   </tr>
  64. </table>
  65. <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  66.   <form name="form1" method="post" action="Order_Pay.asp">
  67.     <tr class="hback"> 
  68.       <td colspan="7" class="hback"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  69.           <tr> 
  70.             <td width="44%"> <strong> 
  71.               <%
  72.   dim strTmp,strLogType,strTmp1
  73.   strLogType = NoSqlHack(Trim(Request.QueryString("LogTye")))
  74.      if Request.QueryString("LogTye")<>"" then
  75.    strTmp =  " and LogType='"& strLogType &"'"
  76.      Else
  77.    strTmp =  " "
  78.     End if
  79. Dim RsOrderObj,RsOrderSQL
  80. Dim strpage,strSQLs,StrOrders,strmp_or
  81. strpage=request("page")
  82. if len(strpage)=0 Or strpage<1 or trim(strpage)=""  Then strpage="1"
  83. Set RsOrderObj = Server.CreateObject(G_FS_RS)
  84. if trim(Request("keyword"))<>"" then
  85. if request("type")="0" then
  86. strmp_or = " and OrderNumber Like '%"&trim(Request("keyword"))&"%'"
  87. else
  88. strmp_or = " and UserNumber Like '%"&trim(Request("keyword"))&"%'"
  89. end if
  90. else
  91. strmp_or=""
  92. end if
  93. RsOrderSQL = "Select * From FS_ME_Order  where  OrderType=3 "& strmp_or &" order by  OrderID desc"
  94. RsOrderObj.Open RsOrderSQL,User_Conn,1,1
  95. Response.Write RsOrderObj.recordcount
  96. %>
  97.               </strong> 个定单</td>
  98.             <td width="56%"><div align="left">
  99.                 <input name="keyword" type="text" id="keyword">
  100.                 <select name="type" id="type">
  101.                   <option value="0" selected>定单号</option>
  102.                   <option value="1">用户编号</option>
  103.                 </select>
  104.                 <input type="submit" name="Submit2" value="搜索">
  105.               </div></td>
  106.           </tr>
  107.         </table></td>
  108.     </tr class="hback">
  109.     <tr class="hback"> 
  110.       <td width="20%" class="xingmu"><div align="left"><strong> 定单号(点定单查看详情)</strong></div></td>
  111.       <td width="10%" class="xingmu"><div align="center"><strong>审核状态</strong></div></td>
  112.       <td width="16%" class="xingmu"><div align="center"><strong>用户名</strong></div></td>
  113.       <td width="18%" class="xingmu"><div align="center"><strong>支付成功日期</strong></div></td>
  114.       <td width="17%" class="xingmu"><div align="center"><strong>日期</strong></div></td>
  115.       <td width="8%" class="xingmu"><div align="center"><strong>类型</strong></div></td>
  116.       <td width="11%" class="xingmu"><div align="center"><strong>支付</strong></div></td>
  117.     </tr>
  118.     <%
  119. Dim select_count,select_pagecount,i
  120. if RsOrderObj.eof then
  121.    RsOrderObj.close
  122.    set RsOrderObj=nothing
  123.    set conn=nothing
  124.    set user_conn=nothing
  125.    Response.Write"<TR><TD colspan=""7""  class=""hback"">没有记录。</TD></TR>"
  126. else
  127. if Request("CountPage")="" or len(Request("CountPage"))<1 then
  128. RsOrderObj.pagesize = 20
  129. Else
  130. RsOrderObj.pagesize = Request("CountPage")
  131. End if
  132. RsOrderObj.absolutepage=cint(strpage)
  133. select_count=RsOrderObj.recordcount
  134. select_pagecount=RsOrderObj.pagecount
  135. for i=1 to RsOrderObj.pagesize
  136. if RsOrderObj.eof Then exit For 
  137.  %>
  138.     <tr class="hback"> 
  139.       <td class="hback"><div align="left"> 
  140.           <% = RsOrderObj("OrderNumber")%>
  141.         </div></td>
  142.       <td class="hback"> <div align="center"> 
  143.           <%
  144. if RsOrderObj("isLock")=1 then
  145. Response.Write"<span class=tx>审核中...<span>"
  146. Else
  147. Response.Write"已审核..."
  148. End if
  149. %>
  150.         </div></td>
  151.       <td class="hback"><div align="center"> 
  152.           <a href="../../<%=G_USER_DIR%>/ShowUser.asp?UserNumber=<% = RsOrderObj("UserNumber")%>" target="_blank"><% = GetFriendName(RsOrderObj("UserNumber"))%></a>
  153.         </div></td>
  154.       <td class="hback"><div align="center"> 
  155.           <% = RsOrderObj("M_PayDate")%>
  156.         </div></td>
  157.       <td class="hback"> <div align="center"> 
  158.           <% = RsOrderObj("AddTime")%>
  159.         </div></td>
  160.       <td class="hback"><div align="center"> 
  161.           <%
  162. if RsOrderObj("OrderType")=0 then
  163. Response.Write("会员组")
  164. Elseif RsOrderObj("OrderType")=1 then
  165. Response.Write("商品")
  166. Elseif RsOrderObj("OrderType")=2 then
  167. Response.Write("点卡")
  168. Elseif RsOrderObj("OrderType")=3 then
  169. Response.Write("在线支付")
  170. Else
  171. Response.Write("其他")
  172. End if
  173. %>
  174.         </div></td>
  175.       <td class="hback"> <div align="center"> 
  176.           <%
  177.   if RsOrderObj("IsSuccess")=0 then
  178.    if RsOrderObj("M_state")=0 then
  179.   %>
  180.           <a href="Order_Pay.asp?type_1=success&id=<%=RsOrderObj("OrderID")%>&OrderNumber=<% = RsOrderObj("OrderNumber")%>" title="更新为成功支付定单" onClick="{if(confirm('是否更新为[[支付成功]]吗?')){return true;}return false;}">失败</a> 
  181.           <%
  182.    else
  183. response.Write "已处理" 
  184. end if
  185.   Else%>
  186.           <span class="tx">成功</span> 
  187.           <%End if%>
  188.           <input name="id" type="checkbox" id="id" value="<%=RsOrderObj("OrderID")%>">
  189.         </div></td>
  190.     </tr>
  191.     <%
  192.   RsOrderObj.MoveNext
  193.   Next
  194.   %>
  195.     <tr class="hback"> 
  196.       <td colspan="7" class="hback"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
  197.           <tr class="hback"> 
  198.             <td width="40%">
  199.               <%  Response.Write("每页:"& RsOrderObj.pagesize &"个,")
  200. Response.write"&nbsp;共<b>"& select_pagecount &"</b>页<b>&nbsp;" & select_count &"</b>条记录,本页是第<b>"& strpage &"</b>页。"
  201. if int(strpage)>1 then
  202. Response.Write"&nbsp;<a href=?page=1&keyword="&Request("keyword")&"&type="&request("type")&">第一页</a>&nbsp;&nbsp;"
  203. Response.Write"&nbsp;<a href=?page="&cstr(cint(strpage)-1)&"&keyword="&Request("keyword")&"&type="&request("type")&">上一页</a>&nbsp;&nbsp;"
  204. End if
  205. If int(strpage)<select_pagecount then
  206. Response.Write"&nbsp;<a href=?page="&cstr(cint(strpage)+1)&"&keyword="&Request("keyword")&"&type="&request("type")&">下一页</a>&nbsp;"
  207. Response.Write"&nbsp;<a href=?page="& select_pagecount &"&keyword="&Request("keyword")&"&type="&request("type")&">最后一页</a>&nbsp;&nbsp;"
  208. End if
  209. Response.Write"<br>"
  210. RsOrderObj.close
  211. Set RsOrderObj=nothing
  212. %>
  213.              </td>
  214.             <td width="40%" class="hback">
  215.               <input type="checkbox" name="chkall" value="checkbox" onClick="CheckAll(this.form)">
  216.               选中所有定单
  217.               <input name="Action" type="hidden" id="Action" value="">
  218.               <input type="button" name="Submit" value="删除选中的定单"  onClick="document.form1.Action.value='Del';{if(confirm('确定清除您所选择的记录吗?')){this.document.form1.submit();return true;}return false;}">
  219. </td>
  220.           </tr>
  221.         </table></td>
  222.     </tr>
  223. <%End if%>
  224.   </form>
  225. </table>
  226. </body>
  227. </html>
  228. <script language="JavaScript" type="text/JavaScript">
  229. function CheckAll(form)  
  230.   {  
  231.   for (var i=0;i<form1.elements.length;i++)  
  232.     {  
  233.     var e = form1.elements[i];  
  234.     if (e.name != 'chkall')  
  235.        e.checked = form1.chkall.checked;  
  236.     }  
  237.   }
  238. </script>
  239. <!--Powsered by Foosun Inc.,Product:FoosunCMS V4.0系列-->