Server : Apache
System : Linux iZ6xhqomji47p1Z 5.10.134-15.al8.x86_64 #1 SMP Thu Jul 20 00:44:04 CST 2023 x86_64
User : www ( 1000)
PHP Version : 8.1.30
Disable Function : 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
Directory :  /www/wwwroot/fsjlkj.cn/application/admin/template/seo/
Upload File :
Current Directory [ Writeable ] Root Directory [ Writeable ]


Current File : /www/wwwroot/fsjlkj.cn/application/admin/template/seo/site.htm
<!doctype html>
<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/plugins/bootstrap/css/bootstrap.min.css?v={$version}">
    <script type="text/javascript">
        var __root_dir__ = "__ROOT_DIR__";
        var __lang__ = "{$admin_lang}";
    </script>
    <script type="text/javascript" src="__SKIN__/js/jquery.js"></script>
    <script type="text/javascript" src="__PUBLIC__/plugins/layer-v3.1.0/layer.js"></script>
</head>
<style>
    .gray-bg {
        background-color: #f3f3f4;
    }
    .wrapper-content {
        padding: 20px;
    }
    .ibox {
        clear: both;
        margin-bottom: 25px;
        margin-top: 0;
        padding: 0;
    }
    .ibox-content {
        clear: both;
        background-color: #ffffff;
        color: inherit;
        padding: 15px 20px 20px 20px;
        border-color: #e7eaec;
        -webkit-border-image: none;
        -o-border-image: none;
        border-image: none;
        border-style: solid solid none;
        border-width: 1px 0px;
    }
    .progress {
        height: 20px;
        margin-bottom: 20px;
        overflow: hidden;
        background-color: #f5f5f5;
        border-radius: 4px;
        -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,.1);
        box-shadow: inset 0 1px 2px rgba(0,0,0,.1);
    }
    .progress-bar{
        height: 100%;
    }
    .progress-bar-success {
        background-color: #1c84c6;
    }
    .ncap-btn-green {
        margin: 20px auto 0;
        width: 100px;
        height: 36px;
        line-height: 36px;
        background-color: #4fc0e8;
        border:1px solid #3aa8cf;
        text-align: center;
        vertical-align: middle;
        display: block;
        padding: 0px 9px;
        border-radius: 3px;
        cursor: pointer;
        color: #fff;
        font-size: 13px;
    }
    a.ncap-btn-green:hover{
        background-color:#3ab0da;
        color: #fff;
        text-decoration: none;
    }
</style>
<body class="gray-bg">
<div class="ibox float-e-margins">
    <div class="ibox-content">
        <div class="progress progress-striped active">
            <div class="progress-bar progress-bar-success" role="progressbar"
                 aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width:0%">
            </div>
        </div>
        <div style="text-align:center" class="success">
            <div class="finash" style="">
                <span>
                    <font id="title">正在生成</font>
                    <span class="filepath"></span>,
                </span>
                <span class="filefindex"></span>
                已完成<span class="percent" style="color:#ff0000 ;font-size:14px;">0</span>%
            </div>
        </div>
    </div>
    <a href="javascript:void(0);" id="a_close_pop" onclick="parent.layer.closeAll();" class="ncap-btn-green" style="display: none;">关闭本窗口</a>
    <div class="ibox-content" id="error_msg" style="display: none">
    </div>
</div>
<script type="text/javascript">
    $('#a_close_pop').hide();
    //请求获取全部数据和页数
    var channelfid = articlefid = channel_index = 0;   //本次执行的下标
    var allpagetotal = channelpagetotal = articlepagetotal = 0;
    var achieve = channelachieve = articleachieve = 0;
    var type_index = 0;
    var msg = "";
    var timestamp1 = Date.parse(new Date());
    function sendIndex(){
        $.ajax({
             url:__root_dir__+"/index.php?m=home&c=Buildhtml&a=buildIndexAll&lang="+__lang__+"&_ajax=1",
             type:'GET',
             dataType:'json',
             data:{},
             timeout : 360000, //超时时间设置,单位毫秒 设置了 1小时
             success:function(res){
                 findex = res.data.typeid;
                 achieve = res.data.achievepage;
                 allpagetotal = res.data.allpagetotal;
                 channelpagetotal = res.data.channelpagetotal;
                 articlepagetotal = res.data.articlepagetotal;
                 if ( -1 == res.msg.indexOf('浏览')){
                     msg += res.msg;
                 }
                 progress = ((achieve/allpagetotal)*100).toFixed(1);
                 $("#title").html('成功创建首页');
                 $(".filepath").html('');
                 $(".progress-bar").css('width',progress+'%');
                 $(".percent").text(progress);
                 if (achieve === 1){
                     if (msg !== ""){
                         $("#error_msg").show();
                         $("#error_msg").prepend(msg);
                         msg = "";
                     }
                     sendChannel();
                 }
             },
             error:function(e){
                parent.layer.alert(e.responseText, {icon: 5, title:false});
             }
        });
    }

     function sendChannel(){
         $.ajax({
             url:__root_dir__+"/index.php?m=home&c=Buildhtml&a=buildChannel&lang="+__lang__+"&id=0&index="+channel_index+"&findex="+articlefid+"&achieve="+channelachieve+"&_ajax=1",
             type:'GET',
             dataType:'json',
             data:{},
             timeout : 360000, //超时时间设置,单位毫秒 设置了 1小时
             beforeSend:function(){
             },
             success:function(res){
                 channel_index = res.data.index;
                 articlefid = res.data.findex;
                 channelachieve = res.data.achievepage;
                 msg += res.msg;
                 progress = (((achieve+channelachieve)/allpagetotal)*100).toFixed(1);
                 $("#title").html('成功创建栏目:');
                 $(".filepath").html(res.data.findex+1);
                 if (res.data.index > 1) {
                     $(".filefindex").html('第'+res.data.index+'页,');
                 } else {
                     $(".filefindex").html('');
                 }
                 $(".progress-bar").css('width',progress+'%');
                 $(".percent").text(progress);
                 if (channelachieve >= channelpagetotal){
                     achieve = achieve + channelachieve;
                     if (msg !== ""){
                         $("#error_msg").show();
                         $("#error_msg").prepend(msg);
                         msg = "";
                     }
                     sendArticle();
                     return false;
                 }
                 sendChannel();
             },
             error:function(e){
                parent.layer.alert(e.responseText, {icon: 5, title:false});
             }
         });
     }
     
     function sendArticle() {
         $.ajax({
             url:__root_dir__+"/index.php?m=home&c=Buildhtml&a=buildArticle&lang="+__lang__+"&id=0&findex="+channelfid+"&achieve="+articleachieve+"&_ajax=1",
             type:'GET',
             dataType:'json',
             data:{},
             timeout : 360000, //超时时间设置,单位毫秒 设置了 1小时
             success:function(res){
                 channelfid = res.data.findex;
                 articleachieve = res.data.achievepage;
                 msg += res.msg;
                 progress = (((achieve+articleachieve)/allpagetotal)*100).toFixed(1);
                 $("#title").html('成功创建文档数:');
                 $(".filepath").html(channelfid);
                 $(".progress-bar").css('width',progress+'%');
                 $(".percent").text(progress);
                 if (articleachieve >= articlepagetotal){
                     var timestamp2 = Date.parse(new Date());
                     var timestamp3 = (timestamp2 - timestamp1) / 1000;
                     if (timestamp3 < 1) timestamp3 = 1;
                     $(".finash").remove();
                     $(".progress-bar").css('width','100%');
                     $(".progress").removeClass('progress-striped ').removeClass('active');
                     $(".success").html("生成完成,共耗时:<font color='red'>"+timestamp3+"</font> 秒");
                     $('#a_close_pop').show();
                     if (msg !== ""){
                         $("#error_msg").show();
                         $("#error_msg").prepend(msg);
                         msg = "";
                     }
                     return false;
                 }
                 sendArticle();
             },
             error:function(e){
                parent.layer.alert(e.responseText, {icon: 5, title:false});
             }
         });
    }

    var uphtmltype = {$uphtmltype|default=0}; // 更新选项
    var startid = 0; // 指定的文档起始ID
    var typeids = ''; // 指定文档之后,所关联的栏目ID
    var counts = ''; // 指定文档之后,所关联的栏目生成个数(与栏目id对应)
    /**
     * 指定文档生成全部(涉及栏目、首页)
     * @return {[type]} [description]
     */
    function sendAppointAll(){
        $.ajax({
             url:__root_dir__+"/index.php?m=home&c=Buildhtml&a=buildIndexAll&lang="+__lang__+"&uphtmltype="+uphtmltype+"&_ajax=1",
             type:'GET',
             dataType:'json',
             data:{},
             timeout : 360000, //超时时间设置,单位毫秒 设置了 1小时
             success:function(res){
                 findex = res.data.typeid;
                 achieve = res.data.achievepage;
                 allpagetotal = res.data.allpagetotal;
                 channelpagetotal = res.data.channelpagetotal;
                 articlepagetotal = res.data.articlepagetotal;
                 startid = res.data.startid;
                 typeids = res.data.typeids;
                 counts = res.data.counts;
                 if (0 == articlepagetotal) {
                     var timestamp2 = Date.parse(new Date());
                     var timestamp3 = (timestamp2 - timestamp1) / 1000;
                     if (timestamp3 < 1) timestamp3 = 1;
                     $(".finash").remove();
                     $(".progress-bar").css('width','100%');
                     $(".progress").removeClass('progress-striped ').removeClass('active');
                     $(".success").html("生成完成,共耗时:<font color='red'>"+timestamp3+"</font> 秒");
                     $('#a_close_pop').show();
                     if (msg !== "") {
                         $("#error_msg").show();
                         $("#error_msg").prepend(msg);
                         msg = "";
                     }
                     return false;
                 } else {
                     if ( -1 == res.msg.indexOf('浏览')){
                         msg += res.msg;
                     }
                     progress = ((achieve/allpagetotal)*100).toFixed(1);
                     $("#title").html('数据优化中');
                     $(".filepath").html('');
                     $(".progress-bar").css('width',progress+'%');
                     $(".percent").text(progress);
                     if (achieve === 1){
                         if (msg !== ""){
                             $("#error_msg").show();
                             $("#error_msg").prepend(msg);
                             msg = "";
                         }
                         sendAppointArticle();
                     }
                 }
             },
             error:function(e){
                parent.layer.alert(e.responseText, {icon: 5, title:false});
             }
        });
    }

    function sendAppointArticle(){
         $.ajax({
             url:__root_dir__+"/index.php?m=home&c=Buildhtml&a=buildArticle&lang="+__lang__+"&id=0&findex="+channelfid+"&achieve="+articleachieve+"&uphtmltype="+uphtmltype+"&startid="+startid+"&_ajax=1",
             type:'GET',
             dataType:'json',
             data:{},
             timeout : 360000, //超时时间设置,单位毫秒 设置了 1小时
             beforeSend:function(){
             },
             success:function(res){
                 channelfid = res.data.findex;
                 articleachieve = res.data.achievepage;
                 msg += res.msg;
                 progress = (((achieve+articleachieve)/allpagetotal)*100).toFixed(1);
                 $("#title").html('成功创建文档数:');
                 $(".filepath").html(channelfid);
                 $(".progress-bar").css('width',progress+'%');
                 $(".percent").text(progress);
                 if (articleachieve === articlepagetotal){
                     achieve = achieve + articleachieve;
                     if (msg !== ""){
                         $("#error_msg").show();
                         $("#error_msg").prepend(msg);
                         msg = "";
                     }
                     sendAppointChannel();
                     return false;
                 }
                 sendAppointArticle();
             },
             error:function(e){
                parent.layer.alert(e.responseText, {icon: 5, title:false});
             }
         });
    }

    function sendAppointChannel(){
         $.ajax({
             url:__root_dir__+"/index.php?m=home&c=Buildhtml&a=buildChannel&lang="+__lang__+"&id=0&index="+channel_index+"&findex="+articlefid+"&type_index="+type_index+"&achieve=0&uphtmltype="+uphtmltype+"&typeids="+typeids+"&counts="+counts+"&_ajax=1",
             type:'GET',
             dataType:'json',
             data:{},
             timeout : 360000, //超时时间设置,单位毫秒 设置了 1小时
             beforeSend:function(){
             },
             success:function(res){
                 channel_index = res.data.index;
                 articlefid = res.data.findex;
                 channelachieve += res.data.achievepage;  //生成栏目完成数据
                 type_index = res.data.type_index;
                 msg += res.msg;
                 progress = (((achieve+channelachieve)/allpagetotal)*100).toFixed(1);
                 $("#title").html('成功创建栏目:');
                 $(".filepath").html(res.data.findex);
                 if (res.data.index > 1) {
                     $(".filefindex").html('第'+res.data.index+'页,');
                 } else {
                     $(".filefindex").html('');
                 }
                 $(".progress-bar").css('width',progress+'%');
                 $(".percent").text(progress);
                 if (channelachieve === channelpagetotal){
                     var timestamp2 = Date.parse(new Date());
                     var timestamp3 = (timestamp2 - timestamp1) / 1000;
                     if (timestamp3 < 1) timestamp3 = 1;
                     $(".finash").remove();
                     $(".progress-bar").css('width','100%');
                     $(".progress").removeClass('progress-striped ').removeClass('active');
                     $(".success").html("生成完成,共耗时:<font color='red'>"+timestamp3+"</font> 秒");
                     $('#a_close_pop').show();
                     if (msg !== ""){
                         $("#error_msg").show();
                         $("#error_msg").prepend(msg);
                         msg = "";
                     }
                     return false;
                 }
                 sendAppointChannel();
             },
             error:function(e){
                parent.layer.alert(e.responseText, {icon: 5, title:false});
             }
         });
    }

    if (0 == uphtmltype) { // 更新全部
        sendIndex();
    } else if (1 == uphtmltype || 2 == uphtmltype) {
        sendAppointAll();
    }
</script>
</body>
</html>