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

40 lines
1.3KB

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