Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

dbarray problem

Asked Modified Viewed 1,554 times
C
chrome511
C
sorry for my english.
i´m from germany
  • Member, joined since
  • Contributed 73 posts on the community forums.
  • Started 18 threads in the forums
  • Started this discussions
asked
Member

hello i have a problem with my dbarray in "admin_reset.php".

i have added a new usergroup called Moderator but the dbarray
$result = dbquery("SELECT user_id, user_name, user_level FROM ".DB_USERS." WHERE user_level>='102' ORDER BY user_level DESC, user_name");
while ($data = dbarray($result)) {
   $reset_opts .= "<option value='".$data['user_id']."'>".$data['user_name']." ".($data['user_level'] == 103 ? "(A)" : "(SA)")."</option>\n";
}

only shows (A) but the user is a Moderator (M).

how must i edit these that the usergroup 102 (Moderators) is (M), 103 (Admin) is (A) and 104 (Siteadmin) is (SA)?

sorry for my english i'm from germany.
0 replies

2 posts

C
Chan
C
Chan 0
Lead Developer of PHP-Fusion
  • Super Admin, joined since
  • Contributed 3,842 posts on the community forums.
  • Started 232 threads in the forums
  • Answered 6 questions
answered
Super Admin


while ($data = dbarray($result)) {

if ($data['user_level'] == 104) {
$this_user_level = "(SA)";
} elseif ($data['user_level'] == 103 {
$this_user_level = "(A)";
} else {
$this_user_level = "(M)";
}   

$reset_opts .= "<option value='".$data['user_id']."'>".$data['user_name']." ".$this_user_level."</option>\n";
}


First time I see a 104. :D
0 replies
C
chrome511
C
sorry for my english.
i´m from germany
  • Member, joined since
  • Contributed 73 posts on the community forums.
  • Started 18 threads in the forums
  • Started this discussions
answered
Member

the reason is that i have the system modified and added a usergroup called Moderator.
moderator have 102 so admin has moved to 103 and siteadmin to 104 and iMOD (Forum) is 105

in this system there was NO MODERATOR.
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 2 posts
  • Votes 0 votes
  • Topic users 2 members

2 participants

C
C
Chan 0
Lead Developer of PHP-Fusion
  • Super Admin, joined since
  • Contributed 3,842 posts on the community forums.
  • Started 232 threads in the forums
  • Answered 6 questions
C
C
sorry for my english.
i´m from germany
  • Member, joined since
  • Contributed 73 posts on the community forums.
  • Started 18 threads in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet