|
|
|
@ -23,6 +23,14 @@ class Amplib {
|
|
|
|
|
if ($data['information'] == FALSE) {
|
|
|
|
|
show_404();
|
|
|
|
|
}
|
|
|
|
|
//查询上一次保存记录
|
|
|
|
|
$amp_log = $this->CI->Logs_model->get_last_edit_amp($ic_id);
|
|
|
|
|
if(!empty($amp_log)){
|
|
|
|
|
$data['last_edit_amp_id'] = $amp_log->log_id;
|
|
|
|
|
}else{
|
|
|
|
|
$data['last_edit_amp_id'] = '';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$this->CI->load->view('bootstrap3/header', $data);
|
|
|
|
|
$this->CI->load->view('amp_editor');
|
|
|
|
|
$this->CI->load->view('bootstrap3/footer');
|
|
|
|
@ -99,7 +107,7 @@ class Amplib {
|
|
|
|
|
$textarea_htmlcode = str_replace('<!--@CANONICAL@-->', $this->CI->config->item('site_url') . $data['information']->ic_url, $textarea_htmlcode);
|
|
|
|
|
|
|
|
|
|
//备份修改的代码
|
|
|
|
|
$this->CI->Logs_model->write('backup_amp', $ic_id, $textarea_htmlcode);
|
|
|
|
|
$this->CI->Logs_model->write('backup_amp', $ic_id, $textarea_htmlcode);
|
|
|
|
|
|
|
|
|
|
//AMP格式验证
|
|
|
|
|
if ($amp_status !== '0') {//只有发布的时候才需要验证
|
|
|
|
|