<?php
$conf_basedir	= "../../";	//相对主目录的位置
$conf_where		= "admin";	//选择调用相应模块
include_once($conf_basedir."base.inc.php");
checkAuth('1');	//判断登录和权限
$title = "系统权限管理";

$uid = intval($uid);

if($uid == 1)
{
	echo js_redirect("admin_manage.php", "超级管理员禁止操作！");
	exit;
}

if($todo == "del")
{
	$field = array('role'=>'base');
	$sswhere = " uid = '".$uid."' ";
	$dao_sys->update("admin_user", $field, $sswhere);
	echo js_redirect("admin_manage.php", "取消成功！");
	exit;
}
else
{
	$field = array('role'=>'admin');
	$sswhere = " uid = '".$uid."' ";
	$dao_sys->update("admin_user", $field, $sswhere);

	echo js_redirect("admin_manage.php", "设置成功！");
	exit;
}

?>