|
|
|
@ -15,9 +15,10 @@ class Index extends CI_Controller {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function index($city = 'Beijing') {
|
|
|
|
|
$this->permission->is_admin();
|
|
|
|
|
$data = array();
|
|
|
|
|
$data['city'] = $city;
|
|
|
|
|
$data['ta_review_list'] = $this->Tripadvisor_Review_model->search(20, $data['city']);
|
|
|
|
|
$data['ta_review_list'] = $this->Tripadvisor_Review_model->search(30, $data['city']);
|
|
|
|
|
$this->load->view('bootstrap3/header', $data);
|
|
|
|
|
$this->load->view('welcome');
|
|
|
|
|
$this->load->view('bootstrap3/footer');
|
|
|
|
@ -26,9 +27,8 @@ class Index extends CI_Controller {
|
|
|
|
|
function auto_update($city = 'Beijing') {
|
|
|
|
|
ini_set('max_execution_time', '100');
|
|
|
|
|
$ta_website = $this->config->item('tripadvisor_website');
|
|
|
|
|
//分页代码,只查询前三页
|
|
|
|
|
$page_mark = array('-', '-or10-', '-or20-');
|
|
|
|
|
$page_mark = array('-');
|
|
|
|
|
//分页代码,只查询前三页,反过来查询,越早的越在后面
|
|
|
|
|
$page_mark = array('-or20-', '-or10-', '-');
|
|
|
|
|
|
|
|
|
|
foreach ($ta_website as $key_city => $item_url) {
|
|
|
|
|
if ($key_city == $city) {
|
|
|
|
|