hotfix/远程访问多媒体中心
lmrwork 7 years ago
parent 4c664aef3f
commit b461f905b0

@ -11,6 +11,7 @@ class Info_amp extends CI_Controller
parent::__construct();
//$this->permission->is_admin();
$this->load->model('InfoMetas_model');
$this->load->model('InfoContents_model');
//CORS TEST
header('Access-Control-Allow-Origin:*');
}
@ -64,7 +65,7 @@ class Info_amp extends CI_Controller
} else {
echo json_encode(array(
"succ" => false,
"message" => "save_amp() -> Post para error."
"message" => "save_amp() -> 参数传递错误。"
));
}
}
@ -75,7 +76,7 @@ class Info_amp extends CI_Controller
if (!$icid) {
echo json_encode(array(
"succ" => false,
"message" => "load_amp() -> Post para error."
"message" => "load_amp() -> 参数传递错误。"
));
return false;
}
@ -91,7 +92,31 @@ class Info_amp extends CI_Controller
} else {
echo json_encode(array(
"succ" => false,
"message" => "load_amp() -> No data error."
"message" => "load_amp() -> 无数据返回。"
));
}
}
public function load_info()
{
$icid = $this->input->post('icid');
if ($icid) {
$ic = $this->InfoContents_model->get_ic_contents2($icid);
if ($ic) {
echo json_encode(array(
"succ" => true,
"info" => $ic->ic_content
));
} else {
echo json_encode(array(
"succ" => false,
"message" => "load_info() -> 无数据返回。"
));
}
} else {
echo json_encode(array(
"succ" => false,
"message" => "load_info() -> 参数传递错误。"
));
}
}

@ -124,6 +124,21 @@ class InfoContents_model extends CI_Model
}
}
public function get_ic_contents2($ic_id)
{
$sql="SELECT top 1 ic_id, ic_content from infoContents where ic_id=?";
$query=$this->HT->query($sql,array($ic_id));
if ($query->result())
{
$row = $query->row();
return $row;
}
else
{
return FALSE;
}
}
public function get_ic_contents_by_list($ic_id_list)
{
$ic_id_list=trim($ic_id_list);

Loading…
Cancel
Save