Exemplo n.º 1
0
* 用户分类
* php>=5.0
* @author LEI
* @version 1.1.2
* @time 20111004
*/
//初始化
$pagetitle = '用户分类';
$pagepower = 'users';
//基本部分
require 'checkpower.inc.php';
//功能部分
include WEB_MOD . 'users.class.php';
$users = new Users();
include WEB_MOD . 'users_class.class.php';
$users_class = new Users_class();
switch ($a) {
    case 'list':
    default:
        //list
        $List = $users_class->GetList(array('id', 'title'));
        //$List = $CL->arraySet($List,0);
        $templatefile = 'users_class_list.tpl.php';
        break;
    case 'edit':
        //
        if (isset($submit)) {
            $info = array();
            $time = time();
            if (isset($id)) {
                $id = intval($id);
Exemplo n.º 2
0
* 用户
* php>=5.0
* @author LEI
* @version 1.1.2
* @time 20111004
*/
//初始化
$pagetitle = '用户';
$pagepower = 'users';
//基本部分
require 'checkpower.inc.php';
//功能部分
include WEB_MOD . 'users.class.php';
$users = new Users();
include WEB_MOD . 'users_class.class.php';
$users_class = new Users_class();
switch ($a) {
    case 'list':
    default:
        //list
        $pageListNum = 12;
        //每页显示
        $totalPage = 0;
        //总页数
        $page = isset($page) ? (int) $page : 1;
        $start = ($page - 1) * $pageListNum;
        $List = $users->GetList(array('id', 'username', 'classid'), $start, $pageListNum, '', 'id desc');
        include WEB_INC . "page.class.php";
        $sqlNum = "select id from {tablepre}users";
        $db->Execute($sqlNum);
        $pageNum = $db->GetRsNum();