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

if($todo == "modify")
{
	$id = intval($id);
	$auth = implode(";", $auth);
	$sql = "UPDATE admin_user_group SET auth = '".$auth."' WHERE id = '".$id."' and id > 9";
	$db_sys->Execute($sql);

	echo js_redirect("group_manage.php", "修改成功！");
	exit;
}
else
{
	$sql = "INSERT INTO admin_user_group (groupname,valid_group,auth,city) VALUES('".$groupname."',1,'','".$city."')";
	$db_sys->Execute($sql);

	echo js_redirect("group_manage.php", "创建成功！");
	exit;
}

?>