<!--#include file="conn.asp"-->
<!--#include file="inc/cookies_check.asp"-->
<!--#include file="inc/Page_cls.asp"-->
<!--#include file="../include/Lebi_md5.asp"-->
<!--#include file="../include/Lebi_Config.asp"-->
<%
'*****************************************
'* 软件名称 乐彼网上开店软件(56770 EShop)
'* 软件开发 http://www.56770.com
'* 版权所有 http://www.56770.com
'* 文件名称 Admin_user_account.asp
'* 最后更新 2011-08-23 by 56770.kingdge
'*****************************************
include "lang/"& LangFilePath &"/lang_sys.inc"
include "lang/"& LangFilePath &"/lang_menu.inc"
include "lang/"& LangFilePath &"/lang_user.inc"
CurrentId = 3
CurrentUrl = "admin_user_account.asp"
LB_Head()
LB_Menu()
action = request("action")
user_id = SafeReplace(request("user_id"))
If user_id <> "" Then 
%>
		<div class="tabmenu mainwidth">
			  <ul>
				<li><a href="admin_user.asp"><span><%=Lang_Menu(56)%></span></a></li>
				<li><a href="Admin_user.asp?action=view&user_id=<%=server.urlencode(user_id)%>"><span><%=user_id%></span></a></li>
				<li><a href="Admin_orders.asp?user_id=<%=server.urlencode(user_id)%>"><span><%=Lang_User(58)%></span></a></li>
				<li><a href="Admin_user_log.asp?user_id=<%=server.urlencode(user_id)%>"><span><%=Lang_User(59)%></span></a></li>
				<li class="current"><a href="Admin_user_account.asp?user_id=<%=server.urlencode(user_id)%>"><span><%=Lang_User(154)%></span></a></li>
				<li><a href="Admin_msg.asp?action=add&user_id=<%=server.urlencode(user_id)%>"><span><%=Lang_User(47)%></span></a></li>
			  </ul>
		</div>
<%
		Response.Write("<div class=""tab-mainbody"">")
		Response.Write("<div class=""tab-mainbody2"">")
Else 
		Response.Write("<div class=""mainbody"">")
		Response.Write("<div class=""mainbody2"">")
End If 
If OutSubmit = 1 Then CheckOutSubmit()
Select Case action
		Case "account_ok" : account_ok()
		Case Else
		account()
End Select
Response.Write("</div>")
Response.Write("</div>")
LB_Footer()

Sub account_ok()
        If OnlyRead = 1 Then OnlyReadMessage()
        admin_flag=",4.5,"
        If Eshop_Lebi_name="" Or instr(","&Eshop_Lebi_flag&",",admin_flag)=0 Then
                adminflag()
        End If
		user_id = safereplace(request("user_id"))
		price = checknum(request("price"),0)
		content = Safereplace(request("content"))
		If user_id <>"" Then
				set rs = server.CreateObject("adodb.recordset")
				rs.open "select usermoney,user_id,user_name,user_mobile from [Lebi_user] where user_id='"& user_id &"'",conn,1,3
				if rs.eof or rs.bof then
						response.write"<SCRIPT language=JavaScript>alert('"& Lang_User(1) &"');javascript:history.back();</SCRIPT>"
						response.End
				Else
						rem 预存款消费明细 2009-6-9 56770.Kingdge
						conn.execute("insert into [Lebi_money_log](m_user_id,m_order_num,m_sj,m_type,m_price,m_zt)values('"&user_id&"','-',"&sqlnowstring&",'"& Lang_User(2) &"',"& price &",1)")
						rs("usermoney")=rs("usermoney")+price
						rs.update
						If SMS_State = "1" Then
								If CheckMobile(rs(3)) Then
										Dim LoadSMSInfo,SMSMsg
										LoadSMSInfo = LoadStyle(Eshop_url&"include/lebi_data/SMS"& LangTxt &".data")
										If InStr(","& SMS_SendMode &",",",7,") > 0 Then
												SMSMsg = splits(Split(LoadSMSInfo,"@@@")(6))
												ReplaceStyle "user_id",rs(1),SMSMsg
												ReplaceStyle "user_name",rs(2),SMSMsg
												ReplaceStyle "time",Now(),SMSMsg
												ReplaceStyle "money",rs(0),SMSMsg
												Call RedirectSendSMS(rs(3),SMSMsg,0,"",sms_sendtype)
		'										code = newclient.getCode()
		'										If code <> "2000" Then
		'												m_s = m_s &"<br/>·手机短信发送失败！"
		'										Else
		'												m_s = m_s &"<br/>·手机短信发送成功！"
		'										End If
										End If
								End If
						End If
						rs.close:Set rs=Nothing
						ManageLog Lang_User(2) &" ["& user_id &"]"
						Call Up_mes(Lang_sys(69),"·"& Lang_User(3),0,"?action=account",0,0,2,1)
				End If
				rs.close : set rs=nothing
		End If
End Sub

Sub account()
        admin_flag=",4.5,"
        If Eshop_Lebi_name="" Or instr(","&Eshop_Lebi_flag&",",admin_flag)=0 Then
                adminflag()
        End If
%>
		<script language="JavaScript" type="text/JavaScript">
		function CheckForm(theform)
		{
			if (!isEmpty(theform.user_id,'<%=Lang_User(73)%>')) return false;
			if (!isEmpty(theform.price,'<%=Lang_User(74)%>')) return false;
		}
		</script>
		<table width="100%" border="0" cellspacing="0" cellpadding="0" id="account" class="classtable">
		<form name="form2" method="post" action="?action=account_ok" onSubmit="return CheckForm(this);">
		<tr>
		  <td height="30" align="left" class="classhead"><input name="submit" type="image" src="lang/<%=LangFilePath%>/images/bt_app.gif" title=" <%=Lang_sys(1)%> " align="absmiddle">&nbsp;<input type="image" src="lang/<%=LangFilePath%>/images/bt_res.gif" title=" <%=Lang_sys(2)%> " onclick="reset();return false;" align="absmiddle"></td>
		  <td height="30" align="right" class="classhead">
			<%=QuickMenu("admin_user_log.asp|"& Lang_Menu(105) &"","admin_user_grade.asp|"& Lang_Menu(107) &"")%>
		  </td>
		 </tr>
		<tr>
		   <td class="classtop" height="30" colspan="2"><%=Lang_Menu(106)%></td>
		</tr>
		<tr class="classrow">
		<td width="15%" height="30" class="classrow"><%=Lang_User(15)%></td>
		<td width="85%" class="classrow"><input type="text" name="user_id" class="form" value="<%=user_id%>"></td>
		</tr>
		<tr class="classrow">
		<td height="30" class="classrow"><%=Lang_User(75)%></td>
		<td class="classrow">
		<input type="text" name="price" class="form" size="5">
		</td>
		</tr>
		<tr class="classrow" class="classrow">
		<td height="30" class="classrow" valign="top" style="padding-top:6px;"><%=Lang_User(76)%></td>
		<td class="classrow">
		<textarea name="content" cols="50" rows="3" class="text"></textarea>
		</td>
		</tr>
		<tr>
		<td colspan="2" height="30" class="classfooter" align="left">
		<input name="submit" type="image" src="lang/<%=LangFilePath%>/images/bt_app.gif" title=" <%=Lang_sys(1)%> " align="absmiddle">&nbsp;<input type="image" src="lang/<%=LangFilePath%>/images/bt_res.gif" title=" <%=Lang_sys(2)%> " onclick="reset();return false;" align="absmiddle">
		</td>
		</tr>
		</form>
		</table>
		<script>tdshow("account");</script>
<%
End Sub
%>