瀏覽代碼

1,功能修复强化处理
2,其他细节

magicblack 4 年之前
父節點
當前提交
d0c7ac9588

+ 1 - 1
application/admin/controller/Template.php

@@ -174,7 +174,7 @@ class Template extends Base
             }
         }
 
-        $filter = '<\?|php|eval|server|assert|get|post|request|cookie|session|input|env|config|call|global|dump|print|phpinfo|fputs|fopen|global|chr|strtr|pack|system|gzuncompress|shell|base64|file|proc|preg|call|ini';
+        $filter = '<\?|php|eval|server|assert|get|post|request|cookie|session|input|env|config|call|global|dump|print|phpinfo|fputs|fopen|global|chr|strtr|pack|system|gzuncompress|shell|base64|file|proc|preg|call|ini|{:';
         $this->assign('filter',$filter);
 
         if (Request()->isPost()) {

+ 10 - 7
application/admin/controller/Urlsend.php

@@ -48,7 +48,10 @@ class Urlsend extends Base
         $this->_param['limit'] = intval($this->_param['limit']) <1 ? 50 : $this->_param['limit'];
         $ids = $this->_param['ids'];
         $ac2 = $this->_param['ac2'];
-
+        $col_time = 'time';
+        if($this->_param['range'] == '1'){
+            $col_time = 'time_add';
+        }
         $today = strtotime(date('Y-m-d'));
         $where = [];
         $col = '';
@@ -58,7 +61,7 @@ class Urlsend extends Base
                 $where['vod_status'] = ['eq',1];
 
                 if($ac2=='today'){
-                    $where['vod_time'] = ['gt',$today];
+                    $where['vod_'.$col_time] = ['gt',$today];
                 }
                 if(!empty($ids)){
                     $where['vod_id'] = ['in',$ids];
@@ -76,7 +79,7 @@ class Urlsend extends Base
                 $where['art_status'] = ['eq',1];
 
                 if($ac2=='today'){
-                    $where['art_time'] = ['gt',$today];
+                    $where['art_'.$col_time] = ['gt',$today];
 
                 }
                 if(!empty($ids)){
@@ -95,7 +98,7 @@ class Urlsend extends Base
                 $where['topic_status'] = ['eq',1];
 
                 if($ac2=='today'){
-                    $where['topic_time'] = ['gt',$today];
+                    $where['topic_'.$col_time] = ['gt',$today];
 
                 }
                 if(!empty($ids)){
@@ -114,7 +117,7 @@ class Urlsend extends Base
                 $where['actor_status'] = ['eq',1];
 
                 if($ac2=='today'){
-                    $where['actor_time'] = ['gt',$today];
+                    $where['actor_'.$col_time] = ['gt',$today];
 
                 }
                 if(!empty($ids)){
@@ -132,7 +135,7 @@ class Urlsend extends Base
                 $where['role_status'] = ['eq',1];
 
                 if($ac2=='today'){
-                    $where['role_time'] = ['gt',$today];
+                    $where['role_'.$col_time] = ['gt',$today];
 
                 }
                 if(!empty($ids)){
@@ -150,7 +153,7 @@ class Urlsend extends Base
                 $where['website_status'] = ['eq',1];
 
                 if($ac2=='today'){
-                    $where['website_time'] = ['gt',$today];
+                    $where['website_'.$col_time] = ['gt',$today];
 
                 }
                 if(!empty($ids)){

+ 11 - 1
application/admin/view/urlsend/index.html

@@ -40,6 +40,15 @@
                 </select>
             </div>
         </div>
+        <div class="layui-form-item">
+            <label class="layui-form-label">{:lang('admin/urlsend/send_range')}:</label>
+            <div class="layui-input-inline">
+                <div class="layui-input-inline w300">
+                    <input type="radio" name="range" value="0" title="{:lang('admin/urlsend/add_update')}" checked >
+                    <input type="radio" name="range" value="1" title="{:lang('admin/urlsend/add')}">
+                </div>
+            </div>
+        </div>
 
         <div class="layui-form-item">
             <label class="layui-form-label">{:lang('admin/urlsend/page_send_num')}:</label>
@@ -109,8 +118,9 @@
         var limit = $('#limit').val();
         var page = $('#page').val();
         var ac = $('#ac').val();
+        var range = $('input[name="range"]:checked').val();
 
-        $("#form_post").attr("action", curUrl + "?"+ 'ac=' +ac +'&limit='+limit +'&page='+page +'&' + p);
+        $("#form_post").attr("action", curUrl + "?"+ 'ac=' +ac +'&limit='+limit +'&page='+page + '&range=' + range +'&' + p );
         $("#form_post").submit();
     }
 

+ 14 - 1
application/common.php

@@ -1481,7 +1481,20 @@ function mac_url_content_img($content)
     if(empty($protocol)){
         $protocol = 'http';
     }
-    return str_replace('mac:',$protocol.':',$content);
+    $content = str_replace('mac:',$protocol.':',$content);
+    if(!empty($GLOBALS['config']['upload']['img_key'])){
+        $rule = mac_buildregx("<img[^>]*src\s*=\s*['" . chr(34) . "]?([\w/\-\:.]*)['" . chr(34) . "]?[^>]*>", "is");
+        preg_match_all($rule, $content, $matches);
+        if(is_array($matches[1])){
+            foreach ($matches[1] as $f => $matchfieldstr) {
+                $img_src = trim(preg_replace("/[ \r\n\t\f]{1,}/", " ", $matchfieldstr));
+                if(preg_match('/'.$GLOBALS['config']['upload']['img_key'].'/',$img_src)){
+                    $content = str_replace($img_src,$GLOBALS['config']['upload']['img_api'] . '' . $img_src,$content);
+                }
+            }
+        }
+    }
+    return $content;
 }
 
 function mac_alphaID($in, $to_num=false, $pad_up=false, $passKey='')

+ 1 - 1
application/extra/version.php

@@ -3,7 +3,7 @@ return array (
     'name' => '苹果CMS内容管理系统',
     'copyright' => 'MacCMS',
     'url' => '//github.com/magicblack',
-    'code' => '2022.1000.3020',
+    'code' => '2022.1000.3022',
     'license' => '开源版',
 );
 ?>

+ 4 - 1
application/lang/zh-cn.php

@@ -7,7 +7,7 @@
 *内部处理key:开头 model/、controller/、只在模块内使用
 */
 return [
-    'lang_ver'=>'3008+',
+    'lang_ver'=>'3021+',
     'hello'  => '欢迎使用',
     'maccms_name'=>'苹果CMS-v10',
     'maccms_copyright'=>'© MacCMS All Rights Reserved.',
@@ -1863,6 +1863,9 @@ https://www.baidu.com/123.jpg
     'admin/urlsend/page_send_num'=>'每页推送数',
     'admin/urlsend/start_page'=>'起始页码',
     'admin/urlsend/in_break_point_exec'=>'进入断点继续执行',
+    'admin/urlsend/send_range'=>'推送范围',
+    'admin/urlsend/add_update'=>'新增+更新',
+    'admin/urlsend/add'=>'新增',
 
     'admin/user/title'=>'用户管理',
     'admin/user/comment_record'=>'评论记录',

+ 4 - 1
application/lang/zh-tw.php

@@ -7,7 +7,7 @@
 *內部處理key:開頭 model/、controller/、只在模塊內使用
 */
 return [
-    'lang_ver'=>'3008+',
+    'lang_ver'=>'3021+',
     'hello'  => '歡迎使用',
     'maccms_name'=>'蘋果CMS-v10',
     'maccms_copyright'=>'© MacCMS All Rights Reserved.',
@@ -1863,6 +1863,9 @@ https://www.baidu.com/123.jpg
     'admin/urlsend/page_send_num'=>'每頁推送數',
     'admin/urlsend/start_page'=>'起始頁碼',
     'admin/urlsend/in_break_point_exec'=>'進入斷點繼續執行',
+    'admin/urlsend/send_range'=>'推送範圍',
+    'admin/urlsend/add_update'=>'新增+更新',
+    'admin/urlsend/add'=>'新增',
 
     'admin/user/title'=>'用戶管理',
     'admin/user/comment_record'=>'評論記錄',