|
|
@ -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);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|