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

hotfix/paypal-note
candice 3 years ago
commit 14e79729d4

@ -951,7 +951,19 @@ class Information extends CI_Controller
break;
default:
}
$breadcrumb_data = $this->Information_model->get_path_exclude_self($information->is_id, $information->is_path);
// GH Home 下层节点名称和链接映射
$group_map = [
278009289 => [
'ic_url' => '/destinations',
'ic_url_title' => 'Destinations'
],
278009290 => [
'ic_url' => '/about',
'ic_url_title' => 'About Us'
]
];
$breadcrumb_data = $this->Information_model->get_breadcrumb_data($information->is_id, $information->is_path, $group_map);
$breadcrumb_structured_data_content = $this->load->view(
$template_path . '-structured-data-breadcrumb',
@ -1368,7 +1380,9 @@ class Information extends CI_Controller
$data["DESCRIPTION"] = $information->ic_seo_description;
$data["KEYWORDS"] = $information->ic_seo_keywords;
$data["CANONICAL"] = $this->config->item('site_url') . $information->ic_url;
$meta_ct_page_type = "";
$meta_ct_page_type = get_meta($information->ic_id, 'meta_ct_page_type'); //页面类型
$meta_product_code = get_meta($information->ic_id, 'meta_product_code'); //绑定的产品编号
//面包屑
$crumb = "";
@ -1381,6 +1395,15 @@ class Information extends CI_Controller
$crumb .= "</div>";
}
$data["crumb"] = $crumb;
//作者字符串,信息页或者城市天气页加载 2022-7-26
$str_author="";
$author = $this->Operator_model->get_author_nikename($information->ic_author);
if ((empty($meta_product_code) && !($meta_ct_page_type !== false && $meta_ct_page_type != "")) || $meta_ct_page_type=="weatherpage"){
$OPI_FirstName = !empty($author)?$author->OPI_FirstName:'author nickname';
$str_author = '<div class="authorupdate">Written by <strong>'.$OPI_FirstName.'</strong> Updated <span>' . date("M. j, Y",strtotime($information->ic_datetime)) . '</span></div>' ;
}
/* 详细内容 */
$ic_content = $information->ic_content;
// /**替换详细内容里面的价格
@ -1399,8 +1422,8 @@ class Information extends CI_Controller
// return '<span class="js_getTourPrice" data="'.$matchItem.'"></span>';;
// },$ic_content);
/** 替换H1加面包屑 */
$ic_content = preg_replace('/<h1>(.*)<\/h1>/i', $crumb . "\r\n" . '<H1>$1</H1>', $ic_content, 1);
/** 替换H1加面包屑,加作者 */
$ic_content = preg_replace('/<h1>(.*)<\/h1>/i', $crumb . "\r\n" . '<H1>$1</H1>' . "\r\n" .$str_author, $ic_content, 1);
/**替换zodiac标签 */
if (strpos($ic_content, '<!--@ZODIAC-CALC@-->') !== false){
@ -1476,9 +1499,8 @@ class Information extends CI_Controller
//总JS为了方便以后js好维护必须的把一些公用的JS统计到一个文件。但是又不是所有页面都需要调用这个基础js所以必须在这里进行判断
$addBaseJs = false;
$addonJs = "";
$meta_ct_page_type = "";
$meta_ct_page_price = get_meta($information->ic_id, 'meta_ct_page_price'); //是否包含价格
$meta_ct_page_type = get_meta($information->ic_id, 'meta_ct_page_type'); //页面类型
if ($meta_ct_page_price == "yes") {
$addBaseJs = true;
} else if ($meta_ct_page_type !== false && $meta_ct_page_type != "") {

@ -256,7 +256,14 @@ class Logs_model extends CI_Model
. " ( \n"
. " ?, ?, N?, ?, N?, GETDATE() \n"
. " )";
$query = $this->HT->query($sql, array($log_action, $is_id, $log_content, $admin_info['OPI_Code'], $admin_info['OPI_Name']));
// fix 外部站点调用
$op_code = NULL;
if ($admin_info['OPI_Code']) $op_code = $admin_info['OPI_Code'];
$op_name = 'outside';
if ($admin_info['OPI_Name']) $op_name = $admin_info['OPI_Name'];
$query = $this->HT->query($sql, array($log_action, $is_id, $log_content, $op_code, $op_name));
$this->insert_id = $this->HT->last_id('infoLogs');
return $query;
//print_r($this->HT->queries);
@ -276,5 +283,4 @@ class Logs_model extends CI_Model
$query = $this->HT->query($sql, array($ic_id));
return $query->row();
}
}

@ -430,7 +430,7 @@ class innerTrainSearch extends CI_Controller{
}
}
//App项目组的接口
//App项目组的接口 暂时不用
public function appGroupApi($train_date=null,$fromStation=null,$toStation=null,$return=false){
set_time_limit(0);

@ -1325,6 +1325,22 @@
</label>
<input name="meta_top_img" id="meta_top_img" type="text" class="form-control" value="<?php echo get_meta($information->ic_id, 'meta_top_img'); ?>" />
</div>
<div class="col-sm-8">
<label>是否显示作者和更新日期?
<a href="javascript:void(0);" onclick="meta('delete', '<?php echo $information->ic_id; ?>', 'meta_show_author', $('#meta_show_author').val())"><i class="text-muted glyphicon glyphicon-remove"></i></a>
<a href="javascript:void(0);" onclick="meta('save', '<?php echo $information->ic_id; ?>', 'meta_show_author', $('#meta_show_author').val())"><i class="text-muted glyphicon glyphicon-hdd"></i></a>
<a href="javascript:void(0);" title="是否显示作者和更新日期?"><i class="text-muted glyphicon glyphicon-question-sign"></i></a>
</label>
<select name="meta_show_author" id="meta_show_author" class="form-control">
<?php if (get_meta($information->ic_id, 'meta_show_author') == 'show') { ?>
<option selected="selected" value="show">显示</option>
<option value="hide">隐藏</option>
<?php } else { ?>
<option value="show">显示</option>
<option selected="selected" value="hide">隐藏</option>
<?php } ?>
</select>
</div>
<?php if ($information->ic_ht_area_type == 'err') { ?>
<div class="col-sm-8">
<label>自定义样式

Loading…
Cancel
Save