This commit is contained in:
2022-06-13 23:37:17 +08:00
parent d21608a860
commit 0230cb42a2
153 changed files with 62907 additions and 0 deletions

36
app/admin/scopesubmit.php Normal file
View File

@@ -0,0 +1,36 @@
<?php
include INDEX_ROOT.'admin/head.php';
admin_head('部门处理层');
$m=$_GET['m'];
if($m=='new'){
if(empty($_POST))sysmsg('POST来的数据不能为空');
if(empty($_POST['name']))sysmsg('介绍不能为空');
if(empty($_POST['scope']))sysmsg('权限点不能为空');
$name=$_POST['name'];
$scope=$_POST['scope'];
$account=new \auth\scope();
$account->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();
?>