Merge branch 'master' of github.com:hainatravel/information-system into master

master
candice 1 year ago
commit 1a8d477f10

@ -735,6 +735,9 @@ class Information extends CI_Controller
} else if (strcasecmp($site_code, "trainspread") == 0 && !empty($auto_update_cache)) {
$information_new = $this->Information_model->Detail($this->input->post('is_id'));
$this->make_www_cache_ts($information_new);
} else if (strcasecmp($site_code, "guilin") == 0 && !empty($auto_update_cache)) {
$information_new = $this->Information_model->Detail($this->input->post('is_id'));
$this->make_www_cache_gl($information_new);
} else if (strcasecmp($site_code, "cht") == 0 && !empty($auto_update_cache)) {
$update_info_log = $this->update_cache($ic_url);
} else if (strcasecmp($site_code, "ah") == 0 && !empty($auto_update_cache)) {
@ -3021,12 +3024,80 @@ class Information extends CI_Controller
$str_author = '<div class="authorupdate">Written by <strong>' . $OPI_FirstName . '</strong> Updated <span>' . date("M. j, Y", strtotime($information->ic_datetime)) . '</span></div>';
}
//火车票详细页搜索框添加 -- zp
$meta_ct_page_trainform = get_meta($information->ic_id, 'meta_ct_page_trainform'); //是否插入火车票搜索框
$template_TrainDetailSearch = "";
if ($meta_ct_page_trainform == "yes" || strpos($information->ic_url,"/china-trains")!==false) {
$meta_train_city = get_meta($information->ic_id, 'meta_train_city'); //默认的出发及目的地城市 beijing|shanghai
$data_TrainCity = array();
$data_TrainCity["from"] = "";
$data_TrainCity["to"] = "";
if (!empty($meta_train_city)) {
if (strpos($meta_train_city, '|') !== false) {
$arrTrainCity = explode('|', $meta_train_city);
$data_TrainCity["from"] = $arrTrainCity[0];
$data_TrainCity["to"] = $arrTrainCity[1];
}
}
$template_TrainDetailSearch = $this->load->view($template_path . '-train-index', $data_TrainCity, true);
}
/* 详细内容 */
$ic_content = $information->ic_content;
/** 替换H1加面包屑,加作者 */
$ic_content = preg_replace('/<h1>(.*)<\/h1>/i', $crumb . "\r\n" . '<H1>$1</H1>' . "\r\n" . $str_author . "\r\n", $ic_content, 1);
$ic_content = preg_replace('/<h1>(.*)<\/h1>/i', $crumb . "\r\n" . '<H1>$1</H1>' . "\r\n" . $str_author . $template_TrainDetailSearch . "\r\n", $ic_content, 1);
// 动态加载反馈标签,按城市出前三条。左侧
// HTLM: <div><!--@FEEDBACK_Shanghai,Beijing@--></div> ,显示全部用<!--@FEEDBACK_All@-->
// 解析结果:<!--@FEEDBACK_Shanghai,Beijing@-->; Shanghai,Beijing
$feedback_array = [];
preg_match_all('^<!--@FEEDBACK_(.*)@-->^', $information->ic_content, $feedback_array);
if (!empty($feedback_array)) {
foreach ($feedback_array[0] as $index => $tag_name) {
$city_name_string = $feedback_array[1][$index];
$feedback_list = $this->Feedback_model->get_CT_feedback_by_cityname($city_name_string,30);
// 防止触发 Google 网络垃圾政策只返回前三条
$top3_feedback_list = array_slice($feedback_list, 0, 3);
$feedback_content = $this->load->view(
'mobile_first/chinatravel-feedback-list',
array('feedback_list' => $top3_feedback_list),
true
);
$ic_content = str_replace(
$tag_name,
$feedback_content,
$ic_content
);
}
}
// 动态加载反馈标签,按城市出前三条。整页
// HTLM: <div><!--@FEEDBACKCROSS_Shanghai,Beijing@--></div> ,显示全部用<!--@FEEDBACK_All@-->
// 解析结果:<!--@FEEDBACKCROSS_Shanghai,Beijing@-->; Shanghai,Beijing
$feedback_array = [];
preg_match_all('^<!--@FEEDBACKCROSS_(.*)@-->^', $information->ic_content, $feedback_array);
if (!empty($feedback_array)) {
foreach ($feedback_array[0] as $index => $tag_name) {
$city_name_string = $feedback_array[1][$index];
$feedback_list = $this->Feedback_model->get_CT_feedback_by_cityname($city_name_string,30);
// 防止触发 Google 网络垃圾政策只返回前三条
$top3_feedback_list = array_slice($feedback_list, 0, 3);
$feedback_content = $this->load->view(
'mobile_first/chinatravel-feedback-cross',
array('feedback_list' => $top3_feedback_list),
true
);
$ic_content = str_replace(
$tag_name,
$feedback_content,
$ic_content
);
}
}
//图片加延迟
$ic_content = $this->html_optimize_lib->set_lazy_loader($ic_content, 'https://data.shanghaihighlights.com/image/grey.gif');
@ -3248,7 +3319,7 @@ class Information extends CI_Controller
// 搜索框
$template_TrainSearch = "";
if ($information->ic_url == "/china-trains/hometest" || $information->ic_url == "/china-trains") {
if ($information->ic_url == "/china-trains/hometest" || $information->ic_url == "/trains") {
//火车票首页
$template_TrainSearch = $this->load->view($template_path . '-train-index', null, true);
$ImgText = "";
@ -4244,6 +4315,13 @@ class Information extends CI_Controller
#endregion
}
/**
* 桂林站 www.guilinchina.net
*/
public function make_www_cache_gl($information){
}
//通过内容找到第一张图片
public function set_photo_content($ic_photo, $ic_content)
{

@ -70,7 +70,7 @@
</div>
<select name="country_code" class="country_code">
<select name="country_code" class="country_code" id="country_code">
<option style="font-weight: 600;" value="United States +1">United States&nbsp; &nbsp;+1</option>
<option style="font-weight: 600;" value="United Kingdom +44">United Kingdom&nbsp; &nbsp;+44</option>
<option style="font-weight: 600;" value="Australia +61">Australia&nbsp; &nbsp;+61</option>
@ -455,3 +455,20 @@
});
})(document);
</script>
<script src="https://data.chinahighlights.com/js/min.php?f=/js/jquery-1.8.2.min.js,/js/jquery.mailAutoComplete-4.0.min.js&amp;v=20231110"></script>
<script>
$(function () {
$.getJSON("https://www.chinahighlights.com/guide-use.php/apps/ip2location/index/get_country", function (data) {
var yourCountry = data.country_name;
$('#country_code option').each((i, optionEle) => {
var countryName = optionEle.value.split('+')[0].trim();
if (yourCountry === countryName) {
optionEle.selected = true;
}
});
})
.fail(function (xhr, status, error) {
console.error(error);
});
})
</script>

@ -255,7 +255,7 @@
<div class="requiredArea" style="margin-top:-10px;">Please verify your email.</div>
</div>
<select name="country_code" class="country_code">
<select name="country_code" class="country_code" id="country_code">
<option style="font-weight: 600;" value="United States +1">United States&nbsp; &nbsp;+1</option>
<option style="font-weight: 600;" value="United Kingdom +44">United Kingdom&nbsp; &nbsp;+44</option>
<option style="font-weight: 600;" value="Australia +61">Australia&nbsp; &nbsp;+61</option>
@ -692,6 +692,22 @@ function validateQuickInquiryForm() {
});
})
</script>
<script>
$(function () {
$.getJSON("https://www.chinahighlights.com/guide-use.php/apps/ip2location/index/get_country", function (data) {
var yourCountry = data.country_name;
$('#country_code option').each((i, optionEle) => {
var countryName = optionEle.value.split('+')[0].trim();
if (yourCountry === countryName) {
optionEle.selected = true;
}
});
})
.fail(function (xhr, status, error) {
console.error(error);
});
})
</script>
<style>
.date_select {width: 31%;

@ -114,7 +114,7 @@ background: #fff;margin-top: 15px; margin-bottom: 20px;">
<div id="ticket_email_verify_errmsg" style="display: none">
<div class="requiredArea" style="margin-top:-10px;">Please verify your email.</div>
</div>
<select name="country_code" class="country_code">
<select name="country_code" class="country_code" id="country_code">
<option style="font-weight: 600;" value="United States +1">United States&nbsp; &nbsp;+1</option>
<option style="font-weight: 600;" value="United Kingdom +44">United Kingdom&nbsp; &nbsp;+44</option>
<option style="font-weight: 600;" value="Australia +61">Australia&nbsp; &nbsp;+61</option>
@ -597,6 +597,23 @@ background: #fff;margin-top: 15px; margin-bottom: 20px;">
return result;
}
</script>
<script src="https://data.chinahighlights.com/js/min.php?f=/js/jquery-1.8.2.min.js,/js/jquery.mailAutoComplete-4.0.min.js&amp;v=20231110"></script>
<script>
$(function () {
$.getJSON("https://www.chinahighlights.com/guide-use.php/apps/ip2location/index/get_country", function (data) {
var yourCountry = data.country_name;
$('#country_code option').each((i, optionEle) => {
var countryName = optionEle.value.split('+')[0].trim();
if (yourCountry === countryName) {
optionEle.selected = true;
}
});
})
.fail(function (xhr, status, error) {
console.error(error);
});
})
</script>
<style>
.minaddBtn { width:auto !important;}
.optionLable input[type="radio"]+label {min-height: auto;}

@ -183,7 +183,7 @@
<select name="country_code" class="country_code">
<select name="country_code" class="country_code" id="country_code">
<option style="font-weight: 600;" value="United States +1">United States&nbsp; &nbsp;+1</option>
<option style="font-weight: 600; " value="Singapore +65">Singapore&nbsp; &nbsp;+65</option>
<option style="font-weight: 600;" value="United Kingdom +44">United Kingdom&nbsp; &nbsp;+44</option>
@ -600,6 +600,22 @@
});
})
</script>
<script>
$(function () {
$.getJSON("https://www.chinahighlights.com/guide-use.php/apps/ip2location/index/get_country", function (data) {
var yourCountry = data.country_name;
$('#country_code option').each((i, optionEle) => {
var countryName = optionEle.value.split('+')[0].trim();
if (yourCountry === countryName) {
optionEle.selected = true;
}
});
})
.fail(function (xhr, status, error) {
console.error(error);
});
})
</script>
<style>
.date_select {
width: 27.5% !important;

@ -246,7 +246,7 @@
<!-- <p><input class="InquiryCalendar" data-min-date="7" id="starting_date" name="date_start"
placeholder="Starting date" required type="date"></p> -->
<select class="country_code" name="country_code">
<select class="country_code" name="country_code" id="country_code">
<option style="font-weight: 600;" value="United States +1">United States&nbsp; &nbsp;+1
</option>
<option style="font-weight: 600;" value="United Kingdom +44">United Kingdom&nbsp;
@ -828,3 +828,19 @@
email: ['gmail.com', 'outlook.com', 'yahoo.com', 'icloud.com', 'hotmail.com', 'live.com', 'aol.com']
});
</script>
<script>
$(function () {
$.getJSON("https://www.globalhighlights.com/index.php/location/get_country", function (data) {
var yourCountry = data.country_name;
$('#country_code option').each((i, optionEle) => {
var countryName = optionEle.value.split('+')[0].trim();
if (yourCountry === countryName) {
optionEle.selected = true;
}
});
})
.fail(function (xhr, status, error) {
console.error(error);
});
})
</script>

@ -265,7 +265,7 @@
</div>
<p>
<select class="country_code" name="country_code">
<select class="country_code" name="country_code" id="country_code">
<option style="font-weight: 600;" value="United States +1">United States&nbsp; &nbsp;+1</option>
<option style="font-weight: 600;" value="United Kingdom +44">United Kingdom&nbsp; &nbsp;+44</option>
<option style="font-weight: 600;" value="Australia +61">Australia&nbsp; &nbsp;+61</option>
@ -692,3 +692,19 @@
});
})
</script>
<script>
$(function () {
$.getJSON("https://www.globalhighlights.com/index.php/location/get_country", function (data) {
var yourCountry = data.country_name;
$('#country_code option').each((i, optionEle) => {
var countryName = optionEle.value.split('+')[0].trim();
if (yourCountry === countryName) {
optionEle.selected = true;
}
});
})
.fail(function (xhr, status, error) {
console.error(error);
});
})
</script>

@ -35,14 +35,13 @@
<header id="header">
<div class="container">
<div id="logo"><a href="/"><img src="//data.shanghaihighlights.com/pic/home/logo.png" alt="Shanghaihig Hlights Logo" width="118" height="85" class="img-responsive"></a></div>
<div class="pull-right">
<div class="top-box">
<ul>
<li><a href="/about-us/">About Us</a> | <a href="/contact-us/">Contact Us</a> | <i class="fa fa-envelope-o" aria-hidden="true"></i><a href="mailto:service@chinatravel.com">service@chinatravel.com</a></li>
<li><i class="fa fa-phone" aria-hidden="true"></i><strong>86-773-286-5632</strong> (Intl rates apply)<span class="t-arrow tag hidden"></span></li>
<li><i class="fa fa-phone" aria-hidden="true"></i><strong>86-773-286-5632</strong> (Intl rates apply)<span class="t-arrow tag hidden"></span></li> </ul>
<div class="topsearch">
<form id="cse-search-box" name="googlesreach" action="/search">
<input type="hidden" name="cx" value="7597586ddf0e24d63">
<input type="hidden" name="cx" value="91b1eee0151d34e9b">
<input type="hidden" name="cof" value="FORID:11">
<div class="relative">
<input type="text" class="siteser" placeholder="Site Search..." name="q">
@ -50,9 +49,7 @@
</div>
</form>
</div>
</ul>
</div>
<div class="clear"></div>
</div>
</div>
<nav class="topnav" role="navigation"><div class="container">

@ -0,0 +1,93 @@
<div id="loader" style="display: none;">
<div id="loading"></div>
</div>
<div class="trainSearchBox ">
<p class="trainSear-title">China Train Ticket Service</p>
<div class="searchBox autocomplete" id="searchbox">
<ul class="nav nav-tabs" id="navtraintop" style="display:none;">
<li role="presentation" class="mainland active"><a href="javascript:;">China Train</a></li>
<li role="presentation" class="intel"><a href="javascript:;">Asia Trains</a></li>
</ul>
<form action="https://www.trainspread.com/trains/search_result/" method="POST" name="ZZform1"
target="_self" class="formWrap form-inline jsbox" onsubmit="return Chk_InnerTrainForm();">
<div class="searchList ">
<label class="searchLabel">Journey:</label>
<div class="search-row">
<div class="flex-row">
<div class="flex-col-3">
<input name="Txt_FZ_1" id="Txt_FZ_1" type="text" class="inputBox form-control" autocomplete="off"
placeholder="From" value="<?php echo isset($from)?$from:"" ?>">
<input default="" id="Code_Txt_FZ_1" name="Code_Txt_FZ_1" type="hidden" value="" />
</div>
<div class="flex-col-3">
<input name="Txt_DZ_1" id="Txt_DZ_1" type="text" class="inputBox form-control" autocomplete="off"
placeholder="To" value="<?php echo isset($to)?$to:"" ?>">
<input default="" id="Code_Txt_DZ_1" name="Code_Txt_DZ_1" type="hidden" value="" />
</div>
<div class="flex-col-3">
<input class="calendar3 form-control " id="stationDate_1" name="stationDate_1" placeholder="Date"
type="text" readonly />
</div>
</div>
</div>
</div>
<div class="addTr">
<div class="searchBtn"><button type="submit" name="button" value="" class="searchButtonLong">SEARCH</button>
<input type="hidden" name="si" id="si" value="1">
</div>
</div>
<input type="hidden" name="utm_source" id="utm_source" value="32150">
</form>
<form action="https://www.trainspread.com/trains/search_result/" method="POST" name="ZZform1"
target="_self" class="formWrap form-inline jsbox hidden" onsubmit="return Chk_IntelTrainForm();">
<div id="IterTrain" class="searchList ">
<label class="searchLabel">Train:</label>
<div class="search-row">
<div class="flex-row">
<div class="flex-col-3">
<select class="inputBox form-control intel-input" name="IT_Txt_FZ_1" id="IT_Txt_FZ_1">
<option value="Lao Cai">Lao Cai</option>
<option value="Beijing">Beijing</option>
<option value="Manzhouli">Manzhouli</option>
<option value="Harbin">Harbin</option>
<option value="Erlian">Erlian</option>
<option value="Jining South">Jining South</option>
<option value="Urumqi">Urumqi</option>
</select>
</div>
<div class="flex-col-3">
<select class="inputBox form-control intel-input" name="IT_Txt_DZ_1" id="IT_Txt_DZ_1">
<option value="">Please Select</option>
<option value="Nanning" data="">Nanning</option>
</select>
</div>
<div class="flex-col-3">
<input class="calendar3 form-control" id="stationDate_IT_1" name="stationDate_IT_1" placeholder="Date"
type="text" readonly />
</div>
</div>
</div>
</div>
<div class="addTr">
<span id="ItelMsg_1"></span>
<div class="searchBtn"><button type="submit" name="button" value="" class="searchButtonLong">SEARCH</button>
</div>
<input type="hidden" name="ItelTrain" id="ItelTrain" value="0">
</div>
<input type="hidden" name="utm_source" id="utm_source2" value="32150">
</form>
</div>
</div>
<link href="https://data.shanghaihighlights.com/css/css3/flatpickr.css" rel="stylesheet" type="text/css" />
<link href="https://data.shanghaihighlights.com/js/mobile-first/train/train-search.css" rel="stylesheet" type="text/css" />
<script defer type="text/javascript" src="https://data.chinahighlights.com/js/train/StationInfo.js"></script>
<script src="https://data.shanghaihighlights.com/js/mobile-first/train/train.js" ></script>

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save