<?php

//禁止直接访问
!defined('IN_SYSTEM') && exit('Access Denied');

//连接到MYSQL并打开系统数据库
$DataBase->open_db();

//查询管理员信息
$DataBase->sel('adminuser', "ORDER BY `id` ASC");

//关闭数据库连接
$DataBase->close_dblink();

foreach($DataBase->Result as $k => $v){
	unset($DataBase->Result[$k]['password']);
	unset($DataBase->Result[$k]['key']);
	if($DataBase->Result[$k]['grade'] == 0){
		$DataBase->Result[$k]['grade_text'] = '系统管理员';
	}
	if($DataBase->Result[$k]['grade'] == 1){
		$DataBase->Result[$k]['grade_text'] = '普通管理员';
	}	
}

//将用户信息赋值给模板
$smarty->assign('AdminUser', $DataBase->Result);

?>