<%guidedisplay=1%>
<!--#include file="admin_start.asp" -->
<%
name=trim(request("customer_name"))

rs.open"select customer_id from jins_customer_list where customer_reg_name='"&name&"' ",conn,1,1
if rs.eof then
   MySys.Error.info = "不存在此用户！"
   MySys.Error.location = "back"
   MySys.Error.err()
End If
rs.close

rs.open"select customer_consume_id from jins_customer_consume_list where customer_name='"&name&"' ",conn,1,1
if rs.eof then
consume_n=0
consume_sum_in=0
consume_sum_out=0
else
consume_n=conn.execute("select count(customer_consume_id) from jins_customer_consume_list where customer_name='"&name&"' ")(0)
consume_sum_in=conn.execute("select sum(customer_consume_sum) as c_sum from jins_customer_consume_list where customer_name='"&name&"' and customer_consume_temp=1 and customer_consume_out='入帐' ")("c_sum")
consume_sum_out=conn.execute("select sum(customer_consume_sum) as c_sum from jins_customer_consume_list where customer_name='"&name&"'  and customer_consume_temp=1 and customer_consume_out='出帐' ")("c_sum")
end if
rs.close

if consume_n<0 then consume_n=0
if consume_sum_in<0 then consume_sum_in=0
if consume_sum_out<0 then consume_sum_out=0
%>
<body topmargin="30" marginwidth="10" marginheight="10">
<form name=edit_html target=admin_edit_html method=post><input type=hidden name=c value=''><input type=hidden name=formname value=''><input type=hidden name=inputname value=''></form>
<form name=customer_consume action="admin_user_customer_consume_edit_handle.asp?action=add&customer_name=<%=name%>" method=post>
<table cellpadding="3" cellspacing="4" width="90%" height="30" align=center style='border:1px solid #ebebeb' >
	<tr>
		<td width="2%" align=right><img alt='点击弹开编辑框' onclick="opencat(basic_open)" style='CURSOR: hand' src="Images/index_search.gif" width="8" height="16"></td>
		<td  width="98%" align=left>
		<font color="#ebebeb"> | </font>
		<img alt='点击弹开提示信息框' onclick="opencat(help_ads_open)" style='CURSOR: hand' src="Images/icon_info.gif" width="13" height="13" hspace="0" align="absmiddle">			
		<font color="#ebebeb"> | </font>
		后台帐户充值
		<font color="#ebebeb"> | </font>
		当前用户：<%=name%>
	    </td>
	</tr>		
	<tr id="help_ads_open" style="display:  ">
		<td colspan="10" align=left>
		<table cellpadding="4" cellspacing="2" width="99%" height="30" align=center style='border:1px dashed #B7B7B7' >
			<tr>
				<td colspan="8" width='100%' style="line-height:150% ">
				·填入负数表示扣除帐户余额！<br>
				</td>
			</tr>
		</table>
		</td>
	</tr>
	
	<tr id="basic_open" >
		<td colspan="10" align=left style='padding-bottom:5px'>
		<table cellpadding="4" cellspacing="2" bgcolor='#f7f7f7' width="99%" height="30" align=center style='border:1px dashed #808080;padding:20px' >
			<tr>
				<td  width="30%" align=right valign="top">帐户操作记录:</td>
				<td  width="70%" align=left valign="top">
				  <%=consume_n%> 条
				</td>
			</tr>
			<tr>
				<td  width="30%" align=right valign="top">当前帐户余额:</td>
				<td  width="70%" align=left valign="top">
				 <%=MySys.info.unit_money(1)%> <%=consume_sum_in-consume_sum_out%>
				</td>
			</tr>
			<tr>
				<td  width="30%" align=right valign="top">帐户入账:</td>
				<td  width="70%" align=left valign="top">
				 <%=MySys.info.unit_money(1)%> <%=consume_sum_in%>
				</td>
			</tr>
			<tr>
				<td  width="30%" align=right valign="top">帐户出账:</td>
				<td  width="70%" align=left valign="top">
				  <%=MySys.info.unit_money(1)%> <%=consume_sum_out%>
				</td>
			</tr>
			<tr>
				<td  width="30%" align=right>充值:</td>
				<td  width="70%" align=left>
				  <%=MySys.info.unit_money(1)%> <input name=customer_consume_sum type=text value="" size=20>
				</td>
			</tr>
		</table>
		</td>
	</tr>

	<tr>
		<td height='1' colspan="9" background='images/dot03.gif'></td>
	</tr>
	
	<tr>
	  <td height='30' colspan="8" width='100%' align=center >
	  <input type=submit value="提交设置！" >
	   <input type=reset value="重置" > 
	   <input onclick='history.back(-1)' type=button value="返回" >	  </td>
	</tr>
</table>		
<SCRIPT language=javascript>
	function opencat(cat)
	{
 	 	if(cat.style.display=="none"){
     	cat.style.display="";
  		} else {
     	cat.style.display="none"; 
  		}
	}</SCRIPT>
</form>
<!--#include file="admin_end.asp" -->