根据节点批量更新AMP页面

hotfix/远程访问多媒体中心
尹诚诚 7 years ago
parent 388db4ef2e
commit 0791e323ac

@ -66,27 +66,23 @@ class Welcome extends CI_Controller {
}
//获取所有信息URL,用来批量静态化更新
public function create_all_urls() {
public function create_all_urls($view=false) {
set_time_limit(0);
$this->output->enable_profiler(false);
$data['all_information'] = $this->Information_model->GetList('ic_status,ic_url,ic_sitecode');
$data['all_information'] = $this->Information_model->GetList('ic_status,ic_id,ic_url,ic_sitecode');
if ($view == 'amp') {
$this->load->view('bootstrap3/header', $data);
$this->load->view('bootstrap3/refresh_amp_urls');
$this->load->view('bootstrap3/footer');
} else {
$this->load->view('bootstrap/header', $data);
$this->load->view('bootstrap/cache_url', $data);
$this->load->view('bootstrap/footer');
}
//获取所有信息URL,用来批量静态化更新
public function create_all_amp_urls() {
set_time_limit(0);
$this->output->enable_profiler(false);
$data['all_information'] = $this->Information_model->GetList('ic_id,ic_status,ic_url,ic_sitecode');
$this->load->view('bootstrap3/header', $data);
$this->load->view('bootstrap3/refresh_amp_urls');
$this->load->view('bootstrap3/footer');
}
//获取某个信息节点和子节点url
public function create_infomation_urls($is_parent_id) {
public function create_infomation_urls($is_parent_id, $view = false) {
$this->output->enable_profiler(FALSE);
$structure = $this->InfoStructures_model->Detail($is_parent_id);
if (empty($structure)) {
@ -94,10 +90,16 @@ class Welcome extends CI_Controller {
return false;
}
$data['all_information'] = $this->Information_model->get_list_by_path($structure->is_path);
if ($view == 'amp') {
$this->load->view('bootstrap3/header', $data);
$this->load->view('bootstrap3/refresh_amp_urls');
$this->load->view('bootstrap3/footer');
} else {
$this->load->view('bootstrap/header', $data);
$this->load->view('bootstrap/cache_url', $data);
$this->load->view('bootstrap/footer');
}
}
public function get_infomation_urls($is_parent_id) {
$this->output->enable_profiler(FALSE);
@ -135,7 +137,7 @@ class Welcome extends CI_Controller {
public function change_static_url($info_id) {
$information = $this->Information_model->Detail($info_id);
$htm_doc = new DOMDocument();
$htm_doc->encoding='UTF-8';
$htm_doc->encoding = 'UTF-8';
libxml_use_internal_errors(true);
$htm_doc->strictErrorChecking = false;
if (empty($information->ic_content)) {
@ -159,15 +161,15 @@ class Welcome extends CI_Controller {
$anchor_list = $htm_doc->getElementsByTagName('a');
foreach ($anchor_list as $anchor) {
$a_href = $anchor->getAttribute('href');
echo 'a.href: '.$a_href.'<br>';
echo 'a.href: ' . $a_href . '<br>';
$match_result = array();
preg_match('/^http:\/\/www.chinahighlights.com(.*)/', $a_href, $match_result);
$result_count = count($match_result);
if ($result_count == 2) {
$result = '//www.chinahighlights.com'.$match_result[1];
$result = '//www.chinahighlights.com' . $match_result[1];
$anchor->setAttribute('href', $result);
echo $result.'<br>';
echo $result . '<br>';
}
}
@ -196,7 +198,6 @@ class Welcome extends CI_Controller {
// $information->ic_ht_product_id,
// $information->ic_ht_product_type,
// $information->ic_author);
// $this->echo_json(array(
// 'status' => 'ok',
// 'infoId' => $info_id,
@ -206,12 +207,11 @@ class Welcome extends CI_Controller {
}
public function count_redirect_nofollow() {
$include_redirece_info =
$this->Information_model->search_all_text('&t=78002', 2000);
echo 'redirect count: '.count($include_redirece_info).'<br/>';
$include_redirece_info = $this->Information_model->search_all_text('&t=78002', 2000);
echo 'redirect count: ' . count($include_redirece_info) . '<br/>';
$redirect_nofollow_list = array();
$htm_doc = new DOMDocument();
$htm_doc->encoding='UTF-8';
$htm_doc->encoding = 'UTF-8';
libxml_use_internal_errors(true);
$htm_doc->strictErrorChecking = false;
foreach ($include_redirece_info as $info) {
@ -227,20 +227,20 @@ class Welcome extends CI_Controller {
preg_match('/.*&t=78002$/', $a_href, $match_result);
$result_count = count($match_result);
if ($result_count > 0 && $a_rel != 'nofollow') {
echo $info->ic_url.' | '.'('.$info->ic_id.','.$info->is_id.')'.'<br/>';
echo 'a.href: '.$a_href.'; rel: '.$a_rel.'<br>';
echo $info->ic_url . ' | ' . '(' . $info->ic_id . ',' . $info->is_id . ')' . '<br/>';
echo 'a.href: ' . $a_href . '; rel: ' . $a_rel . '<br>';
$redirect_nofollow_list[] = $info;
}
}
}
echo 'nofollow_count: '.count($redirect_nofollow_list).'<br/>';
echo 'nofollow_count: ' . count($redirect_nofollow_list) . '<br/>';
return $redirect_nofollow_list;
}
public function transform_redirect_nofollow() {
$redirect_nofollow_list = $this->count_redirect_nofollow();
$htm_doc = new DOMDocument();
$htm_doc->encoding='UTF-8';
$htm_doc->encoding = 'UTF-8';
libxml_use_internal_errors(true);
$htm_doc->strictErrorChecking = false;
@ -255,86 +255,40 @@ class Welcome extends CI_Controller {
$this->Logs_model->backup($info->is_id, $info->ic_content);
$info->ic_content = $htm_doc->saveHTML();
$this->InfoContents_model->Update(
$info->ic_id,
$info->ic_url,
$info->ic_url_title,
$info->ic_type,
$info->ic_title,
$info->ic_content,
$info->ic_summary,
$info->ic_seo_title,
$info->ic_seo_description,
$info->ic_seo_keywords,
$info->ic_show_bread_crumbs,
$info->ic_status,
$info->ic_template,
$info->ic_photo,
$info->ic_photo_width,
$info->ic_photo_height,
$info->ic_recommend_tours,
$info->ic_recommend_packages,
$info->ic_ht_area_id,
$info->ic_ht_area_type,
$info->ic_ht_product_id,
$info->ic_ht_product_type,
$info->ic_author);
}
}
echo 'update_nofollow_count: '.count($redirect_nofollow_list).'<br/>';
$info->ic_id, $info->ic_url, $info->ic_url_title, $info->ic_type, $info->ic_title, $info->ic_content, $info->ic_summary, $info->ic_seo_title, $info->ic_seo_description, $info->ic_seo_keywords, $info->ic_show_bread_crumbs, $info->ic_status, $info->ic_template, $info->ic_photo, $info->ic_photo_width, $info->ic_photo_height, $info->ic_recommend_tours, $info->ic_recommend_packages, $info->ic_ht_area_id, $info->ic_ht_area_type, $info->ic_ht_product_id, $info->ic_ht_product_type, $info->ic_author);
}
}
echo 'update_nofollow_count: ' . count($redirect_nofollow_list) . '<br/>';
}
public function count_http_of_href() {
$data['all_information'] =
$this->Information_model->search_all_text('http://www.chinahighlights.com/', 2000);
echo 'count: '.count($data['all_information']).'<br/>';
$data['all_information'] = $this->Information_model->search_all_text('http://www.chinahighlights.com/', 2000);
echo 'count: ' . count($data['all_information']) . '<br/>';
var_dump($data['all_information']);
}
public function transform_href_to_https() {
$http_host = 'http://www.chinahighlights.com/';
$https_host = 'https://www.chinahighlights.com/';
$data['all_information'] =
$this->Information_model->search_all_text($http_host, 200);
echo 'count: '.count($data['all_information']).'<br/>';
$data['all_information'] = $this->Information_model->search_all_text($http_host, 200);
echo 'count: ' . count($data['all_information']) . '<br/>';
if (empty($data['all_information'])) {
echo 'nothing transform to https';
} else {
foreach ($data['all_information'] as $item) {
if (empty($item->ic_url)) {
echo '<span style="color: red;">['.$item->ic_title .'] ['.$item->ic_url.']</span> <br/>';
echo '<span style="color: red;">[' . $item->ic_title . '] [' . $item->ic_url . ']</span> <br/>';
continue;
} else {
echo $item->ic_url.' | '.$item->ic_title.'<br/>';
echo $item->ic_url . ' | ' . $item->ic_title . '<br/>';
}
$this->Logs_model->backup($item->is_id, $item->ic_content);
$item->ic_content=str_replace($http_host, $https_host, $item->ic_content);
$item->ic_content = str_replace($http_host, $https_host, $item->ic_content);
$this->InfoContents_model->Update(
$item->ic_id,
$item->ic_url,
$item->ic_url_title,
$item->ic_type,
$item->ic_title,
$item->ic_content,
$item->ic_summary,
$item->ic_seo_title,
$item->ic_seo_description,
$item->ic_seo_keywords,
$item->ic_show_bread_crumbs,
$item->ic_status,
$item->ic_template,
$item->ic_photo,
$item->ic_photo_width,
$item->ic_photo_height,
$item->ic_recommend_tours,
$item->ic_recommend_packages,
$item->ic_ht_area_id,
$item->ic_ht_area_type,
$item->ic_ht_product_id,
$item->ic_ht_product_type,
$item->ic_author
$item->ic_id, $item->ic_url, $item->ic_url_title, $item->ic_type, $item->ic_title, $item->ic_content, $item->ic_summary, $item->ic_seo_title, $item->ic_seo_description, $item->ic_seo_keywords, $item->ic_show_bread_crumbs, $item->ic_status, $item->ic_template, $item->ic_photo, $item->ic_photo_width, $item->ic_photo_height, $item->ic_recommend_tours, $item->ic_recommend_packages, $item->ic_ht_area_id, $item->ic_ht_area_type, $item->ic_ht_product_id, $item->ic_ht_product_type, $item->ic_author
);
}
}
@ -346,44 +300,21 @@ class Welcome extends CI_Controller {
->set_output(json_encode($obj));
}
//批量替换二级域名如图片或者data域名
function replace_hostname($topnum){
$data=array();
$find_host='http://data.chinarundreisen.com/'; //http://bilder.chinarundreisen.com/
$new_host='//data.chinarundreisen.com/';
$data['all_information'] = $this->Information_model->search_all_text($find_host,$topnum);
if($data['all_information']){
foreach($data['all_information'] as $item){
echo $item->ic_url.'<br/>';
$item->ic_content=str_replace($find_host, $new_host,$item->ic_content);
function replace_hostname($topnum) {
$data = array();
$find_host = 'http://data.chinarundreisen.com/'; //http://bilder.chinarundreisen.com/
$new_host = '//data.chinarundreisen.com/';
$data['all_information'] = $this->Information_model->search_all_text($find_host, $topnum);
if ($data['all_information']) {
foreach ($data['all_information'] as $item) {
echo $item->ic_url . '<br/>';
$item->ic_content = str_replace($find_host, $new_host, $item->ic_content);
$this->InfoContents_model->Update(
$item->ic_id,
$item->ic_url,
$item->ic_url_title,
$item->ic_type,
$item->ic_title,
$item->ic_content,
$item->ic_summary,
$item->ic_seo_title,
$item->ic_seo_description,
$item->ic_seo_keywords,
$item->ic_show_bread_crumbs,
$item->ic_status,
$item->ic_template,
$item->ic_photo,
$item->ic_photo_width,
$item->ic_photo_height,
$item->ic_recommend_tours,
$item->ic_recommend_packages,
$item->ic_ht_area_id,
$item->ic_ht_area_type,
$item->ic_ht_product_id,
$item->ic_ht_product_type,
$item->ic_author
$item->ic_id, $item->ic_url, $item->ic_url_title, $item->ic_type, $item->ic_title, $item->ic_content, $item->ic_summary, $item->ic_seo_title, $item->ic_seo_description, $item->ic_seo_keywords, $item->ic_show_bread_crumbs, $item->ic_status, $item->ic_template, $item->ic_photo, $item->ic_photo_width, $item->ic_photo_height, $item->ic_recommend_tours, $item->ic_recommend_packages, $item->ic_ht_area_id, $item->ic_ht_area_type, $item->ic_ht_product_id, $item->ic_ht_product_type, $item->ic_author
);
}
}else{
} else {
echo 'all done';
}
}
@ -410,7 +341,7 @@ class Welcome extends CI_Controller {
preg_match($pattern, $subject, $match_result);
$result_count = count($match_result);
if ($result_count == 2) {
$result = $replace.$match_result[1];
$result = $replace . $match_result[1];
}
return $result;
}
@ -431,7 +362,7 @@ class Welcome extends CI_Controller {
$parent_path = str_replace('-', ',', $parent_path);
$parent_path = trim($parent_path, ',');
if ($parent_path != '')
$parent_path.=',';
$parent_path .= ',';
$this->load->model('Import_model');
$this->Import_model->set_path($is_id, $parent_path);
echo 'ok';

@ -42,7 +42,7 @@
<li><a href="<?php echo site_url('sendmail') ?>" >订单邮件管理</a> </li>
<li><a href="http://share.chtcdn.com/info.php/infoshare/" target="_blank" >信息分享平台</a> </li>
<li><a href="<?php echo site_url('welcome/create_all_urls') ?>" target="_blank" >全站静态化更新</a> </li>
<li><a href="<?php echo site_url('welcome/create_all_amp_urls') ?>" target="_blank" >全站AMP更新</a> </li>
<li><a href="<?php echo site_url('welcome/create_all_urls/amp') ?>" target="_blank" >全站AMP更新</a> </li>
<li class="divider"></li>

@ -525,7 +525,10 @@
<ul id="treeDemo" name="treeDemo" class="ztree" style="height:1035px;overflow-x:auto;"></ul>
<ul class="nav nav-list">
<li class="nav-header"><a href="<?php echo site_url('welcome/create_infomation_urls/' . $information->is_id); ?>" target="_blank"><i class="text-muted glyphicon glyphicon-retweet"></i></a></li>
<li class="nav-header">
<a href="<?php echo site_url('welcome/create_infomation_urls/' . $information->is_id); ?>" target="_blank" class="col-sm-5" title="批量更新静态化页面"><i class="text-muted glyphicon glyphicon-retweet"></i></a>
<a href="<?php echo site_url('welcome/create_infomation_urls/' . $information->is_id . '/amp'); ?>" target="_blank" class="col-sm-5" title="批量更新AMP页面"><i class="glyphicon glyphicon-flash"></i></a>
</li>
</ul>
</div>
@ -553,24 +556,25 @@
$show_photo_meta = get_meta($information->ic_id, 'meta_use_list_picture');
$amp_photo = '';
if ($information->ic_photo && $show_photo_meta !== 'no') {
$amp_photo = $this->config->item('site_image_url').$information->ic_photo;
$amp_photo = $this->config->item('site_image_url') . $information->ic_photo;
}
$amp_build_url = "/amp_app/?icid=".$information->ic_id."&is_path=".$information->is_path."&usr=".urlencode($amp_user['OPI_Name'])."&url=".urlencode($information->ic_url)."&photo=".urlencode($amp_photo)."&site=".urlencode($this->config->item('site_url'))."&imgurl=".urlencode($this->config->item('site_image_url'));
$amp_build_url = "/amp_app/?icid=" . $information->ic_id . "&is_path=" . $information->is_path . "&usr=" . urlencode($amp_user['OPI_Name']) . "&url=" . urlencode($information->ic_url) . "&photo=" . urlencode($amp_photo) . "&site=" . urlencode($this->config->item('site_url')) . "&imgurl=" . urlencode($this->config->item('site_image_url'));
?>
<?php if(is_series_site()){ ?>
<label title="AMP页面编辑"><a href="<?php echo($amp_build_url);?>" target="_blank">AMP构建工具</a></label> |
<?php if (is_series_site()) { ?>
<label title="AMP页面编辑"><a href="<?php echo($amp_build_url); ?>" target="_blank">AMP构建工具</a></label> |
<?php } ?>
<?php if (get_meta($information->ic_id, 'AMP_STATUS') === '1') {?>
<?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 {?>
<?php } else { ?>
<label title="创建AMP页面"><a href="<?php echo site_url('amp/edit/' . $information->ic_id); ?>" target="_blank"><i class="glyphicon glyphicon-plus"></i></a></label>
<?php }?>
<?php } ?>
</div>
<div class="col-xs-24">
<input class="form-control" type="text" id="ic_title" style="<?php if ($embody == 1) {
<input class="form-control" type="text" id="ic_title" style="<?php
if ($embody == 1) {
echo 'border-color:green;';
}
?>" name="ic_title" value="<?php echo $information->ic_title; ?>" >
}
?>" name="ic_title" value="<?php echo $information->ic_title; ?>" >
</div>
<div class="col-xs-24 btn-sm"></div>
</div>
@ -584,12 +588,12 @@
<div class="col-xs-24 nopadding">链接地址
<a href="javascript:void(0);" onclick="format_url()" title="格式化URL"><i class="glyphicon glyphtext-muted glyphicon glyphicon-flag text-muted"></i></a>
<a href="javascript:void(0);" onclick="goto_page();" id="goto_page_button" name="goto_page_button" target="_blank" title="查看" ><i class="glyphicon glyphtext-muted glyphicon glyphicon-eye-open text-muted"></i></a>
<?php if ($information->ic_sitecode == 'cht') {?>
<?php if ($information->ic_sitecode == 'cht') { ?>
<a href="javascript:void(0);" onclick="goto_test_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 }?>
<?php if ($information->ic_sitecode == 'gm') {?>
<?php } ?>
<?php if ($information->ic_sitecode == 'gm') { ?>
<a href="javascript:void(0);" onclick="goto_gmtest_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 }?>
<?php } ?>
</div>
<input class="form-control col-xs-24" type="text" id="ic_url" name="ic_url" value="<?php echo $information->ic_url; ?>" >
</div>
@ -631,16 +635,16 @@
<select name="meta_website_nav" id="meta_website_nav" class="form-control" >
<option value="" >不选择</option>
<?php
if (!empty($setting_website_nav)) {
if (!empty($setting_website_nav)) {
$setting_website_nav_active = trim(get_meta($information->ic_id, 'meta_website_nav'));
foreach ($setting_website_nav as $item) {
$strcasecmp_nav = strcasecmp($setting_website_nav_active, $item->im_value);
?>
<option <?php echo $strcasecmp_nav == 0 ? 'selected' : FALSE; ?> value="<?php echo $item->im_value ?>" ><?php echo $item->im_value ?></option>
<?php
}
}
?>
}
}
?>
</select>
</div>
@ -762,7 +766,8 @@ if (!empty($setting_website_nav)) {
</select>
</div>
<div class="col-sm-5 <?php if ($information->ic_ht_area_type != 'c') {
<div class="col-sm-5 <?php
if ($information->ic_ht_area_type != 'c') {
echo 'hidden';
}
?>">
@ -799,7 +804,7 @@ if (!empty($setting_website_nav)) {
</div>
<div class="<?php
if ($information->ic_ht_area_type == 'c') {
if ($information->ic_ht_area_type == 'c') {
echo 'col-sm-4';
} else {
echo 'col-sm-9';
@ -818,11 +823,11 @@ if ($information->ic_ht_area_type == 'c') {
</div>
<?php // 有子节点时
<?php
// 有子节点时
$children_cnt = 0;
foreach ($informationList as $kin => $vin) {
if (in_array($information->is_id, explode(",", $vin->is_path))
&& $vin->status==1 && $vin->id != $information->is_id
if (in_array($information->is_id, explode(",", $vin->is_path)) && $vin->status == 1 && $vin->id != $information->is_id
) {
$children_cnt ++;
}
@ -861,7 +866,7 @@ if ($information->ic_ht_area_type == 'c') {
</div>
<?php }?>
<?php } ?>
<label>信息备注
@ -954,7 +959,7 @@ if ($information->ic_ht_area_type == 'c') {
</div>
<?php if (is_series_site()) {
<?php if (is_series_site()) {
?>
<div class="row">
<div class="col-sm-8">
@ -967,7 +972,7 @@ if ($information->ic_ht_area_type == 'c') {
</div>
<div class="col-sm-8">
<?php
$meta_subnavi_arr = array(
$meta_subnavi_arr = array(
'index' => '首页',
'tour' => '线路',
'dest' => '目的地',
@ -992,11 +997,11 @@ $meta_subnavi_arr = array(
<a href="javascript:void(0);" title="用于配置此信息对应的一级导航"><i class="text-muted glyphicon glyphicon-question-sign"></i></a>
</label>
<select name="meta_subnavi" id="meta_subnavi" class="form-control" >
<?php if ($meta_subnavi = get_meta($information->ic_id, 'meta_subnavi')) {?>
<?php if ($meta_subnavi = get_meta($information->ic_id, 'meta_subnavi')) { ?>
<option selected="selected" value="<?php echo $meta_subnavi; ?>"><?php echo $meta_subnavi_arr[$meta_subnavi]; ?></option>
<?php } else {?>
<?php } else { ?>
<option selected="selected" value="info"><?php echo $meta_subnavi_arr['info']; ?></option>
<?php }?>
<?php } ?>
<option value="index"><?php echo ($meta_subnavi_arr['index']); ?></option>
<option value="tour"><?php echo ($meta_subnavi_arr['tour']); ?></option>
<option value="dest"><?php echo ($meta_subnavi_arr['dest']); ?></option>
@ -1022,13 +1027,13 @@ $meta_subnavi_arr = array(
<a href="javascript:void(0);" title="用于配置是否在面包屑中显示Guide首页."><i class="text-muted glyphicon glyphicon-question-sign"></i></a>
</label>
<select name="meta_bread_showinfo" id="meta_bread_showinfo" class="form-control" >
<?php if (get_meta($information->ic_id, 'meta_bread_showinfo') == 'noshow') {?>
<?php if (get_meta($information->ic_id, 'meta_bread_showinfo') == 'noshow') { ?>
<option selected="selected" value="noshow">不显示</option>
<option value="show">显示</option>
<?php } else {?>
<?php } else { ?>
<option value="noshow">不显示</option>
<option selected="selected" value="show">显示</option>
<?php }?>
<?php } ?>
</select>
</div>
<div class="col-sm-8">
@ -1039,7 +1044,7 @@ $meta_subnavi_arr = array(
</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>
<?php if ($information->ic_ht_area_type == 'err') {?>
<?php if ($information->ic_ht_area_type == 'err') { ?>
<div class="col-sm-8">
<label>自定义样式
<a href="javascript:void(0);" onclick="meta('delete', '<?php echo $information->ic_id; ?>', 'meta_my_class', $('#meta_my_class').val())"><i class="text-muted glyphicon glyphicon-remove"></i></a>
@ -1061,11 +1066,11 @@ $meta_subnavi_arr = array(
</label>
<input class="form-control" type="text" name="meta_z_res" value="<?php echo get_meta($information->ic_id, 'meta_z_res'); ?>" id="meta_z_res"/>
</div>
<?php }?>
<?php } ?>
</div>
<?php }?>
<?php } ?>
<?php if ($information->ic_ht_area_type == 'g') {?>
<?php if ($information->ic_ht_area_type == 'g') { ?>
<div class="row">
@ -1106,7 +1111,7 @@ $meta_subnavi_arr = array(
</div>
</div>
<?php }?>
<?php } ?>
<div class="row">
<div class="col-sm-5">
<label>展示打赏功能
@ -1176,13 +1181,13 @@ $meta_subnavi_arr = array(
<label>信息类型</label>
<select name="ic_type" id="ic_type" class="form-control" onselect="" >
<?php
foreach ($infoTypeList as $key => $value) {
foreach ($infoTypeList as $key => $value) {
$value == $information->ic_type ? $select_str = 'selected' : $select_str = '';
?>
<option <?php echo $select_str; ?> value="<?php echo $value; ?>" ><?php echo $key; ?></option>
<?php }?>
<?php } ?>
</select>
<?php if ($rootInformation->ic_ht_area_type == 'pd') {?>
<?php if ($rootInformation->ic_ht_area_type == 'pd') { ?>
<div id="bind_product_code">
<br/>
<div class="input-group">
@ -1191,15 +1196,15 @@ foreach ($infoTypeList as $key => $value) {
<a href="javascript:void(0);" class="input-group-addon" onclick="meta('delete', '<?php echo $information->ic_id; ?>', 'meta_product_code', $('#meta_product_code').val())"><i class="text-muted glyphicon glyphtext-muted glyphicon glyphicon-remove"></i></a>
</div>
</div>
<?php }?>
<?php } ?>
<label style="width:48px;">模板</label>
<select name="ic_template" id="ic_template" class="form-control">
<?php
foreach ($templateList as $key => $value) {
foreach ($templateList as $key => $value) {
$value == $information->ic_template ? $select_str = 'selected' : $select_str = '';
?>
<option <?php echo $select_str; ?> value="<?php echo $value; ?>" ><?php echo $key; ?></option>
<?php }?>
<?php } ?>
</select>
<label>是否作为面包屑显示</label>
@ -1212,9 +1217,9 @@ foreach ($templateList as $key => $value) {
<select name="ic_author" id="ic_author" class="form-control">
<option value="" >-</option>
<?php
$userinfo = $this->session->userdata('session_admin');
$hasselected = false;
foreach ($editor_list as $editor_item) {
$userinfo = $this->session->userdata('session_admin');
$hasselected = false;
foreach ($editor_list as $editor_item) {
//mb_strtolower($editor_item->OPI_Code) == mb_strtolower($information->ic_author) ? $select_str = 'selected' : $select_str = '';
if (mb_strtolower($editor_item->OPI_Code) == mb_strtolower($information->ic_author)) {
$select_str = 'selected';
@ -1227,14 +1232,14 @@ foreach ($editor_list as $editor_item) {
}
?>
<option <?php echo $select_str; ?> value="<?php echo $editor_item->OPI_Code; ?>" ><?php echo $editor_item->OPI_Name; ?></option>
<?php }?>
<?php } ?>
<option value="" >-</option>
<?php
foreach ($author_list as $author_item) {
foreach ($author_list as $author_item) {
($author_item->a_id == $information->ic_author) ? $select_str = 'selected' : $select_str = '';
?>
<option <?php echo $select_str; ?> value="<?php echo $author_item->a_id; ?>" ><?php echo $author_item->a_name; ?></option>
<?php }?>
<?php } ?>
</select>
<label>是否发布</label>
@ -1254,13 +1259,13 @@ foreach ($author_list as $author_item) {
<input type="checkbox" name="ignore_url_check" id="ignore_url_check" />忽略URL重复
</label>
<div class="clearfix"></div>
<?php if (is_series_site() || ($this->config->item('site_code') == 'ah')) {?>
<?php if (is_series_site() || ($this->config->item('site_code') == 'ah')) { ?>
<label class="col-xs-24">本站会自动更新静态页面</label>
<?php } else {?>
<?php } else { ?>
<label class="checkbox col-xs-24" style="font-weight: normal;margin-top:0;padding-left: 21px;">
<input type="checkbox" name="auto_update_cache_checkbox" id="auto_update_cache_checkbox" onclick="get_update_cache_url();" value="<?php echo $information->ic_url; ?>" />静态更新
</label>
<?php }?>
<?php } ?>
<div class="clearfix"></div>
<p class="col-xs-24 nopadding">
@ -1271,21 +1276,23 @@ foreach ($author_list as $author_item) {
<!-- <a href="javascript:void();" class="btn btn-sm" id="goto_validator_button" target="_blank" onclick="goto_validator();" >HTML规范验证</a> -->
</p>
<div class="btn-group col-xs-24 nopadding pull-right <?php if ($is_writeable == 0) {
<div class="btn-group col-xs-24 nopadding pull-right <?php
if ($is_writeable == 0) {
echo 'hide';
}
?>">
}
?>">
<input type="hidden" name="rule_check_flag" id="rule_check_flag" value="1">
<a href="javascript:void(0);" class="btn btn-primary col-xs-19" onclick="editor.sync();
if (editor.html() != '' && editor.text() == '') {
alert('当前信息内容只包含空白标签请在编辑器HTML界面把空白代码标签去掉再保存');
return false;
};
}
;
//保存增加AMP判断 - lmr
<?php if (get_meta($information->ic_id, 'AMP_JSON') && get_meta($information->ic_id, 'AMP_STATUS')) {?>
<?php if (get_meta($information->ic_id, 'AMP_JSON') && get_meta($information->ic_id, 'AMP_STATUS')) { ?>
var amp_confirm = window.confirm('\n检测到页面存在AMP版本是否需要打开AMP编辑界面\n\r注意如果修改了PC端版本那么同时也需要修改AMP版本。\n');
if (amp_confirm) {
window.open('<?php echo($amp_build_url);?>', '_blank');
window.open('<?php echo($amp_build_url); ?>', '_blank');
}
<?php } ?>
if (information_check() != false) {
@ -1305,9 +1312,9 @@ foreach ($author_list as $author_item) {
<li class="dropdown-submenu pull-left">
<a id="history_log_toggle" tabindex="-1" href="javascript:void(0);">历史记录</a>
<ul class="dropdown-menu history_log" style="right: 157px;left: inherit;top: 83px;">
<?php foreach ($content_backup_list as $item) {?>
<?php foreach ($content_backup_list as $item) { ?>
<li><a href="<?php echo site_url('information/backup_content/' . $item->log_id); ?>" target="_blank"><?php echo $item->log_datetime ?>, <?php echo $item->log_ht_username ?></a></li>
<?php }?>
<?php } ?>
</ul>
</li>
</ul>

Loading…
Cancel
Save