<div id="centre" class="layout">
    <div class="centreInner ">
        <div class="mainInner radius5 ">
            <?php require APPPATH . 'views/'.TEMPLATE_NAME.'/payment_common.php';?>
            <?php 
                $id = (isset($info['id']) && $info['id'] != '') ? $info['id'] . '/' : '';
            ?>
            <form id="js_pay_form" action="/payment/pay/<?=$id?>" target="_blank" method="post">			
                <div class="belongBox radius5">
                    <div class="house_beans_form">
                        <?php 
                        if ($info['is_active']) { //优惠活动
                            $rate = $info['payment_config']['active']['rate'];
                         ?>
                        <div class="clearfix">
                            <h3 class="h3 left">我要充值</h3>
                            <div class="sale">优惠活动：截止至<span class="b_c"><?=$info['payment_config']['active']['endtime']?></span>，充值多赠送<span class="b_c"><?=$info['payment_config']['active']['percentage']?></span>房豆。</div>
                        </div>
                        <?php } else { 
                            $rate = $info['payment_config']['init_rate'];
                        }?>
                        <div class="house_beans_pay">
                            <div class="item clearfix">
                                <p class="text">充值金额：</p>
                                <div class="left" id="js_select_pay">
                                    <?php foreach($info['payment_config']['price'] as $k => $v) { ?>
                                    <div class="sct <?php if ($k == $info['select_active']) {echo 'select';}?>" data-num="<?=$k?>" data-RMB="<?=$v?>"><?=$v?>元<b class="s">选中</b></div>
                                    <?php }?>
                                    <div class="left relative_pay">
                                        <label id="js_for_label" class="for_label hide" for="js_input_pay">输入其他金额</label>
                                        <input data-num="0" <?php if ($info['select_active'] == 0) {echo 'value="' . $info['price'] . '"';}?>autocomplete="off" maxlength="9" type="text" id="js_input_pay" class="input_text" name="else_num">
                                    </div>
                                    <?php if (isset($info['type'])) {
                                        $type = $info['type'];
                                    } else {
                                        $type = 1;//默认充值10元，$type--data-num
                                    }?>
                                    <input type="hidden"  id="js_data_num" value="<?=$type?>" name="type"><!--提交的是哪一个值-->	
                                    <input type="hidden"  id="js_data_sale" value="<?=$rate?>"><!--是否有打折优惠，默认是10，即无优惠-->
                                </div>
                                <p class="text">元</p>
                                <p class="text textColor" id="js_input_pay_pay" name="price">（请输入整数，至少5）</p>
                            </div>	
                            <div class="item clearfix">
                                <?php
                                    if ($info['select_active'] == 0) {
                                        $price = $info['price'];
                                    } else {
                                        $price = $info['payment_config']['price'][$info['select_active']];
                                    }
                                ?>
                                <p class="text mr45">我要充值<span class="m7" id="js_RMB_01"><?=$price?></span>元</p>
                                <p class="text mr45">价值<span class="m7" id="js_FD"><?=$price * $rate?></span>房豆</p>
                                <p class="text mr45">需付款<span class="m7 color"  id="js_RMB_02"><?=$price?></span>元</p>
                            </div>
                            <?php
                                $invoice_select = '';
                                $invoice_content = '';
                                if (isset($info['invoice']) && $info['invoice']) {
                                    $invoice_select = 'checked';
                                    $invoice_content = $info['invoice'];
                                }
                            ?>
                            <div class="item clearfix">
                                <label class="left" for="js_invoice">
                                <input type="checkbox" id="js_invoice" <?=$invoice_select?>> 我需要发票</label>
                                <p class="text">&nbsp;</p>
                                <div class="left text2 hide" id="js_invoice_input_box">
                                    <p class="left">请填写发票抬头：</p>
                                    <input type="text" class="input_text" name="invoice" id="js_invoice" maxlength="40" value="<?=$invoice_content?>">
                                    <?php if ($invoice_content != '') { ?>
                                        <script type="text/javascript">
                                            $("#js_invoice_input_box").show();
                                        </script>
                                    <?php } ?>
                                </div>
                                <div class="text" id="js_invoice_pay"></div>
                            </div>
                        </div>

                        <!--2017-10-18 支付宝 微信-->
                        <?php if( !empty($info['payMethod']) && (in_array('wxpay',$info['payMethod']) || in_array('alipay',$info['payMethod']))){?>
                        <p class="select_pay_title select_pay_title02 clear">平台支付</p>
                        <dl class="select_pay_list clearfix">
                            <?php if(in_array('wxpay',$info['payMethod'])) { ?>
                            <dd class="item">
                                <label for="name_zfb_yl_1">
                                    <input type="radio" class="input_r" name="back_name" id="name_zfb_yl_1" value="wxpay" <?php if($info['bank_name'] == 'wxpay') {echo ' checked';}?>>
                                    <img alt="微信" src="<?=STATIC_SOURCE_URL?>/zsb/images/v1.0/weixin.png" class="img" ><span class="z">&nbsp;</span></label>
                            </dd>
                            <?php } ?>
                            <?php if(in_array('alipay',$info['payMethod'])) { ?>
                            <dd class="item">
                                <label for="name_zfb_yl_zfb">
                                    <input type="radio" class="input_r" name="back_name" id="name_zfb_yl_zfb" value="alipay" <?php if($info['bank_name'] == 'alipay') {echo ' checked';}?>>
                                    <img alt="支付宝" src="<?=STATIC_SOURCE_URL?>/zsb/images/v1.0/zfb.png" class="img" ><span class="z">&nbsp;</span></label>
                            </dd>
                            <?php } ?>
                        </dl>
                        <?php } ?>
                        <!--2017-10-18 支付宝 微信-->

                        <?php if( !empty($info['payMethod']) && in_array('unionpay',$info['payMethod']) ){?>
                   		<p class="select_pay_title">
                            <span class="left">银行卡支付（银联支付）</span>
                            <span class="right">
                                <a href="<?=$info['documentation']['pay_detail']?>" target="_blank">网上支付说明</a> | 
                                <a href="<?=$info['documentation']['often_question']?>" target="_blank">用户常见问题</a> | 
                                <a href="<?=$info['documentation']['bank_limit']?>" target="_blank">各银行支付限额</a>
                            </span>
						</p>
                        <dl class="select_pay_list clearfix">
                            <?php 
                            $i = 0;
                            foreach($info['bank'] as $k => $v) {
                                $i++;
                                if (isset($v['display']) && $v['display'] == 0) {
                                    continue;
                                }
                             ?>
                            <dd class="item">
                                <label for="back_name_<?=$i?>">
                                    <input type="radio" class="input_r" name="back_name" value="<?=$k?>" id="back_name_<?=$i?>" <?php if($k == $info['bank_name']) {echo ' checked';}?>>
                                    <img alt="<?=$v['name']?>" src="<?=STATIC_SOURCE_URL?>/zsb/images/v1.0/<?=$v['image_url']?>" class="img">
                                    <span class="z">&nbsp;</span>
                                </label>
                            </dd>  
                            <?php }?>
                        </dl>
                        <?php } ?>


                        <div class="clear consent_box_pay"><label><input id="js_checkConsent" type="checkbox" class="input_c" checked name="checkConsent" >我已同意</label><a href="<?=$info['payment_agreement']?>" target="_blank">365网上支付协议</a></div>
                        <div id="js_checkConsent_pay" class="checkConsent_pay_box"></div>
                        <div class="clear">
                            <div class="btnFBbox btnLJCZbox"  style="position:relative; width:85px; height:32px;margin:0 auto;overflow: hidden;">
                                 <button id="js_btnSubmit_pay" class="btnB btnSubmit radius5"  type="submit">确认支付</button>
                                 <div id="new_login_btn_none" class="radius5" style="left:-17px; top:-4px;">&nbsp;</div>
                            </div>
                        </div>
                    </div>
                </div>
            </form>
            <!----> 
        </div>
    </div>
</div>
<div class="dialog radius5 dialogW468" id="js_pay_open">
    <div class="hd">
        <h3 class="h3">充值遇到问题？</h3>
        <p title="关闭" class="js_btn_pay_close_zz close close-win">关闭 </p>
    </div>
    <div class="mod">
        <div class="text"> 充值完成前请不要关闭此窗口。<br>
            完成充值后根据您的情况选择：（请在新开网页上完成付款后再选择）</div>
        <div class="modBottom">
            <a href="<?=$info['recharge_record']?>" class="js_btn_pay_close_zz btn btnCon radius5">已完成充值</a>
            <a href="javascript:void(0);" class="js_btn_pay_close_zz btn btnCon radius5 close-win">返回重新选择</a>
        </div>
    </div>
</div>
<?=$page_js?>