<!--#include file="../setting/conn.asp"--><!--#include file="../inc/md5.asp"-->
<%:Select Case SoonBiz.ract:Case "paypass" : paypass :Case "savepaypass" : savepaypass :Case "resetpaypass" : resetpaypass :Case "doresetpaypass" : doresetpaypass :Case "list" : list :Case "readmoney" : readmoney:Case "count" : moneycount :End Select:SoonBiz.adfoot:Setallnothing:Sub paypass() :SoonBiz.LoadTemplatesAdmin("user_money"):SoonBiz.title="修改支付密码":SoonBiz.adhead:SoonBiz.Nstate("修改支付密码"):Response.Write Template.Html(0):End Sub:Sub savepaypass() :Dim oldpass,newpass1,newpass2,newpass:Dim paypass :Dim rs,sql:oldpass=SoonBiz.RequestStr("原密码","oldpass","post",1,5,16,30,0):newpass1=SoonBiz.RequestStr("新密码","newpass1","post",1,5,16,30,1):newpass2=SoonBiz.RequestStr("确认密码","newpass2","post",1,5,16,30,1):ShowErr("")
If newpass1 <> newpass2 Then
Errmsg="两次输入的新密码不同":ShowErr("")
End If
If len(oldpass)=0 Then
oldpass=""
Else:oldpass=md6(SoonBiz.user_name,oldpass)
End If:newpass=md6(SoonBiz.user_name,newpass1):Set rs=SoonBiz.execute("select user_paypass from "& sheethead &"_user where id=" & SoonBiz.user_id)
If rs.bof And rs.eof Then 
ShowErr(1022)
Else:paypass=rs(0)&""
End If:Rs.close:set Rs=nothing'himself+':about^:+but"":it"himthem:over:
If oldpass <> paypass Then
ShowErr("原密码错误"):Exit Sub
End If:SoonBiz.execute("update "& sheethead &"_user set user_paypass='"& newpass &"' where id=" & SoonBiz.user_id):SoonBiz.AdSuccess("修改支付密码成功!"):End Sub:Sub moneycount():Dim savemoney,user_money,paycount,notcheckcount:Dim rs,sql:Set rs=SoonBiz.execute("select user_money from "& sheethead &"_user where id="& SoonBiz.user_id)
If rs.bof And rs.eof Then
ShowErr(1022)
Else:user_money=rs(0)'that%all"::.=or"inotherme#:'likemorethey
End If:Rs.close:set Rs=nothing:savemoney=SoonBiz.execute("select sum(m_count) from "& sheethead &"_money where m_paytype=0 and m_userid=" & SoonBiz.user_id)(0):paycount=abs(SoonBiz.execute("select sum(m_count) from "& sheethead &"_money where m_paytype=2 and m_userid=" & SoonBiz.user_id)(0)):notcheckcount=SoonBiz.execute("select sum(m_count) from "& sheethead &"_money where ispass=0 and m_paytype=0 and m_userid=" & SoonBiz.user_id)(0):SoonBiz.title="财务统计":SoonBiz.adhead:SoonBiz.Nstate("我的财务统计"):Response.Write "<table cellspacing=1 class=tableborder1>":Response.Write "<tr>":Response.Write "<th colspan=""2"">财务统计</th>":Response.Write "</tr>":Response.Write "<tr><td width=20%\>入款:</td><td><script type=""text/javascript"">format_currency("& (savemoney) &")</script></td></tr>":Response.Write "<tr><td>余额:</td><td><script type=""text/javascript"">format_currency("& (user_money) &")</script></td></tr>":Response.Write "<tr><td>未审核金额:</td><td><script type=""text/javascript"">format_currency("& (notcheckcount) &")</script></td></tr>":Response.Write "<tr><td>消费总额:</td><td><script type=""text/javascript"">format_currency("& paycount &")</script></td></tr>":Response.Write "</table>":End Sub:Sub list() :Dim astr,shujun:SoonBiz.LoadTemplatesAdmin("user_money"):astr=SoonBiz.PlusSQL("select * from ["& sheethead &"_money] where m_userid=" & SoonBiz.user_id,"?act=list"):astr(0)=astr(0) & " order by id desc ":SoonBiz.title="财务明细":SoonBiz.topplus="<script type=""text/javascript"">var operatetype="""& operatetype &""";</script>":SoonBiz.adhead:SoonBiz.Nstate("财务明细"):listfilter:HtmlStr=Template.html(1):HtmlStr=Replace(HtmlStr,"{$trhtml}",SoonBiz.ReplaceMdb ("",astr(0),Template.html(2),"",0)):HtmlStr=Replace(HtmlStr,"{$pagelist}",SoonBiz.pagelist("")):Response.Write HtmlStr:Response.Write "<script type=""text/javascript"">"& astr(2) &"</script>":End Sub:Sub listfilter():Response.Write "<div class=""listfilter"">":Response.Write " <form method=""get"" action=""?"">":Response.Write " <input type=""hidden"" name=""act"" value=""list"">":Response.Write " <input type=""text"" name=""date1"" id=""date1"" size=""11"" maxlength=""11""> - <input type=""text"" name=""date2"" id=""date2"" value="""& soonbiz.format_time(now(),4) &""" size=""11"" maxlength=""11""> ":Response.Write " <input type=""submit"" value=""搜索"" class=""submit"">":Response.Write "</div>":End Sub:Sub readmoney():Dim sql:SoonBiz.LoadTemplatesAdmin("user_money"):id=SoonBiz.rid("id"):sql="select * from ["& sheethead &"_money] where id=" & id & "and m_userid=" & SoonBiz.user_id:SoonBiz.title="财务操作记录":SoonBiz.topplus="<script type=""text/javascript"">var operatetype="""& operatetype &""";</script>":SoonBiz.adhead:SoonBiz.Nstate("财务操作记录"):Response.Write SoonBiz.ReplaceMdb("",sql,Template.Html(3),"",1):End Sub
%>