From f0575f39b818f1223c09f8ca526744c2b127df8f Mon Sep 17 00:00:00 2001 From: LiaoYijun Date: Thu, 13 Jul 2017 16:56:39 +0800 Subject: [PATCH 01/17] =?UTF-8?q?=E6=8A=8A=E5=9F=8E=E5=B8=82-=E6=99=AF?= =?UTF-8?q?=E7=82=B9=E8=AF=A6=E7=BB=86=E6=A8=A1=E6=9D=BF=E6=A0=87=E8=AF=86?= =?UTF-8?q?=E4=B8=BA[=E5=B7=B2=E5=BA=9F=E5=BC=83]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/config/config.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/config/config.php b/application/config/config.php index 063c4fb6..d783cabd 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -906,7 +906,6 @@ $config['templates'] = array( '城市-首页模板[简]' => 'city_info_s_index', '城市-景点列表模板' => 'city_info_attractions_list', '城市-景点列表模板[简]' => 'city_info_s_attractions_list', - '城市-景点详细模板' => 'city_attractions', '城市-特色产品模板' => 'city_info_diytour', '城市-一线城市首页' => 'city_info_index_one', '省份-首页' => "area_info_index", @@ -931,6 +930,7 @@ $config['templates'] = array( '[已废弃]专题-庄重' => 'solemn', '[已废弃]专题-节庆' => 'festival', '[已废弃]专题-线路促销' => 'promotion_tour', + '[已废弃]城市-景点详细模板' => 'city_attractions', '城市-线路详细' => 'city_circuit', '专题模板(大)' => 'guide_big_series', '三峡游船' => 'yangtze', @@ -1031,4 +1031,4 @@ $config['css_source_ah'] = ''; + $content = GET_HTTP($url); + if (empty($content)) { + echo 'error gethttp:' . $url; + return FALSE; + } + //echo $content; + $html_object = str_get_html($content); + foreach ($html_object->find('div .extended') as $review) { + if (!empty($review->id)) { + //评论ID + $tr_review_id = str_replace('UR', '', $review->id); + //用户ID + $tr_member_id = $review->find('div.member_info div.memberOverlayLink', 0); + if (isset($tr_member_id) && isset($tr_member_id->id)) { + //UID_A50920FC5494D02709AA8F0E12294AAB-SRC_494596572 + $tr_member_id = substr($tr_member_id->id, 4, 32); + } else { + $tr_member_id = 0; + } + //用户名 + $tr_member_name = $review->find('div.username span.expand_inline', 0); + if (empty($tr_member_name)) { + $tr_member_name = 'A TripAdvisor Member'; //看不到客人名字 + } else { + $tr_member_name = $tr_member_name->plaintext; + } + //TA内容 + $tr_content = $review->find('div.entry', 0); + if (empty($tr_content)) { + $tr_content = ''; + } else { + $tr_content = $tr_content->innertext; + } + //游览时间 + $tr_visited_date = $review->find('span.recommend-titleInline', 0); + if (empty($tr_visited_date)) { + $tr_visited_date = ''; + } else { + $tr_visited_date = str_replace('Visited ', '', $tr_visited_date->plaintext); + } + //评论时间 + $tr_review_date = $review->find('span.ratingDate', 0); + if (empty($tr_review_date->title)) { + $tr_review_date = str_replace('Reviewed ', '', $tr_review_date->innertext); + } else { + $tr_review_date = $tr_review_date->title; + } + + $Tripadvisor_Review_Data = new StdClass; + $Tripadvisor_Review_Data->tr_member_id = $tr_member_id; + $Tripadvisor_Review_Data->tr_member_name = $tr_member_name; + $Tripadvisor_Review_Data->tr_content = $tr_content; + $Tripadvisor_Review_Data->tr_visited_date = $tr_visited_date; + $Tripadvisor_Review_Data->tr_review_date = $tr_review_date; + $where = array('tr_review_id' => $tr_review_id); + $this->Tripadvisor_Review_model->update('Tripadvisor_Review', $Tripadvisor_Review_Data, $where); + //print_r($Tripadvisor_Review_Data); + echo $tr_review_id . ' ' . $tr_member_id . ' ' . $tr_member_name . ' ' . $tr_content . ' ' . $tr_visited_date . ' ' . $tr_review_date . '
'; + } + } + } + + //分析评论,找出可能的团号和导游 + public function analysis_ta_review($tr_id) { + $data = array(); + $data['ta_review'] = $this->Tripadvisor_Review_model->detail_tr_id($tr_id); + if (empty($data['ta_review'])) { + echo '找不到评论内容'; + return; + } + $start_date = date('Y-m-d', strtotime($data['ta_review']->tr_visited_date)); + $end_date = date("Y-m-d", strtotime("$start_date +31 day")); + $group_list = $this->Tripadvisor_Review_model->find_group($data['ta_review']->tr_city, $start_date, $end_date); + if (empty($group_list)) { + echo json_encode(array('group_result' => '没有找到匹配团信息', 'tr_content' => $data['ta_review']->tr_content)); + return; + } + $data['match_group_list'] = array(); + //echo $data['ta_review']->tr_content . '
'; + foreach ($group_list as $item) { + //echo $item->GuideName . '
'; + if ((trim($item->GuideName) <> '') && (stripos($data['ta_review']->tr_content, $item->GuideName) !== false)) { + //查询团队中客人信息 + $item->customer_list = $this->Tripadvisor_Review_model->get_customer_info($item->coli_sn); + //填充匹配到的导游到匹配记录中 + $data['match_group_list'][] = $item; + //高亮导游名字 + //防止重复替换 + $data['ta_review']->tr_content = str_ireplace('' . $item->GuideName . '', $item->GuideName, $data['ta_review']->tr_content); + $data['ta_review']->tr_content = str_ireplace($item->GuideName, '' . $item->GuideName . '', $data['ta_review']->tr_content); + //echo $data['ta_review']->tr_content; + //echo $item->GRI_No . ',' . date("Y-m-d", strtotime($item->EOI_GetDate)) . ',' . $item->GuideName . ',' . $customer_string . '
'; + } + } + echo json_encode(array('group_result' => $this->load->view('find_group_result', $data, true), 'tr_content' => $data['ta_review']->tr_content)); + } + +} diff --git a/application/third_party/tripadvisor_spider/models/Tripadvisor_Review_model.php b/application/third_party/tripadvisor_spider/models/Tripadvisor_Review_model.php new file mode 100644 index 00000000..40998e6a --- /dev/null +++ b/application/third_party/tripadvisor_spider/models/Tripadvisor_Review_model.php @@ -0,0 +1,162 @@ +INFO = $this->load->database('INFO', TRUE); + $this->HT = $this->load->database('HT', TRUE); + } + + function init() { + $this->topnum = false; + $this->where = false; + $this->orderby = " ORDER BY tr_datetime DESC "; + } + + function detail_tr_id($tr_id) { + $this->init(); + $this->topnum = 1; + $this->where = ' AND tr.tr_id= ' . $this->INFO->escape($tr_id); + return $this->GetList(); + } + + function detail($tr_review_id) { + $this->init(); + $this->topnum = 1; + $this->where = ' AND tr.tr_review_id= ' . $this->INFO->escape($tr_review_id); + return $this->GetList(); + } + + function search($topnum, $tr_city) { + $this->init(); + $this->topnum = $topnum; + $this->where = ' AND tr.tr_city =' . $this->INFO->escape($tr_city); + $this->orderby = " ORDER BY tr.tr_id DESC "; + return $this->GetList(); + } + + //获取准备要更新的数据集 + function update_list($topnum = 10) { + $this->init(); + $this->topnum = $topnum; + $this->where = ' AND tr.tr_content IS NULL '; + return $this->GetList(); + } + + function GetList() { + $this->topnum ? $sql = "SELECT TOP " . $this->topnum : $sql = "SELECT "; + $sql.=" + tr.tr_id + ,tr.tr_city + ,tr.tr_review_id + ,tr.tr_review_title + ,tr.tr_member_id + ,tr.tr_member_name + ,tr.tr_review_id + ,tr.tr_review_date + ,tr.tr_visited_date + ,tr.tr_content + ,tr.tr_datetime + FROM Tripadvisor_Review tr + WHERE 1 = 1 + + "; + $this->where ? $sql.=$this->where : false; + $this->orderby ? $sql.=$this->orderby : false; + + $query = $this->INFO->query($sql); + //print_r($this->INFO->queries); + if ($this->topnum === 1) { + if ($query->num_rows() > 0) { + $row = $query->row(); + return $row; + } else { + return FALSE; + } + } else { + return $query->result(); + } + } + + public function add($table, $data) { + if ($this->INFO->insert($table, $data)) { + return $this->INFO->last_id($table); + } else { + return false; + } + } + + public function update($table, $data, $where) { + $this->INFO->update($table, $data, $where); + //print_r($this->INFO->queries); + } + + public function find_group($city, $start_date, $end_date) { + $sql = " + SELECT GRI_No + ,coli_id + ,coli_sn + ,b.EOI_ObjSN + ,a.EOI_GetDate + ,dbo.GetGuideName(b.EOI_ObjSN ,1) AS GuideName + FROM Eva_ObjectInfo AS a + INNER JOIN ConfirmLineInfo + ON COLI_GRI_SN = a.EOI_GRI_SN + AND COLI_GRI_SN>0 + INNER JOIN GroupInfo + ON GRI_SN = a.EOI_GRI_SN + LEFT JOIN Eva_ObjectInfo AS b + ON b.EOI_GRI_SN = a.EOI_GRI_SN + AND b.EOI_VEI_SN = a.EOI_ObjSN + AND b.EOI_Type = 3 + WHERE a.EOI_Type = 1 + AND a.EOI_GetDate BETWEEN ? AND ? + AND EXISTS( + SELECT VEI_SN + FROM VEndorInfo + WHERE VEI_SN =a.EOI_ObjSN + AND EXISTS + ( + SELECT TOP 1 1 + FROM CItyInfo2 ci2 + WHERE ci2.CII2_Name = ? + AND ci2.CII2_CII_SN = VEI_CII_Name + ) + ) + AND b.EOI_ObjSN IS NOT NULL + + "; + $query = $this->HT->query($sql, array($start_date, $end_date, $city)); + return $query->result(); + } + + //客人信息 + public function get_customer_info($COLI_SN) { + $sql = "SELECT CUL_IsLinkMan, + MEI_FirstName, + MEI_LastName, + MEI_Gender, + MEI_Country, + COI2_Country, + MEI_PassportNo, + MEI_Phone, + MEI_Birthday, + MEI_ServiceLang, + SYC2_CodeDiscribe + FROM CUstomerList INNER JOIN MEmberInfo ON CUL_CUI_SN=MEI_SN + LEFT JOIN COuntryInfo2 ON COI2_COI_SN=MEI_Country AND COI2_LGC=2 + LEFT JOIN V_System_Code ON MEI_ServiceLang=SYC_SN AND SYC_Type=102 AND LGC_LGC=2 + WHERE CUL_COLI_SN=?"; + $query = $this->HT->query($sql, array($COLI_SN)); + $result = $query->result(); + return $result; + } + +} diff --git a/application/third_party/tripadvisor_spider/views/find_group_result.php b/application/third_party/tripadvisor_spider/views/find_group_result.php new file mode 100644 index 00000000..9dc95862 --- /dev/null +++ b/application/third_party/tripadvisor_spider/views/find_group_result.php @@ -0,0 +1,28 @@ + \ No newline at end of file diff --git a/application/third_party/tripadvisor_spider/views/welcome.php b/application/third_party/tripadvisor_spider/views/welcome.php new file mode 100644 index 00000000..9dd8e848 --- /dev/null +++ b/application/third_party/tripadvisor_spider/views/welcome.php @@ -0,0 +1,81 @@ + +
+
+ + + +
+
+
+ + + + +
+
+
+ + + + + +
+
+ + $item) { ?> + +
+
tr_review_title; ?> 分析
+
+ +

tr_member_name; ?>:

+
tr_content; ?>
+

-Visited tr_visited_date; ?> , Reviewed tr_review_date; ?>

+
+
+ + +
+ + + +
+
+ + + \ No newline at end of file From 57f67096242ecd7f823c2d1f95a88c4dea9c752a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B9=E8=AF=9A=E8=AF=9A?= Date: Fri, 14 Jul 2017 09:17:07 +0800 Subject: [PATCH 03/17] =?UTF-8?q?TA=E8=AF=84=E8=AE=BA=E9=87=87=E9=9B=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/controllers/apps.php | 8 ++++++-- .../tripadvisor_spider/controllers/index.php | 2 +- .../models/Tripadvisor_Review_model.php | 2 +- .../third_party/tripadvisor_spider/views/welcome.php | 12 ------------ 4 files changed, 8 insertions(+), 16 deletions(-) diff --git a/application/controllers/apps.php b/application/controllers/apps.php index e5365bf8..6bb0cfa9 100644 --- a/application/controllers/apps.php +++ b/application/controllers/apps.php @@ -22,11 +22,15 @@ class Apps extends CI_Controller $action_name = isset($param[1])?strtolower($param[1]):'index'; //加载应用包 - $app_path=APPPATH.$third_party."/".$app_name."/"; //存放模块的目录 $view_cascade=TRUE; //允许加载模块内、外的视图 $this->load->add_package_path($app_path,$view_cascade); - + + //加载配置文件 + if (file_exists($app_path . 'config/config.php')) { + $this->load->config('config'); + } + //加载控制器 if ( ! file_exists($app_path.'controllers/'.$controller_name.'.php')) { echo 'Controller file is not exists!'; diff --git a/application/third_party/tripadvisor_spider/controllers/index.php b/application/third_party/tripadvisor_spider/controllers/index.php index 08f9aa99..0597d8a0 100644 --- a/application/third_party/tripadvisor_spider/controllers/index.php +++ b/application/third_party/tripadvisor_spider/controllers/index.php @@ -17,7 +17,7 @@ class Index extends CI_Controller { public function index($city = 'Beijing') { $data = array(); $data['city'] = $city; - $data['ta_review_list'] = $this->Tripadvisor_Review_model->search(10, $data['city']); + $data['ta_review_list'] = $this->Tripadvisor_Review_model->search(20, $data['city']); $this->load->view('bootstrap3/header', $data); $this->load->view('welcome'); $this->load->view('bootstrap3/footer'); diff --git a/application/third_party/tripadvisor_spider/models/Tripadvisor_Review_model.php b/application/third_party/tripadvisor_spider/models/Tripadvisor_Review_model.php index 40998e6a..59f305ca 100644 --- a/application/third_party/tripadvisor_spider/models/Tripadvisor_Review_model.php +++ b/application/third_party/tripadvisor_spider/models/Tripadvisor_Review_model.php @@ -100,7 +100,7 @@ class Tripadvisor_Review_model extends CI_Model { public function find_group($city, $start_date, $end_date) { $sql = " - SELECT GRI_No + SELECT top 100 GRI_No ,coli_id ,coli_sn ,b.EOI_ObjSN diff --git a/application/third_party/tripadvisor_spider/views/welcome.php b/application/third_party/tripadvisor_spider/views/welcome.php index 9dd8e848..c130bcbd 100644 --- a/application/third_party/tripadvisor_spider/views/welcome.php +++ b/application/third_party/tripadvisor_spider/views/welcome.php @@ -1,22 +1,10 @@ -
-
-
- - - - -
-
-
-
-
+ - $item) { ?> + $item) { + //TA原帖链接 + $ta_url=''; + if(!empty($ta_website[$item->tr_city])){ + $ta_url=$ta_website[$item->tr_city].'#REVIEWS'; + $ta_url=str_ireplace('Attraction_Review','ShowUserReviews',$ta_url); + $ta_url=str_ireplace('Reviews{PAGENUM}','r'.$item->tr_review_id.'-',$ta_url); + } + ?>
-
tr_review_title; ?> 分析
+

tr_member_name; ?>:

diff --git a/application/views/bootstrap/header.php b/application/views/bootstrap/header.php index b72b60a0..578b1108 100644 --- a/application/views/bootstrap/header.php +++ b/application/views/bootstrap/header.php @@ -73,13 +73,15 @@ 更多 diff --git a/application/views/bootstrap3/header.php b/application/views/bootstrap3/header.php index c5ef8df2..1daec3cb 100644 --- a/application/views/bootstrap3/header.php +++ b/application/views/bootstrap3/header.php @@ -82,6 +82,9 @@
  • 打赏统计
  • 表单管理
  • 广告管理
  • +
  • TA评论采集
  • +
  • 老旧信息查询
  • +
  • Html基础知识
  • 系统设置
  • From 951a53d4021e0d3177570472c43380d6ba628dff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B9=E8=AF=9A=E8=AF=9A?= Date: Fri, 14 Jul 2017 10:47:12 +0800 Subject: [PATCH 05/17] =?UTF-8?q?=E4=BC=98=E5=8C=96sql=E9=A2=84=E8=AE=A1?= =?UTF-8?q?=EF=BC=8Cnull=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tripadvisor_spider/models/Tripadvisor_Review_model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/third_party/tripadvisor_spider/models/Tripadvisor_Review_model.php b/application/third_party/tripadvisor_spider/models/Tripadvisor_Review_model.php index 59f305ca..f9830724 100644 --- a/application/third_party/tripadvisor_spider/models/Tripadvisor_Review_model.php +++ b/application/third_party/tripadvisor_spider/models/Tripadvisor_Review_model.php @@ -130,7 +130,7 @@ class Tripadvisor_Review_model extends CI_Model { AND ci2.CII2_CII_SN = VEI_CII_Name ) ) - AND b.EOI_ObjSN IS NOT NULL + AND ISNULL(b.EOI_ObjSN,0)>0 "; $query = $this->HT->query($sql, array($start_date, $end_date, $city)); From ec7f900c87577d470ddc3409677f53d3ef988587 Mon Sep 17 00:00:00 2001 From: "lmr@hainatravel.com" <59361885@qq.com> Date: Fri, 14 Jul 2017 11:03:50 +0800 Subject: [PATCH 06/17] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/controllers/tools.php | 46 ++++++++++++++++++++++++++++++- application/views/tools/old.php | 6 ++++ 2 files changed, 51 insertions(+), 1 deletion(-) diff --git a/application/controllers/tools.php b/application/controllers/tools.php index 77f1f33b..ac95ded2 100644 --- a/application/controllers/tools.php +++ b/application/controllers/tools.php @@ -27,14 +27,58 @@ class Tools extends CI_Controller $data['yeardiff'] = $this->input->get_post('yeardiff'); $data['nopub'] = $this->input->get_post('nopub'); $data['emptyinfo'] = $this->input->get_post('emptyinfo'); + $data['csv'] = $this->input->get_post('csv'); //参数 if (!$data['yeardiff']) $data['yeardiff'] = 3; //老旧信息 $data['info'] = $this->Information_model->get_oldest_info($data['yeardiff'], $data['nopub'], $data['emptyinfo']); //视图 - $this->load->view('tools/old', $data); + if ($data['csv']) + { + $csv_header = array('id', 'file', 'date', 'public'); + $csv_data = array(); + foreach ($data['info'] as $key => $it) + { + $temp = array(); + $temp[0] = $key; + $temp[1] = $it->ic_url; + $temp[2] = date('Y-m-d', strtotime($it->ic_datetime)); + $it->ic_status ? $temp[3] = 'yes' : $temp[3] = 'no'; + array_push($csv_data, $temp); + } + $this->csv($csv_header, $csv_data, 'old_info.csv'); + } else { + $this->load->view('tools/old', $data); + } } + /** + * 导出CSV文件 + * @param array $data 数据 + * @param array $header_data 首行数据 + * @param string $file_name 文件名称 + * @return string + */ + public function csv($header_data, $data, $file_name) + { + header('Content-Type: application/vnd.ms-excel'); + header('Content-Disposition: attachment;filename='.$file_name); + header('Cache-Control: max-age=0'); + $fp = fopen('php://output', 'a'); + if (!empty($header_data)) { + fputcsv($fp, $header_data); + } + $count = count($data); + if ($count > 0) + { + for ($i = 0; $i < $count; $i++) + { + $row = $data[$i]; + fputcsv($fp, $row); + } + } + fclose($fp); + } } //end of Cache diff --git a/application/views/tools/old.php b/application/views/tools/old.php index 54117707..826e97bd 100644 --- a/application/views/tools/old.php +++ b/application/views/tools/old.php @@ -94,6 +94,12 @@ $(function() { > 显示内容为空的信息 +   + + +    From b2cac79ad0f0bd49f7d88252270e2b68525b3d1d Mon Sep 17 00:00:00 2001 From: "lmr@hainatravel.com" <59361885@qq.com> Date: Fri, 14 Jul 2017 11:13:51 +0800 Subject: [PATCH 07/17] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=96=87=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/views/tools/old.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/views/tools/old.php b/application/views/tools/old.php index 826e97bd..d2daaaaa 100644 --- a/application/views/tools/old.php +++ b/application/views/tools/old.php @@ -101,7 +101,7 @@ $(function() {    - +
    From 731d2afce03538321b1e696d6ec9c4f03ebd612b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B9=E8=AF=9A=E8=AF=9A?= Date: Mon, 17 Jul 2017 10:22:50 +0800 Subject: [PATCH 08/17] =?UTF-8?q?=E6=9B=BF=E6=8D=A2=E4=B8=B4=E6=97=B6?= =?UTF-8?q?=E9=A2=84=E8=A7=88=E5=9B=BE=E7=89=87=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/config/config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/config/config.php b/application/config/config.php index 3ee3101d..0b23672e 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -1015,7 +1015,7 @@ $config['project_state'] = array( //上传图片是异步上网的,所以用此url进行本地预览 $config['media_image_url'] = 'http://202.103.68.44/upload'; $config['media_image_url2'] = 'http://video.chtcdn.com/upload'; -$config['media_image_url_org'] = 'http://202.103.68.35/image'; +$config['media_image_url_org'] = 'http://photo.chtcdn.com:3581/upload'; $config['media_image_url_remote'] = 'http://photo.chtcdn.com/upload'; $config['media_image_url_remote2'] = 'http://116.251.217.48:3581/upload'; From f6f75ccd6cc1acfc8de660f081aae657dc31a898 Mon Sep 17 00:00:00 2001 From: "lmr@hainatravel.com" <59361885@qq.com> Date: Mon, 17 Jul 2017 11:55:54 +0800 Subject: [PATCH 09/17] =?UTF-8?q?fix=20=E4=BA=A7=E5=93=81=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/controllers/information.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/controllers/information.php b/application/controllers/information.php index e7e61f10..df62cfed 100644 --- a/application/controllers/information.php +++ b/application/controllers/information.php @@ -518,7 +518,7 @@ class Information extends CI_Controller { } else { $url = $this->config->item('site_url') . '/index.php/welcome/update_cache/?static_html_url=' . $url; } - if ($information->ic_type == 'product') { + if (isset($information->ic_type) && $information->ic_type == 'product') { $url = $this->config->item('site_url') . '/index.php/welcome/update_cache/?static_html_url=' . $tmp; } } From c4fbd3a1ba0e792e3e3ad932b74c1adfc39b4121 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B9=E8=AF=9A=E8=AF=9A?= Date: Tue, 18 Jul 2017 10:32:37 +0800 Subject: [PATCH 10/17] =?UTF-8?q?=E6=A0=B9=E6=8D=AEta=E8=AF=84=E8=AE=BAid?= =?UTF-8?q?=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../third_party/tripadvisor_spider/controllers/index.php | 2 ++ .../tripadvisor_spider/models/Tripadvisor_Review_model.php | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/application/third_party/tripadvisor_spider/controllers/index.php b/application/third_party/tripadvisor_spider/controllers/index.php index a33ec760..55a5a134 100644 --- a/application/third_party/tripadvisor_spider/controllers/index.php +++ b/application/third_party/tripadvisor_spider/controllers/index.php @@ -34,6 +34,8 @@ class Index extends CI_Controller { if ($key_city == $city) { foreach ($page_mark as $page_num) { $page_url = str_replace('{PAGENUM}', $page_num, $item_url); + //使用代理来请求,国内直接访问会很慢 + $page_url=str_replace('https://www.tripadvisor.com', 'http://47.91.16.199:5052', $page_url); $content = GET_HTTP($page_url); if (!empty($content)) { $html_object = str_get_html($content); diff --git a/application/third_party/tripadvisor_spider/models/Tripadvisor_Review_model.php b/application/third_party/tripadvisor_spider/models/Tripadvisor_Review_model.php index f9830724..02ffed1f 100644 --- a/application/third_party/tripadvisor_spider/models/Tripadvisor_Review_model.php +++ b/application/third_party/tripadvisor_spider/models/Tripadvisor_Review_model.php @@ -17,7 +17,7 @@ class Tripadvisor_Review_model extends CI_Model { function init() { $this->topnum = false; $this->where = false; - $this->orderby = " ORDER BY tr_datetime DESC "; + $this->orderby = " ORDER BY tr.tr_review_id DESC "; } function detail_tr_id($tr_id) { @@ -38,7 +38,7 @@ class Tripadvisor_Review_model extends CI_Model { $this->init(); $this->topnum = $topnum; $this->where = ' AND tr.tr_city =' . $this->INFO->escape($tr_city); - $this->orderby = " ORDER BY tr.tr_id DESC "; + $this->orderby = " ORDER BY tr.tr_review_id DESC "; return $this->GetList(); } From d54a327dc61704575cf48f88a46a72aa38a4fb70 Mon Sep 17 00:00:00 2001 From: "lmr@hainatravel.com" <59361885@qq.com> Date: Wed, 19 Jul 2017 11:00:46 +0800 Subject: [PATCH 11/17] =?UTF-8?q?=E6=9B=B4=E6=94=B9config=EF=BC=9A?= =?UTF-8?q?=E8=A5=BF=E8=AF=AD-https?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/config/config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/config/config.php b/application/config/config.php index 0b23672e..0f018798 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -367,7 +367,7 @@ $config['site'] = array( 'gm' => array('site_code' => 'gm', 'site_id' => 22, 'site_lgc' => '4', 'site_url' => 'http://www.chinarundreisen.com', 'site_image_url' => '//bilder.chinarundreisen.com', 'site_authors' => array('DX', 'X', 'K', 'Lan', 'lmr', 'zyh', 'ZYHL', 'TDJ'), 'site_user' => ',ycc,lmr,B,zyh,DX,X,K,htc,zm,bhn,Lan,Tony,zyh,J,v,ZYHL,TDJ,LYY,shw,'), 'vc' => array('site_code' => 'vc', 'site_id' => 30, 'site_lgc' => '5', 'site_url' => 'http://www.voyageschine.com', 'site_image_url' => '//images.voyageschine.com', 'site_authors' => array('JE', 'kq', 'lya', 'lyz', 'zyh'), 'site_user' => ',ycc,lmr, zyh,JE,htc,kq,lya,bhn,Tony,zyh,B,J,lyz,LYY,'), 'jp' => array('site_code' => 'jp', 'site_id' => 88, 'site_lgc' => '3', 'site_url' => 'http://www.arachina.com', 'site_image_url' => '//images.arachina.com', 'site_authors' => array('hql', 'LLM', 'SHX', 'lmr', 'zyh', 'zb'), 'site_user' => ',ycc,lmr, zyh,hql,LLM,SHX,htc,zpl,Tony,zyh,J,B,zb,LYY,'), - 'vac' => array('site_code' => 'vac', 'site_id' => 95, 'site_lgc' => '6', 'site_url' => 'http://www.viaje-a-china.com', 'site_image_url' => '//imagenes.viaje-a-china.com', 'site_authors' => array('I', 'cyt', 'lmr', 'zyh', 'LLM'), 'site_user' => ',ycc,lmr, zyh,I,cyt,htc,bhn,Tony,zyh,B,J,LLM,LYY,'), + 'vac' => array('site_code' => 'vac', 'site_id' => 95, 'site_lgc' => '6', 'site_url' => 'https://www.viaje-a-china.com', 'site_image_url' => '//imagenes.viaje-a-china.com', 'site_authors' => array('I', 'cyt', 'lmr', 'zyh', 'LLM'), 'site_user' => ',ycc,lmr, zyh,I,cyt,htc,bhn,Tony,zyh,B,J,LLM,LYY,'), 'it' => array('site_code' => 'it', 'site_id' => 168, 'site_lgc' => '8', 'site_url' => 'https://www.viaggio-in-cina.it', 'site_image_url' => '//images.viaggio-in-cina.it', 'site_authors' => array('LZY', 'ZQQ', 'lmr', 'zyh'), 'site_user' => ',ycc,lmr, zyh,LZY,htc,ZQQ,Tony,zyh,B,J,LYY,'), 'ru' => array('site_code' => 'ru', 'site_id' => 102, 'site_lgc' => '7', 'site_url' => 'http://www.chinahighlights.ru', 'site_image_url' => '//images.chinahighlights.ru', 'site_authors' => array('xjj', 'zyy'), 'site_user' => ',ycc,lmr, zyh,xjj,htc,DX,zyy,bhn,Tony,zyh,B,J,LYY,'), 'wt' => array('site_code' => 'wt', 'site_id' => 172, 'site_lgc' => '2', 'site_url' => 'http://www.iiiyooo.com', 'site_image_url' => '', 'site_authors' => array('ylh', 'lfj', 'wx', 'lzh', 'shw', 'lx'), 'site_user' => ',ycc,lmr, zyh,ylh,lfj,wx,lzh,shw,lx,bhn,B,J,'), From 4f13d9d30a040d4564f18c2cf49f4e313d93f6b6 Mon Sep 17 00:00:00 2001 From: "lmr@hainatravel.com" <59361885@qq.com> Date: Wed, 19 Jul 2017 15:50:27 +0800 Subject: [PATCH 12/17] ru conf https --- application/config/config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/config/config.php b/application/config/config.php index 0f018798..ce96892c 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -369,7 +369,7 @@ $config['site'] = array( 'jp' => array('site_code' => 'jp', 'site_id' => 88, 'site_lgc' => '3', 'site_url' => 'http://www.arachina.com', 'site_image_url' => '//images.arachina.com', 'site_authors' => array('hql', 'LLM', 'SHX', 'lmr', 'zyh', 'zb'), 'site_user' => ',ycc,lmr, zyh,hql,LLM,SHX,htc,zpl,Tony,zyh,J,B,zb,LYY,'), 'vac' => array('site_code' => 'vac', 'site_id' => 95, 'site_lgc' => '6', 'site_url' => 'https://www.viaje-a-china.com', 'site_image_url' => '//imagenes.viaje-a-china.com', 'site_authors' => array('I', 'cyt', 'lmr', 'zyh', 'LLM'), 'site_user' => ',ycc,lmr, zyh,I,cyt,htc,bhn,Tony,zyh,B,J,LLM,LYY,'), 'it' => array('site_code' => 'it', 'site_id' => 168, 'site_lgc' => '8', 'site_url' => 'https://www.viaggio-in-cina.it', 'site_image_url' => '//images.viaggio-in-cina.it', 'site_authors' => array('LZY', 'ZQQ', 'lmr', 'zyh'), 'site_user' => ',ycc,lmr, zyh,LZY,htc,ZQQ,Tony,zyh,B,J,LYY,'), - 'ru' => array('site_code' => 'ru', 'site_id' => 102, 'site_lgc' => '7', 'site_url' => 'http://www.chinahighlights.ru', 'site_image_url' => '//images.chinahighlights.ru', 'site_authors' => array('xjj', 'zyy'), 'site_user' => ',ycc,lmr, zyh,xjj,htc,DX,zyy,bhn,Tony,zyh,B,J,LYY,'), + 'ru' => array('site_code' => 'ru', 'site_id' => 102, 'site_lgc' => '7', 'site_url' => 'https://www.chinahighlights.ru', 'site_image_url' => '//images.chinahighlights.ru', 'site_authors' => array('xjj', 'zyy'), 'site_user' => ',ycc,lmr, zyh,xjj,htc,DX,zyy,bhn,Tony,zyh,B,J,LYY,'), 'wt' => array('site_code' => 'wt', 'site_id' => 172, 'site_lgc' => '2', 'site_url' => 'http://www.iiiyooo.com', 'site_image_url' => '', 'site_authors' => array('ylh', 'lfj', 'wx', 'lzh', 'shw', 'lx'), 'site_user' => ',ycc,lmr, zyh,ylh,lfj,wx,lzh,shw,lx,bhn,B,J,'), 'tbt' => array('site_code' => 'tbt', 'site_id' => 169, 'site_lgc' => '1', 'site_url' => 'http://www.tibettravel.info', 'site_image_url' => '/images', 'site_authors' => array('wj', 'sfx'), 'site_user' => ',ycc,wj,bhn,wx,lzh,lfj,hwt,thf,sfx,J,ZP,'), 'sht' => array('site_code' => 'sht', 'site_id' => 96, 'site_lgc' => '1', 'site_url' => 'http://www.shanghaihighlights.com', 'site_image_url' => '//images.shanghaihighlights.com', 'site_authors' => array('vz', 'sfx'), 'site_user' => ',ycc,wj,bhn,wx,lzh,lfj,hwt,thf,vz,sfx,J,ZP,LYY,'), From 23bc6f15b9ec010261dc8b9c17ecd437bf971cf9 Mon Sep 17 00:00:00 2001 From: "lmr@hainatravel.com" <59361885@qq.com> Date: Thu, 20 Jul 2017 10:17:27 +0800 Subject: [PATCH 13/17] vc config https --- application/config/config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/config/config.php b/application/config/config.php index ce96892c..4dbb8705 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -365,7 +365,7 @@ $config['proxy_ips'] = ''; $config['site'] = array( 'cht' => array('site_code' => 'cht', 'site_id' => 14, 'site_lgc' => '1', 'site_url' => 'https://www.chinahighlights.com', 'site_image_url' => '//images.chinahighlights.com', 'site_authors' => array('zzy', 'spt', 'yl', 'gavin', 'sw', 'zl', 'wbl', 'yqw', 'lf', 'zhm', 'pkl'), 'site_user' => ',ycc,lmr, zyh,J,shw,B,zzy,WJJ,Tony,pcf,zxy,wst,wz,v,S,yyg,yxd,wj,sw,yl,hx,spt,wmr,zl,syt,gavin,zm,htc,yqw,bhn,lmj,wbl,yqw,LYY,zhm,'), 'gm' => array('site_code' => 'gm', 'site_id' => 22, 'site_lgc' => '4', 'site_url' => 'http://www.chinarundreisen.com', 'site_image_url' => '//bilder.chinarundreisen.com', 'site_authors' => array('DX', 'X', 'K', 'Lan', 'lmr', 'zyh', 'ZYHL', 'TDJ'), 'site_user' => ',ycc,lmr,B,zyh,DX,X,K,htc,zm,bhn,Lan,Tony,zyh,J,v,ZYHL,TDJ,LYY,shw,'), - 'vc' => array('site_code' => 'vc', 'site_id' => 30, 'site_lgc' => '5', 'site_url' => 'http://www.voyageschine.com', 'site_image_url' => '//images.voyageschine.com', 'site_authors' => array('JE', 'kq', 'lya', 'lyz', 'zyh'), 'site_user' => ',ycc,lmr, zyh,JE,htc,kq,lya,bhn,Tony,zyh,B,J,lyz,LYY,'), + 'vc' => array('site_code' => 'vc', 'site_id' => 30, 'site_lgc' => '5', 'site_url' => 'https://www.voyageschine.com', 'site_image_url' => '//images.voyageschine.com', 'site_authors' => array('JE', 'kq', 'lya', 'lyz', 'zyh'), 'site_user' => ',ycc,lmr, zyh,JE,htc,kq,lya,bhn,Tony,zyh,B,J,lyz,LYY,'), 'jp' => array('site_code' => 'jp', 'site_id' => 88, 'site_lgc' => '3', 'site_url' => 'http://www.arachina.com', 'site_image_url' => '//images.arachina.com', 'site_authors' => array('hql', 'LLM', 'SHX', 'lmr', 'zyh', 'zb'), 'site_user' => ',ycc,lmr, zyh,hql,LLM,SHX,htc,zpl,Tony,zyh,J,B,zb,LYY,'), 'vac' => array('site_code' => 'vac', 'site_id' => 95, 'site_lgc' => '6', 'site_url' => 'https://www.viaje-a-china.com', 'site_image_url' => '//imagenes.viaje-a-china.com', 'site_authors' => array('I', 'cyt', 'lmr', 'zyh', 'LLM'), 'site_user' => ',ycc,lmr, zyh,I,cyt,htc,bhn,Tony,zyh,B,J,LLM,LYY,'), 'it' => array('site_code' => 'it', 'site_id' => 168, 'site_lgc' => '8', 'site_url' => 'https://www.viaggio-in-cina.it', 'site_image_url' => '//images.viaggio-in-cina.it', 'site_authors' => array('LZY', 'ZQQ', 'lmr', 'zyh'), 'site_user' => ',ycc,lmr, zyh,LZY,htc,ZQQ,Tony,zyh,B,J,LYY,'), From 12833bc48c209970dea53e7c781f8661b6153537 Mon Sep 17 00:00:00 2001 From: "lmr@hainatravel.com" <59361885@qq.com> Date: Thu, 20 Jul 2017 13:54:15 +0800 Subject: [PATCH 14/17] jp config https --- application/config/config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/config/config.php b/application/config/config.php index 4dbb8705..013dc95b 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -366,7 +366,7 @@ $config['site'] = array( 'cht' => array('site_code' => 'cht', 'site_id' => 14, 'site_lgc' => '1', 'site_url' => 'https://www.chinahighlights.com', 'site_image_url' => '//images.chinahighlights.com', 'site_authors' => array('zzy', 'spt', 'yl', 'gavin', 'sw', 'zl', 'wbl', 'yqw', 'lf', 'zhm', 'pkl'), 'site_user' => ',ycc,lmr, zyh,J,shw,B,zzy,WJJ,Tony,pcf,zxy,wst,wz,v,S,yyg,yxd,wj,sw,yl,hx,spt,wmr,zl,syt,gavin,zm,htc,yqw,bhn,lmj,wbl,yqw,LYY,zhm,'), 'gm' => array('site_code' => 'gm', 'site_id' => 22, 'site_lgc' => '4', 'site_url' => 'http://www.chinarundreisen.com', 'site_image_url' => '//bilder.chinarundreisen.com', 'site_authors' => array('DX', 'X', 'K', 'Lan', 'lmr', 'zyh', 'ZYHL', 'TDJ'), 'site_user' => ',ycc,lmr,B,zyh,DX,X,K,htc,zm,bhn,Lan,Tony,zyh,J,v,ZYHL,TDJ,LYY,shw,'), 'vc' => array('site_code' => 'vc', 'site_id' => 30, 'site_lgc' => '5', 'site_url' => 'https://www.voyageschine.com', 'site_image_url' => '//images.voyageschine.com', 'site_authors' => array('JE', 'kq', 'lya', 'lyz', 'zyh'), 'site_user' => ',ycc,lmr, zyh,JE,htc,kq,lya,bhn,Tony,zyh,B,J,lyz,LYY,'), - 'jp' => array('site_code' => 'jp', 'site_id' => 88, 'site_lgc' => '3', 'site_url' => 'http://www.arachina.com', 'site_image_url' => '//images.arachina.com', 'site_authors' => array('hql', 'LLM', 'SHX', 'lmr', 'zyh', 'zb'), 'site_user' => ',ycc,lmr, zyh,hql,LLM,SHX,htc,zpl,Tony,zyh,J,B,zb,LYY,'), + 'jp' => array('site_code' => 'jp', 'site_id' => 88, 'site_lgc' => '3', 'site_url' => 'https://www.arachina.com', 'site_image_url' => '//images.arachina.com', 'site_authors' => array('hql', 'LLM', 'SHX', 'lmr', 'zyh', 'zb'), 'site_user' => ',ycc,lmr, zyh,hql,LLM,SHX,htc,zpl,Tony,zyh,J,B,zb,LYY,'), 'vac' => array('site_code' => 'vac', 'site_id' => 95, 'site_lgc' => '6', 'site_url' => 'https://www.viaje-a-china.com', 'site_image_url' => '//imagenes.viaje-a-china.com', 'site_authors' => array('I', 'cyt', 'lmr', 'zyh', 'LLM'), 'site_user' => ',ycc,lmr, zyh,I,cyt,htc,bhn,Tony,zyh,B,J,LLM,LYY,'), 'it' => array('site_code' => 'it', 'site_id' => 168, 'site_lgc' => '8', 'site_url' => 'https://www.viaggio-in-cina.it', 'site_image_url' => '//images.viaggio-in-cina.it', 'site_authors' => array('LZY', 'ZQQ', 'lmr', 'zyh'), 'site_user' => ',ycc,lmr, zyh,LZY,htc,ZQQ,Tony,zyh,B,J,LYY,'), 'ru' => array('site_code' => 'ru', 'site_id' => 102, 'site_lgc' => '7', 'site_url' => 'https://www.chinahighlights.ru', 'site_image_url' => '//images.chinahighlights.ru', 'site_authors' => array('xjj', 'zyy'), 'site_user' => ',ycc,lmr, zyh,xjj,htc,DX,zyy,bhn,Tony,zyh,B,J,LYY,'), From 31ee17ac468367f6e5f588710ca5bb41068867b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B9=E8=AF=9A=E8=AF=9A?= Date: Wed, 26 Jul 2017 09:28:37 +0800 Subject: [PATCH 15/17] =?UTF-8?q?=E9=82=AE=E4=BB=B6=E5=8F=91=E9=80=81?= =?UTF-8?q?=E4=B8=8D=E4=BA=86=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/controllers/sendmail.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/controllers/sendmail.php b/application/controllers/sendmail.php index f63debf8..f7deef22 100644 --- a/application/controllers/sendmail.php +++ b/application/controllers/sendmail.php @@ -54,8 +54,8 @@ class Sendmail extends CI_Controller } $this->load->library('email'); $config['protocol'] = 'smtp'; - $config['smtp_host'] = 'ssl://smtp.chinahighlights.net';//ssl://smtp.sendgrid.net'; - $config['smtp_port'] = 465; + $config['smtp_host'] = 'smtp.chinahighlights.net';//ssl://smtp.sendgrid.net'; + $config['smtp_port'] = 25; $config['smtp_user'] = 'noreply02@chinahighlights.net';//'zm198311@yahoo.com.cn'; $config['smtp_pass'] = 'eHgb2Z8G\HbR';//cits@123'; $config['smtp_timeout'] = 3600; From fc46d8b152f5920e7c4a9a0a862ef94472822ed4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B9=E8=AF=9A=E8=AF=9A?= Date: Wed, 26 Jul 2017 10:48:18 +0800 Subject: [PATCH 16/17] =?UTF-8?q?=E4=BF=AE=E6=94=B9smtp=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/controllers/sendmail.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/controllers/sendmail.php b/application/controllers/sendmail.php index f7deef22..64b07441 100644 --- a/application/controllers/sendmail.php +++ b/application/controllers/sendmail.php @@ -54,8 +54,8 @@ class Sendmail extends CI_Controller } $this->load->library('email'); $config['protocol'] = 'smtp'; - $config['smtp_host'] = 'smtp.chinahighlights.net';//ssl://smtp.sendgrid.net'; - $config['smtp_port'] = 25; + $config['smtp_host'] = 'ssl://smtp.exmail.qq.com';//ssl://smtp.sendgrid.net'; + $config['smtp_port'] = 465; $config['smtp_user'] = 'noreply02@chinahighlights.net';//'zm198311@yahoo.com.cn'; $config['smtp_pass'] = 'eHgb2Z8G\HbR';//cits@123'; $config['smtp_timeout'] = 3600; From 92e7debfffe595f2e29786280cda9a5b1fde386e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B9=E8=AF=9A=E8=AF=9A?= Date: Wed, 26 Jul 2017 10:55:27 +0800 Subject: [PATCH 17/17] =?UTF-8?q?=E4=BF=AE=E6=94=B9smtp=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/controllers/sendmail.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/controllers/sendmail.php b/application/controllers/sendmail.php index 64b07441..a6907fa9 100644 --- a/application/controllers/sendmail.php +++ b/application/controllers/sendmail.php @@ -54,7 +54,7 @@ class Sendmail extends CI_Controller } $this->load->library('email'); $config['protocol'] = 'smtp'; - $config['smtp_host'] = 'ssl://smtp.exmail.qq.com';//ssl://smtp.sendgrid.net'; + $config['smtp_host'] = 'ssl://hwsmtp.exmail.qq.com';//ssl://smtp.sendgrid.net'; $config['smtp_port'] = 465; $config['smtp_user'] = 'noreply02@chinahighlights.net';//'zm198311@yahoo.com.cn'; $config['smtp_pass'] = 'eHgb2Z8G\HbR';//cits@123';