<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<!--{$page_charset}-->" />

<title>会员登录</title>
<!--{include file="<!--{$cptplpath}-->headerjs.tpl"}-->
</head>
<body>
<!--{include file="<!--{$cptplpath}-->lang_all.tpl"}-->
<!--{if $a eq "pay"}-->
<div class="main-wrap" >
  <div class="path"><p>当前位置：插件中心<span>&gt;&gt;</span>会员充值</p></div>
  <div class="main-cont" style="margin-top: -20px;">
    <h3 class="title">会员充值</h3>
<div class="metappcontentbox">



<link rel="stylesheet" href="<!--{$cppath}-->css/plugin.css" />
<link rel="stylesheet" href="<!--{$cppath}-->layui/css/layui.css" />
<link rel="stylesheet" href="<!--{$cppath}-->css/bootstrap.min.css" />
<script src="<!--{$cppath}-->layui/layui.js"></script>
<script src="https://cdn.bootcss.com/jquery/2.1.1/jquery.min.js"></script>
	<script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
      

	<div class="metinfotop">
		
	</div>
	<div class="clear"></div>

<script>
var ownlangtxt = '';
</script>

	<div class="v52fmbx">
		<div class="paydiv">
                    <form id="yue_pay">	
                    <h3 class="v52fmbx_hr">充值</h3>
			<dl>
				<dt>账户余额</dt>
				<dd class="ftype_input">
					<div class="fbox">
						<span class="money">￥<!--{$user.money}--></span>
					</div>
				</dd>
			</dl>
                        <input type="hidden" name="member_id" value="<!--{$user.adminid}-->" />                
			<dl>
				<dt>支付金额</dt>
				<dd class="ftype_input">
					<div class="fbox">
						<input type="text" style="width:150px;" name="price" value="" placeholder="请输入充值金额" data-required="1">
						<span style="color:red;display:inline-block;padding-left:15px">充值后如需退款须扣除 2% 的手续费，充值后 60 天内可以在“用户中心-财务中心-发票申请”提交发票申请。</span>
					</div>
					<span class="tips"></span>
				</dd>
			</dl>

			<dl class="noborder">
				<dt> </dt>
				<dd>
					<input type="button" value="充值" class="submit paysubmit" onclick="pay();">
					<!--<span class="tips"><a href="http://localhost/metinfo/admin/index.php?lang=en-us&anyid=65&n=appstore&c=member&a=dofinance">充值记录</a></span>-->
				</dd>
			</dl>
		</form>
		</div>
		<div class="paysuc" style="display:none">
		<h3 class="v52fmbx_hr">支付成功</h3>
		<dl>
			<dt></dt>
			<dd>
				<div>
					<span class="paysucjump"><a>支付成功，请点击！！</a></span>
				</div>
			</dd>
		</dl>
	</div>
	</div>
<script type="text/javascript">
//修改密码
		
		
                function pay(){
                            var form = new FormData(document.getElementById("yue_pay"));
                   
                               $.ajax({
                                    url:"admincp.php?c=plugin&a=ajaxaddorder",
                                    type:"post",
                                    data:form,
                                    dataType: "json",
                                    async : false,
                                    processData:false,
                                    contentType:false,
                                    success:function(data){
                                        var json = eval(data);
                                        
                                            var response = json.response;
                                        
                                            var result=json.result;
                                            var order_number = json.order_number;  
                                             var order_name = json.order_name; 
                                             var oeder_price = json.oeder_price;  
                                             host = window.location.host;
                                         
                                             var url='http://www.8cms.com/source/plugin/alipay/alipayapi.php';
                                         
                                            if (response == "1") {
                                                  
                                                               var parames = new Array();
                                                                parames.push({ name: "WIDout_trade_no", value: order_number});
                                                                parames.push({ name: "WIDsubject", value: order_name});
                                                                parames.push({ name: "WIDtotal_fee", value: oeder_price});
                                                                 parames.push({ name: "WIDbody", value: '充值余额'});
                                                                var temp_form = Post(url, parames);    
                                                                temp_form.submit();
                                                               return false;
                                               
                                            }
                                            else {
                                                  alert(result);
                                            }
                                    }
                                
                                });   
                }
            /*
         *功能： 模拟form表单的提交
         *参数： URL 跳转地址 PARAMTERS 参数
         */
       function Post(URL, PARAMTERS) {
            //创建form表单
             var temp_form = document.createElement("form");
             temp_form.action = URL;
             //如需打开新窗口，form的target属性要设置为'_blank'
            temp_form.target = "_blank";
             temp_form.method = "post";
            temp_form.style.display = "none";
             //添加参数
             for (var item in PARAMTERS) {
                var opt = document.createElement("input");
                 opt.name = PARAMTERS[item].name;
                 opt.value = PARAMTERS[item].value;
                 temp_form.appendChild(opt);
             }
            document.body.appendChild(temp_form);
             //提交数据
         //    temp_form.submit();
             return temp_form; 
         }
</script>


		<div class="clear"></div>
	
	

  </div>
</div>
</div>
<!--{/if}-->

<!--{if $a eq "setting"}-->
<div class="main-wrap">
  <div class="path"><p>当前位置：插件中心<span>&gt;&gt;</span>插件管理<span>&gt;&gt;</span><!--{$plugin_name}--></p></div>
  <div class="main-cont">
	<!--{assign var='pluginmanage' value=XHook::doAction(<!--{$plugin_event}-->)}-->
  </div>
</div>
<!--{/if}-->
<!--{assign var='pluginevent' value=XHook::doAction('adm_footer')}-->
</body>
</html>
