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

53 lines
1.9KB

  1. <?php
  2. /**
  3. * 会员权限管理
  4. *
  5. * @version $Id: member_rank.php 1 12:37 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('member_Type');
  13. if (empty($dopost)) $dopost = '';
  14. //保存更改
  15. if ($dopost == 'save') {
  16. $startID = 1;
  17. $endID = $idend;
  18. for (; $startID <= $endID; $startID++) {
  19. $query = '';
  20. $id = ${"ID_" . $startID};
  21. $name = ${"name_" . $startID};
  22. $rank = ${"rank_" . $startID};
  23. $money = ${"money_" . $startID};
  24. $scores = ${"scores_" . $startID};
  25. if (isset(${"check_" . $startID})) {
  26. if ($rank > 0) {
  27. $query = "UPDATE `#@__arcrank` SET membername='$name',money='$money',rank='$rank',scores='$scores' WHERE id='$id' ";
  28. }
  29. } else {
  30. $query = "DELETE FROM `#@__arcrank` WHERE id='$id' AND rank<>10";
  31. }
  32. if ($query != '') $dsql->ExecuteNoneQuery($query);
  33. }
  34. if (isset($check_new)) {
  35. if ($rank_new > 0 && $name_new != '' && $rank_new > 10) {
  36. $inquery = "INSERT INTO `#@__arcrank`(`rank`,`membername`,`adminrank`,`money`,`scores`,`purviews`) VALUES('$rank_new','$name_new','5','$money_new','$scores',''); ";
  37. $dsql->ExecuteNoneQuery($inquery);
  38. }
  39. }
  40. echo "<script> alert('成功更新会员等级表!'); </script>";
  41. }
  42. if ($dopost == 'del') {
  43. $dsql->ExecuteNoneQuery("DELETE FROM `#@__arcrank` WHERE id='$id' AND rank<>10");
  44. ShowMsg("删除成功!", "member_rank.php");
  45. exit();
  46. }
  47. $dsql->SetQuery("SELECT * FROM `#@__arcrank` WHERE rank>0 ORDER BY rank");
  48. $dsql->Execute();
  49. include DedeInclude('templets/member_rank.htm');