Your Name 3 months ago
parent
commit
1db005d05a
45 changed files with 755 additions and 57 deletions
  1. 31
    2
      apps/admin/controller/content/LinkController.php
  2. 8
    2
      apps/admin/controller/system/CityController.php
  3. 44
    2
      apps/admin/model/content/LinkModel.php
  4. 77
    4
      apps/admin/view/default/content/link.html
  5. 26
    0
      apps/admin/view/default/system/city.html
  6. 26
    0
      apps/common/HomeController.php
  7. 42
    10
      apps/home/controller/IndexController.php
  8. 109
    3
      apps/home/controller/ParserController.php
  9. 12
    0
      apps/home/model/ParserModel.php
  10. 7
    0
      core/function/helper.php
  11. BIN
      static/upload/image/20240826/1724603617908669.png
  12. BIN
      static/upload/image/20240826/1724603904511317.png
  13. BIN
      static/upload/image/20240826/1724604698835047.png
  14. 1
    0
      template/dafeult/about.html
  15. 1
    0
      template/dafeult/case.html
  16. 1
    0
      template/dafeult/caselist.html
  17. 20
    5
      template/dafeult/city.html
  18. 2
    2
      template/dafeult/foot.html
  19. 62
    0
      template/dafeult/foot_city.html
  20. 16
    2
      template/dafeult/head.html
  21. 55
    0
      template/dafeult/head_city.html
  22. 13
    0
      template/dafeult/hot.html
  23. 10
    5
      template/dafeult/index.html
  24. 9
    2
      template/dafeult/message.html
  25. 1
    0
      template/dafeult/news.html
  26. 3
    0
      template/dafeult/newslist.html
  27. 3
    0
      template/dafeult/team.html
  28. 5
    0
      template/dafeult/teamlist.html
  29. 2
    0
      template/dafeult/wap/about.html
  30. 2
    1
      template/dafeult/wap/case.html
  31. 2
    0
      template/dafeult/wap/caselist.html
  32. 18
    5
      template/dafeult/wap/city.html
  33. 1
    1
      template/dafeult/wap/foot.html
  34. 41
    0
      template/dafeult/wap/foot_city.html
  35. 11
    2
      template/dafeult/wap/head.html
  36. 34
    0
      template/dafeult/wap/head_city.html
  37. 13
    0
      template/dafeult/wap/hot.html
  38. 8
    4
      template/dafeult/wap/index.html
  39. 12
    3
      template/dafeult/wap/message.html
  40. 2
    1
      template/dafeult/wap/news.html
  41. 1
    0
      template/dafeult/wap/newslist.html
  42. 2
    1
      template/dafeult/wap/team.html
  43. 1
    0
      template/dafeult/wap/teamlist.html
  44. 9
    0
      友情链接增加cid.txt
  45. 12
    0
      新增自定义foreach标签.txt

+ 31
- 2
apps/admin/controller/content/LinkController.php View File

24
     // 友情链接列表
24
     // 友情链接列表
25
     public function index()
25
     public function index()
26
     {
26
     {
27
+        //调用城市
28
+        $city_list = $this->model->getCity();
29
+        //var_dump($city_list);
30
+        $this->assign('city_list', $city_list);
31
+
27
         if ((! ! $id = get('id', 'int')) && $result = $this->model->getLink($id)) {
32
         if ((! ! $id = get('id', 'int')) && $result = $this->model->getLink($id)) {
28
             $this->assign('more', true);
33
             $this->assign('more', true);
29
             $this->assign('link', $result);
34
             $this->assign('link', $result);
50
             $link = post('link');
55
             $link = post('link');
51
             $logo = post('logo');
56
             $logo = post('logo');
52
             $sorting = post('sorting');
57
             $sorting = post('sorting');
53
-            
58
+            $city = post('city');
59
+
60
+
61
+            //查询城市名称
62
+            $cityName = $this->model->getCityName($city);
63
+
64
+
54
             if (! $gid) {
65
             if (! $gid) {
55
                 $gid = $this->model->getMaxGid() + 1;
66
                 $gid = $this->model->getMaxGid() + 1;
56
             }
67
             }
79
                 'name' => $name,
90
                 'name' => $name,
80
                 'link' => $link,
91
                 'link' => $link,
81
                 'logo' => $logo,
92
                 'logo' => $logo,
93
+                'city' => $city,
94
+                'csm' => $cityName,
82
                 'sorting' => $sorting,
95
                 'sorting' => $sorting,
83
                 'create_user' => session('username'),
96
                 'create_user' => session('username'),
84
                 'update_user' => session('username')
97
                 'update_user' => session('username')
160
             $link = post('link');
173
             $link = post('link');
161
             $logo = post('logo');
174
             $logo = post('logo');
162
             $sorting = post('sorting');
175
             $sorting = post('sorting');
163
-            
176
+            $city = post('city');
177
+
178
+            //查询城市名称
179
+            $cityName = $this->model->getCityName($city);
180
+
164
             if (! $gid) {
181
             if (! $gid) {
165
                 $gid = $this->model->getMaxGid() + 1;
182
                 $gid = $this->model->getMaxGid() + 1;
166
             }
183
             }
184
                 'name' => $name,
201
                 'name' => $name,
185
                 'link' => $link,
202
                 'link' => $link,
186
                 'logo' => $logo,
203
                 'logo' => $logo,
204
+                'city' => $city,
205
+                'csm' => $cityName,
187
                 'sorting' => $sorting,
206
                 'sorting' => $sorting,
188
                 'update_user' => session('username')
207
                 'update_user' => session('username')
189
             );
208
             );
200
                 location(- 1);
219
                 location(- 1);
201
             }
220
             }
202
         } else {
221
         } else {
222
+
223
+
224
+
203
             // 调取修改内容
225
             // 调取修改内容
204
             $this->assign('mod', true);
226
             $this->assign('mod', true);
205
             if (! $result = $this->model->getLink($id)) {
227
             if (! $result = $this->model->getLink($id)) {
206
                 error('编辑的内容已经不存在!', - 1);
228
                 error('编辑的内容已经不存在!', - 1);
207
             }
229
             }
230
+
231
+            //var_dump($result);
232
+            //调用城市
233
+            $city_list = $this->model->getCity($result->city);
234
+            //var_dump($city_list);
235
+            $this->assign('city_list', $city_list);
236
+
208
             $this->assign('gids', $this->model->getGid());
237
             $this->assign('gids', $this->model->getGid());
209
             $this->assign('link', $result);
238
             $this->assign('link', $result);
210
             $this->display('content/link.html');
239
             $this->display('content/link.html');

+ 8
- 2
apps/admin/controller/system/CityController.php View File

78
                 $mutietitle = post('mutietitle');
78
                 $mutietitle = post('mutietitle');
79
                 $mutietitle = str_replace(',', ',', $mutietitle);
79
                 $mutietitle = str_replace(',', ',', $mutietitle);
80
                 $pid = post('pid', 'int');
80
                 $pid = post('pid', 'int');
81
+                $logo = post('logo');
81
                 if (! $mutititle) {
82
                 if (! $mutititle) {
82
                     alert_back('城市名称不能为空!');
83
                     alert_back('城市名称不能为空!');
83
                 }
84
                 }
109
                         'email' => '',
110
                         'email' => '',
110
                         'qq' => '',
111
                         'qq' => '',
111
                         'address' => '',
112
                         'address' => '',
113
+                        'logo' => $logo
112
                     );
114
                     );
113
                 }
115
                 }
114
             }else{
116
             }else{
122
                 $seo_title = post('seo_title');
124
                 $seo_title = post('seo_title');
123
                 $seo_keywords = post('seo_keywords');
125
                 $seo_keywords = post('seo_keywords');
124
                 $seo_description = post('seo_description');
126
                 $seo_description = post('seo_description');
127
+                $logo = post('logo');
125
 
128
 
126
                 $contact = post('contact');
129
                 $contact = post('contact');
127
                 $mobile = post('mobile');
130
                 $mobile = post('mobile');
159
                     'fax' => $fax,
162
                     'fax' => $fax,
160
                     'email' => $email,
163
                     'email' => $email,
161
                     'qq' => $qq,
164
                     'qq' => $qq,
162
-                    'address' => $address
165
+                    'address' => $address,
166
+                    'logo' => $logo
163
                 );
167
                 );
164
             }
168
             }
165
             // 执行添加
169
             // 执行添加
229
             $email = post('email');
233
             $email = post('email');
230
             $qq = post('qq');
234
             $qq = post('qq');
231
             $address = post('address');
235
             $address = post('address');
236
+            $logo = post('logo');
232
 
237
 
233
             if($id==$pid){
238
             if($id==$pid){
234
                 alert_back('区域混乱啦!');
239
                 alert_back('区域混乱啦!');
256
                 'fax' => $fax,
261
                 'fax' => $fax,
257
                 'email' => $email,
262
                 'email' => $email,
258
                 'qq' => $qq,
263
                 'qq' => $qq,
259
-                'address' => $address
264
+                'address' => $address,
265
+                'logo' => $logo
260
             );
266
             );
261
             // 执行添加
267
             // 执行添加
262
             if ($this->model->modCity($id, $data)) {
268
             if ($this->model->modCity($id, $data)) {

+ 44
- 2
apps/admin/model/content/LinkModel.php View File

17
     public function getList()
17
     public function getList()
18
     {
18
     {
19
         return parent::table('ay_link')->where("acode='" . session('acode') . "'")
19
         return parent::table('ay_link')->where("acode='" . session('acode') . "'")
20
-            ->order('gid asc,sorting asc,id asc')
20
+            ->order('city asc,gid asc,sorting asc,id asc')
21
             ->page()
21
             ->page()
22
             ->select();
22
             ->select();
23
     }
23
     }
27
     {
27
     {
28
         return parent::table('ay_link')->where("acode='" . session('acode') . "'")
28
         return parent::table('ay_link')->where("acode='" . session('acode') . "'")
29
             ->like($field, $keyword)
29
             ->like($field, $keyword)
30
-            ->order('gid asc,sorting asc,id asc')
30
+            ->order('city asc,gid asc,sorting asc,id asc')
31
             ->page()
31
             ->page()
32
             ->select();
32
             ->select();
33
     }
33
     }
82
     {
82
     {
83
         return parent::table('ay_link')->column('logo');
83
         return parent::table('ay_link')->column('logo');
84
     }
84
     }
85
+
86
+    /*
87
+     * 调用所有城市列表
88
+     */
89
+    public function getCity($cid=0){
90
+        $ids = parent::table('ay_city')->where("pid=0")->column('id');
91
+        $is = '-1';
92
+        foreach ($ids as $k=>$v){
93
+            $is = $is.','.$v;
94
+        }
95
+        $list = parent::table('ay_city')->where("id IN(1,2,9,22) OR pid IN($is)")->order("etitle ASC")->select();;
96
+        //return $list;
97
+
98
+        // 将结果转换为数组
99
+        $dataArray = [];
100
+        foreach ($list as $row) {
101
+            $dataArray[] = (array)$row;
102
+        }
103
+
104
+        $data = [];
105
+        foreach($dataArray as $k=>$v){
106
+            $str = $v['etitle'];
107
+            $zm = $str[0];
108
+            if((int)$cid === (int)$v['id']){
109
+                $v['selected'] = 1;
110
+            }else{
111
+                $v['selected'] = 0;
112
+            }
113
+            $data[$zm][] = $v;
114
+        }
115
+        return $data;
116
+
117
+    }
118
+
119
+    public function getCityName($id){
120
+        if($id > 0){
121
+            return parent::table('ay_city')->where("id=$id")->value('title');
122
+        }else{
123
+            return "全国";
124
+        }
125
+    }
126
+
85
 }
127
 }

+ 77
- 4
apps/admin/view/default/content/link.html View File

15
 	  			<thead>
15
 	  			<thead>
16
                     <tr>
16
                     <tr>
17
                     	<th>分组(gid)</th>
17
                     	<th>分组(gid)</th>
18
+                        <th>城市</th>
18
                         <th>名称</th>
19
                         <th>名称</th>
19
                         <th>链接</th>
20
                         <th>链接</th>
20
                         <th>Logo</th>
21
                         <th>Logo</th>
26
                     {foreach $links(key,value)}
27
                     {foreach $links(key,value)}
27
                     <tr>
28
                     <tr>
28
                     	<td>[value->gid]</td>
29
                     	<td>[value->gid]</td>
30
+                        <td>[value->csm]</td>
29
                         <td>[value->name]</td>
31
                         <td>[value->name]</td>
30
                         <td>[value->link]</td>
32
                         <td>[value->link]</td>
31
                         <td><img src="{SITE_DIR}[value->logo]" style="height:20px;"></td>
33
                         <td><img src="{SITE_DIR}[value->logo]" style="height:20px;"></td>
51
 	  		 	<div class="layui-form-item">
53
 	  		 	<div class="layui-form-item">
52
                      <label class="layui-form-label">分组</label>
54
                      <label class="layui-form-label">分组</label>
53
                      <div class="layui-input-block">
55
                      <div class="layui-input-block">
54
-                     	<select name="gid">	
56
+                     	<select name="gid">
57
+
58
+
55
                      		{foreach $gids(key,value)}
59
                      		{foreach $gids(key,value)}
56
 	                			<option value="[value]" >分组[value]</option>
60
 	                			<option value="[value]" >分组[value]</option>
57
 	                		{/foreach}
61
 	                		{/foreach}
62
+
63
+
58
 	                		<option value="" >自动新增分组</option>
64
 	                		<option value="" >自动新增分组</option>
59
 	                	</select>
65
 	                	</select>
60
                      </div>
66
                      </div>
61
                 </div>
67
                 </div>
62
-                
68
+
69
+
70
+
71
+
72
+
73
+                 <div class="layui-form-item">
74
+                     <label class="layui-form-label">城市</label>
75
+                     <div class="layui-input-block">
76
+                         <select name="city" id="city">
77
+                             <option value="0">全国</option>
78
+                             {foreach $city_list(key,value)}
79
+                             <optgroup label="[key]">
80
+                             {php}
81
+                             foreach($value as $k2=>$v2){
82
+                             echo '<option value="'.$v2['id'].'" >'.$v2['title'].'</option>';
83
+                             }
84
+                             {/php}
85
+                             {/foreach}
86
+                             </optgroup>
87
+                         </select>
88
+                     </div>
89
+                 </div>
90
+
91
+                 <style>
92
+                     .layui-form-select dl{
93
+                         z-index: 9999;
94
+                         max-height: 450px;
95
+                     }
96
+                </style>
97
+
63
                  <div class="layui-form-item">
98
                  <div class="layui-form-item">
64
                      <label class="layui-form-label">名称</label>
99
                      <label class="layui-form-label">名称</label>
65
                      <div class="layui-input-block">
100
                      <div class="layui-input-block">
120
                      	<input type="text" name="gid" required  lay-verify="required" value="{$link->gid}" placeholder="请输入分组"  class="layui-input">
155
                      	<input type="text" name="gid" required  lay-verify="required" value="{$link->gid}" placeholder="请输入分组"  class="layui-input">
121
                      </div>
156
                      </div>
122
                 </div>
157
                 </div>
123
-                
124
-                <div class="layui-form-item">
158
+
159
+                 {php}
160
+                    //var_dump($link->city);
161
+                    //var_dump($link);
162
+                    //$link->city
163
+                 {/php}
164
+
165
+                 <div class="layui-form-item">
166
+                     <label class="layui-form-label">城市</label>
167
+                     <div class="layui-input-block">
168
+                         <select name="city" id="city">
169
+                             <option value="0">全国</option>
170
+                             {foreach $city_list(key,value)}
171
+                             <optgroup label="[key]">
172
+                                 {php}
173
+                                 foreach($value as $k2=>$v2){
174
+                                 if($v2['selected'] === 1){
175
+                                    $cur = 'selected';
176
+                                 }else{
177
+                                    $cur = '';
178
+                                 }
179
+                                 echo '<option value="'.$v2['id'].'" '.$cur.'>'.$v2['title'].'</option>';
180
+                                 }
181
+                                 {/php}
182
+                                 {/foreach}
183
+                             </optgroup>
184
+                         </select>
185
+                     </div>
186
+                 </div>
187
+
188
+                 <style>
189
+                     .layui-form-select dl{
190
+                         z-index: 9999;
191
+                         max-height: 450px;
192
+                     }
193
+                 </style>
194
+
195
+
196
+
197
+                 <div class="layui-form-item">
125
                      <label class="layui-form-label">名称</label>
198
                      <label class="layui-form-label">名称</label>
126
                      <div class="layui-input-block">
199
                      <div class="layui-input-block">
127
                      	<input type="text" name="name" required  lay-verify="required" value="{$link->name}" placeholder="请输入名称"  class="layui-input">
200
                      	<input type="text" name="name" required  lay-verify="required" value="{$link->name}" placeholder="请输入名称"  class="layui-input">

+ 26
- 0
apps/admin/view/default/system/city.html View File

108
                             <input type="text" name="etitle" placeholder="请输入城市拼音" class="layui-input">
108
                             <input type="text" name="etitle" placeholder="请输入城市拼音" class="layui-input">
109
                         </div>
109
                         </div>
110
                     </div>
110
                     </div>
111
+
112
+                            <div class="layui-form-item">
113
+                                <label class="layui-form-label">城市LOGO</label>
114
+                                <div class="layui-input-inline">
115
+                                    <input type="text" name="logo" id="logo" value="{$sites->logo}" placeholder="请上传城市LOGO图"  class="layui-input">
116
+                                </div>
117
+                                <button type="button" class="layui-btn upload" data-des="logo">
118
+                                    <i class="layui-icon">&#xe67c;</i>上传图片
119
+                                </button>
120
+                                <div id="logo_box" class="pic"><dl><dt>{if(@[$sites->logo])}<img src="{SITE_DIR}{$sites->logo}" data-url="{$sites->logo}"></dt><dd>删除</dd></dl>{/if}</div>
121
+                            </div>
122
+
123
+
111
                     <div class="layui-form-item">
124
                     <div class="layui-form-item">
112
                         <label class="layui-form-label">参数</label>
125
                         <label class="layui-form-label">参数</label>
113
                         <div class="layui-input-block">
126
                         <div class="layui-input-block">
236
                                         <input type="text" name="etitle" required lay-verify="required" value="{$city->etitle}" placeholder="请输入城市英文城市名称" class="layui-input">
249
                                         <input type="text" name="etitle" required lay-verify="required" value="{$city->etitle}" placeholder="请输入城市英文城市名称" class="layui-input">
237
                                     </div>
250
                                     </div>
238
                                 </div>
251
                                 </div>
252
+
253
+                            <div class="layui-form-item">
254
+                                <label class="layui-form-label">城市LOGO</label>
255
+                                <div class="layui-input-inline">
256
+                                    <input type="text" name="logo" id="logo" value="{$city->logo}" placeholder="请上传城市LOGO图"  class="layui-input">
257
+                                </div>
258
+                                <button type="button" class="layui-btn upload" data-des="logo">
259
+                                    <i class="layui-icon">&#xe67c;</i>上传图片
260
+                                </button>
261
+                                <div id="logo_box" class="pic"><dl><dt>{if(@[$city->logo])}<img src="{SITE_DIR}{$city->logo}" data-url="{$city->logo}"></dt><dd>删除</dd></dl>{/if}</div>
262
+                            </div>
263
+
264
+
239
                                 <div class="layui-form-item">
265
                                 <div class="layui-form-item">
240
                                     <label class="layui-form-label">参数</label>
266
                                     <label class="layui-form-label">参数</label>
241
                                     <div class="layui-input-block">
267
                                     <div class="layui-input-block">

+ 26
- 0
apps/common/HomeController.php View File

10
 
10
 
11
 use core\basic\Controller;
11
 use core\basic\Controller;
12
 use core\basic\Config;
12
 use core\basic\Config;
13
+use app\home\model\ParserModel;
13
 
14
 
14
 class HomeController extends Controller
15
 class HomeController extends Controller
15
 {
16
 {
16
 
17
 
17
     public function __construct()
18
     public function __construct()
18
     {
19
     {
20
+        $this->model = new ParserModel();
21
+
19
         // 自动缓存基础信息
22
         // 自动缓存基础信息
20
         cache_config();
23
         cache_config();
21
         
24
         
100
                 cookie('city',$this->config('firstcity'));
103
                 cookie('city',$this->config('firstcity'));
101
             }else{
104
             }else{
102
                 cookie('city',$domain_first);
105
                 cookie('city',$domain_first);
106
+                //var_dump($domain_first);
107
+                //设置新的cookie 城市id
108
+                //$cityid = 1;
109
+                $cityid = $this->model->getCityId($domain_first);
110
+                if(empty($cityid)){
111
+                    $cityid = 0;
112
+                }
113
+                //var_dump($cityid);
114
+                cookie('city_id',$cityid);
115
+                //模板赋值变量 用于sql 同样查询数组可循环
116
+                $this->assign('cityId',$cityid);
117
+                //测试数据
118
+                /*$testArray = [
119
+                    1,2,3,4
120
+                ];
121
+                $this->assign('testArray',$testArray);*/
122
+
123
+                //输出logo
124
+                $citylogo = $this->model->getCityLogo($domain_first);
125
+                if(empty($citylogo)){
126
+                    $citylogo = $this->model->getSiteLogo();
127
+                }
128
+                $this->assign('citylogo',$citylogo);
103
             }
129
             }
104
         }else{
130
         }else{
105
             $cur_city = array_filter($citys, function($t) use ($domain) { return $t['isurl'] == $domain; });
131
             $cur_city = array_filter($citys, function($t) use ($domain) { return $t['isurl'] == $domain; });

+ 42
- 10
apps/home/controller/IndexController.php View File

40
         
40
         
41
         if (PATH) { // 采用pathinfo模式及p参数伪静态模式
41
         if (PATH) { // 采用pathinfo模式及p参数伪静态模式
42
             if ($url_rule_type == 2 && stripos(URL, $_SERVER['SCRIPT_NAME']) !== false) { // 禁止伪静态时带index.php访问
42
             if ($url_rule_type == 2 && stripos(URL, $_SERVER['SCRIPT_NAME']) !== false) { // 禁止伪静态时带index.php访问
43
-                _404('您访问的内容不存在,请核对后重试!');
43
+                //_404('您访问的内容不存在,请核对后重试!');
44
+                _301();
44
             }
45
             }
45
             $path = PATH;
46
             $path = PATH;
46
         } elseif ($url_rule_type == 3 && isset($_SERVER["QUERY_STRING"]) && $qs = $_SERVER["QUERY_STRING"]) { // 采用简短传参模式
47
         } elseif ($url_rule_type == 3 && isset($_SERVER["QUERY_STRING"]) && $qs = $_SERVER["QUERY_STRING"]) { // 采用简短传参模式
216
                             $this->getContentPage($data);
217
                             $this->getContentPage($data);
217
                         } else {
218
                         } else {
218
                             //var_dump(strtolower($path_arr[0]));
219
                             //var_dump(strtolower($path_arr[0]));
219
-                            _404('您访问的内容不存在,请核对后重试!');
220
+                            //_404('您访问的内容不存在,请核对后重试!');
221
+                            _301();
220
                         }
222
                         }
221
                     } else {
223
                     } else {
222
                         define('CMS_PAGE', true); // 使用cms分页处理模型
224
                         define('CMS_PAGE', true); // 使用cms分页处理模型
227
                                 $this->getListPage($sort);
229
                                 $this->getListPage($sort);
228
                             }
230
                             }
229
                         } else {
231
                         } else {
230
-                            _404('您访问的页面不存在,请核对后重试!');
232
+                            //_404('您访问的页面不存在,请核对后重试!');
233
+                            _301();
231
                         }
234
                         }
232
                     }
235
                     }
233
             }
236
             }
249
     // 首页
252
     // 首页
250
     private function getIndexPage()
253
     private function getIndexPage()
251
     {
254
     {
252
-        $content = parent::parser($this->htmldir . 'index.html'); // 框架标签解析
253
-        $content = $this->parser->parserBefore($content); // CMS公共标签前置解析
254
 
255
 
255
         $cur_city = cookie('city');
256
         $cur_city = cookie('city');
257
+
258
+        //tyqngp
259
+        //var_dump($cur_city);
260
+        //var_dump(get_http_url());
261
+
262
+        $domain_url = get_http_url();
263
+        $ap = explode('.',$domain_url);
264
+        if($ap[1] == 'cn' || $ap[1] == 'com'){
265
+            $aps = $ap[0];
266
+            $aps = str_replace('https://', '', $aps);
267
+            $aps = str_replace('http://', '', $aps);
268
+        }else{
269
+            $aps = $ap[1];
270
+        }
271
+        //var_dump($aps);
272
+
273
+        if($cur_city == $aps){
274
+            //城市页面
275
+            $content = parent::parser($this->htmldir . 'city.html'); // 框架标签解析
276
+        }else{
277
+            //主页
278
+            $content = parent::parser($this->htmldir . 'index.html'); // 框架标签解析
279
+        }
280
+
281
+        $content = $this->parser->parserBefore($content); // CMS公共标签前置解析
282
+        
256
         if( !! $cur_city ){ //如果是分站
283
         if( !! $cur_city ){ //如果是分站
257
             $citys = Config::get('citys');
284
             $citys = Config::get('citys');
258
             $city = $citys[$cur_city];
285
             $city = $citys[$cur_city];
262
         }else{
289
         }else{
263
             $content = str_replace('{pboot:pagetitle}', $this->config('index_title') ?: '{pboot:sitetitle}-{pboot:sitesubtitle}', $content);
290
             $content = str_replace('{pboot:pagetitle}', $this->config('index_title') ?: '{pboot:sitetitle}-{pboot:sitesubtitle}', $content);
264
         }
291
         }
265
-        
292
+
293
+
266
         $content = $this->parser->parserPositionLabel($content, - 1, '首页', SITE_INDEX_DIR . '/'); // CMS当前位置标签解析
294
         $content = $this->parser->parserPositionLabel($content, - 1, '首页', SITE_INDEX_DIR . '/'); // CMS当前位置标签解析
267
         $content = $this->parser->parserSpecialPageSortLabel($content, 0, '', SITE_INDEX_DIR . '/'); // 解析分类标签
295
         $content = $this->parser->parserSpecialPageSortLabel($content, 0, '', SITE_INDEX_DIR . '/'); // 解析分类标签
268
         $content = $this->parser->parserAfter($content); // CMS公共标签后置解析
296
         $content = $this->parser->parserAfter($content); // CMS公共标签后置解析
322
                 error('请到后台设置分类栏目内容页模板!');
350
                 error('请到后台设置分类栏目内容页模板!');
323
             }
351
             }
324
         } else {
352
         } else {
325
-            _404('您访问内容的分类已经不存在,请核对后再试!');
353
+            //_404('您访问内容的分类已经不存在,请核对后再试!');
354
+            _301();
326
         }
355
         }
327
         $this->cache($content, true);
356
         $this->cache($content, true);
328
     }
357
     }
337
         
366
         
338
         // 读取数据
367
         // 读取数据
339
         if (! $data = $this->model->getAbout($sort->scode)) {
368
         if (! $data = $this->model->getAbout($sort->scode)) {
340
-            _404('您访问的内容不存在,请核对后重试!');
369
+            //_404('您访问的内容不存在,请核对后重试!');
370
+            _301();
341
         }
371
         }
342
         
372
         
343
         if ($sort->contenttpl) {
373
         if ($sort->contenttpl) {
466
             } else {
496
             } else {
467
                 //读取后台首页404访问配置
497
                 //读取后台首页404访问配置
468
                 if($this->config('url_index_404') == 1){
498
                 if($this->config('url_index_404') == 1){
469
-                    _404('您访问的页面不存在,请核对后重试!');
499
+                   // _404('您访问的页面不存在,请核对后重试!');
500
+                    _301();
470
                 }
501
                 }
471
                 header("Location: " . $http . $_SERVER['HTTP_HOST'] . $matches1[0], true, 301);
502
                 header("Location: " . $http . $_SERVER['HTTP_HOST'] . $matches1[0], true, 301);
472
             }
503
             }
474
             if( file_exists(ROOT_PATH . '/data/city.lock') ){
505
             if( file_exists(ROOT_PATH . '/data/city.lock') ){
475
                 $this->getIndexPage();
506
                 $this->getIndexPage();
476
             }else{
507
             }else{
477
-                _404('您访问的页面不存在,请核对后重试!');
508
+                //_404('您访问的页面不存在,请核对后重试!');
509
+                _301();
478
             }
510
             }
479
         }
511
         }
480
     }
512
     }

+ 109
- 3
apps/home/controller/ParserController.php View File

80
         $content = $this->parserReplaceKeyword($content); // 页面关键词替换
80
         $content = $this->parserReplaceKeyword($content); // 页面关键词替换
81
         $content = $this->parserTitleReplaceLabel($content); // 通用内容替换标签  这里是我新增的
81
         $content = $this->parserTitleReplaceLabel($content); // 通用内容替换标签  这里是我新增的
82
         $content = $this->parserBLock($content); //自定义方法2
82
         $content = $this->parserBLock($content); //自定义方法2
83
+        $content = $this->parserForeachLabel($content); // 指定随意内容按条件遍
83
 
84
 
84
         // 解析个人扩展标签,升级不覆盖
85
         // 解析个人扩展标签,升级不覆盖
85
         if (file_exists(APP_PATH . '/home/controller/ExtLabelController.php')) {
86
         if (file_exists(APP_PATH . '/home/controller/ExtLabelController.php')) {
92
         return $content;
93
         return $content;
93
     }
94
     }
94
 
95
 
96
+    // 解析指定随意内容遍历,支持设定分隔符 @pbhtml
97
+    /*
98
+     * foreach标签无法匹配成功
99
+     * 模板代码不要有php原生 因为无法与标签传值
100
+     * 复制link标签  加上city_id 的手法 就可以了
101
+     */
102
+    public function parserForeachLabel($content)
103
+    {
104
+        $pattern = '/{pboot:foreach(s+[^}]+)?}([sS]*?){/pboot:foreach}/';
105
+        $pattern2 = '/[foreach:([w]+)(s+[^]]+)?]/';
106
+
107
+        if (preg_match_all($pattern, $content, $matches)) {
108
+            $count = count($matches[0]);
109
+            for ($i = 0; $i<$count; $i ++) {
110
+                // 获取调节参数
111
+                $params = $this->parserParam($matches[1][$i]);
112
+                $str = '';
113
+                $char = ',';
114
+
115
+                if (! self::checkLabelLevel($params)) {
116
+                    $content = str_replace($matches[0][$i], '', $content);
117
+                    continue;
118
+                }
119
+
120
+                // 分离参数
121
+                foreach ($params as $key => $value) {
122
+                    switch ($key) {
123
+                        case 'num':
124
+                            $num = $value;
125
+                            break;
126
+                        case 'str':
127
+                            //var_dump($value);
128
+                            $str = $value;
129
+                            break;
130
+                        case 'char':
131
+                            if ($value) $char = $value;
132
+                            break;
133
+                    }
134
+                }
135
+
136
+                // 无数据直接替换为空并跳过
137
+                if (! $str) {
138
+                    $content = str_replace($matches[0][$i], '', $content);
139
+                    continue;
140
+                }
141
+
142
+                // 匹配到内部标签
143
+                if (preg_match_all($pattern2, $matches[2][$i], $matches2)) {
144
+                    $count2 = count($matches2[0]); // 循环内的内容标签数量
145
+                } else {
146
+                    $count2 = 0;
147
+                }
148
+
149
+                $out_html = '';
150
+                $key = 1;
151
+                //$arr是数组 可以调用自定义函数或模型方法 一般直接用sql
152
+                $arr = explode($char,$str);
153
+                foreach ($arr as $value) { // 按查询图片条数循环
154
+                    $one_html = $matches[2][$i];
155
+                    for ($j = 0; $j<$count2; $j ++) { // 循环替换数据
156
+                        $params = $this->parserParam($matches2[2][$j]);
157
+                        switch ($matches2[1][$j]) {
158
+                            case 'n':
159
+                                $one_html = str_replace($matches2[0][$j], $this->adjustLabelData($params, $key) - 1, $one_html);
160
+                                break;
161
+                            case 'i':
162
+                                $one_html = str_replace($matches2[0][$j], $this->adjustLabelData($params, $key), $one_html);
163
+                                break;
164
+                            case 'name':
165
+                                $one_html = str_replace($matches2[0][$j], $this->adjustLabelData($params, $value), $one_html);
166
+                                break;
167
+                        }
168
+                    }
169
+	                $key ++;
170
+	                $out_html .= $one_html;
171
+	                if (isset($num) && $key > $num) {
172
+                        unset($num);
173
+                        break;
174
+                    }
175
+	            }
176
+                $content = str_replace($matches[0][$i], $out_html, $content);
177
+            }
178
+	    }
179
+        return $content;
180
+    }
181
+
182
+
95
     // 通用内容替换标签 @mk-title_replace
183
     // 通用内容替换标签 @mk-title_replace
96
     //$content这里用的时文章标题,直接是字符串
184
     //$content这里用的时文章标题,直接是字符串
97
     public function parserTitleReplaceLabel($content)
185
     public function parserTitleReplaceLabel($content)
146
         return $content;
234
         return $content;
147
     }
235
     }
148
 
236
 
237
+    /*
238
+     * {pboot:block id='{pboot:httpurl}' /}
239
+     */
149
     public function parserBLock($content){
240
     public function parserBLock($content){
241
+
150
         $pattern = '/\{pboot:block(\s+[^}]+)?\}/';
242
         $pattern = '/\{pboot:block(\s+[^}]+)?\}/';
151
         if (preg_match_all($pattern, $content, $matches)) {
243
         if (preg_match_all($pattern, $content, $matches)) {
152
             $count = count($matches[0]);
244
             $count = count($matches[0]);
156
                 foreach ($params as $key => $value) {
248
                 foreach ($params as $key => $value) {
157
                     switch ($key) {
249
                     switch ($key) {
158
                         case 'id':
250
                         case 'id':
251
+                            //var_dump($value);
252
+                            //$value里面存在{xx} 就需要特殊处理
253
+                            //解析顺序不同 与eyoucms的模板机制 区别
159
                             $data = $this->model->getBlockContent($value);
254
                             $data = $this->model->getBlockContent($value);
160
                             //return $data['value'];
255
                             //return $data['value'];
161
                             //print_r($data);exit();
256
                             //print_r($data);exit();
2833
             for ($i = 0; $i < $count; $i ++) {
2928
             for ($i = 0; $i < $count; $i ++) {
2834
                 // 获取调节参数
2929
                 // 获取调节参数
2835
                 $params = $this->parserParam($matches[1][$i]);
2930
                 $params = $this->parserParam($matches[1][$i]);
2836
-                
2931
+
2837
                 if (! self::checkLabelLevel($params)) {
2932
                 if (! self::checkLabelLevel($params)) {
2838
                     $content = str_replace($matches[0][$i], '', $content);
2933
                     $content = str_replace($matches[0][$i], '', $content);
2839
                     continue;
2934
                     continue;
2840
                 }
2935
                 }
2841
-                
2936
+
2842
                 $num = 1000; // 最大读取1000条
2937
                 $num = 1000; // 最大读取1000条
2843
                 $sql = '';
2938
                 $sql = '';
2844
-                
2939
+                $kp = 0;
2845
                 foreach ($params as $key => $value) {
2940
                 foreach ($params as $key => $value) {
2846
                     switch ($key) {
2941
                     switch ($key) {
2847
                         case 'num':
2942
                         case 'num':
2850
                         case 'sql':
2945
                         case 'sql':
2851
                             $sql = $value;
2946
                             $sql = $value;
2852
                             break;
2947
                             break;
2948
+                        case 'kp':
2949
+                            $kp = $value;
2950
+                            break;
2853
                     }
2951
                     }
2854
                 }
2952
                 }
2855
                 
2953
                 
2881
                 
2979
                 
2882
                 $pagenum = defined('PAGE') ? PAGE : 1;
2980
                 $pagenum = defined('PAGE') ? PAGE : 1;
2883
                 $key = ($pagenum - 1) * $num + 1;
2981
                 $key = ($pagenum - 1) * $num + 1;
2982
+                $a = 1;
2884
                 foreach ($data as $value) { // 按查询数据条数循环
2983
                 foreach ($data as $value) { // 按查询数据条数循环
2885
                     $one_html = $matches[2][$i];
2984
                     $one_html = $matches[2][$i];
2886
                     for ($j = 0; $j < $count2; $j ++) { // 循环替换数据
2985
                     for ($j = 0; $j < $count2; $j ++) { // 循环替换数据
2897
                                     $one_html = str_replace($matches2[0][$j], $this->adjustLabelData($params, $value->{$matches2[1][$j]}), $one_html);
2996
                                     $one_html = str_replace($matches2[0][$j], $this->adjustLabelData($params, $value->{$matches2[1][$j]}), $one_html);
2898
                                 }
2997
                                 }
2899
                         }
2998
                         }
2999
+
3000
+                        if($kp > 0){
3001
+                            if($a%$kp == 0 && $a > 0){
3002
+                                $one_html = $one_html."<br/>";
3003
+                            }
3004
+                        }
2900
                     }
3005
                     }
3006
+                    $a++;
2901
                     $key ++;
3007
                     $key ++;
2902
                     $out_html .= $one_html;
3008
                     $out_html .= $one_html;
2903
                 }
3009
                 }

+ 12
- 0
apps/home/model/ParserModel.php View File

10
 
10
 
11
 use core\basic\Model;
11
 use core\basic\Model;
12
 
12
 
13
+
13
 class ParserModel extends Model
14
 class ParserModel extends Model
14
 {
15
 {
15
 
16
 
1044
         return '1+1';
1045
         return '1+1';
1045
     }
1046
     }
1046
 
1047
 
1048
+    public function getCityId($name){
1049
+       return parent::table('ay_city')->where(['etitle'=>$name])->value('id');
1050
+    }
1051
+    public function getCityLogo($name){
1052
+        return parent::table('ay_city')->where(['etitle'=>$name])->value('logo');
1053
+    }
1054
+    public function getSiteLogo(){
1055
+        return parent::table('ay_site')->where(['id'=>1])->value('logo');
1056
+    }
1057
+
1058
+
1047
 }
1059
 }

+ 7
- 0
core/function/helper.php View File

732
     }
732
     }
733
 }
733
 }
734
 
734
 
735
+function _301(){
736
+    $target_url = get_http_url();
737
+    header("HTTP/1.1 301 Moved Permanently");
738
+    header("Location: $target_url");
739
+    exit;
740
+}
741
+
735
 // php对象转为数组
742
 // php对象转为数组
736
 function toArray($obj){
743
 function toArray($obj){
737
     if($obj === null){
744
     if($obj === null){

BIN
static/upload/image/20240826/1724603617908669.png View File


BIN
static/upload/image/20240826/1724603904511317.png View File


BIN
static/upload/image/20240826/1724604698835047.png View File


+ 1
- 0
template/dafeult/about.html View File

35
     </div>
35
     </div>
36
   </div>
36
   </div>
37
 </div>
37
 </div>
38
+{include file=hot.html}
38
 {include file=foot.html}
39
 {include file=foot.html}
39
 </body>
40
 </body>
40
 </html>
41
 </html>

+ 1
- 0
template/dafeult/case.html View File

64
     </div>
64
     </div>
65
   </div>
65
   </div>
66
 </div>
66
 </div>
67
+{include file=hot.html}
67
 {include file=foot.html}
68
 {include file=foot.html}
68
 </body>
69
 </body>
69
 </html>
70
 </html>

+ 1
- 0
template/dafeult/caselist.html View File

60
   <!--/分页--> 
60
   <!--/分页--> 
61
   
61
   
62
 </div>
62
 </div>
63
+{include file=hot.html}
63
 {include file=foot.html}
64
 {include file=foot.html}
64
 </body>
65
 </body>
65
 </html>
66
 </html>

+ 20
- 5
template/dafeult/city.html View File

2
 <html xmlns="">
2
 <html xmlns="">
3
 <head>
3
 <head>
4
 
4
 
5
-<title>{pboot:if('{sort:title}'=='')}{pboot:pagetitle}{else}{sort:title}{/pboot:if}</title>
6
-<meta name="keywords" content="{pboot:if('{sort:keywords}'=='')}{pboot:pagekeywords}{else}{sort:keywords}{/pboot:if}">
7
-<meta name="description" content="{pboot:if('{sort:description}'=='')}{pboot:pagedescription}{else}{sort:description}{/pboot:if}">
5
+<title>{label:city_index_title}</title>
6
+<meta name="keywords" content="{label:city_index_keywork}">
7
+<meta name="description" content="{label:city_index_desc}">
8
 
8
 
9
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
9
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
10
 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
10
 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
17
 <script type="text/javascript" src="{pboot:sitedomain}/skin/js/superslide.3.0.js"></script>
17
 <script type="text/javascript" src="{pboot:sitedomain}/skin/js/superslide.3.0.js"></script>
18
 </head>
18
 </head>
19
 <body>
19
 <body>
20
-{include file=head.html}
20
+{include file=head_city.html}
21
 <div><img src="/static/upload/image/20240528/1716887600211481.jpg" width="100%"></div>
21
 <div><img src="/static/upload/image/20240528/1716887600211481.jpg" width="100%"></div>
22
 <div class="page-bg">
22
 <div class="page-bg">
23
   <div class="page-box">
23
   <div class="page-box">
63
 	
63
 	
64
   </div>
64
   </div>
65
 </div>
65
 </div>
66
-{include file=foot.html}
66
+
67
+{include file=hot.html}
68
+
69
+<div class="footer" style="font-size: 16px;">
70
+	<div class="footer-dh">友情链接:
71
+
72
+		{pboot:sql sql="select * from ay_link where city='{$cityId}'"}
73
+		<a href="[sql:link]" class="first-level" target="_blank" style="padding-right: 10px;"> [sql:name] </a>
74
+		{/pboot:sql}
75
+
76
+	</div>
77
+</div>
78
+
79
+
80
+
81
+{include file=foot_city.html}
67
 </body>
82
 </body>
68
 </html>
83
 </html>

+ 2
- 2
template/dafeult/foot.html View File

7
     <div class="left">
7
     <div class="left">
8
       <div class="footer-dh">
8
       <div class="footer-dh">
9
         <ul>
9
         <ul>
10
-          <li><a href="{pboot:sitedomain}/" title="首页">首页</a></li>
10
+          <li><a href="{pboot:httpurl}" title="首页">首页</a></li>
11
           {pboot:nav}
11
           {pboot:nav}
12
           <li class=""> <a href="[nav:link]" class="first-level"> [nav:name] </a> </li>
12
           <li class=""> <a href="[nav:link]" class="first-level"> [nav:name] </a> </li>
13
           {/pboot:nav}
13
           {/pboot:nav}
27
   </div>
27
   </div>
28
 </div>
28
 </div>
29
 <div class="footer-copy">
29
 <div class="footer-copy">
30
-  <p>{pboot:sitecopyright} <a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank">{pboot:siteicp}</a> <a href="{pboot:sitedomain}/index.php/sitemap.xml" target="_blank">XML</a> {pboot:sitestatistical}</p>
30
+  <p>{pboot:sitecopyright} <a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank">{pboot:siteicp}</a> <a href="{pboot:sitedomain}/index.php/sitemap.xml" target="_blank">网站地图</a> {pboot:sitestatistical}</p>
31
   <p style="display:none;"></p>
31
   <p style="display:none;"></p>
32
 </div>
32
 </div>
33
 <!--/页脚--> 
33
 <!--/页脚--> 

+ 62
- 0
template/dafeult/foot_city.html View File

1
+<!--页脚-->
2
+<div class="footer-bg">
3
+	
4
+
5
+		
6
+  <div class="footer">
7
+    <div class="left">
8
+      <div class="footer-dh">
9
+        <ul>
10
+          <li><a href="{pboot:sitedomain}" title="首页">首页</a></li>
11
+          {pboot:nav}
12
+          <li class=""> <a href="{pboot:sitedomain}[nav:link]" class="first-level"> [nav:name] </a> </li>
13
+          {/pboot:nav}
14
+        </ul>
15
+      </div>
16
+      <div class="footer-message">
17
+        <p>咨询热线:{pboot:companyphone}</p>
18
+        <p>联系邮箱:{pboot:companyemail}</p>
19
+        <p>公司地址:{pboot:companyaddress}</p>
20
+      </div>
21
+    </div>
22
+    <div class="right">
23
+      <div class="ewm"> <img src="{pboot:companyweixin}">
24
+        <p>客服微信</p>
25
+      </div>
26
+    </div>
27
+  </div>
28
+</div>
29
+<div class="footer-copy">
30
+  <p>{pboot:sitecopyright} <a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank">{pboot:siteicp}</a> <a href="{pboot:sitedomain}/index.php/sitemap.xml" target="_blank">网站地图</a> {pboot:sitestatistical}</p>
31
+  <p style="display:none;"></p>
32
+</div>
33
+<!--/页脚--> 
34
+
35
+<!--在线客服-->
36
+<div class="kefu">
37
+  <ul>
38
+<!--    <li> <a href="" target="_black" rel="nofollow"> <i class="icon-kefu-1"></i>
39
+      <p>在线客服</p>
40
+      </a> </li>-->
41
+    <li> <a href="tel:{pboot:companyphone}"> <i class="icon-kefu-2"></i>
42
+      <p>电话咨询</p>
43
+      </a>
44
+      <div class="kefu-call">
45
+        <p>7×24小时客服</p>
46
+        <strong>{pboot:companyphone}</strong> </div>
47
+    </li>
48
+    <li> <i class="icon-kefu-3"></i>
49
+      <p>微信客服</p>
50
+      <div class="kefu-img"> <img src="{pboot:companyweixin}">
51
+        <p class="red">扫描二维码</p>
52
+        <p>添加微信客服</p>
53
+      </div>
54
+    </li>
55
+    <li> <a href="#top" rel="nofollow"> <i class="icon-kefu-4"></i>
56
+      <p>返回顶部</p>
57
+      </a> </li>
58
+  </ul>
59
+</div>
60
+<!--/在线客服--> 
61
+
62
+<script type="text/javascript" src="{pboot:sitedomain}/skin/js/common.js"></script>

+ 16
- 2
template/dafeult/head.html View File

1
 <!--导航栏-->
1
 <!--导航栏-->
2
 <div class="header">
2
 <div class="header">
3
   <div class="header-box">
3
   <div class="header-box">
4
-    <div class="logo"> <a href="{pboot:sitedomain}" title="{pboot:sitetitle}"><img src="{pboot:sitelogo}" alt="{pboot:sitetitle}"></a> 
4
+    <div class="logo">
5
+
6
+      <a href="{pboot:httpurl}" title="{pboot:sitetitle}">
7
+
8
+
9
+
10
+        {pboot:sql sql="select * from ay_site where id=1"}
11
+        <img src="{$citylogo}" alt="{pboot:titlereplace title='[sql:title]' /}">
12
+        {/pboot:sql}
13
+
14
+      </a>
5
 	
15
 	
6
 	
16
 	
7
 	</div>
17
 	</div>
8
     <div class="top-desc">
18
     <div class="top-desc">
9
 		<p style="margin-left: 350px;
19
 		<p style="margin-left: 350px;
10
     position: absolute;
20
     position: absolute;
11
-    margin-top: 10px;">{pboot:if({iscity})}{xx}{else}主站{/pboot:if} |  <a href="/city.html">城市分站</a></p>
21
+    margin-top: 10px;">{pboot:if({iscity})}{xx}{else}主站{/pboot:if} |  <a href="{label:city_url}">城市分站</a></p>
12
       <p class="small">{label:logotxt}</span>
22
       <p class="small">{label:logotxt}</span>
13
       <p class="big">{label:logotxt2}</p>
23
       <p class="big">{label:logotxt2}</p>
14
 	  
24
 	  
27
     </div>
37
     </div>
28
   </div>
38
   </div>
29
 </div>
39
 </div>
40
+
41
+
30
 <div class="nav-bg" id="navbr">
42
 <div class="nav-bg" id="navbr">
31
   <div class="nav">
43
   <div class="nav">
32
     <ul>
44
     <ul>
37
     </ul>
49
     </ul>
38
   </div>
50
   </div>
39
 </div>
51
 </div>
52
+
53
+
40
 <!--/导航栏-->
54
 <!--/导航栏-->

+ 55
- 0
template/dafeult/head_city.html View File

1
+<!--导航栏-->
2
+<div class="header">
3
+  <div class="header-box">
4
+    <div class="logo">
5
+
6
+      <a href="{pboot:sitedomain}" title="{pboot:sitetitle}">
7
+
8
+
9
+
10
+        {pboot:sql sql="select * from ay_site where id=1"}
11
+        <img src="{$citylogo}" alt="{pboot:titlereplace title='[sql:title]' /}">
12
+        {/pboot:sql}
13
+
14
+      </a>
15
+	
16
+	
17
+	</div>
18
+    <div class="top-desc">
19
+		<p style="margin-left: 350px;
20
+    position: absolute;
21
+    margin-top: 10px;">{pboot:if({iscity})}{xx}{else}主站{/pboot:if} |  <a href="{label:city_url}">城市分站</a></p>
22
+      <p class="small">{label:logotxt}</span>
23
+      <p class="big">{label:logotxt2}</p>
24
+	  
25
+	  
26
+	  
27
+	  
28
+    </div>
29
+	
30
+
31
+	  
32
+
33
+	
34
+    <div class="call">
35
+      <p class="small">心理咨询电话:</p>
36
+      <p class="big">{pboot:companyphone}</p>
37
+    </div>
38
+  </div>
39
+</div>
40
+
41
+
42
+<div class="nav-bg" id="navbr">
43
+  <div class="nav">
44
+    <ul>
45
+      <li {pboot:if(0=='{sort:scode}')}class="hover"{/pboot:if}>
46
+        <a href="{pboot:sitedomain}" title="网站首页">网站首页</a></li>
47
+      {pboot:nav}
48
+      <li {pboot:if('[nav:scode]'=='{sort:tcode}')}class="hover"{/pboot:if}> <a href="{pboot:sitedomain}[nav:link]" class="first-level"> [nav:name] </a> </li>
49
+      {/pboot:nav}
50
+    </ul>
51
+  </div>
52
+</div>
53
+
54
+
55
+<!--/导航栏-->

+ 13
- 0
template/dafeult/hot.html View File

1
+<div class="footer" style="font-size: 16px;margin-bottom:100px;">
2
+    <div class="footer-dh" style="line-height: 16px;"><font style="font-weight: bold;">热门城市</font>:<br/><br/><br/>
3
+
4
+        <!--环境变量-->
5
+        {pboot:sql sql="select * from ay_city where pid!=0 OR id IN(1,2,9,22) ORDER BY RAND() LIMIT 50" kp="15"}
6
+        <a href="https://[sql:etitle].{label:top_domain}" class="first-level" target="_blank" style="margin-right:20px;display:block;float:left;padding-right: 10px;">[sql:title] </a>
7
+        {/pboot:sql}
8
+
9
+    </div>
10
+</div>
11
+
12
+
13
+<div style="clear: both;"></div>

+ 10
- 5
template/dafeult/index.html View File

308
   </div>
308
   </div>
309
 </div>
309
 </div>
310
 {/pboot:sort}
310
 {/pboot:sort}
311
-<!--/首页新闻--> 
311
+<!--/首页新闻-->
312
+
313
+
314
+{include file=hot.html}
312
 
315
 
313
 
316
 
314
 	<div class="footer" style="font-size: 16px;">
317
 	<div class="footer" style="font-size: 16px;">
315
 		<div class="footer-dh">友情链接:
318
 		<div class="footer-dh">友情链接:
316
-		  {pboot:link gid=1 num=50}
317
-		  <a href="[link:link]" class="first-level" target="_blank" style="padding-right: 10px;"> [link:name] </a>
318
-		  {/pboot:link}
319
+
320
+          {pboot:sql sql="select * from ay_link where city='{$cityId}'"}
321
+          <a href="[sql:link]" class="first-level" target="_blank" style="padding-right: 10px;"> [sql:name] </a>
322
+          {/pboot:sql}
323
+
319
 		</div>	
324
 		</div>	
320
-	</div>	
325
+	</div>
321
 
326
 
322
 
327
 
323
 {include file=foot.html}
328
 {include file=foot.html}

+ 9
- 2
template/dafeult/message.html View File

27
     <form action="{pboot:msgaction}"  method="post">
27
     <form action="{pboot:msgaction}"  method="post">
28
       <div class="list-form">
28
       <div class="list-form">
29
         <ul>
29
         <ul>
30
-          <li>
31
-            <div class="tip-text">孩子年龄:</div>
30
+          <li style="display: none;">
31
+            <div class="tip-text">年龄:</div>
32
             <div class="xuanze">
32
             <div class="xuanze">
33
               <input  type='radio' id='attr_30_1' name='nianling' value='0-3岁'>
33
               <input  type='radio' id='attr_30_1' name='nianling' value='0-3岁'>
34
               <label for="attr_30_1">0-3岁</label>
34
               <label for="attr_30_1">0-3岁</label>
38
               <label for="attr_30_3">6-12岁</label>
38
               <label for="attr_30_3">6-12岁</label>
39
               <input  type='radio' id='attr_30_4' name='nianling' value='12-18岁'>
39
               <input  type='radio' id='attr_30_4' name='nianling' value='12-18岁'>
40
               <label for="attr_30_4">12-18岁</label>
40
               <label for="attr_30_4">12-18岁</label>
41
+              <input  type='radio' id='attr_30_5' name='nianling' value='18岁以上'>
42
+              <label for="attr_30_5">18岁以上</label>
41
             </div>
43
             </div>
42
           </li>
44
           </li>
43
           <li>
45
           <li>
53
               <label for="attr_31_4">人际关系</label>
55
               <label for="attr_31_4">人际关系</label>
54
               <input type='radio' id='attr_31_5' name='leixing' value='职业发展'>
56
               <input type='radio' id='attr_31_5' name='leixing' value='职业发展'>
55
               <label for="attr_31_5">职业发展</label>
57
               <label for="attr_31_5">职业发展</label>
58
+              <input type='radio' id='attr_31_6' name='leixing' value='其他'>
59
+              <label for="attr_31_6">其他</label>
56
             </div>
60
             </div>
57
           </li>
61
           </li>
58
           <li>
62
           <li>
154
     </div>
158
     </div>
155
   </div>
159
   </div>
156
 </div>
160
 </div>
161
+
162
+{include file=hot.html}
163
+
157
 {include file=foot.html}
164
 {include file=foot.html}
158
 </body>
165
 </body>
159
 </html>
166
 </html>

+ 1
- 0
template/dafeult/news.html View File

41
     </div>
41
     </div>
42
   </div>
42
   </div>
43
 </div>
43
 </div>
44
+{include file=hot.html}
44
 {include file=foot.html}
45
 {include file=foot.html}
45
 </body>
46
 </body>
46
 </html>
47
 </html>

+ 3
- 0
template/dafeult/newslist.html View File

54
 <div class="tac text-secondary">本分类下无任何数据!</div>
54
 <div class="tac text-secondary">本分类下无任何数据!</div>
55
 {/pboot:if}
55
 {/pboot:if}
56
 </div>
56
 </div>
57
+
58
+{include file=hot.html}
59
+
57
 {include file=foot.html}
60
 {include file=foot.html}
58
 </body>
61
 </body>
59
 </html>
62
 </html>

+ 3
- 0
template/dafeult/team.html View File

58
     </div>
58
     </div>
59
   </div>
59
   </div>
60
 </div>
60
 </div>
61
+
62
+{include file=hot.html}
63
+
61
 {include file=foot.html}
64
 {include file=foot.html}
62
 </body>
65
 </body>
63
 </html>
66
 </html>

+ 5
- 0
template/dafeult/teamlist.html View File

57
   <!--/分页--> 
57
   <!--/分页--> 
58
   
58
   
59
 </div>
59
 </div>
60
+
61
+
62
+{include file=hot.html}
63
+
64
+
60
 {include file=foot.html}
65
 {include file=foot.html}
61
 </body>
66
 </body>
62
 </html>
67
 </html>

+ 2
- 0
template/dafeult/wap/about.html View File

35
     </div>
35
     </div>
36
   </div>
36
   </div>
37
 </div>
37
 </div>
38
+
39
+{include file=hot.html}
38
 {include file=foot.html}
40
 {include file=foot.html}
39
 </body>
41
 </body>
40
 </html>
42
 </html>

+ 2
- 1
template/dafeult/wap/case.html View File

90
   </div>
90
   </div>
91
   <script>jQuery(".tab-anli").slide({effect:"leftLoop",trigger:"click"});</script> 
91
   <script>jQuery(".tab-anli").slide({effect:"leftLoop",trigger:"click"});</script> 
92
 </div>
92
 </div>
93
-<!--个案分享 结束--> 
93
+<!--个案分享 结束-->
94
+{include file=hot.html}
94
 {include file=foot.html}
95
 {include file=foot.html}
95
 </body>
96
 </body>
96
 </html>
97
 </html>

+ 2
- 0
template/dafeult/wap/caselist.html View File

48
 {else}
48
 {else}
49
 <div class="tac text-secondary">本分类下无任何数据!</div>
49
 <div class="tac text-secondary">本分类下无任何数据!</div>
50
 {/pboot:if}
50
 {/pboot:if}
51
+
52
+{include file=hot.html}
51
 {include file=foot.html}
53
 {include file=foot.html}
52
 </body>
54
 </body>
53
 </html>
55
 </html>

+ 18
- 5
template/dafeult/wap/city.html View File

2
 <html xmlns="">
2
 <html xmlns="">
3
 <head>
3
 <head>
4
 
4
 
5
-<title>{pboot:if('{sort:title}'=='')}{pboot:pagetitle}{else}{sort:title}{/pboot:if}</title>
6
-<meta name="keywords" content="{pboot:if('{sort:keywords}'=='')}{pboot:pagekeywords}{else}{sort:keywords}{/pboot:if}">
7
-<meta name="description" content="{pboot:if('{sort:description}'=='')}{pboot:pagedescription}{else}{sort:description}{/pboot:if}">
5
+
6
+<title>{label:city_index_title}</title>
7
+<meta name="keywords" content="{label:city_index_keywork}">
8
+<meta name="description" content="{label:city_index_desc}">
9
+
8
 
10
 
9
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
11
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
10
 <meta name="viewport" content="width=device-width, viewport-fit=cover, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
12
 <meta name="viewport" content="width=device-width, viewport-fit=cover, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
17
 <script type="text/javascript" src="{pboot:sitedomain}/m/js/superslide.3.0.js"></script>
19
 <script type="text/javascript" src="{pboot:sitedomain}/m/js/superslide.3.0.js"></script>
18
 </head>
20
 </head>
19
 <body>
21
 <body>
20
-{include file=head.html}
22
+{include file=head_city.html}
21
 <div class="main">
23
 <div class="main">
22
   
24
   
23
   
25
   
63
 </div>
65
 </div>
64
 
66
 
65
 
67
 
66
-{include file=foot.html}
68
+{include file=hot.html}
69
+
70
+<div class="footer-copy-content" style="font-size: 12px;">
71
+
72
+	友情链接:
73
+	{pboot:sql sql="select * from ay_link where city='{$cityId}'"}
74
+	<a href="[sql:link]" class="first-level" target="_blank" style="padding-right: 10px;"> [sql:name] </a>
75
+	{/pboot:sql}
76
+
77
+</div>
78
+
79
+{include file=foot_city.html}
67
 </body>
80
 </body>
68
 </html>
81
 </html>

+ 1
- 1
template/dafeult/wap/foot.html View File

12
 </div>
12
 </div>
13
 <div class="footer-nav">
13
 <div class="footer-nav">
14
   <ul>
14
   <ul>
15
-    <li> <a href="{pboot:sitedomain}/"> <span class="icon iconfont icon-shouye"></span>
15
+    <li> <a href="{pboot:httpurl}/"> <span class="icon iconfont icon-shouye"></span>
16
       <p>首页</p>
16
       <p>首页</p>
17
       </a> </li>
17
       </a> </li>
18
     {pboot:sort scode=1}
18
     {pboot:sort scode=1}

+ 41
- 0
template/dafeult/wap/foot_city.html View File

1
+<!--页脚-->
2
+
3
+<div class="footer-copy">
4
+	
5
+
6
+	
7
+  <div class="footer-copy-content">
8
+    <p>{pboot:sitecopyright}</p>
9
+    <p><a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank">{pboot:siteicp}</a> {pboot:sitestatistical}</p>
10
+    <p style="display:none;"></p>
11
+  </div>
12
+</div>
13
+<div class="footer-nav">
14
+  <ul>
15
+    <li> <a href="{pboot:sitedomain}"> <span class="icon iconfont icon-shouye"></span>
16
+      <p>首页</p>
17
+      </a> </li>
18
+    {pboot:sort scode=1}
19
+    <li> <a href="{pboot:sitedomain}[sort:link]"> <span class="icon iconfont icon-xihuan"></span>
20
+      <p>[sort:name]</p>
21
+      </a> </li>
22
+    {/pboot:sort}
23
+    {pboot:sort scode=6}
24
+    <li > <a href="{pboot:sitedomain}[sort:link]"> <span class="icon iconfont icon-wode"></span>
25
+      <p>[sort:name]</p>
26
+      </a> </li>
27
+    {/pboot:sort}
28
+    {pboot:sort scode=7}
29
+    <li > <a href="{pboot:sitedomain}[sort:link]"> <span class="icon iconfont icon-dianpu"></span>
30
+      <p>[sort:name]</p>
31
+      </a> </li>
32
+    {/pboot:sort}
33
+    {pboot:sort scode=9}
34
+    <li > <a href="{pboot:sitedomain}[sort:link]"> <span class="icon iconfont icon-wangwang"></span>
35
+      <p>[sort:name]</p>
36
+      </a> </li>
37
+    {/pboot:sort}
38
+  </ul>
39
+</div>
40
+<script type="text/javascript" src="{pboot:sitedomain}/m/js/common_m.js"></script> 
41
+<!--页脚 结束-->

+ 11
- 2
template/dafeult/wap/head.html View File

1
 <!--导航-->
1
 <!--导航-->
2
 <div class="header">
2
 <div class="header">
3
   <div class="left-btn"> <span class="icon iconfont icon-caidan" id="menu"></span> </div>
3
   <div class="left-btn"> <span class="icon iconfont icon-caidan" id="menu"></span> </div>
4
-  <div class="logo"> <a href="{pboot:sitedomain}/" title="{pboot:sitetitle}"><img src="{pboot:sitelogo}" alt="{pboot:sitetitle}"></a> </div>
4
+  <div class="logo">
5
+
6
+
7
+    <a href="{pboot:httpurl}" title="{pboot:sitetitle}">
8
+      {pboot:sql sql="select * from ay_site where id=1"}
9
+      <img src="{$citylogo}" alt="{pboot:titlereplace title='[sql:title]' /}">
10
+      {/pboot:sql}
11
+    </a>
12
+
13
+  </div>
5
   <div class="right-btn"> <a href="tel:{pboot:companyphone}"><span class="icon iconfont icon-dianhua1"></span></a> </div>
14
   <div class="right-btn"> <a href="tel:{pboot:companyphone}"><span class="icon iconfont icon-dianhua1"></span></a> </div>
6
 </div>
15
 </div>
7
 <div class="fixed-nav-bg"> </div>
16
 <div class="fixed-nav-bg"> </div>
16
 	
25
 	
17
 	
26
 	
18
 	
27
 	
19
-<li>{pboot:if({iscity})}{xx}{else}主站{/pboot:if} |  <a href="/city.html" style="display: contents;"> 城市分站</a></li>	
28
+<li>{pboot:if({iscity})}{xx}{else}主站{/pboot:if} |  <a href="{label:city_url}" style="display: contents;"> 城市分站</a></li>
20
 	
29
 	
21
 	
30
 	
22
 	
31
 	

+ 34
- 0
template/dafeult/wap/head_city.html View File

1
+<!--导航-->
2
+<div class="header">
3
+  <div class="left-btn"> <span class="icon iconfont icon-caidan" id="menu"></span> </div>
4
+  <div class="logo">
5
+
6
+
7
+    <a href="{pboot:sitedomain}" title="{pboot:sitetitle}">
8
+      {pboot:sql sql="select * from ay_site where id=1"}
9
+      <img src="{$citylogo}" alt="{pboot:titlereplace title='[sql:title]' /}">
10
+      {/pboot:sql}
11
+    </a>
12
+
13
+  </div>
14
+  <div class="right-btn"> <a href="tel:{pboot:companyphone}"><span class="icon iconfont icon-dianhua1"></span></a> </div>
15
+</div>
16
+<div class="fixed-nav-bg"> </div>
17
+<div class="fixed-nav">
18
+  <ul>
19
+    <li {pboot:if(0=='{sort:scode}')}class="hover"{/pboot:if}><a href="{pboot:sitedomain}" title="网站首页">网站首页<span class="icon iconfont icon-xiangyou1"></span></a></li>
20
+    {pboot:nav}
21
+    <li {pboot:if('[nav:scode]'=='{sort:tcode}')}class="hover"{/pboot:if}> <a href="{pboot:sitedomain}[nav:link]" class="first-level"> [nav:name]<span class="icon iconfont icon-xiangyou1"></span> </a> </li>
22
+	
23
+    {/pboot:nav}
24
+	
25
+	
26
+	
27
+	
28
+<li>{pboot:if({iscity})}{xx}{else}主站{/pboot:if} |  <a href="{label:city_url}" style="display: contents;"> 城市分站</a></li>
29
+	
30
+	
31
+	
32
+  </ul>
33
+</div>
34
+<!--/导航-->

+ 13
- 0
template/dafeult/wap/hot.html View File

1
+<div class="footer-copy-content" style="font-size: 14px;margin-bottom:20px;line-height: 25px;background: #fff;">
2
+
3
+<font style="margin-bottom:10px;display:block;font-weight: bold; ">热门城市:</font>
4
+        <!--环境变量-->
5
+        {pboot:sql sql="select * from ay_city where pid!=0 OR id IN(1,2,9,22) ORDER BY RAND() LIMIT 50" kp="0"}
6
+        <a href="https://[sql:etitle].{label:top_domain}" class="first-level" target="_blank" style="margin-right:20px;display:block;float:left;padding-right: 10px;">[sql:title] </a>
7
+        {/pboot:sql}
8
+
9
+
10
+        <div style="clear: both;"></div>
11
+</div>
12
+
13
+

+ 8
- 4
template/dafeult/wap/index.html View File

236
   </div>
236
   </div>
237
 </div>
237
 </div>
238
 {/pboot:sort}
238
 {/pboot:sort}
239
-<!--动态资讯 结束--> 
239
+<!--动态资讯 结束-->
240
 
240
 
241
 
241
 
242
 
242
 
243
+{include file=hot.html}
244
+
243
 <div class="footer-copy-content" style="font-size: 12px;">
245
 <div class="footer-copy-content" style="font-size: 12px;">
246
+
244
    友情链接:
247
    友情链接:
245
-     {pboot:link gid=1 num=50}
246
-     <a href="[link:link]" class="first-level" target="_blank" style="padding-right: 10px;"> [link:name] </a>
247
-     {/pboot:link}
248
+  {pboot:sql sql="select * from ay_link where city='{$cityId}'"}
249
+  <a href="[sql:link]" class="first-level" target="_blank" style="padding-right: 10px;"> [sql:name] </a>
250
+  {/pboot:sql}
251
+
248
   </div>	
252
   </div>	
249
 
253
 
250
 
254
 

+ 12
- 3
template/dafeult/wap/message.html View File

25
   <form action="{pboot:msgaction}"  method="post">
25
   <form action="{pboot:msgaction}"  method="post">
26
     <div class="list-form">
26
     <div class="list-form">
27
       <ul>
27
       <ul>
28
-        <li>
29
-          <div class="tip-text">孩子年龄:</div>
28
+        <li style="display: none;">
29
+          <div class="tip-text">年龄:</div>
30
           <div class="xuanze">
30
           <div class="xuanze">
31
             <div class="box">
31
             <div class="box">
32
               <input  type='radio' id='attr_30_1' name='nianling' value='0-3岁'>
32
               <input  type='radio' id='attr_30_1' name='nianling' value='0-3岁'>
44
               <input  type='radio' id='attr_30_4' name='nianling' value='12-18岁'>
44
               <input  type='radio' id='attr_30_4' name='nianling' value='12-18岁'>
45
               <label for="attr_30_4">12-18岁</label>
45
               <label for="attr_30_4">12-18岁</label>
46
             </div>
46
             </div>
47
+            <div class="box">
48
+              <input  type='radio' id='attr_30_5' name='nianling' value='18岁以上'>
49
+              <label for="attr_30_5">18岁以上</label>
50
+            </div>
47
           </div>
51
           </div>
48
         </li>
52
         </li>
49
         <li>
53
         <li>
69
               <input  type='radio' id='attr_31_5' name='leixing' value='职业发展'>
73
               <input  type='radio' id='attr_31_5' name='leixing' value='职业发展'>
70
               <label for="attr_31_5">职业发展</label>
74
               <label for="attr_31_5">职业发展</label>
71
             </div>
75
             </div>
76
+            <div class="box">
77
+              <input  type='radio' id='attr_31_6' name='leixing' value='其他'>
78
+              <label for="attr_31_6">其他</label>
79
+            </div>
72
           </div>
80
           </div>
73
         </li>
81
         </li>
74
         <li>
82
         <li>
153
     </ul>
161
     </ul>
154
   </div>
162
   </div>
155
 </div>
163
 </div>
156
-<!--服务流程 结束--> 
164
+<!--服务流程 结束-->
165
+{include file=hot.html}
157
 {include file=foot.html}
166
 {include file=foot.html}
158
 </body>
167
 </body>
159
 </html>
168
 </html>

+ 2
- 1
template/dafeult/wap/news.html View File

51
     </ul>
51
     </ul>
52
   </div>
52
   </div>
53
 </div>
53
 </div>
54
-<!--动态资讯 结束--> 
54
+<!--动态资讯 结束-->
55
+{include file=hot.html}
55
 {include file=foot.html}
56
 {include file=foot.html}
56
 </body>
57
 </body>
57
 </html>
58
 </html>

+ 1
- 0
template/dafeult/wap/newslist.html View File

45
 {else}
45
 {else}
46
 <div class="tac text-secondary">本分类下无任何数据!</div>
46
 <div class="tac text-secondary">本分类下无任何数据!</div>
47
 {/pboot:if}
47
 {/pboot:if}
48
+{include file=hot.html}
48
 {include file=foot.html}
49
 {include file=foot.html}
49
 </body>
50
 </body>
50
 </html>
51
 </html>

+ 2
- 1
template/dafeult/wap/team.html View File

73
     </div>
73
     </div>
74
   </div>
74
   </div>
75
 </div>
75
 </div>
76
-<!--专家团队 结束--> 
76
+<!--专家团队 结束-->
77
+{include file=hot.html}
77
 {include file=foot.html}
78
 {include file=foot.html}
78
 </body>
79
 </body>
79
 </html>
80
 </html>

+ 1
- 0
template/dafeult/wap/teamlist.html View File

49
 <div class="tac text-secondary">本分类下无任何数据!</div>
49
 <div class="tac text-secondary">本分类下无任何数据!</div>
50
 {/pboot:if}
50
 {/pboot:if}
51
 </div>
51
 </div>
52
+{include file=hot.html}
52
 {include file=foot.html}
53
 {include file=foot.html}
53
 </body>
54
 </body>
54
 </html>
55
 </html>

+ 9
- 0
友情链接增加cid.txt View File

1
+
2
+
3
+后台增加字段
4
+标签解析增加参数
5
+
6
+----------------------------------------
7
+{pboot:link gid=1 num=50 cid={$cityId}}
8
+<a href="[link:link]" class="first-level" target="_blank" style="padding-right: 10px;"> [link:name] </a>
9
+{/pboot:link}

+ 12
- 0
新增自定义foreach标签.txt View File

1
+{pboot:foreach str={label:hotkey} char=|}
2
+<a href="/search/?keyword=[foreach:name]" target="_blank" rel="nofollow">[foreach:name]</a>
3
+{/pboot:foreach}
4
+
5
+{pboot:foreach str={label:hotkey}}
6
+<a href="/search/?keyword=[foreach:name]" target="_blank" rel="nofollow">[foreach:name]</a>
7
+{/pboot:foreach}
8
+
9
+
10
+参数都是字符串,不能是数组或对象
11
+应该传值(参数)
12
+调用数组并循环

Loading…
Cancel
Save