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.
22 lines
704 B
22 lines
704 B
6 months ago
|
<?php
|
||
|
class Admin_GeneController extends Ctrl_Admin{
|
||
|
public function indexAction(){
|
||
|
|
||
|
}
|
||
|
public function getlistAction(){
|
||
|
$GeneModel = new GeneModel();
|
||
|
$p = $_REQUEST;
|
||
|
$page = $p['page'];
|
||
|
$limit = $p['limit'];
|
||
|
$offset = ($page-1)*$limit;
|
||
|
$sql = "select * from {$GeneModel->table} ";
|
||
|
$count = $GeneModel->query($sql);
|
||
|
$sql = "select * from {$GeneModel->table} order by id desc limit {$offset},{$limit} ";
|
||
|
$data = $GeneModel->query($sql);
|
||
|
$return['code'] = 0;
|
||
|
$return['count'] = count($count);
|
||
|
$return['data'] = $data;
|
||
|
$return['msg'] = "成功";
|
||
|
echo json_encode($return);die;
|
||
|
}
|
||
|
}
|