phpBB intergration
Posted: Tue Apr 12, 2005 2:12 pm
I am trying to create an admin section using the pbpBB login system. I have created a page that only shows if the person is logged in and there user_level is ADMIN. I now need to show only part of the page to a member of a specific user group but still letting ADMIN see the whole section. I know there is probably an easier or better way of doing this, but it works for now.
I now need to show the section between lines 34 & 42 if they belong to a specific group. The $member variable is called by a script called phpBB Fetch All
This just checks to see if the user is in the specified group. What do I need to change to get this working?
Code: Select all
<?php if ($userdata) {
if ($userdata['session_logged_in']) {
if ($userdata['user_level'] == ADMIN) { ?>
<!-- BEGIN: General Config -->
<div class="box">
<div>General Config</div>
<div class="boxmain">
· <a href="./index.php">Admin Home</a><br />
· <a href="./index.php?act=gens&do=setc">General Config</a>
</div>
<hr style="color: rgb(230, 230, 230);" width="80%" align="left" noshade="noshade" size="1" />
</div>
<!-- END: General Config -->
<!-- BEGIN: Categories Admin -->
<div class="box">
<div>Categories Admin</div>
<div class="boxmain">
· <a href="./index.php?act=mcat&do=lcat">List Categories</a><br />
· <a href="./index.php?act=mcat&do=ncat">New Category</a>
</div>
<hr style="color: rgb(230, 230, 230);" width="80%" align="left" noshade="noshade" size="1" />
</div>
<!-- END: Categories Admin -->
<!-- BEGIN: Sub Categories Admin -->
<div class="box">
<div>Sub Categories Admin</div>
<div class="boxmain">
· <a href="./index.php?act=scat&do=lcat">List Sub Categories</a><br />
· <a href="./index.php?act=scat&do=nscat">New Sub Category</a>
</div>
<hr style="color: rgb(230, 230, 230);" width="80%" align="left" noshade="noshade" size="1" />
</div>
<!-- END: Sub Categories Admin -->
<?php if ($member) { ?>
<!-- BEGIN: New Submissions Admin -->
<div class="box">
<div>New Submissions Admin</div>
<div class="boxmain">
· <a href="./index.php?act=nsub&do=new">New Submissions</a>
</div>
<hr style="color: rgb(230, 230, 230);" width="80%" align="left" noshade="noshade" size="1" />
</div>
<!-- END: New Submissions Admin -->
<!-- END: Left column -->
<?php } } } else { echo 'ADMIN ONLY, SORRY!!'; } }?>Code: Select all
$member = phpbb_fetch_users(7);This just checks to see if the user is in the specified group. What do I need to change to get this working?