HEX
Server: nginx/1.28.1
System: Linux 10-41-63-61 6.8.0-31-generic #31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024 x86_64
User: www (1001)
PHP: 7.4.33
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/cms.smpolia.com/application/admin/view/module/install.html
{extend name="index_layout"/}
{block name="main"}
<form class="layui-form" method="post">
    <input type="hidden" name="module" value="{$config.module}">
    <div class="layui-form-item">
        <table class="layui-table" lay-even style="max-width: 280px;">
            <colgroup>
                <col width="180">
                <col width="100">
                <col>
            </colgroup>
            <thead>
                <tr>
                    <td>是否适配系统版本</td>
                    <td class="text-center">{$version_check|raw}</td>
                </tr>
            </thead>
        </table>
    </div>
    {notempty name="need_module"}
    <div class="layui-form-item">
        <h4><b>模块依赖检查</b></h4>
        <table class="layui-table" lay-even style="max-width: 500px;">
            <colgroup>
                <col width="180">
                <col width="100">
                <col>
            </colgroup>
            <thead>
                <tr>
                    <th>模块</th>
                    <th>当前版本</th>
                    <th>所需版本</th>
                    <th class="text-center">检查结果</th>
                </tr>
            </thead>
            <tbody>
                {volist name="need_module" id="vo"}
                <tr>
                    <td>{$vo.module}</td>
                    <td width="100">{$vo.version}</td>
                    <td width="100">{$vo.version_need}</td>
                    <td class="text-center" width="100">{$vo.result|raw}</td>
                </tr>
                {/volist}
            </tbody>
        </table>
    </div>
    {/notempty}
    {notempty name="need_plugin"}
    <div class="layui-form-item">
        <h4><b>插件依赖检查</b></h4>
        <table class="layui-table" lay-even style="max-width: 500px;">
            <colgroup>
                <col width="180">
                <col width="100">
                <col>
            </colgroup>
            <thead>
                <tr>
                    <th>插件</th>
                    <th>当前版本</th>
                    <th>所需版本</th>
                    <th class="text-center">检查结果</th>
                </tr>
            </thead>
            <tbody>
                {volist name="need_plugin" id="vo"}
                <tr>
                    <td>{$vo.plugin}</td>
                    <td width="100">{$vo.version}</td>
                    <td width="100">{$vo.version_need}</td>
                    <td class="text-center" width="100">{$vo.result|raw}</td>
                </tr>
                {/volist}
            </tbody>
        </table>
    </div>
    {/notempty}
    {notempty name="table_check"}
    <div class="layui-form-item">
        <h4><b>数据表检查</b></h4>
        <table class="layui-table" lay-even style="max-width: 280px;">
            <colgroup>
                <col width="180">
                <col width="100">
                <col>
            </colgroup>
            <thead>
                <tr>
                    <th>数据表</th>
                    <th class="text-center">检查结果</th>
                </tr>
            </thead>
            <tbody>
                {volist name="table_check" id="vo"}
                <tr>
                    <td>{$vo.table}</td>
                    <td class="text-center">{$vo.result|raw}</td>
                </tr>
                {/volist}
            </tbody>
        </table>
    </div>
    {/notempty}
    <div class="layui-form-item">
        <h4><b>是否清除旧数据</b></h4>
        <div>
            <input type="radio" name="clear" value="0" title="否" checked>
            <input type="radio" name="clear" value="1" title="是">
        </div>
        <div class="layui-form-mid layui-word-aux">选择“是”,将删除数据库中已存在的相同数据表</div>
    </div>
    <div class="layui-form-item">
        <div>
    	<input type="checkbox" name="demo" title="安装演示数据" value="1" lay-skin="primary" checked>
        </div>
        <div class="layui-form-mid layui-word-aux">含有旧数据时,请勿勾选,以免数据冲突</div>
    </div>
    <div class="layui-form-item layer-footer">
        <button class="layui-btn" id="install" lay-submit>确认安装</button>
    </div>
</form>
{/block}
{block name="script"}
<script>
layui.use('yznForm', function() {
    var yznForm = layui.yznForm;

    $('#install').click(function() {
        var table_exists = false;
        var target;
        if ($('.layui-form i.text-danger').length) {
            layer.msg('系统版本过低或缺少依赖模块或插件',{ icon: 2})
            return false;
        }
        if ($('.layui-form span.text-danger').length) {
            table_exists = true;
        }
        if (table_exists && $('.layui-form input[name=clear]:checked').val() == 0) {
            layer.msg('数据库表存在冲突,如果需要覆盖原有数据,请选择“清除旧数据”',{ icon: 2})
            return false;
        }
        yznForm.listen();
    });
});
</script>
{/block}