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

hotfix/远程访问多媒体中心
尹诚诚 8 years ago
commit 9fbe648ecd

@ -383,7 +383,7 @@ $config['site'] = array(
'diy' => array('site_code' => 'diy', 'site_id' => 99, 'site_lgc' => '1', 'sitemap_name' => 'E:/Dropbox/wwwroot/diychinatours.com/information.sitemap.xml', 'site_image_url' => '//images.diychinatours.com', 'site_url' => 'http://www.diychinatours.com', 'site_sitemap' => 'E:/Dropbox/wwwroot/diychinatours.com/information.sitemap.xml', 'site_authors' => array('ycc,lyy')),
'ah' => array('site_code' => 'ah', 'site_id' => 141, 'site_lgc' => '1', 'sitemap_name' => '', 'site_image_url' => '//images.asiahighlights.com', 'site_url' => 'https://www.asiahighlights.com', 'site_sitemap' => '', 'site_authors' => array('X', 'sfx'), 'site_user' => array(',ycc,sfx,X,')),
'pgr' => array('site_code' => 'pgr', 'site_id' => 148, 'site_lgc' => '2', 'sitemap_name' => '', 'site_image_url' => '', 'site_url' => 'http://www.peregrine.cn', 'site_sitemap' => '', 'site_authors' => array('X', 'sfx'), 'site_user' => array(',ycc,sfx,X,')),
'ts' => array('site_code' => 'ts', 'site_id' => 0, 'site_lgc' => '1', 'sitemap_name' => '', 'site_image_url' => '', 'site_url' => '', 'site_sitemap' => '', 'site_authors' => array('X', 'sfx'), 'site_user' => array(',ycc,sfx,X,')),
'ts' => array('site_code' => 'ts', 'site_id' => 149, 'site_lgc' => '1', 'sitemap_name' => '', 'site_image_url' => '', 'site_url' => 'http://www.trainspread.com', 'site_sitemap' => '', 'site_authors' => array('X', 'sfx'), 'site_user' => array(',ycc,sfx,X,')),
'bht' => array('site_code' => 'bht', 'site_id' => 6565, 'site_lgc' => '1', 'site_image_url' => '', 'site_url' => 'http://www.beijinghighlights.com', 'site_authors' => array('cj'))
);
@ -963,6 +963,10 @@ $config['templates_pgr'] = array(
'空白模板' => 'guide_info_detail'
,'导航模板' => 'culture_info_detail_with_category'
);
// 国际火车网站模板
$config['templates_ts'] = array(
'信息导航模板' => 'train_series_with_category'
);
//翰特产品类型,Information控制器的get_products函数有直接调用在这里增加了信息需要去控制器写相关操作代码
$config['ProductType_HT'] = array(

@ -138,14 +138,14 @@ class Cache extends CI_Controller
$mydir = dir($dir);
while($f = $mydir->read())
{
if(is_dir("$dir/$f") && $f!="." && $f!=".." && (strpos($dir, '/cn/')==false))
if(is_dir("$dir/$f") && $f!="." && $f!=".." && (strpos($dir, '/cn/')===false) && (strpos($dir, '/amp/')===false))
{
$path[] = "$dir/$f";
$this->tree("$dir/$f", $file, $path, $file_time);
}
else
{
if ($f!='.' && $f!='..' && (strpos($dir, '/cn/')==false) && (strpos($f, '.pdf')===false) && (strpos($f, '/amp/')===false) )
if ($f!='.' && $f!='..' && (strpos($dir, '/cn/')===false) && (strpos($dir, '/amp/')===false) && (strpos($f, '.pdf')===false))
{
$file_temp = str_ireplace('/index.htm###', '', $f.'###');
$file_temp = str_ireplace('###', '', $file_temp);

@ -12,6 +12,7 @@ class Info_amp extends CI_Controller
//$this->permission->is_admin();
$this->load->model('InfoMetas_model');
$this->load->model('InfoContents_model');
$this->site_code = $this->config->item('site_code');
//CORS TEST
header('Access-Control-Allow-Origin:*');
}
@ -124,7 +125,10 @@ class Info_amp extends CI_Controller
echo json_encode(array(
"succ" => true,
"info" => $ic->ic_content,
"title" => $ic->ic_title
"title" => $ic->ic_title,
"photo" => $this->config->item('site_image_url').$ic->ic_photo,
"url" => $ic->ic_url,
"site" => $this->config->item('site_url')
));
} else {
echo json_encode(array(

@ -190,6 +190,9 @@ class Information extends CI_Controller {
if (in_array($this->config->item('site_code'), array('pgr'))) {
$this->config->set_item('templates', $this->config->item('templates_pgr'));
}
if (in_array($this->config->item('site_code'), array('ts'))) {
$this->config->set_item('templates', $this->config->item('templates_ts'));
}
//信息区域类型
switch ($data['rootInformation']->ic_ht_area_type) {

@ -382,7 +382,7 @@ class Keyworlds extends CI_Controller {
$source_flag = 'source_m';
}
$today_0 = strtotime(date('Ymd000000'));
$today_0 = mktime(0,0,0,date("m"),(date("d")-$this->Keywords_model->catch_day), date("Y"));
$today_24 = strtotime(date('Ymd235959'));
$last_rank_today = $this->Keywordsrank_model->get_rank_list($worldsList[0]->kw_id,1,$today_0,$today_24);
// $last_rank_today = $last_rank_pc;
@ -399,6 +399,9 @@ class Keyworlds extends CI_Controller {
} else if ($engines == 'yandex') {//俄语站的yangdex
$rank = $this->get_search_content_by_yandex($client_flag,$v->kw_keyworlds, $site_url, $i - 1);
}
if ( $rank[$rank_flag] < 0 ) {
break;
}
$orignal[] = $rank['orignal'];
if ($client_flag === 'm') {
$rank['rank'] = isset($last_rank_today[0]) ? $last_rank_today[0]->kwr_rank : null;
@ -418,9 +421,6 @@ class Keyworlds extends CI_Controller {
break;
}
}
if ( $rank[$rank_flag] < 0 ) {
break;
}
if (isset($last_rank_today[0]) && ! empty($last_rank_today[0])) {
$this->Keywordsrank_model->update_rank($last_rank_today[0]->kwr_id, $rank['rank'], $rank['rank_m'], $rank['source'], $rank['source_m'], $rank['engines']);
} else {
@ -493,7 +493,7 @@ class Keyworlds extends CI_Controller {
if ($response) {
//分析google搜索结果计算排名
if (false !== stripos($response, '<h1>302 Moved</h1>') ||
false !== stripos($response, 'recaptcha')) {
false !== stripos($response, 'recaptcha') || false !== stripos($response, 'CAPTCHA')) {
$rank['rank'] = -2;
$rank["orignal"] = $response;
} elseif (false !== stripos($response, $site_url)) {

@ -142,7 +142,7 @@ class Area_model extends CI_Model
. "FROM COuntryInfo ci \n"
. " INNER JOIN COuntryInfo2 ci2 ON ci2.COI2_COI_SN = ci.COI_SN \n"
. "WHERE ci2.COI2_LGC = ? \n"
. " AND ci.COI_SN in(1,19, 27, 28, 29, 30, 31, 35, 591)";
. " AND ci.COI_SN in(1, 19, 22, 27, 28, 29, 30, 31, 35, 591)";
$query = $this->HT->query($sql, array($this->config->item('site_lgc')));
return $query->result();
}

@ -126,7 +126,7 @@ class InfoContents_model extends CI_Model
public function get_ic_contents2($ic_id)
{
$sql="SELECT top 1 ic_id, ic_content, ic_title from infoContents where ic_id=?";
$sql="SELECT top 1 ic_id, ic_content, ic_title, ic_url, ic_photo from infoContents where ic_id=?";
$query=$this->HT->query($sql,array($ic_id));
if ($query->result())
{

@ -2,6 +2,7 @@
class infoKeywords_model extends CI_Model
{
public $catch_day = 2;
function __construct()
{
parent::__construct();
@ -66,7 +67,7 @@ class infoKeywords_model extends CI_Model
//获取关键词列表用于抓取排名
public function get_keyworld_list_old($top = 1, $engines='',$site_code=false)
{
$today = strtotime(date('Y-m-d'));
$today = mktime(0,0,0,date("m"),(date("d")-$this->catch_day), date("Y"));
//只查某个站点,原因是个事业部服务器分开,只需要查询本事业部站点即可
$map = " ";
if(!empty($site_code)){
@ -80,7 +81,7 @@ class infoKeywords_model extends CI_Model
}elseif ($engines=='eu') {
$map.=" AND kw_sitecode in ('gm','vc','vac','ru','it','jp') ";
}
$today0 = strtotime(date('Ymd000000'));
$today0 = mktime(0,0,0,date("m"),(date("d")-2), date("Y"));
$sql = "SELECT TOP 1 kw_id,
kw_keyworlds,
kw_is_id,
@ -97,7 +98,7 @@ class infoKeywords_model extends CI_Model
}
public function get_keyworld_list($top=1,$engines='',$site_code=false)
{
$today0 = strtotime(date('Ymd000000'));
$today0 = mktime(0,0,0,date("m"),(date("d")-$this->catch_day), date("Y"));
$map = " ";
//只查某个站点,原因是个事业部服务器分开,只需要查询本事业部站点即可
if(!empty($site_code)){

@ -14,6 +14,7 @@ class search extends CI_Controller{
//定义一些变量
$flag = true;
$juheTrainInfo = '';
set_time_limit(0);
//判断数据是否合法
@ -30,6 +31,7 @@ class search extends CI_Controller{
//调用查询模块
$search_return = $this->Searchtrain($train_date,$fromStation,$toStation);
//调用数据处理模块
$returnJson = $this->dataOperate($search_return,$fromStation,$toStation);
@ -45,10 +47,11 @@ class search extends CI_Controller{
$this->train_date = $train_date;
$now_time = time();
$differ_time = (strtotime($train_date) - $now_time) / 86400;
$this->seveth = 'no';
//屏蔽掉超过预售期的搜索,提高速度
if($differ_time > 29){
$train_date = date('Y-m-d',strtotime('+7day'));
$this->seventh = true;
$this->seveth = 'yes';
}
$url = 'http://139.129.246.118:12309/trainTickets/ticketsAvailable?key='.JUHE_TRAIN_API_KEY.'&train_date='.$train_date.'&from_station='.$fromStation.'&to_station='.$toStation;
$this->url = $url;
@ -70,17 +73,20 @@ class search extends CI_Controller{
}else{
$cache_train_info = $this->BIZ_train_model->get_train_info($fromStation,$toStation);
if(empty($cache_train_info)){
$operate_data = null;
log_message('error','TRAIN 查询为空的链接:'.$this->url.'|出错的原因:'.$this->reason.'|缓存为空');
$operate_data = NULL;
}else{
$cache_time = $cache_train_info->tpc_datetime;
$now_time = time();
$differ_time = ($now_time - strtotime($cache_time)) / 86400;
if($differ_time >= 3){
$this->delete_traincache($fromStation,$toStation);
$this->BIZ_train_model->delete_traincache($fromStation,$toStation);
log_message('error','TRAIN 查询为空的链接:'.$this->url.'|出错的原因:'.$this->reason.'|缓存超时,已经删除');
$operate_data = NULL;
}else{
$this->cache = 'yes';
$operate_data = $cache_train_info->tpc_content;
log_message('error','查询为空的链接:'.$this->url.'|出错的原因:'.$this->reason.'|调用缓存号:'.$cache_train_info->tpc_sn.'|缓存生成的时间:'.$cache_train_info->tpc_datetime);
log_message('error','TRAIN 查询为空的链接:'.$this->url.'|出错的原因:'.$this->reason.'|调用缓存号:'.$cache_train_info->tpc_sn.'|缓存生成的时间:'.$cache_train_info->tpc_datetime);
}
}
}
@ -94,6 +100,7 @@ class search extends CI_Controller{
$return_data->httpstatus = 200;
$return_data->reason = $this->reason;
$return_data->cache = $this->cache;
$return_data->seveth = $this->seveth;
$return_data->data->result = array();
$return_data->data->map = new stdClass();
$obj = array();
@ -208,14 +215,8 @@ class search extends CI_Controller{
//余票转换
function ticket_exchange($num){
if($this->cache == 'yes'){
$time = strtotime($this->train_date) - time();
$day = $time / 86400;
if($day > 15){
return '有';
}else{
return $num;
}
if($this->cache == 'yes' || $this->seveth == 'yes'){
return '有';
}else{
if(is_numeric($num)){
if($num == 0){

@ -542,7 +542,14 @@
</label>
</div>
<div class="col-xs-17 text-right">
<label title="AMP页面编辑"><a href="http://202.103.68.62:3732/?icid=<?php echo($information->ic_id); ?>" target="_blank">AMP构建工具</a></label> |
<?php
$amp_user = $this->session->userdata('session_admin');
$amp_photo = '';
if ($information->ic_photo) {
$amp_photo = $this->config->item('site_image_url').$information->ic_photo;
}
?>
<label title="AMP页面编辑"><a href="/static/?icid=<?php echo($information->ic_id); ?>&usr=<?php echo(urlencode($amp_user['OPI_Name'])); ?>&url=<?php echo(urlencode($information->ic_url)); ?>&photo=<?php echo(urlencode($amp_photo)); ?>&site=<?php echo(urlencode($this->config->item('site_url'))); ?>&imgurl=<?php echo(urlencode($this->config->item('site_image_url'))); ?>" target="_blank">AMP构建工具</a></label> |
<?php if (get_meta($information->ic_id, 'AMP_STATUS') === '1') {?>
<label title="AMP页面编辑"><a href="<?php echo site_url('amp/edit/' . $information->ic_id); ?>" target="_blank"><i class="glyphicon glyphicon-flash"></i></a></label>
<?php } else {?>

@ -43,7 +43,7 @@
<div id="zhexiantu" class="span12" style="height:<?php if($wordcount==1) {echo '620px';}else{echo '1000px;';} ?>;margin-left:0;padding-right: 15px;"></div>
<?php } if (!empty($rank_info)) { ?>
<legend>排名情况</legend>
<!-- update time 3 -->
<!-- update time 0316 -3day -->
<table class="table table-striped">
<thead>
<tr>

Loading…
Cancel
Save