<!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>top</title>
    <link rel="stylesheet" type="text/css" href="<!--{$cppath}-->css/basic_admin.css" />
    <script type="text/javascript" src="<!--{$urlpath}-->tpl/static/js/jquery.min.js"></script>
    <script type="text/javascript" src="<!--{$cppath}-->js/top.js"></script>
    <script type='text/javascript' src='<!--{$urlpath}-->tpl/static/laydate/laydate.js'></script>
    <script type="text/javascript" src="<!--{$urlpath}-->tpl/admincp/js/layer/layer.js"></script>
    <!--[if lte IE 6]>
<script type='text/javascript' src='<!--{$urlpath}-->tpl/staticjs/DD_belatedPNG-min.js'></script>
    <script language="javascript">DD_belatedPNG.fix('.logo');</script>
    <![endif]-->
</head>

<body>
<div class="modal-body  oya met-scrollbar" data-url="update" data-dataurl="" data-refresh="1" data-tablerefresh="undefined" data-tablerefresh-type="undefined" data-load=""><div class="text-center py-5 modal-loader h-100 hide" style="height:;"><div class="d-flex align-items-center justify-content-center h-100"><div class="loader loader-round-circle"></div></div></div><div class="modal-html"><div class="met-update">
            <div class="metadmin-fmbx">
                <h3 class="example-title">程序信息</h3>
                <input type="hidden" id="download_url" value=""/>
                <dl>
                    <dt>
                        <label class="form-control-label">检测更新</label>
                    </dt>
                    <dd>
                        <div class="form-group clearfix update">
                            <span class="text-help ml-2" id="check"></span>
                            <button type="button" class="btn btn-primary float-right btn-show-allsubcolumn2" id="update" style="display:none;">立即更新</button>
                        </div>
                    </dd>
                </dl>
                <dl>
                    <dt>
                        <label class="form-control-label">当前版本</label>
                    </dt>
                    <dd>
                        <div class="form-group clearfix version">
                            <span class="text-help ml-2" id="version"></span>

                        </div>

                    </dd>
                </dl>
                <dl>
                    <dt>
                        <label class="form-control-label">更新日志</label>
                    </dt>
                    <dd>
                        <div class="form-group clearfix ">
                            <a class="log_url text-help ml-2 " target="_blank" href="http://www.8cms.cn/">查看</a>
                        </div>
                    </dd>
                </dl>
                <dl>
                    <dt>
                        <label class="form-control-label">版权所有</label>
                    </dt>
                    <dd>
                        <div class="form-group clearfix copyright">
                            <a class="text-help ml-2" href="http://www.8cms.cn" target="_blank">Powered by LJCMS</a>
                        </div>
                    </dd>
                </dl>
                <h3 class="example-title">服务器信息</h3>
                <dl>
                    <dt>
                        <label class="form-control-label">操作系统</label>
                    </dt>
                    <dd>
                        <div class="form-group clearfix os">
                            <span class="text-help ml-2"><!--{$sysdata.os}--></span>
                        </div>
                    </dd>
                </dl>
                <dl>
                    <dt>
                        <label class="form-control-label">Web服务器</label>
                    </dt>
                    <dd>
                        <div class="form-group clearfix software">

                            <span class="text-help ml-2"><!--{$sysdata.webengine|filterhtml:30}--></span>
                        </div>
                    </dd>
                </dl>
                <dl>
                    <dt>
                        <label class="form-control-label">PHP版本</label>
                    </dt>
                    <dd>
                        <div class="form-group clearfix php">

                            <span class="text-help ml-2"><!--{$sysdata.phpversion}--></span>
                        </div>
                    </dd>
                </dl>
                <dl>
                    <dt>
                        <label class="form-control-label">MySQL版本</label>
                    </dt>
                    <dd>
                        <div class="form-group clearfix mysql">

                            <span class="text-help ml-2">5.5.53</span>
                        </div>
                    </dd>
                </dl>
            </div>
        </div></div></div>

<script type="application/javascript">
    $(function(){
        $.ajax({
            type: "POST",
            url: "admincp.php?c=frame&a=check_edition",
            cache: false,
            dataType: "json",
            success: function(data) {
                var json = eval(data);
                var response = json.slay;
                var result = json.msg;
                var data = json.data;
                $('#check').text(result);
                $('#version').text(data.edition_hao);
                $('#download_url').val(data.fileurl);
                if(response=='0'){
                    $('#update').css('display','block');
                }
            },

        });


        $('#update').click(function(e){
            var download_url=$('#download_url').val();
            var version=$('#version').text();
            layer.open({
                content: '是否立即更新最新版本？'
                ,btn: ['确定', '取消']
                ,yes: function(index){

                    $.ajax({
                        type: "POST",
                        url: "admincp.php?c=frame&a=update_edition",
                        data:{download_url:download_url,version:version},
                        async: false,
                        beforeSend: function(){
                            layer.msg('版本更新中，请不要操作界面！', {icon: 16,shade:0.01,time: 10000000000}, function() {
                            });
                        },
                        dataType: "json",
                        success: function(data) {
                            var json = eval(data);
                            var response = json.slay;
                            var result = json.msg;
                            if(response=='1'){
                                layer.msg('版本更新中，请不要操作界面！', {icon: 16,shade:0.01,time: 2000}, function() {
                                    alert(result);
                                    window.parent.location.reload();
                                    var index = parent.layer.getFrameIndex(window.name);
                                    parent.layer.close(index);
                                    parent.location.reload();
                                });

                            }else{
                                layer.msg(result);
                            }
                        },

                    });
                }
            });
        });
    });
</script>
</body>
</html>