Welcome, Guest |
You have to register before you can post on our site.
|
Forum Statistics |
» Members: 133,833
» Latest member: Thesapphire
» Forum threads: 176,958
» Forum posts: 1,239,726
Full Statistics
|
|
|
problem locking page to usergroups |
Posted by: APag96 - 2010-08-31, 03:05 AM - Forum: 1.6 General Support
- Replies (4)
|
|
I am using the Page Manager plugin to create a banned users page.
I was able to get it working just fine. Now I only want to allow Admins, Mods, and Super-Mods to view the page. I added some validation code and now I keep getting the "You do not have permission to access this page..." error. I am logged in as an Admin. I see no problems with the code...
Here is my code:
<?php
global $headerinclude, $header, $theme, $footer, $lang;
if($mybb->user['usergroup'] != "4" || $mybb->user['usergroup'] != "3" || $mybb->user['usergroup'] != "6")
{
error_no_permission();
}
$lang->load('modcp');
$bannedquery = $db->simple_select("banned", "uid, admin, reason, dateline, lifted", "", array("order_by" => 'dateline', "order_dir" => 'DESC'));
if ($db->num_rows($bannedquery) > 0)
{
$bannedtablerows = "";
while ($ban = $db->fetch_array($bannedquery))
{
$banneduser = get_user($ban['uid']);
$banby = get_user($ban['admin']);
if ($ban['lifted'] > 0)
$unbandate = my_date($mybb->settings['dateformat'], $ban['lifted']);
else
$unbandate = $lang->never;
$bannedtablerows .= '<tr>
<td class="trow1">'. build_profile_link($banneduser['username'], $banneduser['uid']). '</td>
<td class="trow1">'. $ban['reason']. '</td>
<td class="trow1">'. build_profile_link($banby['username'], $banby['uid']). '</td>
<td class="trow1">'. my_date($mybb->settings['dateformat'], $ban['dateline']) .'</td>
<td class="trow1">'. $unbandate .'</td>
</tr>';
}
}
else
{
$bannedtablerows = '<tr><td class="trow1" colspan="5" align="center">'. $lang->no_banned .'</td></tr>';
}
$template='<html>
<head>
<title>'.$pages['name'].'</title>
{$headerinclude}
</head>
<body>
{$header}
<table border="0" cellspacing="1" cellpadding="4" class="tborder">
<tr><td class="thead" colspan="5"><strong>{$lang->ban_banned}</strong></td></tr>
<tr>
<td class="tcat"><span class="smalltext"><strong>{$lang->username}</strong></span></td>
<td class="tcat"><span class="smalltext"><strong>{$lang->reason}</strong></span></td>
<td class="tcat"><span class="smalltext"><strong>{$lang->ban_bannedby}</strong></span></td>
<td class="tcat"><span class="smalltext"><strong>{$lang->start_date}</strong></span></td>
<td class="tcat"><span class="smalltext"><strong>{$lang->end_date}</strong></span></td>
</tr>
{$bannedtablerows}
</table>
{$footer}
</body>
</html>';
$template=str_replace("\'", "'", addslashes($template));
add_breadcrumb($pages['name']);
eval("\$page=\"".$template."\";");
output_page($page);
?>
Could someone help me out here. There is simply something wrong with the if...then loop. 400+ views and not ONE comment. Wow...
|
|
|
"Access Denied" |
Posted by: Zash - 2010-08-31, 02:54 AM - Forum: 1.6 General Support
- Replies (13)
|
|
This forum is hosted on my server, and it's getting an error that I can't seem to figure out. When accessing any page in the root directory (index.php, showthread.php, etc.) it simply gives the message "Access Denied".
When accessing folders, like /admin/ or /images/ everything works fine. Nothing on the server seems to be causing the problem.
This is what the page is returning:
X-Powered-By: PHP/5.2.11
Set-Cookie: mybb[lastvisit]=1283223618; expires=Wed, 31-Aug-2011 03:00:18 GMT; path=/; domain=.sextoychat.com
Set-Cookie: mybb[lastactive]=1283223618; expires=Wed, 31-Aug-2011 03:00:18 GMT; path=/; domain=.sextoychat.com
Set-Cookie: sid=b802c071b5f7bd82523e2d45df296d22; path=/; domain=.sextoychat.com; HttpOnly
Content-type: text/html
Access Denied
The website (Once it is back online, it is potentially NSFW so warning): sextoychat.com
In addition, in the Admin CP User Management --> Edit User
The tab "Account Settings" gives access denied while Avatar, Signature, and Mod Options doesn't return anything.
|
|
|
Group Moderators? |
Posted by: SamHF - 2010-08-31, 02:40 AM - Forum: 1.6 General Support
- Replies (1)
|
|
Is there anyway I can set a certain group to moderator specific forums?
For example I want me reviewers group to moderate the submissions section, approve posts etc...
Thanks in advance,
~ SamHF
|
|
|
|