reg($scope,$name,$_POST['def']); alert('添加成功'); go('/admin/scope.html'); }elseif ($m=="edit"){ if(empty($_POST))sysmsg('POST来的数据不能为空'); if(empty($_POST['name']))sysmsg('介绍不能为空'); if(empty($_GET['scope']))sysmsg('权限点不能为空'); $scope=$_GET['scope'];//改不了 $name=$_POST['name'];//空不了 $def=$_POST['def']; $account=new \auth\scope(); $account->edit($scope,$name,$_POST['def']); alert('修改成功'); go('/admin/scope.html'); }else{ alert('参数错误,请重新输入'); go('/admin/scope.html'); } admin_foot(); ?>