<?php /*a:3:{s:67:"/home/affivpnx/app.peakwork.pro/app/admin/view/system/bank_add.html";i:1763742186;s:65:"/home/affivpnx/app.peakwork.pro/app/admin/view/public/header.html";i:1763742186;s:65:"/home/affivpnx/app.peakwork.pro/app/admin/view/public/footer.html";i:1763742186;}*/ ?>
<!doctype html>
<html class="x-admin-sm">
<head>
    <meta charset="UTF-8">
    <title>后台登录-<?php echo htmlentities($system_name); ?></title>
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link rel="stylesheet" href="/static/admin/css/font.css">
    <link rel="stylesheet" href="/static/admin/css/xadmin.css">
    <script type="text/javascript" src="/static/admin/js/jquery.min.js"></script>
    <!-- <link rel="stylesheet" href="./css/theme5.css"> -->
    <script src="/static/admin/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="/static/admin/js/xadmin.js?date=<?php echo date('Ymd'); ?>"></script>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
    <script src="/static/admin/js/html5.min.js"></script>
    <script src="/static/admin/js/respond.min.js"></script>
    <![endif]-->
</head>

<body>
<div class="layui-fluid">
    <div class="layui-row">
        <form class="layui-form">
            <input type="hidden" name="id" value="<?php echo htmlentities($admin_id); ?>">
            <div class="layui-form-item">
                <label for="name" class="layui-form-label">
                    <span class="x-red">*</span>银行名称/Coin
                </label>
                <div class="layui-input-inline">
                    <input type="text" id="name" name="name" lay-verify="name"
                           autocomplete="off" class="layui-input" value="<?php echo htmlentities((isset($info['name']) && ($info['name'] !== '')?$info['name']:'')); ?>"
                            required="">
                </div>
               
            </div>
            <div class="layui-form-item">
                <label for="account_name" class="layui-form-label"><span class="x-red">*</span>户名/Network</label>
                <div class="layui-input-inline">
                    <input type="text" id="account_name" name="account_name" lay-verify="account_name" autocomplete="off"
                           class="layui-input"  required=""  value="<?php echo htmlentities((isset($info['account_name']) && ($info['account_name'] !== '')?$info['account_name']:'')); ?>">
                </div>
                
            </div>
            <div class="layui-form-item">
                <label for="card_no" class="layui-form-label"><span class="x-red">*</span>卡号/Address</label>
                <div class="layui-input-inline">
                    <input type="text"  required="" id="card_no" lay-verify="card_no" autocomplete="off" class="layui-input"  name="card_no"  value="<?php echo htmlentities((isset($info['card_no']) && ($info['card_no'] !== '')?$info['card_no']:'')); ?>"> 
                </div>
            </div>
            
            <div class="layui-form-item">
                <label for="L_repass" class="layui-form-label">
                </label>
                <button class="layui-btn" lay-filter="add" lay-submit="">
                    <?php if($admin_id == 0): ?>增加<?php else: ?>更新<?php endif; ?>
                </button>
            </div>
        </form>
    </div>
</div>
<script type="text/javascript">
    layui.use(['form', 'layer'],
        function () {
            $ = layui.jquery;
            var form = layui.form,
                layer = layui.layer;
            var pass_reg = /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,.\/]).{6,16}$/;

            //自定义验证规则
           

            //监听提交
            form.on('submit(add)', function (data) {
                console.log(data.field);
                //发异步，把数据提交给php
                $.ajax({
                    url: '<?php echo url("admin/System/bankAdd"); ?>',
                    type: 'post',
                    data: data.field,
                    dataType: 'json',
                    success: function (res) {
                        if (res.status == '200') {
                            tipAction(1, res.msg);
                            setTimeout(function () {
                                // 获得frame索引
                                // var index = parent.layer.getFrameIndex(window.name);
                                //关闭当前frame
                                // parent.layer.close(index);
                                parent.location.reload();
                            }, 1000);
                        } else {
                            tipAction(2, res.msg);
                        }
                    },
                    error: function () {
                        tipAction(2, '系统繁忙,请重试');
                    }
                });
                return false;
            });
        });
</script>
</body>
</html>
<script type="application/javascript">
    /**
     * 统一接口返回提示弹窗
     * type 1-成功 2-失败
     * info 提示信息
     * */
    function tipAction(type, info) {
        layer.msg(info, {icon: type, time: 1500})
    }

    //图片放大
    function showBig(obj) {
        let img_src = $(obj).attr('src');
        layer.open({
            type: 1,
            area: ['70%', 'auto'],
            shadeClose: true,
            title: false,
            closeBtn: false,
            content: `<div style=""><img src="${img_src}" alt="" width="100%"></div>`
        });
    }
</script>

