<!--{include file="<!--{$oetplpath}-->widget_header.tpl"}-->
<div class="oemarry_main">
  <!--{include file="<!--{$oetplpath}-->widget_menu.tpl"}-->
  <div class="oem_uright">
	
	<div class="oe_balance">
	  帐户余额：<strong>¥<!--{doubleval($login.user.money)}--></strong>&nbsp;&nbsp;&nbsp;
 	  <font style="display:none;">冻结资金：<strong>¥<!--{doubleval($login.user.freeze)}--></strong>&nbsp;&nbsp;&nbsp;</font>
	  <a href="<!--{$oefile}-->&c=recharge">充值</a>
	  <a href="<!--{$oefile}-->&c=withdraw">提现</a>
	</div>

	<div class="oe_mine_box">
	  <ul>
	    <li><a href="<!--{$oefile}-->&c=recharge" class="_current">在线充值</a></li>
		<li><a href="<!--{$oefile}-->&c=money">余额明细</a></li>
	  </ul>
	  <div class="clear"></div>
	</div>

	<div class="oe_widget_center">
	  

	  <h3 class="oe_f_title _bottom_border _margin_bottom">
	    在线充值<span>（填写充值金额，点击“确定”进入支付页面）</span>
	  </h3>

	  <table class="oe_table_info">
	   <tr>
		  <th width="15%">充值金额：</th>
		  <td width="85%">
		    <input type="text" name="money" id="money" class="input-80" /> 元
			（输入充值金额，单位：元）
		  </td>
		</tr>
		<tr>
		  <th></th>
		  <td>
			<input type="button" id="btn_post" class="submit_btn1" value="确定" /> 
		  </td>
		</tr>
	  </table>

	  <script type="text/javascript">
	  $(function(){
		
		$("#btn_post").bind("click", function(){
			$money = $("#money").val();
			if ($money.length == 0) {
				ToastShow("请输入充值金额", "money");
				return false;
			}

			$url = _ROOT_PATH+"index.php";
			$.ajax({
				type: "POST",
				url: $url,
				cache: false,
				data: {m:"user", c:"recharge", a:"submit", money:$money, r:get_rndnum(8)},
				dataType: "json",
				success: function($data) {
					$json = eval($data);
					$response = $json.response;
					$result = $json.result;
					if ($response == "1") {
						window.location.href = _ROOT_PATH+"index.php?c=pay&paynum="+$result;
					}
					else {
						if ($result.length > 0) {
							ToastShow($result);
						}
						else {
							ToastShow("提交失败，请重试!");
						}
					}
				},
				error: function() {
					ToastShow("提交失败，请检查网络！");
				}
			});

		});
	  });
	  </script>

	</div>
	<!--//oe_widget_center End-->

  </div>
  <!--//oem_uright End-->
  <div class="clear"></div>

</div>
<!--{include file="<!--{$oetplpath}-->widget_footer.tpl"}-->
</body>
</html>