国内流行的内容管理系统(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.

39 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 DedeCMS.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. {
  15. $row = $dsql->GetOne("SELECT * FROM #@__admintype WHERE rank='".$rankid."'");
  16. if(is_array($row))
  17. {
  18. ShowMsg('你所创建的组别的级别值已存在,不允许重复!', '-1');
  19. exit();
  20. }
  21. if($rankid > 10)
  22. {
  23. ShowMsg('组级别值不能大于10, 否则一切权限设置均无效!', '-1');
  24. exit();
  25. }
  26. $AllPurviews = '';
  27. if(is_array($purviews))
  28. {
  29. foreach($purviews as $pur)
  30. {
  31. $AllPurviews = $pur.' ';
  32. }
  33. $AllPurviews = trim($AllPurviews);
  34. }
  35. $dsql->ExecuteNoneQuery("INSERT INTO #@__admintype(rank,typename,system,purviews) VALUES ('$rankid','$groupname', 0, '$AllPurviews');");
  36. ShowMsg("成功创建一个新的用户组!", "sys_group.php");
  37. exit();
  38. }
  39. include DedeInclude('templets/sys_group_add.htm');