<?php /*a:3:{s:68:"/home/affivpnx/app.peakwork.pro/app/admin/view/system/agreement.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>

<style>
    .upload-span {
        width: 20%;
        position: relative;
        display: inline-block;
        margin-right: 10px;
    }

    .upload-more {
        width: 100%;
        height: 150px;
    }

    .upload-close {
        position: absolute;
        background: white;
        padding: 5px;
        right: 0;
        cursor: pointer;
    }

    .layui-form-item .layui-input-inline {
        width: 80%;
    }
</style>
<body>
<div class="x-nav">
    <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right"
       onclick="location.reload()" title="刷新">
        <i class="layui-icon layui-icon-refresh" style="line-height:30px"></i>
    </a>
</div>
<div class="layui-fluid">
    <div class="layui-row">
        <form class="layui-form">
            <div class="layui-form-item">
                <label class="layui-form-label">注册协议-越南</label>
                <div class="layui-input-block">
                    <textarea name="register_vi" id="register_vi" class="layui-textarea" placeholder="请输入注册协议-越南语"><?php echo htmlentities((isset($info['register_vi']) && ($info['register_vi'] !== '')?$info['register_vi']:'')); ?></textarea>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">注册协议-英语</label>
                <div class="layui-input-block">
                    <textarea name="register_en" id="register_en" class="layui-textarea" placeholder="请输入注册协议-英语"><?php echo htmlentities((isset($info['register_en']) && ($info['register_en'] !== '')?$info['register_en']:'')); ?></textarea>
                </div>
            </div>
            
            <div class="layui-form-item">
                <label class="layui-form-label">注册协议-阿拉伯</label>
                <div class="layui-input-block">
                    <textarea name="register_arab" id="register_arab" class="layui-textarea" placeholder="请输入注册协议"><?php echo htmlentities((isset($info['register_arab']) && ($info['register_arab'] !== '')?$info['register_arab']:'')); ?></textarea>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">注册协议-法语</label>
                <div class="layui-input-block">
                    <textarea name="register_fa" id="register_fa" class="layui-textarea" placeholder="请输入注册协议"><?php echo htmlentities((isset($info['register_fa']) && ($info['register_fa'] !== '')?$info['register_fa']:'')); ?></textarea>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">注册协议-俄语</label>
                <div class="layui-input-block">
                    <textarea name="register_ru" id="register_ru" class="layui-textarea" placeholder="请输入注册协议"><?php echo htmlentities((isset($info['register_ru']) && ($info['register_ru'] !== '')?$info['register_ru']:'')); ?></textarea>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">注册协议-意大利</label>
                <div class="layui-input-block">
                    <textarea name="register_italien" id="register_italien" class="layui-textarea" placeholder="请输入注册协议"><?php echo htmlentities((isset($info['register_italien']) && ($info['register_italien'] !== '')?$info['register_italien']:'')); ?></textarea>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">注册协议-葡萄牙</label>
                <div class="layui-input-block">
                    <textarea name="register_pt" id="register_pt" class="layui-textarea" placeholder="请输入注册协议"><?php echo htmlentities((isset($info['register_pt']) && ($info['register_pt'] !== '')?$info['register_pt']:'')); ?></textarea>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">注册协议-西班牙</label>
                <div class="layui-input-block">
                    <textarea name="register_es" id="register_es" class="layui-textarea" placeholder="请输入注册协议"><?php echo htmlentities((isset($info['register_es']) && ($info['register_es'] !== '')?$info['register_es']:'')); ?></textarea>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">注册协议-繁体</label>
                <div class="layui-input-block">
                    <textarea name="register_zh" id="register_zh" class="layui-textarea" placeholder="请输入注册协议-繁体"><?php echo htmlentities((isset($info['register_zh']) && ($info['register_zh'] !== '')?$info['register_zh']:'')); ?></textarea>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">
                </label>
                <button class="layui-btn" lay-filter="add" lay-submit="">提交</button>
            </div>
        </form>
    </div>
</div>
</body>
<script type="application/javascript">
    layui.use(['form', 'layedit'], function () {
        var form = layui.form;
        var layedit = layui.layedit;
        var register_vi = layedit.build('register_vi', {hideTool: ['image', 'help', 'face']}); //建立编辑器
        var register_en = layedit.build('register_en', {hideTool: ['image', 'help', 'face']}); //建立编辑器
        var register_zh = layedit.build('register_zh', {hideTool: ['image', 'help', 'face']}); //建立编辑器
        
        var register_arab = layedit.build('register_arab', {hideTool: ['image', 'help', 'face']}); //建立编辑器
        var register_fa = layedit.build('register_fa', {hideTool: ['image', 'help', 'face']}); //建立编辑器
        var register_ru = layedit.build('register_ru', {hideTool: ['image', 'help', 'face']}); //建立编辑器
        var register_italien = layedit.build('register_italien', {hideTool: ['image', 'help', 'face']}); //建立编辑器
        var register_pt = layedit.build('register_pt', {hideTool: ['image', 'help', 'face']}); //建立编辑器
        var register_es = layedit.build('register_es', {hideTool: ['image', 'help', 'face']}); //建立编辑器
        //监听提交
        form.on('submit(add)', function (data) {
            data.field.register_vi = layedit.getContent(register_vi);
            data.field.register_en = layedit.getContent(register_en);
            data.field.register_zh = layedit.getContent(register_zh);
            
            data.field.register_arab = layedit.getContent(register_arab);
            data.field.register_fa = layedit.getContent(register_fa);
            data.field.register_ru = layedit.getContent(register_ru);
            data.field.register_italien = layedit.getContent(register_italien);
            data.field.register_pt = layedit.getContent(register_pt);
            data.field.register_es = layedit.getContent(register_es);
            //发异步，把数据提交给php
            $.ajax({
                url: '<?php echo url("admin/System/configSubmit"); ?>',
                type: 'post',
                data: {'config': data.field, 'id': 5},
                dataType: 'json',
                success: function (res) {
                    if (res.status == '200') {
                        tipAction(1, res.msg);
                    } else {
                        tipAction(2, res.msg);
                    }
                },
                error: function () {
                    tipAction(2, '系统繁忙,请重试');
                }
            });
            return false;
        });
    });
</script>
</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>

