Browse Source

Merge branch 'sess_0306' of 121.43.114.153:/home/git/repositories/shopnc into sess_0306

stanley-king 9 years ago
parent
commit
ea5f40f462
3 changed files with 15 additions and 2 deletions
  1. 1 1
      mobile/control/index.php
  2. 1 1
      mobile/control/search.php
  3. 13 0
      mobile/framework/function/function.php

+ 1 - 1
mobile/control/index.php

@@ -220,7 +220,7 @@ class indexControl extends mobileHomeControl
 
         //所需字段
         $fieldstr = 'goods_id,goods_commonid,store_id,brand_id,gc_id,goods_name,goods_price,goods_marketprice,goods_promotion_price,
-        goods_image,goods_salenum,evaluation_good_star,evaluation_count,goods_storage,goods_storage_alarm,is_virtual,is_presell,is_fcode,have_gift,goods_mobile_name';
+        goods_image,goods_salenum,evaluation_good_star,evaluation_count,goods_storage,goods_storage_alarm,is_virtual,is_presell,is_fcode,have_gift,goods_mobile_name,goods_jingle';
 
         $helper = new goods_helper();
         $goods_list = $helper->get_infos($goods_ids,$fieldstr);

+ 1 - 1
mobile/control/search.php

@@ -64,7 +64,7 @@ class searchControl extends mobileHomeControl
 //        // 添加3个状态字段
 //        $fieldstr .= ',is_virtual,is_presell,is_fcode,have_gift';
 
-        $fieldstr = 'goods_id,goods_commonid,store_id,brand_id,gc_id,goods_name,goods_price,goods_marketprice,goods_promotion_price,';
+        $fieldstr = 'goods_id,goods_commonid,store_id,brand_id,gc_id,goods_name,goods_price,goods_marketprice,goods_promotion_price,goods_jingle';
         $fieldstr .= 'goods_image,goods_salenum,evaluation_good_star,evaluation_count,goods_storage,goods_storage_alarm,is_virtual,is_presell,is_fcode,have_gift,goods_mobile_name';
 
         //排序方式

+ 13 - 0
mobile/framework/function/function.php

@@ -89,3 +89,16 @@ function mobile_page($page_count)
     return $extend_data;
 }
 
+/**
+ * 过滤html标签,js代码,css样式标签
+ * @param $str
+ * @return mixed
+ */
+function remove_tags($str) {
+    $str = preg_replace( "@<script(.*?)</script>@is", "", $str );
+    $str = preg_replace( "@<iframe(.*?)</iframe>@is", "", $str );
+    $str = preg_replace( "@<style(.*?)</style>@is", "", $str );
+    $str = preg_replace( "@<(.*?)>@is", "", $str );
+
+    return $str;
+}