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

# Conflicts:
#	application/config/config.php
master
赵鹏 11 months ago
commit e7f9b1d795

@ -390,8 +390,8 @@ $config['rewrite_short_tags'] = false;
*/
$config['proxy_ips'] = '';
//各站信息组和人员权限分配
$config['site'] = array(
'ch' => array('site_code' => 'ch', 'site_id' => 14, 'site_lgc' => '1', 'site_url' => 'https://www.chinahighlights.com', 'site_image_url' => 'https://images.chinahighlights.com', 'site_authors' => array('TDJ', 'ycc'), 'site_user' => ',ycc,'),
'ah' => array('site_code' => 'ah', 'site_id' => 141, 'site_lgc' => '1', 'sitemap_name' => '', 'site_image_url' => 'https://images.asiahighlights.com', 'site_url' => 'https://www.asiahighlights.com', 'site_sitemap' => '', 'site_authors' => array('X', 'sfx'), 'site_user' => array(',ycc,sfx,X,')),
@ -448,19 +448,10 @@ $config['cache']['gh_vac']['cache_path'] = 'D:\wwwcache-intl\globalhighlights.es
$config['cache']['gh_ru']['cache_path'] = 'D:\wwwcache-intl\globalhighlights.ru';
$config['cache']['gh_it']['cache_path'] = 'D:\wwwcache-intl\globalhighlights.it';
/*
globalhighlights.jp
globalhighlights.de
globalhighlights.fr
globalhighlights.es
globalhighlights.ru
globalhighlights.it
*/
//静态文件站点域名
$config['cache']['jp']['site_url'] = 'https://www.arachina.com';
$config['cache']['gm']['site_url'] = 'https://www.chinarundreisen.com';
$config['cache']['vc']['site_url'] = 'https://www.voyageschine.com';
$config['cache']['vc']['site_url'] = 'https://www.chinahighlights.fr';
$config['cache']['vac']['site_url'] = 'https://www.viaje-a-china.com';
$config['cache']['ru']['site_url'] = 'https://www.chinahighlights.ru';
$config['cache']['it']['site_url'] = 'https://www.viaggio-in-cina.it';
@ -502,157 +493,8 @@ $config['cache']['gh_vac']['cache_api_para'] = 'cache_url';
$config['cache']['gh_ru']['cache_api_para'] = 'cache_url';
$config['cache']['gh_it']['cache_api_para'] = 'cache_url';
//本地测试用 - lmr
if (isset($_SERVER['HTTP_HOST']) && $_SERVER['HTTP_HOST'] == '202.103.68.62:9999') {
$config['site']['jp']['site_url'] = 'http://202.103.68.62:9093';
$config['site']['gm']['site_url'] = 'http://202.103.68.62:9094';
$config['site']['vc']['site_url'] = 'http://202.103.68.62:9095';
$config['site']['vac']['site_url'] = 'http://202.103.68.62:9096';
$config['site']['ru']['site_url'] = 'http://202.103.68.62:9097';
$config['site']['it']['site_url'] = 'http://202.103.68.62:9098';
}
//本地测试用 - lyy
if (isset($_SERVER['HTTP_HOST']) && $_SERVER['HTTP_HOST'] == '202.103.68.34:9999' || $_SERVER['HTTP_HOST'] == 'localhost:9999') {
$config['site']['sht']['site_url'] = 'http://202.103.68.34:8880';
$config['site']['gl']['site_url'] = 'http://202.103.68.34:8881';
$config['site']['diy']['site_url'] = 'http://202.103.68.34:9091';
}
//德语网站信息平台-TDY
if (isset($_SERVER['HTTP_HOST']) && $_SERVER['HTTP_HOST'] == '144.76.185.44:8576') {
$config['cache']['gm']['cache_path'] = 'C:\inetpub\wwwroot\gmsite\static';
}
//country控制器用到了
//信息类型
$config['InfoType_country'] = array(
'不设置' => 'none',
'首页' => 'root',
'基本数据' => 'n_facts',
'国家艺术' => 'n_arts',
'国家文化' => 'n_culture',
'国家概述' => 'n_overview',
'国家图片' => 'n_photos',
'国家景点' => 'n_attraction',
'国家旅游' => 'n_travel',
'国家交通' => 'n_transport',
'国家天气' => 'n_weather',
'国家节庆' => 'n_festival',
'国家美食' => 'n_food',
'国家历史' => 'n_history',
'国家地图' => 'n_map',
'民族传统和文化遗产' => 'n_national',
'产品附加信息' => 'product',
'旅游工具箱' => 'n_tools',
);
//province控制器用到了
$config['InfoType_province'] = array(
'不设置' => 'none',
'首页' => 'root',
'基本数据' => 'p_facts',
'地图' => 'p_map',
'地图详细' => 'p_map_detail',
'交通' => 'p_transport',
'节庆' => 'p_festival',
'天气' => 'p_weather',
'旅游建议' => 'p_tips',
'热门旅游城市' => 'p_popular_city',
'产品附加信息' => 'product',
);
//city控制器用到了
$config['InfoType_city'] = array(
'不设置' => 'none',
'首页' => 'root',
'简介' => 'c_overview',
'关于' => 'c_about',
'食物' => 'c_food',
'食物详细' => 'c_food_detail',
'餐饮' => 'c_restaurant',
'餐饮详细' => 'c_restaurant_detail',
'历史' => 'c_history',
'基本数据' => 'c_facts',
'旅游' => 'c_travel',
'交通' => 'c_transport',
'地图' => 'c_map',
'地图详细' => 'c_map_detail',
'天气' => 'c_weather',
'天气详细' => 'c_weather_detail',
'购物' => 'c_shopping',
'夜生活' => 'c_nightlife',
'旅游建议' => 'c_tips',
'值得做的' => 'c_todo',
'景点概述' => 'c_attraction',
'景点详细' => 'c_attraction_detail',
'推荐做的' => 'c_toptodo',
'儿童旅游' => 'c_kids',
'推荐理由' => 'c_reason',
'城市article' => 'c_article',
'城市机票' => 'c_city_flights',
'产品附加信息' => 'product',
'article-Place to Go' => 'a_placetogo',
'article-Things to Do' => 'a_thingstodo',
'article-Seasonal' => 'a_seasonal',
'article-Food' => 'a_food',
'article-Culture' => 'a_culture',
'article-Travel Tips' => 'a_traveltips',
'article-Tour Planning' => 'a_tourplanning',
'layout' => 'layout',
'一地线路详细' => 'c_single_circuit',
'一日游线路详细' => 'c_day_tour',
);
//special控制器用到了
$config['InfoType_special'] = array(
'不设置' => 'none',
'首页' => 'root',
'长江' => 't_yangtze_river',
'长城' => 't_greatwall',
'黄河' => 't_yellow_river',
'丝路' => 't_silkroad',
'茶马古道' => 't_tea_horse_road',
'穆斯林' => 't_muslims_in_china',
'自行车游' => 't_china_biking',
'徒步' => 't_china_hiking',
'青藏铁路' => 't_qinghai_tibet_railway',
'水乡' => 't_water_town',
'Top专题' => 't_best_china',
'Spotlight文章' => 't_spotlight',
'专题首页推介' => 't_topic_promotion',
'产品附加信息' => 'product',
);
//special控制器用到了
$config['InfoType_video'] = array(
'不设置' => 'none',
);
//节庆
$config['InfoType_festival'] = array(
'不设置' => 'none',
'民族节庆' => 'f_national',
'传统节庆' => 'f_tradition',
'旅游节庆' => 'f_travel',
);
//公民游
$config['InfoType_citizen'] = array(
'不设置' => 'none',
'大洲' => 'w_continent',
'国家' => 'w_country',
'城市' => 'w_city',
'签证信息' => 'w_visa',
'景点目录' => 'w_attraction',
'景点详细' => 'w_attraction_detail',
'地图目录' => 'w_map',
'地图详细' => 'w_map_detail',
'产品' => 'product',
);
//可选模板
$config['templates_i'] = array(
$config['templates_i'] = [
'[城市]C通用模板' => 'guide_info_detail',
'[城市]C列表模板' => 'city_info_list',
'[城市]C首页模板' => 'city_info_index',
@ -681,68 +523,12 @@ $config['templates_i'] = array(
'[废弃]D专题-庄重' => 'solemn',
'[废弃]D专题-节庆' => 'festival',
'[废弃]D专题-促销' => 'promotion_tour',
);
//翰特产品类型,Information控制器的get_products函数有直接调用在这里增加了信息需要去控制器写相关操作代码
$config['ProductType_HT'] = array(
'景点' => 't',
);
//区域类型对应字母
$config['area_type'] = array(
'机场' => 'a',
'城市' => 'c',
'大洲' => 'e',
'节庆' => 'f',
'团购' => 'g',
'航空公司' => 'l',
'国家' => 'n',
'省份' => 'p',
'火车站信息' => 'r',
'新闻' => 's',
'专题' => 't',
'视频' => 'v',
'大使馆' => 'y',
'公民游' => 'z',
'交换链接' => 'k',
'首页' => 'h',
'FAQ' => 'q',
);
$config['auhtor_task_type'] = array(
'翻译' => 'translate',
'修改' => 'modify',
'审核' => 'review',
'投稿' => 'contribute',
);
$config['auhtor_task_status'] = array(
'编辑中' => 'edit', //新建任务或作者编辑
'待审核' => 'review', //作者提交,待管理员审核
'审核通过' => 'reviewed', //审核通过,未付款,审核不通过则把状态改为“编辑中”
'完结' => 'complete', //已付款。任务结束
);
$config['auhtor_task_detail_status'] = array(
'使用的' => 'used', //表示目前正在使用的记录,用于区别草稿、版本等其他状态。原因是用同一个表保存不同属性的记录
'原始' => 'original', //原始任务信息备份
'版本' => 'version', //多份,每提交审核一次生成一份
);
//项目类型
$config['project_types'] = array(
'base' => '绩效项目',
'dare' => '挑战项目',
'innovation' => '创新项目',
);
//项目状态
$config['project_state'] = array(
'notstart' => '还没开始',
'runing' => '开发中',
'complete' => '完成',
);
];
//是否开启权限控制
$config['check_access'] = true;
//权限管理超级管理
$config['access_super_manage'] = array('ycc', 'lmr', 'lyj', 'rz', 'zp');
$config['access_super_manage'] = ['ycc', 'lmr', 'lyj', 'rz', 'zp'];
//编辑器预览样式路径
$config['css_source_cht'] = 'https://data.chinahighlights.com/css/min.php?f=/public/css/global.min.css,/css/festival-detail.css';
@ -750,7 +536,7 @@ $config['css_source_ch'] = 'https://data.chinahighlights.com/css/mobile-first.cs
$config['css_source_gm'] = 'https://data.chinarundreisen.com/public/pkg/css/baselAlRkXMnl750806T065919409Z.css';
$config['css_source_vc'] = 'https://data.voyageschine.com/information-view/tools/min/?v=20150611&f=/bootstrap/css/bootstrap.min.css,/information/css/base.css,/information/css/r/Header.css,/information/css/r/PublicContent.css,/information/css/r/footergray.css,/information/js/i18n/jquery.ui.datepicker/smoothness/jquery.min.css,/information/css/tip-yellowsimple/tip-yellowsimple.css,/information/css/private-vc.css';
$config['css_source_vc'] = 'https://data.chinahighlights.fr/information-view/tools/min/?v=20150611&f=/bootstrap/css/bootstrap.min.css,/information/css/base.css,/information/css/r/Header.css,/information/css/r/PublicContent.css,/information/css/r/footergray.css,/information/js/i18n/jquery.ui.datepicker/smoothness/jquery.min.css,/information/css/tip-yellowsimple/tip-yellowsimple.css,/information/css/private-vc.css';
$config['css_source_vac'] = 'https://data.viaje-a-china.com/information-view/tools/min/?v=20150611&f=/bootstrap/css/bootstrap.min.css,/information/css/base.css,/information/css/r/Header.css,/information/css/r/PublicContent.css,/information/css/r/footergray.css,/information/js/i18n/jquery.ui.datepicker/smoothness/jquery.min.css,/information/css/tip-yellowsimple/tip-yellowsimple.css,/information/css/private-vac.css';
$config['css_source_ru'] = 'https://data.chinahighlights.ru/information-view/tools/min/?v=20150611&f=/bootstrap/css/bootstrap.min.css,/information/css/base.css,/information/css/r/Header.css,/information/css/r/PublicContent.css,/information/css/r/footergray.css,/information/js/i18n/jquery.ui.datepicker/smoothness/jquery.min.css,/information/css/tip-yellowsimple/tip-yellowsimple.css,/information/css/private-ru.css';
$config['css_source_it'] = 'https://data.viaggio-in-cina.it/information-view/tools/min/?v=20150611&f=/bootstrap/css/bootstrap.min.css,/information/css/base.css,/information/css/r/Header.css,/information/css/r/PublicContent.css,/information/css/r/footergray.css,/information/js/i18n/jquery.ui.datepicker/smoothness/jquery.min.css,/information/css/tip-yellowsimple/tip-yellowsimple.css,/information/css/private-it.css';
@ -774,13 +560,6 @@ $config['css_source_hly'] = 'https://www.hualiyingtravel.com/css/csse3/base.css'
$config['css_source_ts'] = 'https://www.trainspread.com/css/bootstrap.min.css';
//静态文件生成路径
$config['cache']['jp']['cache_path'] = 'D:\wwwcache-intl\arachina.com';
$config['cache']['gm']['cache_path'] = 'D:\wwwcache-gm\chinarundreisen.com';
$config['cache']['vc']['cache_path'] = 'D:\wwwcache-intl\voyageschine.com';
$config['cache']['vac']['cache_path'] = 'D:\wwwcache-intl\viaje-a-china.com';
$config['cache']['ru']['cache_path'] = 'D:\wwwcache-intl\chinahighlights.ru';
$config['cache']['it']['cache_path'] = 'D:\wwwcache-intl\viaggio-in-cina.it';
$config['cache']['ch']['cache_path'] = 'D:\wwwcache\chinahighlights.com';
$config['cache']['ah']['cache_path'] = 'D:\wwwcache\asiahighlights.com';
$config['cache']['jh']['cache_path'] = 'D:\wwwcache\japanhighlights.com';
@ -832,7 +611,7 @@ if (isset($_SERVER['HTTP_HOST']) && $_SERVER['HTTP_HOST'] == '144.76.185.44:8576
//country控制器用到了
//信息类型
$config['InfoType_country'] = array(
$config['InfoType_country'] = [
'不设置' => 'none',
'首页' => 'root',
'基本数据' => 'n_facts',
@ -851,10 +630,10 @@ $config['InfoType_country'] = array(
'民族传统和文化遗产' => 'n_national',
'产品附加信息' => 'product',
'旅游工具箱' => 'n_tools',
);
];
//province控制器用到了
$config['InfoType_province'] = array(
$config['InfoType_province'] = [
'不设置' => 'none',
'首页' => 'root',
'基本数据' => 'p_facts',
@ -866,10 +645,10 @@ $config['InfoType_province'] = array(
'旅游建议' => 'p_tips',
'热门旅游城市' => 'p_popular_city',
'产品附加信息' => 'product',
);
];
//city控制器用到了
$config['InfoType_city'] = array(
$config['InfoType_city'] = [
'不设置' => 'none',
'首页' => 'root',
'简介' => 'c_overview',
@ -908,10 +687,10 @@ $config['InfoType_city'] = array(
'layout' => 'layout',
'一地线路详细' => 'c_single_circuit',
'一日游线路详细' => 'c_day_tour',
);
];
//special控制器用到了
$config['InfoType_special'] = array(
$config['InfoType_special'] = [
'不设置' => 'none',
'首页' => 'root',
'长江' => 't_yangtze_river',
@ -928,32 +707,32 @@ $config['InfoType_special'] = array(
'Spotlight文章' => 't_spotlight',
'专题首页推介' => 't_topic_promotion',
'产品附加信息' => 'product',
);
];
//special控制器用到了
$config['InfoType_video'] = array(
$config['InfoType_video'] = [
'不设置' => 'none',
);
];
//节庆
$config['InfoType_festival'] = array(
$config['InfoType_festival'] = [
'不设置' => 'none',
'民族节庆' => 'f_national',
'传统节庆' => 'f_tradition',
'旅游节庆' => 'f_travel',
);
];
//产品类型
$config['InfoType_product'] = array(
$config['InfoType_product'] = [
'不设置' => 'none',
'线路' => 'pd_tour',
'包价线路' => 'pd_package',
'信息页' => 'pd_info',
'移动端' => 'pd_phone',
);
];
//产品类型 - 德语
$config['InfoType_product_gm'] = array(
$config['InfoType_product_gm'] = [
'不设置' => 'none',
'线路' => 'pd_tour',
'包价线路' => 'pd_package',
@ -978,10 +757,10 @@ $config['InfoType_product_gm'] = array(
'产品附加信息' => 'product',
'旅游工具箱' => 'n_tools',
);
];
//公民游
$config['InfoType_citizen'] = array(
$config['InfoType_citizen'] = [
'不设置' => 'none',
'大洲' => 'w_continent',
'国家' => 'w_country',
@ -992,10 +771,10 @@ $config['InfoType_citizen'] = array(
'地图目录' => 'w_map',
'地图详细' => 'w_map_detail',
'产品' => 'product',
);
];
//ct站点用到了
$config['InfoType_ct'] = array(
$config['InfoType_ct'] = [
'不设置' => 'none',
'首页' => 'root',
'简介' => 'c_overview',
@ -1025,20 +804,20 @@ $config['InfoType_ct'] = array(
'游记' => 'story',
'一地线路详细' => 'c_single_circuit',
'一日游线路详细' => 'c_day_tour',
);
];
//AH站点用到了
$config['InfoType_ah'] = array(
$config['InfoType_ah'] = [
'国家信息' => 'country_info',
'区域信息' => 'area_info',
'国家信息列表页' => 'country_info_list',
'区域信息列表页' => 'area_info_list',
'线路' => 'pd_tour',
'包价线路' => 'pd_package',
);
];
//可选模板
$config['templates'] = array(
$config['templates'] = [
'通用内容模板' => 'guide_info_detail',
'城市-列表模板' => 'city_info_list',
'城市-首页模板' => 'city_info_index',
@ -1076,10 +855,10 @@ $config['templates'] = array(
'三峡游船' => 'yangtze',
'城市article列表' => 'city_article_list',
'food列表' => 'food_list',
);
];
//德语信息模板
$config['templates_gm'] = array(
$config['templates_gm'] = [
'通用内容模板' => 'guide_info_detail',
'城市-首页模板(GM)' => 'city_info_index',
'文化模板 [单页式]' => 'culture_info_detail_one_page',
@ -1087,16 +866,16 @@ $config['templates_gm'] = array(
'信息专题模板' => 'guide_top_series',
'列表式' => 'guide_info_list',
'空白模板' => 'none',
);
];
//德语信息模板
$config['templates_gh'] = array(
$config['templates_gh'] = [
'通用内容模板' => 'guide_info_detail',
'带导航' => 'guide_with_nav'
);
'带导航' => 'guide_with_nav',
];
// CHT 信息模板
$config['templates_cht'] = array(
$config['templates_cht'] = [
'通用内容模板' => 'guide_info_detail',
'城市-列表模板' => 'city_info_list',
'城市-首页模板' => 'city_info_index',
@ -1123,15 +902,15 @@ $config['templates_cht'] = array(
'城市article列表' => 'city_article_list',
'food列表' => 'food_list',
'FAQ模板' => 'faq_detail',
);
];
//产品管理板块模板
$config['templates_product'] = array(
$config['templates_product'] = [
'空白模板' => 'none',
);
];
//产品管理板块模板
$config['templates_product_gm'] = array(
$config['templates_product_gm'] = [
'空白模板' => 'none',
'通用内容模板' => 'guide_info_detail',
'城市-首页模板(GM)' => 'city_info_index',
@ -1139,39 +918,39 @@ $config['templates_product_gm'] = array(
'文化模板 [导航式]' => 'culture_info_detail_with_category',
'信息专题模板' => 'guide_top_series',
'列表式' => 'guide_info_list',
);
];
//产品管理板块模板(国际站使用)
$config['templates_product_i'] = array(
$config['templates_product_i'] = [
'空白模板HTML构建工具' => 'r_empty_container',
'空白模板(新)' => 'r_tpl_empty_2017',
'空白模板(旧)' => 'r_tpl_empty',
);
];
//亚洲组专用模板
$config['templates_ah'] = array(
$config['templates_ah'] = [
'空白模板' => 'none',
'静态页面' => 'static',
);
];
// 出境游网站模板
$config['templates_pgr'] = array(
$config['templates_pgr'] = [
'空白模板' => 'guide_info_detail',
'导航模板' => 'culture_info_detail_with_category',
);
];
// 国际火车网站模板
$config['templates_ts'] = array(
$config['templates_ts'] = [
'空白模板' => 'guide_info_detail',
'信息导航模板' => 'train_series_with_category',
);
];
//翰特产品类型,Information控制器的get_products函数有直接调用在这里增加了信息需要去控制器写相关操作代码
$config['ProductType_HT'] = array(
$config['ProductType_HT'] = [
'景点' => 't',
);
];
//区域类型对应字母
$config['area_type'] = array(
$config['area_type'] = [
'机场' => 'a',
'城市' => 'c',
'大洲' => 'e',
@ -1188,37 +967,37 @@ $config['area_type'] = array(
'公民游' => 'z',
'交换链接' => 'k',
'FAQ' => 'q',
);
];
$config['auhtor_task_type'] = array(
$config['auhtor_task_type'] = [
'翻译' => 'translate',
'修改' => 'modify',
'审核' => 'review',
'投稿' => 'contribute',
);
$config['auhtor_task_status'] = array(
];
$config['auhtor_task_status'] = [
'编辑中' => 'edit', //新建任务或作者编辑
'待审核' => 'review', //作者提交,待管理员审核
'审核通过' => 'reviewed', //审核通过,未付款,审核不通过则把状态改为“编辑中”
'完结' => 'complete', //已付款。任务结束
);
$config['auhtor_task_detail_status'] = array(
];
$config['auhtor_task_detail_status'] = [
'使用的' => 'used', //表示目前正在使用的记录,用于区别草稿、版本等其他状态。原因是用同一个表保存不同属性的记录
'原始' => 'original', //原始任务信息备份
'版本' => 'version', //多份,每提交审核一次生成一份
);
];
//项目类型
$config['project_types'] = array(
$config['project_types'] = [
'base' => '绩效项目',
'dare' => '挑战项目',
'innovation' => '创新项目',
);
];
//项目状态
$config['project_state'] = array(
$config['project_state'] = [
'notstart' => '还没开始',
'runing' => '开发中',
'complete' => '完成',
);
];
//多媒体中心的本地图片路径
//上传图片是异步上网的所以用此url进行本地预览
$config['media_image_url'] = 'https://video.chtcdn.com/upload';

@ -1095,12 +1095,13 @@ class Information extends CI_Controller
$data_H1 = array();
$data_H1['infocategory'] = $this->Information_model->get_detail_by_path($information->is_path, 1); //信息所属分类,获取信息顶级节点内容
$data_H1['author'] = ''; //获取作者信息
$data_H1['meta_news_createdate'] = get_meta($information->ic_id, 'meta_news_createdate');
$data_H1['meta_news_createdate'] = $this->get_publish_date_in_6_month($information);
$author_url = '';
$author = $this->Operator_model->get_author_nikename($information->ic_author);
if (!empty($author)) {
$data_H1['author'] = $author->OPI_FirstName;
$data_H1['OPI_Code'] = $author->OPI_Code;
$data_H1['author_url'] = $this->get_author_url('www.chinahighlights.com', $author->OPI_Code);
$author_url = $this->get_author_url('www.chinahighlights.com', $author->OPI_Code);
} else {
$author_web = $this->Infoauthors_model->detail_by_id($information->ic_author); //原始作者,可能是在线作者等
if (!empty($author_web)) {
@ -1154,7 +1155,7 @@ class Information extends CI_Controller
$article_structured_data_content = $this->load->view(
$template_path . '-structured-data-article',
array('information' => $information, 'author_name' => $data_H1['author'], 'author_url' => $data_H1['author_url']),
array('information' => $information, 'author_name' => $data_H1['author'], 'author_url' => $author_url),
true
);
$template = str_replace('<!--@STRUCTURED-DATA-ARTICLE-BLOCK@-->', $article_structured_data_content, $template);
@ -1485,6 +1486,26 @@ class Information extends CI_Controller
file_put_contents($html_path, $template, LOCK_EX);
}
// 六个月以前的文章不显示发布时间
private function get_publish_date_in_6_month($information)
{
$publish_date_in_6_month = NULL;
$meta_news_createdate = get_meta($information->ic_id, 'meta_news_createdate');
if (!empty($meta_news_createdate) && strtotime($meta_news_createdate)) {
$publish_date = new DateTime($meta_news_createdate, new DateTimeZone('UTC'));
$current_date = new DateTime('now', new DateTimeZone('UTC'));
$interval = $current_date->diff($publish_date);
$total_months = $interval->y * 12 + $interval->m;
if ($total_months < 6) {
$publish_date_in_6_month = $meta_news_createdate;
}
}
return $publish_date_in_6_month;
}
public function test_recommand()
{
$information = $this->Information_model->Detail($this->input->get('is_id'));
@ -1835,13 +1856,13 @@ class Information extends CI_Controller
$data_H1 = array();
$data_H1['infocategory'] = $this->Information_model->get_detail_by_path($information->is_path, 1); //信息所属分类,获取信息顶级节点内容
$data_H1['author'] = ''; //获取作者信息
$data_H1['meta_news_createdate'] = get_meta($information->ic_id, 'meta_news_createdate');
$data_H1['meta_news_createdate'] = $this->get_publish_date_in_6_month($information);
$author = $this->Operator_model->get_author_nikename($information->ic_author);
$author_url = '';
if (!empty($author)) {
$data_H1['author'] = $author->OPI_FirstName;
$data_H1['OPI_Code'] = $author->OPI_Code;
$data_H1['author_url'] = $this->get_author_url('www.globalhighlights.com', $author->OPI_Code);
$author_url = $this->get_author_url('www.globalhighlights.com', $author->OPI_Code);
} else {
$author_web = $this->Infoauthors_model->detail_by_id($information->ic_author); //原始作者,可能是在线作者等
if (!empty($author_web)) {
@ -1862,7 +1883,7 @@ class Information extends CI_Controller
$article_structured_data_content = $this->load->view(
'mobile_first/gh-structured-data-article',
array('information' => $information, 'author_name' => $data_H1['author'], 'author_url' => $data_H1['author_url']),
array('information' => $information, 'author_name' => $data_H1['author'], 'author_url' => $author_url),
true
);
$template = str_replace('<!--@STRUCTURED-DATA-ARTICLE-BLOCK@-->', $article_structured_data_content, $template);
@ -2224,14 +2245,17 @@ class Information extends CI_Controller
$breadcrumb_data = $this->Information_model->get_breadcrumb_data($information->is_id, $information->is_path, $group_map);
$ads_by_google = !empty(get_meta($information->ic_id, 'meta_google_ad_article'));
$data['meta_news_createdate'] = get_meta($information->ic_id, 'meta_news_createdate');
$data['meta_news_createdate'] = $this->get_publish_date_in_6_month($information);
$data['ads_by_google'] = $ads_by_google;
$data['author'] = ''; //获取作者信息
$author_url = '';
$author = $this->Operator_model->get_author_nikename($information->ic_author);
if (!empty($author)) {
$data['author'] = $author->OPI_FirstName;
$data['OPI_Code'] = $author->OPI_Code;
$data['author_url'] = $this->get_author_url('www.asiahighlights.com', $author->OPI_Code);
$author_url = $this->get_author_url('www.asiahighlights.com', $author->OPI_Code);
} else {
$author_web = $this->Infoauthors_model->detail_by_id($information->ic_author); //原始作者,可能是在线作者等
if (!empty($author_web)) {
@ -2244,7 +2268,7 @@ class Information extends CI_Controller
// 结构化标签Article
$article_structured_data_content = $this->load->view(
$template_path . '-structured-data-article',
array('information' => $information, 'author_name' => $data['author'], 'author_url' => $data['author_url']),
array('information' => $information, 'author_name' => $data['author'], 'author_url' => $author_url),
true
);
$template = str_replace('<!--@STRUCTURED-DATA-ARTICLE-BLOCK@-->', $article_structured_data_content, $template);
@ -2630,14 +2654,15 @@ class Information extends CI_Controller
$breadcrumb_data = $this->Information_model->get_breadcrumb_data($information->is_id, $information->is_path, $group_map);
$ads_by_google = !empty(get_meta($information->ic_id, 'meta_google_ad_article'));
$data['meta_news_createdate'] = get_meta($information->ic_id, 'meta_news_createdate');
$data['meta_news_createdate'] = $this->get_publish_date_in_6_month($information);
$data['ads_by_google'] = $ads_by_google;
$data['author'] = ''; //获取作者信息
$author = $this->Operator_model->get_author_nikename($information->ic_author);
$author_url = '';
if (!empty($author)) {
$data['author'] = $author->OPI_FirstName;
$data['OPI_Code'] = $author->OPI_Code;
$data['author_url'] = $this->get_author_url('www.japanhighlights.com', $author->OPI_Code);
$author_url = $this->get_author_url('www.japanhighlights.com', $author->OPI_Code);
} else {
$author_web = $this->Infoauthors_model->detail_by_id($information->ic_author); //原始作者,可能是在线作者等
if (!empty($author_web)) {
@ -2650,7 +2675,7 @@ class Information extends CI_Controller
// 结构化标签Article
$article_structured_data_content = $this->load->view(
$template_path . '-structured-data-article',
array('information' => $information, 'author_name' => $data['author'], 'author_url' => $data['author_url']),
array('information' => $information, 'author_name' => $data['author'], 'author_url' => $author_url),
true
);
$template = str_replace('<!--@STRUCTURED-DATA-ARTICLE-BLOCK@-->', $article_structured_data_content, $template);

@ -354,6 +354,13 @@
return true;
}
//JH 跳转测试页面
function goto_jhtest_page() {
var site_url = 'https://proxy-www.japanhighlights.com';
$('#goto_test_page_button').attr("href", site_url + $('#ic_url').val());
return true;
}
//GH 跳转测试页面
function goto_ghtest_page() {
var site_url = 'https://proxy-www.globalhighlights.com';
@ -758,6 +765,11 @@ if ($embody == 1) {
name="goto_test_page_button" target="_blank" title="查看测试页面"><i
class="glyphicon glyphtext-muted glyphicon glyphicon-random text-muted"></i></a>
<?php }?>
<?php if ($information->ic_sitecode == 'jh') {?>
<a href="javascript:void(0);" onclick="goto_jhtest_page();" id="goto_test_page_button"
name="goto_test_page_button" target="_blank" title="查看测试页面"><i
class="glyphicon glyphtext-muted glyphicon glyphicon-random text-muted"></i></a>
<?php }?>
</div>
<input class="form-control col-xs-24" type="text" id="ic_url" name="ic_url"
value="<?php echo $information->ic_url; ?>">

@ -94,6 +94,9 @@
case 'guilin':
$media_site_code = 'guilin';
break;
case 'hly':
$media_site_code = 'hly';
break;
default:
$media_site_code = 'ch';
}

@ -29,3 +29,6 @@ mklink /D "D:\wwwroot-ct\uploader-file\trainspread\image" "D:\wwwroot-ct\origin-
//guilin
mklink /D "D:\wwwroot-ct\uploader-file\guilin\image" "D:\wwwroot-ct\guilinchina.net\image"
mklink /D "D:\wwwroot-ct\uploader-file\guilin\pic" "D:\wwwroot-ct\guilinchina.net\pic"
//hly
mklink /D "D:\wwwroot-ct\uploader-file\hly\image" "D:\wwwroot-ct\hualiyingtravel.com\image"
Loading…
Cancel
Save