{template 'member', 'header'}
<div id="memberArea">
	{template 'member', 'left'}
	<div class="col-auto">
		<div class="col-1 ">
			<h5 class="title">{L('buy_point')}</h5>
			<div class="content">
			<form method="post" action="" id="myform" name="myform">
			<table width="100%" cellspacing="0" class="table_form">
				<tr>
					<th width="100">{L('account_remain')}：</th> 
					<td>	
						<font style="color:#F00; font-size:18px;font-family:Georgia,Arial; font-weight:700">{$memberinfo[amount]}</font>{L('unit_yuan')}，
						<font style="color:#F00; font-size:12px;font-family:Georgia,Arial; font-weight:700">{$memberinfo[point]}</font>{L('unit_point')}
					</td>
				</tr>
				<tr>
				<script language="JavaScript">
				<!--
				$(document).ready(function() {
					$("#point").html($("#money").val()*{if !empty($member_setting['rmb_point_rate'])}{$member_setting['rmb_point_rate']}{else}10{/if});
					$("#money").keyup(function() {
						$(this).val($(this).val().replace(/[^\d]/g,''));
						$("#point").html($("#money").val()*{if !empty($member_setting['rmb_point_rate'])}{$member_setting['rmb_point_rate']}{else}10{/if});
						if({$memberinfo[amount]} < $(this).val()) {
							$("#alert").html('{L('not_sufficient_funds')}');
						} else {
							$("#alert").html('');
						}
					});
				});
				//-->
				</script>
					<th width="100">{L('cost')}：</th> 
					<td>	
						<input type="text" class="input-text" name="money" id="money" size="4">{L('unit_yuan')}
						{L('can_change_point_num')}：<font id="point" style="color:#F00; font-size:12px;font-family:Georgia,Arial; font-weight:700">0</font>{L('unit_point')}
						<font id="alert" style="color:#F00; font-size:12px;font-family:Georgia,Arial; font-weight:700"></font>
					</td>
				</tr>

				<tr>
					<th width="100"></th> 
					<td>			
						<input type="submit" class="button" name="buy" value="兑换">
					</td>
				</tr>
			</table>
			</form>
			
			</div>
			<span class="o1"></span><span class="o2"></span><span class="o3"></span><span class="o4"></span>
		</div>
		<div class="bk10"></div>

{if $member_setting['showapppoint']}
		<div class="col-1 ">
			<h5 class="title">{L('app_each').L('credit_change')}</h5>
			<div class="content">
			
			<form method="post" action="" id="myform" name="myform">
			<table width="100%" cellspacing="0" class="table_form">
				<tr>
					<th width="100">{L('cost')}：</th> 
					<td>	
						<input type="text" class="input-text" name="fromvalue">
						<select name="from">
							{loop $credit_list $k $v}
								<option value="{$k}">
								{$v[0]}
								</option>
							{/loop}
						</select>
					</td>
				</tr>


				<tr>
					<th width="100">{L('cost')}：</th> 
					<td>			
						<select name="to">
							{loop $outcredit $k $v}
								<option value="{$v['toid']}_{$v[to]}">
								{$applist[$v['toid']]['name']}[{$v['toname']}]
								</option>
							{/loop}
						</select>
					</td>
				</tr>
				<tr>
					<th width="100"></th> 
					<td>			
						<input type="submit" class="button" name="dosubmit" value="兑换">
					</td>
				</tr>
			</table>
			</form>
			
			</div>
			<span class="o1"></span><span class="o2"></span><span class="o3"></span><span class="o4"></span>
		</div>
{/if}

	</div>
</div>
<div class="clear"></div>
{template 'member', 'footer'}