save($Data)){ Tool_Fnc::ajaxMsg('操作失败'); } Tool_Fnc::ajaxMsg('操作成功',1); } public function listAction(){ $p = $_REQUEST; $page = $p['page']; $limit = $p['limit']; $type = $p['type']; $offset = ($page-1)*$limit; $AMD = new ActiveModel; $sql = "select * from active where type={$type} and status=1"; $count = $AMD->query($sql); $sql = "select * from active where type={$type} and status=1 order by id desc limit {$offset},{$limit} "; $data = $AMD->query($sql); foreach ($data as $key => &$val){ $val['content'] = strip_tags($val['content']); } $return['code'] = 0; $return['count'] = count($count); $return['data'] = $data; $return['msg'] = "成功"; echo json_encode($return);die; } }