|
- <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
- <%option explicit%>
- <!--#include file="../Conn.asp"-->
- <!--#include file="../KS_Cls/Kesion.MemberCls.asp"-->
- <!--#include file="../KS_Cls/Kesion.Label.CommonCls.asp"-->
- <%
- Dim KS:Set KS=New PublicCls
- Dim KSUser:Set KSUser=New UserCls
- Dim UserLoginTF:UserLoginTF=KSUser.UserLoginChecked
- IF UserLoginTF=false Then
- Call KS.ShowTips("error","<li>你还没有登录或登录已过期,请<a href='../user/login/'>点击这里</a>重新登录!</li>")
- End If
- dim action:action = request.QueryString("action")
- if action<>"" then
- call AddZJ
- end if
- Select Case request.QueryString("action2")
- Case "SaveAddZJ" call SaveAddZJ
- End Select
- '支付提交
- Sub AddZJ()
- %>
- <!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>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
- <title><%=title%></title>
- <style type="text/css">
- body, td, th { font-size: 12px; color: #666; }
- body { margin-left: 0px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; }
- #main { width: 390px; margin:auto }
- .divLeft { width: 40%; height: 35px; float: left; line-height: 35px; text-align: right; }
- .divRight { width:60%; height:35px; line-height: 35px; float:left; }
- .divInput { margin-top:4px; height:26px; line-height:26px; }
- .input { height: 23px; line-height:23px; border-width: 1px; border-style: solid; margin: 0px; padding: 0px; }
- .inputSubmit { FONT-SIZE: 12px; BACKGROUND: #CCC; COLOR: #000; padding-left:10px; padding-right:10px; padding-bottom:2px; padding-top:2px; }
- </style>
- <SCRIPT language=javascript>
- function CheckForm()
- {
- if(document.form.Money.value=="")
- {
- alert("提现金额不能为空!");
- document.form.Money.focus();
- return false;
- }
- if(document.form.Money.value><%=KSUser.GetUserInfo("Money") %>)
- {
- alert("您最多只能提现<%= KSUser.GetUserInfo("Money") %>元!");
- document.form.Money.focus();
- return false;
- }
- }
- </script>
- </head>
- <body>
- <div id="main">
- <%
- dim title,readonly,Money,xieid,Remark,InOrOut,MoneyType
- if action = "ATM" then
- title = "提现"
- MoneyType=9
- Remark="提现"
- elseif action = "Pay" then
- title = "付款"
- Money=cint(request.QueryString("Money"))
- xieid=request.QueryString("xieid")
- MoneyType=7
- Remark="支付"&request.QueryString("xieid")&"号稿件费用"
- end if
- If cint(KSUser.GetUserInfo("Money"))<Money Then
- KS.Die "<script>alert('对不起!您的资金余额不足,还差"&Money-KSUser.GetUserInfo("Money")&"元,请充值后再提交!');top.location.href='user_payonline.asp';</script>"
- end if
- %>
- <form id="form" name="form" method="post" action="?Action2=SaveAddZJ&ComeUrl=<%=Server.URLEncode(Request.ServerVariables("HTTP_REFERER"))%>" onSubmit="return CheckForm();">
- <div class="divLeft"><strong>用户名:</strong></div>
- <div class="divRight"><%= KSUser.GetUserInfo("UserName") %></div>
- <div class="divLeft"><strong>可用资金:</strong></div>
- <div class="divRight"><%=formatnumber(KSUser.GetUserInfo("Money"),2,-1)%>元</div>
- <div class="divLeft"><strong>用户组:</strong></div>
- <div class="divRight"><%=KS.GetUserGroupName(KSUser.GetUserInfo("GroupID"))%></div>
- <div class="divLeft"><strong><%= title %>金额:</strong></div>
- <div class="divRight">
- <% If action = "ATM" Then %>
- <div class="divInput"><input name="Money" type="text" class="input" id="Money" value="<%= Money %>" size="10" maxlength="9"/>
- </div>
- </div>
- <div class="divLeft"><strong>收款银行帐号:</strong></div>
- <div class="divRight">
- <div class="divInput">
- <% If KSUser.GetUserInfo("KS_inbankusn")="" Then %>
- <input name="KS_inbankusn" type="text" class="input" id="KS_inbankusn" style="width:185px; font-size:14px; font-weight:bold;" value=""/>
- <% Else %>
- <%=KSUser.GetUserInfo("KS_inbankusn")%>
- <% End If %>
- </div>
- </div>
- <div class="divLeft"><strong>收款银行开户行:</strong></div>
- <div class="divRight">
- <div class="divInput">
- <% If KSUser.GetUserInfo("KS_inbankusn")="" Then %>
- <input name="KS_inbankname" type="text" class="input" id="KS_inbankname" value="" style="width:240px;" />
- <% Else %>
- <%=KSUser.GetUserInfo("KS_inbankname")%>
- <% End If %>
- </div>
- </div>
- <div class="divLeft"><strong>收款银行用户名:</strong></div>
- <div class="divRight">
- <div class="divInput">
- <% If KSUser.GetUserInfo("KS_inbankusn")="" Then %>
- <input name="KS_inbankusname" type="text" class="input" id="KS_inbankusname" value="" style="width:50px;" />
- <% Else %>
- <%=KSUser.GetUserInfo("KS_inbankusname")%>
- <% End If %>
- </div>
- </div>
- <% Else %>
- <%= Money %>
- <input name="Money" type="hidden" id="Money" value="<%= Money %>">
- </div>
- <div class="divLeft"><strong>稿件号:</strong></div>
- <div class="divRight"><%= xieid %></div>
- <% End If %>
- <div class="divLeft"></div>
- <div class="divRight">
- <div class="divInput">
- <input class="inputSubmit" type="submit" name="button" id="button" value="提交"/>
- <input name="InOrOut" type="hidden" id="InOrOut" value="2">
- <input name="PayTime" type="hidden" id="PayTime" value="<%=formatdatetime(now,2)%>">
- <input name="UserID" type="hidden" id="UserID" value="<%= KSUser.GetUserInfo("UserID") %>">
- <input name="MoneyType" type="hidden" id="MoneyType" value="<%= MoneyType %>">
- <input name="Remark" type="hidden" id="Remark" value="<%= Remark %>">
- <% If action = "ATM" Then %>
- <input name="ok" type="hidden" id="ok" value="tx">
- <% Else %>
- <input name="ok" type="hidden" id="ok" value="zf">
- <% End If %>
- </div>
- </div>
- </form>
- <div style=" clear:both"></div>
- </div>
- </body>
- </html>
- <%
- End Sub
- '保存续费
- sub SaveAddZJ()
- dim UserID,MoneyType,Money,PayTime,Remark,sqlUser,rsUser,InOrOut
- dim TxType
- UserID=KS.ChkClng(request("UserID"))
- InOrOut=KS.ChkClng(Request("InOrOut"))
- MoneyType=Trim(request("MoneyType"))
- Money=KS.G("Money")
- PayTime=KS.G("PayTime")
- Remark=KS.G("Remark")
- Set rsUser=Server.CreateObject("Adodb.RecordSet")
- sqlUser="select top 1 * from KS_User where UserID=" & UserID
- rsUser.Open sqlUser,Conn,1,3
- if rsUser("KS_inbankusn")="" then
- rsUser("KS_inbankusn")=KS.G("KS_inbankusn")
- rsUser("KS_inbankname")=KS.G("KS_inbankname")
- rsUser("KS_inbankusname")=KS.G("KS_inbankusname")
- end if
- rsUser.update
- If KS.G("ok") = "tx" Then
- Call KS.TxMoneyInOrOut(rsUser("UserName"),rsUser("RealName"),Money,MoneyType,InOrOut,PayTime,"0",KS.C("AdminName"),Remark,0,0,0,0,rsUser("UserID"))
- Response.Write "<script>alert('操作成功!请等待管理员完成提现!');top.location.href='"&Request("ComeUrl")&"';</script>"
- Else
- '参数:UserName-用户名,ClientName-客户姓名,Money-金钱,MoneyType-类型,InOrOutFlag-操作类型1收入2支出,PayTime-汇款日期,OrderID-订单号,Inputer-操作员,Remark-操作备注,MustIn -强行写入 1是 0否
- 'MoneyInOrOut(UserName,ClientName,Money,MoneyType,InorOutFlag,PayTime,OrderID,Inputer,Remark,ChannelID,InfoID,MustIn)
- Call KS.MoneyInOrOut(rsUser("UserName"),rsUser("RealName"),Money,MoneyType,InOrOut,PayTime,"0",KS.C("AdminName"),Remark,0,0,0)
- Response.Write "<script>alert('操作成功!');top.location.href='"&Request("ComeUrl")&"';</script>"
- End If
- end sub
- Set KSUser=Nothing
- Set ks=nothing
- CloseConn
- %>
|