You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
858 B
25 lines
858 B
7 months ago
|
<?php
|
||
|
class Admin_RemindController extends Ctrl_Admin{
|
||
|
public function indexAction(){
|
||
|
|
||
|
}
|
||
|
public function getlistAction(){
|
||
|
$RemindModel = new RemindModel();
|
||
|
$p = $_REQUEST;
|
||
|
$page = $p['page'];
|
||
|
$limit = $p['limit'];
|
||
|
$offset = ($page-1)*$limit;
|
||
|
$sql = "select * from {$RemindModel->table} where is_delete=0";
|
||
|
$count = $RemindModel->query($sql);
|
||
|
$sql = "select * from {$RemindModel->table} where is_delete=0 order by id desc limit {$offset},{$limit} ";
|
||
|
$data = $RemindModel->query($sql);
|
||
|
foreach($data as $key => &$val){
|
||
|
$val['sex'] = $val['sex']==1?'公':'母';
|
||
|
}
|
||
|
$return['code'] = 0;
|
||
|
$return['count'] = count($count);
|
||
|
$return['data'] = $data;
|
||
|
$return['msg'] = "成功";
|
||
|
echo json_encode($return);die;
|
||
|
}
|
||
|
}
|