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

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

File diff suppressed because it is too large Load Diff

@ -1095,12 +1095,13 @@ class Information extends CI_Controller
$data_H1 = array(); $data_H1 = array();
$data_H1['infocategory'] = $this->Information_model->get_detail_by_path($information->is_path, 1); //信息所属分类,获取信息顶级节点内容 $data_H1['infocategory'] = $this->Information_model->get_detail_by_path($information->is_path, 1); //信息所属分类,获取信息顶级节点内容
$data_H1['author'] = ''; //获取作者信息 $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); $author = $this->Operator_model->get_author_nikename($information->ic_author);
if (!empty($author)) { if (!empty($author)) {
$data_H1['author'] = $author->OPI_FirstName; $data_H1['author'] = $author->OPI_FirstName;
$data_H1['OPI_Code'] = $author->OPI_Code; $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 { } else {
$author_web = $this->Infoauthors_model->detail_by_id($information->ic_author); //原始作者,可能是在线作者等 $author_web = $this->Infoauthors_model->detail_by_id($information->ic_author); //原始作者,可能是在线作者等
if (!empty($author_web)) { if (!empty($author_web)) {
@ -1154,7 +1155,7 @@ class Information extends CI_Controller
$article_structured_data_content = $this->load->view( $article_structured_data_content = $this->load->view(
$template_path . '-structured-data-article', $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 true
); );
$template = str_replace('<!--@STRUCTURED-DATA-ARTICLE-BLOCK@-->', $article_structured_data_content, $template); $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); 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() public function test_recommand()
{ {
$information = $this->Information_model->Detail($this->input->get('is_id')); $information = $this->Information_model->Detail($this->input->get('is_id'));
@ -1835,13 +1856,13 @@ class Information extends CI_Controller
$data_H1 = array(); $data_H1 = array();
$data_H1['infocategory'] = $this->Information_model->get_detail_by_path($information->is_path, 1); //信息所属分类,获取信息顶级节点内容 $data_H1['infocategory'] = $this->Information_model->get_detail_by_path($information->is_path, 1); //信息所属分类,获取信息顶级节点内容
$data_H1['author'] = ''; //获取作者信息 $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 = $this->Operator_model->get_author_nikename($information->ic_author);
$author_url = '';
if (!empty($author)) { if (!empty($author)) {
$data_H1['author'] = $author->OPI_FirstName; $data_H1['author'] = $author->OPI_FirstName;
$data_H1['OPI_Code'] = $author->OPI_Code; $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 { } else {
$author_web = $this->Infoauthors_model->detail_by_id($information->ic_author); //原始作者,可能是在线作者等 $author_web = $this->Infoauthors_model->detail_by_id($information->ic_author); //原始作者,可能是在线作者等
if (!empty($author_web)) { if (!empty($author_web)) {
@ -1862,7 +1883,7 @@ class Information extends CI_Controller
$article_structured_data_content = $this->load->view( $article_structured_data_content = $this->load->view(
'mobile_first/gh-structured-data-article', '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 true
); );
$template = str_replace('<!--@STRUCTURED-DATA-ARTICLE-BLOCK@-->', $article_structured_data_content, $template); $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); $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')); $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['ads_by_google'] = $ads_by_google;
$data['author'] = ''; //获取作者信息 $data['author'] = ''; //获取作者信息
$author_url = '';
$author = $this->Operator_model->get_author_nikename($information->ic_author); $author = $this->Operator_model->get_author_nikename($information->ic_author);
if (!empty($author)) { if (!empty($author)) {
$data['author'] = $author->OPI_FirstName; $data['author'] = $author->OPI_FirstName;
$data['OPI_Code'] = $author->OPI_Code; $data['OPI_Code'] = $author->OPI_Code;
$data['author_url'] = $this->get_author_url('www.asiahighlights.com', $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 { } else {
$author_web = $this->Infoauthors_model->detail_by_id($information->ic_author); //原始作者,可能是在线作者等 $author_web = $this->Infoauthors_model->detail_by_id($information->ic_author); //原始作者,可能是在线作者等
if (!empty($author_web)) { if (!empty($author_web)) {
@ -2244,7 +2268,7 @@ class Information extends CI_Controller
// 结构化标签Article // 结构化标签Article
$article_structured_data_content = $this->load->view( $article_structured_data_content = $this->load->view(
$template_path . '-structured-data-article', $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 true
); );
$template = str_replace('<!--@STRUCTURED-DATA-ARTICLE-BLOCK@-->', $article_structured_data_content, $template); $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); $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')); $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['ads_by_google'] = $ads_by_google;
$data['author'] = ''; //获取作者信息 $data['author'] = ''; //获取作者信息
$author = $this->Operator_model->get_author_nikename($information->ic_author); $author = $this->Operator_model->get_author_nikename($information->ic_author);
$author_url = '';
if (!empty($author)) { if (!empty($author)) {
$data['author'] = $author->OPI_FirstName; $data['author'] = $author->OPI_FirstName;
$data['OPI_Code'] = $author->OPI_Code; $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 { } else {
$author_web = $this->Infoauthors_model->detail_by_id($information->ic_author); //原始作者,可能是在线作者等 $author_web = $this->Infoauthors_model->detail_by_id($information->ic_author); //原始作者,可能是在线作者等
if (!empty($author_web)) { if (!empty($author_web)) {
@ -2650,7 +2675,7 @@ class Information extends CI_Controller
// 结构化标签Article // 结构化标签Article
$article_structured_data_content = $this->load->view( $article_structured_data_content = $this->load->view(
$template_path . '-structured-data-article', $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 true
); );
$template = str_replace('<!--@STRUCTURED-DATA-ARTICLE-BLOCK@-->', $article_structured_data_content, $template); $template = str_replace('<!--@STRUCTURED-DATA-ARTICLE-BLOCK@-->', $article_structured_data_content, $template);

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

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

@ -28,4 +28,7 @@ mklink /D "D:\wwwroot-ct\uploader-file\trainspread\image" "D:\wwwroot-ct\origin-
//guilin //guilin
mklink /D "D:\wwwroot-ct\uploader-file\guilin\image" "D:\wwwroot-ct\guilinchina.net\image" 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" 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