From 6d723af7aa3dc12c053cb0bf66c03ee1024705e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=9C=E6=81=92?= <2323333339@qq.com> Date: Sat, 20 Feb 2021 18:35:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/factory.php | 3 +- core/function.php | 2 +- index.php | 341 +++++++++++++++++++++------------------------ public/include.php | 70 +++++----- 4 files changed, 195 insertions(+), 221 deletions(-) diff --git a/core/factory.php b/core/factory.php index 989b46d..e4b955c 100644 --- a/core/factory.php +++ b/core/factory.php @@ -27,7 +27,8 @@ class Editor } if (!file) return; let uploadUrl = 'index('/action/upload'); ?>'; - ($('input[name="cid"]').val()) && (uploadUrl = uploadUrl + '&cid=' + cid); + let cid = $('input[name="cid"]').val() + cid && (uploadUrl = uploadUrl + '&cid=' + cid); let random = Date.now().toString(36); let fileName = random + '.png' let uploadText = '[图片上传中...(' + random + ')]'; diff --git a/core/function.php b/core/function.php index 16bfb06..fd0d2b9 100644 --- a/core/function.php +++ b/core/function.php @@ -3,7 +3,7 @@ /* 获取主题当前版本号 */ function _getVersion() { - return "5.2.8"; + return "5.2.9"; }; /* 判断是否是手机 */ diff --git a/index.php b/index.php index b70d09e..200144b 100644 --- a/index.php +++ b/index.php @@ -8,197 +8,178 @@ */ ?> - - - - need('public/include.php'); ?> - - - - - - + need('public/include.php'); ?> + + + + + -
- need('public/header.php'); ?> -
-
-
- options->JIndex_Carousel; - if ($carousel_text) { - $carousel_arr = explode("\r\n", $carousel_text); - if (count($carousel_arr) > 0) { - for ($i = 0; $i < count($carousel_arr); $i++) { - $img = explode("||", $carousel_arr[$i])[0]; - $url = explode("||", $carousel_arr[$i])[1]; - $title = explode("||", $carousel_arr[$i])[2]; - $carousel[] = array("img" => trim($img), "url" => trim($url), "title" => trim($title)); - }; - } - } - $recommend = []; - $recommend_text = $this->options->JIndex_Recommend; - if ($recommend_text) { - $recommend_arr = explode("||", $recommend_text); - if (count($recommend_arr) === 2) $recommend = $recommend_arr; - } - ?> - 0 || sizeof($recommend) === 2) : ?> -
- 0) : ?> -
-
- - - -
-
-
-
-
- - -
- - widget('Widget_Archive@' . $cid, 'pageSize=1&type=post', 'cid=' . $cid)->to($item); ?> -
- - <?php $item->title() ?> - -
- 推荐 -
title() ?>
-
-
- -
- -
- - options->JIndex_Hot === "on") : ?> - widget('Widget_Contents_Hot@Index', 'pageSize=4')->to($item); ?> -
- -
- - options->JIndex_Ad; - $index_ad = null; - if ($index_ad_text) { - $index_ad_arr = explode("||", $index_ad_text); - if (count($index_ad_arr) === 2) $index_ad = array("image" => trim($index_ad_arr[0]), "url" => trim($index_ad_arr[1])); - } - ?> - - - - -
-
    -
  • 最新文章
  • -
  • 热门文章
  • -
  • 评论最多
  • -
  • 点赞最多
  • -
  • -
- options->JIndex_Notice; - $index_notice = null; - if ($index_notice_text) { - $index_notice_arr = explode("||", $index_notice_text); - if (count($index_notice_arr) === 2) $index_notice = array("text" => trim($index_notice_arr[0]), "url" => trim($index_notice_arr[1])); - } - ?> - -
- - - - - -
- -
-
-
    -
      -
    • -
      -
      -
      -
      -

      -

      -
      -
      -
    • -
    • -
      -
      -
      -
      -

      -

      -
      -
      -
    • -
    -
    +
    + need('public/header.php'); ?> +
    +
    +
    + options->JIndex_Carousel; + if ($carousel_text) { + $carousel_arr = explode("\r\n", $carousel_text); + if (count($carousel_arr) > 0) { + for ($i = 0; $i < count($carousel_arr); $i++) { + $img = explode("||", $carousel_arr[$i])[0]; + $url = explode("||", $carousel_arr[$i])[1]; + $title = explode("||", $carousel_arr[$i])[2]; + $carousel[] = array("img" => trim($img), "url" => trim($url), "title" => trim($title)); + }; + } + } + $recommend = []; + $recommend_text = $this->options->JIndex_Recommend; + if ($recommend_text) { + $recommend_arr = explode("||", $recommend_text); + if (count($recommend_arr) === 2) $recommend = $recommend_arr; + } + ?> + 0 || sizeof($recommend) === 2) : ?> +
    + 0) : ?> +
    +
    + + + +
    +
    +
    +
    -
    查看更多
    + + +
    + + widget('Widget_Archive@' . $cid, 'pageSize=1&type=post', 'cid=' . $cid)->to($item); ?> +
    + + <?php $item->title() ?> + +
    + 推荐 +
    title() ?>
    +
    +
    + +
    +
    - need('public/aside.php'); ?> + + options->JIndex_Hot === "on") : ?> + widget('Widget_Contents_Hot@Index', 'pageSize=4')->to($item); ?> +
    + +
    + + options->JIndex_Ad; + $index_ad = null; + if ($index_ad_text) { + $index_ad_arr = explode("||", $index_ad_text); + if (count($index_ad_arr) === 2) $index_ad = array("image" => trim($index_ad_arr[0]), "url" => trim($index_ad_arr[1])); + } + ?> + + + + +
    +
      +
    • 最新文章
    • +
    • 热门文章
    • +
    • 评论最多
    • +
    • 点赞最多
    • +
    • +
    + options->JIndex_Notice; + $index_notice = null; + if ($index_notice_text) { + $index_notice_arr = explode("||", $index_notice_text); + if (count($index_notice_arr) === 2) $index_notice = array("text" => trim($index_notice_arr[0]), "url" => trim($index_notice_arr[1])); + } + ?> + +
    + + + + + +
    + +
    +
    +
      +
        +
      • +
        +
        +
        +
        +

        +

        +
        +
        +
      • +
      • +
        +
        +
        +
        +

        +

        +
        +
        +
      • +
      +
      - need('public/footer.php'); ?> +
      查看更多
      +
      + need('public/aside.php'); ?>
      + need('public/footer.php'); ?> +
      \ No newline at end of file diff --git a/public/include.php b/public/include.php index ad86d73..4ddbb3f 100644 --- a/public/include.php +++ b/public/include.php @@ -1,37 +1,32 @@ - @@ -43,25 +38,23 @@ <?php $this->archiveTitle(array('category' => '分类 %s 下的文章', 'search' => '包含关键字 %s 的文章', 'tag' => '标签 %s 下的文章', 'author' => '%s 发布的文章'), '', ' - '); ?><?php $this->options->title(); ?> is('single')) : ?> - - - header('keywords=&description='); ?> + + + header('keywords=&description='); ?> - header(); ?> + header(); ?> - options->JAside) && $this->options->JAside_Weather_Key) : ?> - + - @@ -70,8 +63,7 @@ - options->JCursorEffects && $this->options->JCursorEffects !== 'off') : ?> - + \ No newline at end of file