国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.2KB

  1. <?php
  2. /**
  3. * 系统权限组添加
  4. *
  5. * @version $Id: sys_group_add.php 1 22:28 2010年7月20日Z tianya $
  6. * @package DedeBIZ.Administrator
  7. * @copyright Copyright (c) 2020, DedeBIZ.COM
  8. * @license https://www.dedebiz.com/license
  9. * @link https://www.dedebiz.com
  10. */
  11. require_once(dirname(__FILE__) . "/config.php");
  12. CheckPurview('sys_Group');
  13. if (!empty($dopost)) {
  14. $row = $dsql->GetOne("SELECT * FROM #@__admintype WHERE rank='" . $rankid . "'");
  15. if (is_array($row)) {
  16. ShowMsg('你所创建的组别的级别值已存在,不允许重复!', '-1');
  17. exit();
  18. }
  19. if ($rankid > 10) {
  20. ShowMsg('组级别值不能大于10, 否则一切权限设置均无效!', '-1');
  21. exit();
  22. }
  23. $AllPurviews = '';
  24. if (is_array($purviews)) {
  25. foreach ($purviews as $pur) {
  26. $AllPurviews = $pur . ' ';
  27. }
  28. $AllPurviews = trim($AllPurviews);
  29. }
  30. $dsql->ExecuteNoneQuery("INSERT INTO #@__admintype(rank,typename,system,purviews) VALUES ('$rankid','$groupname', 0, '$AllPurviews');");
  31. ShowMsg("成功创建一个新的用户组!", "sys_group.php");
  32. exit();
  33. }
  34. include DedeInclude('templets/sys_group_add.htm');