Beispiel #1
0
*/
//初始化
$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);
                if ($id <= 0) {
                    errorinfo('变量错误', '');
                }
            }
            $info = array('title' => $title);
Beispiel #2
0
             }
         }
     } else {
         $info = array();
         $time = time();
         if (isset($id)) {
             $id = intval($id);
             if ($id <= 0) {
                 errorinfo('变量错误', '');
             }
             $info = $users->GetInfo('', ' id = ' . $id);
             if (empty($info)) {
                 errorinfo('变量错误', '');
             }
         }
         $classList = $users_class->GetList();
         if (isset($info['power'])) {
             $power = array();
             $power = explode(",", $info['power']);
             foreach ($power as $key => $value) {
                 $power_list[$value] = true;
             }
         }
         $templatefile = 'users_edit.tpl.php';
     }
     break;
 case 'search':
     //
     break;
 case 'show':
     //