master
LMR 1 year ago
parent e14baeecfa
commit 76f1d93ce6

@ -10,6 +10,8 @@ class infofix extends CI_Controller
{ {
parent::__construct(); parent::__construct();
$this->load->model('Information_model'); $this->load->model('Information_model');
$this->load->model('infoContents_model');
$this->load->model('logs_model');
$this->site_code = $this->input->get('site_code') ? $this->input->get('site_code') : $this->config->item('site_code'); $this->site_code = $this->input->get('site_code') ? $this->input->get('site_code') : $this->config->item('site_code');
} }
@ -104,18 +106,29 @@ class infofix extends CI_Controller
// json参数 // json参数
$site = $this->input->get_post('site'); $site = $this->input->get_post('site');
$keys = $this->input->get_post('keys'); $keys = $this->input->get_post('keys');
$keyArr = explode('@', $keys); $keyArr = explode('@', $keys); // 250000343@oldurl@newurl@
sleep(3); sleep(2);
echo json_encode($keyArr); echo ($keys);
return true; return true;
// 容错 // 容错
if (empty($site) || empty($keys) || strpos($keys, '/') === false) { if (empty($site) || count($keyArr) != 4 || strpos($keys, '/') === false) {
echo json_encode(array()); echo json_encode(array());
return false; return false;
} }
// 参数解析
$ic_id = $keyArr[0];
$oldStr = $keyArr[1];
$newStr = $keyArr[2];
$is_id = $keyArr[3];
// 先备份
//$this->logs_model->backup()
//$ic = $this->infoContents_model->get_ic_contents2($ic_id);
//$ic->info_content = mb_str_replace($oldStr, $newStr, $keyArr);
} }
} }

@ -799,7 +799,7 @@ class Information_model extends CI_Model
} }
$search = ' AND (1=0 ' . $keysql . ')'; $search = ' AND (1=0 ' . $keysql . ')';
$sql = " $sql = "
SELECT ic_id, ic_url, ic_content, m1.im_value AS amp_json, m2.im_value AS amp_body SELECT is_id, ic_id, ic_url, ic_content, m1.im_value AS amp_json, m2.im_value AS amp_body
FROM infoStructures is1 FROM infoStructures is1
INNER JOIN infoContents ic INNER JOIN infoContents ic
ON ic.ic_id = is1.is_ic_id ON ic.ic_id = is1.is_ic_id

Loading…
Cancel
Save