Hello everyone and happy christmas,

I have a virtual pet website which has multiple level users, or if you like, different ranks from 1 - 10.

1 is suspended and 10 is master admin.

I have worked out how to give access to an admin page for users with the rank 6 and above for example but want to be able to say only members with ranks 6 and for example 7 and 10 can only access a admin page. I want to beable to individually give each level access to certain pages.


Here is the code for a particular page:

<?php

/*
Admin Main (admin.php)
*/

$page_title = "admin_access6.php";
$rank_check ==6;
include "../header.inc.php";

print "$openHTML";

$credit = $getGame[credit] / 100;

ECHO <<<END

As you can see this is setting this page access to ONLY level 6 due to the double ==. If it was a single = like $rank_check =6; then this would allow all ranks and levels of 6 and above access it.

So how would I make it so thatI could add allocated multiple levels to have access.

Would be much apprcieated any advice :)

Thank you kindly
Merry Christmas Everyone

Justin

Recommended Answers

All 20 Replies

Orig. code:

<?php

/*
Admin Main (admin.php)
*/

$page_title = "admin_access6.php";
$rank_check ==6;
include "../header.inc.php";

print "$openHTML";

$credit = $getGame[credit] / 100;

ECHO <<<END

As you can see this is setting this page access to ONLY level 6 due to the double ==.

The '==' operator checks for equality between two values; it does not assign a value to a variable. To assign a value to a variable, use the '=' operator.

Assuming that you have a variable named $rand_check and its value is 6, the line: $rank_check ==6; is the equivalent of this: TRUE; , which, though valid syntax, has no effect on logic of your code. If $rand_check is not actually set to 6, then $rank_check ==6; is the equivalent of this: FALSE; , which is, again, valid but totally pointless.

You need to do conditional processing based on the value of $rank_check. Code to follow.

If it was a single = like $rank_check =6; then this would allow all ranks and levels of 6 and above access it.

So how would I make it so thatI could add allocated multiple levels to have access.

Adapt as needed:

<?php
$page_title = "admin_access6.php";

if($rank_check == 6 || $rank_check == 7 || $rank_check == 8){
    include "../header.inc.php";

    print "$openHTML";

    $credit = $getGame[credit] / 100;

    ECHO <<<END
}

Thank you so much for your help.

I did try to include what you said but when I did I get the following error:

Parse error: syntax error, unexpected $end in /home/cyberpet/public_html/admin/admin_access6.php on line 517

The code on line 517 is:

print "$closeHTML";

I am very new to php so trying to understand what you said!:O)

Kind Regards
Justin

You have to make sure that you have the closing curly brace (i.e., } ) at bottom of your file. (It came from the IF statement I introduced.)

Also, not sure why you're doing this: ECHO <<<END , but try removing it.

For some reason I cannot get it to work. I have played around with the code and have coe up with this ..

<?php

$page_title = "admin_access6.php";
$rank_check == 6 || $rank_check == 7 || $rank_check == 8;

include "../header.inc.php";

print "$openHTML";

$credit = $getGame[credit] / 100;

ECHO <<<END

However, this doesnt work as it lets a level 10 access this page.

I see what you mean by having the if $rank check but this doesnt seem to work. I could use that to show/not the link to the page further on in the script but want to stop/allow actual access to viewing the page!

Please Help! lol
Kind Regards
Justin

Try this:

<?php

$page_title = "admin_access6.php";
if($rank_check != 6 && $rank_check != 7 && $rank_check != 8){
    exit;
}
include "../header.inc.php";

print "$openHTML";

$credit = $getGame[credit] / 100;

ECHO <<<END

I realize your understanding of PHP is low, but the line from your code: $rank_check == 6 || $rank_check == 7 || $rank_check == 8; does not do what you think it does. In fact, it doesn't do anything at all (in terms of conditional processing).

Thanks for being so patient bill.

I have included the entire document as im getting confused. I have included your latest butI get the following error:

Parse error: syntax error, unexpected $end in /home/cyberpet/public_html/admin/admin_access6.php on line 510

<?php
$page_title = "admin_access6.php";
if($rank_check != 6 && $rank_check != 7 && $rank_check != 8){
exit;
}
include "../header.inc.php";
print "$openHTML";
$credit = $getGame[credit] / 100;
ECHO <<<END


<script type="text/javascript" src="http://forms.aweber.com/form/72/188557372.js"></script>

<body bgcolor="#FFFFFF">

<CENTER>


<table border="0" cellpadding="0" cellspacing="5" style="border-collapse: collapse" bordercolor="#111111" width="100%" height="1082">
  <tr>
    <td width="100%" colspan="7" height="207">
    <p style="margin: 0 25" align="center"><b>
    <font face="Arial" size="7" color="#FF0000">CPC ACCESS RIGHTS</font></b><p style="margin: 0 25" align="center"><font face="Arial">
      
    <font size="6"><b>-RESTRICTED- LEVEL 6 - </b></font></font>
    <p style="margin: 0 25" align="center"><font face="Arial">
      
    <font size="4"><b>[STAFF GENERAL]</b></font></font><p style="margin: 0 25" align="center"><font face="Arial">
      
    <p style="margin: 0 25"><font face="Arial">You are now in the administration 
    panel for CPC and can access your given areas. You will see there is an 
    instruction manual which <u><b>MUST</b></u> be read <b><u>BEFORE</u> using 
    any access rights</b>. If you are found to have misused them, then you risk 
    loosing your account at CPC. IP addresses are recorded for every action 
    taken so please be cautious. If unsure then please speak to a senior level 
    member of staff or veganlad, the Founder. </font></td>
  </tr>
  <tr>
    <td width="2%" height="19">&nbsp;</td>
    <td width="17%" height="19">&nbsp;</td>
    <td width="53%" height="19">&nbsp;</td>
    <td width="1%" height="19">&nbsp;</td>
    <td width="14%" height="19">&nbsp;</td>
    <td width="6%" height="19">&nbsp;</td>
    <td width="7%" height="19">&nbsp;</td>
  </tr>
  <tr>
    <td width="2%" height="19">&nbsp;</td>
    <td width="17%" bgcolor="#FFCC66" height="19"><b><u><font face="Arial">Tool Name</font></u></b></td>
    <td width="53%" bgcolor="#FFCC66" height="19"><b><u><font face="Arial">Description</font></u></b></td>
    <td width="1%" bgcolor="#FFCC66" height="19">&nbsp;</td>
    <td width="14%" bgcolor="#FFCC66" height="19"><b><font face="Arial">Min User Level</font></b></td>
    <td width="6%" bgcolor="#FFCC66" height="19">&nbsp;</td>
    <td width="7%" height="19">&nbsp;</td>
  </tr>
  <tr>
    <td width="2%" height="19">&nbsp;</td>
    <td width="17%" height="19">&nbsp;</td>
    <td width="53%" height="19">&nbsp;</td>
    <td width="1%" height="19">&nbsp;</td>
    <td width="14%" height="19">&nbsp;</td>
    <td width="6%" height="19">&nbsp;</td>
    <td width="7%" height="19">&nbsp;</td>
  </tr>
  <tr>
    <td width="2%" height="1"></td>
    <td width="17%" height="1">
    <font face="Arial" style="text-decoration: underline; font-weight: 700" size="2">
    News &amp; Update Tools</font></td>
    <td width="53%" height="1"></td>
    <td width="1%" height="1"></td>
    <td width="14%" height="1"></td>
    <td width="6%" height="1"></td>
    <td width="7%" height="1"></td>
  </tr>
  <tr>
    <td width="2%" height="56">&nbsp;</td>
    <td width="17%" height="56" align="left" bgcolor="#FFFFCC">
    <p style="margin-top: 0; margin-bottom: 0">
    <font color="#0000FF">
    <font face="Arial" style="font-size: 11pt">&nbsp;</font><font face="Verdana" style="font-size: 9pt">
    </font></font>
    <font face="Verdana" style="font-size: 9pt">              <A HREF="admin_add_update.php?game=$game">Add Update </A>
    </font></td>
    <td width="53%" valign="top" height="56" bgcolor="#FFFFCC"><font face="Verdana" style="font-size: 9pt">
    This tool is used to add an update to the Updates Page and should be used 
    for general announcements, winners of competitions, lottery winners, new 
    features and the latest news. However, the daily CPC news should be used for 
    less important messages.</font></td>
    <td width="1%" valign="top" height="56" bgcolor="#FFFFCC">&nbsp;</td>
    <td width="14%" height="56" bgcolor="#FFFFCC">
    <p align="center" style="margin-top: 0; margin-bottom: 0"><b>
    <font face="Arial" size="2" color="#999999">Level 6 - </font></b>
    <p align="center" style="margin-top: 0; margin-bottom: 0"><b>
    <font face="Arial" color="#999999" size="2">Staff general</font></b></td>
    <td width="6%" valign="top" height="56" bgcolor="#FFFFCC">
    <p align="center">&nbsp;</td>
    <td width="7%" valign="top" height="56">&nbsp;</td>
  </tr>
  <tr>
    <td width="2%" height="35">&nbsp;</td>
    <td width="17%" bgcolor="#FFFFCC" height="35" align="left">
    <font color="#0000FF" face="Arial" style="font-size: 11pt">&nbsp;</font><font style="font-size: 9pt" face="Verdana"><A HREF="admin_headlines.php?game=$game">News Headlines</A></font></td>
    <td width="53%" valign="top" bgcolor="#FFFFCC" height="35">
    <font face="Verdana" style="font-size: 9pt">Used to add up to a maximum of 3 
    Headlines. You should add a log in the e-group stating what you have changed 
    it from and what the new headline is.</font></td>
    <td width="1%" valign="top" bgcolor="#FFFFCC" height="35">&nbsp;</td>
    <td width="14%" bgcolor="#FFFFCC" height="35">
    <p align="center" style="margin-top: 0; margin-bottom: 0">
    <font color="#808080">&nbsp;&nbsp; </font><font color="#666666">&nbsp;
    </font><b><font face="Arial" size="2" color="#666666">Level 7 - </font></b>
    </p>
    <p align="center" style="margin-top: 0; margin-bottom: 0"><b>
    <font face="Arial" size="2" color="#666666">Staff Development</font></b></td>
    <td width="6%" valign="top" bgcolor="#FFFFCC" height="35">&nbsp;</td>
    <td width="7%" valign="top" height="35">&nbsp;</td>
  </tr>
  <tr>
    <td width="2%" align="center" height="32">&nbsp;</td>
    <td width="17%" align="left" height="32" bgcolor="#FFFFCC">
    <p align="left"> 
              <font face="Verdana" style="font-size: 9pt"> 
              <font color="#0000FF">&nbsp;</font><A HREF="admin_customize_pages.php?game=$game">Customize Pages</A><font color="#0000FF">
    </font>
              </font> 
            </td>
    <td width="53%" valign="top" height="32" bgcolor="#FFFFCC">
    <font face="Verdana" style="font-size: 9pt">Allows you to customize the main 
    content and layout of main pages within the website. Only to be done with 
    permission (from founder/admin level)</font></td>
    <td width="1%" valign="top" height="32" bgcolor="#FFFFCC">&nbsp;</td>
    <td width="14%" height="32" bgcolor="#FFFFCC">
    <p align="center" style="margin-top: 0; margin-bottom: 0"><b>
    <font face="Arial" size="2" color="#FF6600">Level 8 - </font></b></p>
    <p align="center" style="margin-top: 0; margin-bottom: 0"><b>
    <font face="Arial" size="2" color="#FF6600">Staff Technical</font></b></td>
    <td width="6%" valign="top" height="32" bgcolor="#FFFFCC">&nbsp;</td>
    <td width="7%" valign="top" height="32">&nbsp;</td>
  </tr>
  <tr>
    <td width="2%" height="19">&nbsp;</td>
    <td width="17%" height="19" bgcolor="#FFFFCC" align="left"> 
              <font face="Verdana" style="font-size: 9pt"> 
              <font color="#0000FF">&nbsp;</font><A HREF="cust_codes.php?game=$game">Customization Codes</A><font color="#0000FF">
    </font> </font> </td>
    <td width="53%" valign="top" height="19" bgcolor="#FFFFCC">
    <font face="Verdana" style="font-size: 9pt">These are codes that can be used 
    in communication/web pages to members although only in content under this 
    domain. </font></td>
    <td width="1%" valign="top" height="19" bgcolor="#FFFFCC">&nbsp;</td>
    <td width="14%" height="19" bgcolor="#FFFFCC">
    <p align="center" style="margin-top: 0; margin-bottom: 0"><b>
    <font face="Arial" size="2" color="#999999">Level 6 - </font></b>
    <p align="center" style="margin-top: 0; margin-bottom: 0"><b>
    <font face="Arial" color="#999999" size="2">Staff general</font></b></td>
    <td width="6%" valign="top" height="19" bgcolor="#FFFFCC">&nbsp;</td>
    <td width="7%" valign="top" height="19">&nbsp;</td>
  </tr>
  <tr>
    <td width="2%" height="19">&nbsp;</td>
    <td width="17%" height="19">&nbsp;</td>
    <td width="53%" valign="top" height="19">&nbsp;</td>
    <td width="1%" valign="top" height="19">&nbsp;</td>
    <td width="14%" height="19">&nbsp;</td>
    <td width="6%" valign="top" height="19">&nbsp;</td>
    <td width="7%" valign="top" height="19">&nbsp;</td>
  </tr>
  <tr>
    <td width="2%" height="19">&nbsp;</td>
    <td width="17%" height="19">
    <span style="font-weight: 700; text-decoration: underline">
    <font face="Arial" size="2">Forums</font></span></td>
    <td width="53%" valign="top" height="19">&nbsp;</td>
    <td width="1%" valign="top" height="19">&nbsp;</td>
    <td width="14%" height="19">&nbsp;</td>
    <td width="6%" valign="top" height="19">&nbsp;</td>
    <td width="7%" valign="top" height="19">&nbsp;</td>
  </tr>
  <tr>
    <td width="2%" height="19">&nbsp;</td>
    <td width="17%" height="19" bgcolor="#FFFFCC"> 
              <font face="Arial" size="2"> 
              <A HREF="admin_add_cat.php?game=$game">Add Category</A><font color="#0000FF">
    </font> </font> </td>
    <td width="53%" valign="top" height="19" bgcolor="#FFFFCC">
    <font face="Verdana" style="font-size: 9pt">To add a category to the Forum 
    board simply click here and follow the instructions. Again, please post a 
    message stating the name and desc. of any Categories made to the e-group.
    </font></td>
    <td width="1%" valign="top" height="19" bgcolor="#FFFFCC">&nbsp;</td>
    <td width="14%" height="19" bgcolor="#FFFFCC">
    <p align="center" style="margin-top: 0; margin-bottom: 0"><b>
    <font face="Arial" size="2" color="#999999">Level 6 - </font></b>
    <p align="center" style="margin-top: 0; margin-bottom: 0"><b>
    <font face="Arial" color="#999999" size="2">Staff general</font></b></td>
    <td width="6%" valign="top" height="19">&nbsp;</td>
    <td width="7%" valign="top" height="19">&nbsp;</td>
  </tr>
  <tr>
    <td width="2%" height="19">&nbsp;</td>
    <td width="17%" height="19">&nbsp;</td>
    <td width="53%" valign="top" height="19">&nbsp;</td>
    <td width="1%" valign="top" height="19">&nbsp;</td>
    <td width="14%" height="19">&nbsp;</td>
    <td width="6%" valign="top" height="19">&nbsp;</td>
    <td width="7%" valign="top" height="19">&nbsp;</td>
  </tr>
  <tr>
    <td width="2%" height="19">&nbsp;</td>
    <td width="17%" height="19">&nbsp;</td>
    <td width="53%" valign="top" height="19">&nbsp;</td>
    <td width="1%" valign="top" height="19">&nbsp;</td>
    <td width="14%" height="19">&nbsp;</td>
    <td width="6%" valign="top" height="19">&nbsp;</td>
    <td width="7%" valign="top" height="19">&nbsp;</td>
  </tr>
  <tr>
    <td width="2%" height="19">&nbsp;</td>
    <td width="17%" height="19"><u><b><font face="Arial" size="2">Security Tools</font></b></u></td>
    <td width="53%" valign="top" height="19">
    <font face="Verdana" style="font-size: 9pt" color="#EB3834"><u><b>Use with 
    caution!</b></u><i> Misuse will result in disciplinary action. Always 
    screenshot evidence!</i></font></td>
    <td width="1%" valign="top" height="19">&nbsp;</td>
    <td width="14%" height="19">&nbsp;</td>
    <td width="6%" valign="top" height="19">&nbsp;</td>
    <td width="7%" valign="top" height="19">&nbsp;</td>
  </tr>
  <tr>
    <td width="2%" height="19">&nbsp;</td>
    <td width="17%" height="19" bgcolor="#FFFFCC"> 
              <font face="Arial" size="2"> 
              <A HREF="admin_delete_cat.php?game=$game">Delete Category</A><font color="#0000FF">
    </font>
              </font> </td>
    <td width="53%" valign="top" height="19" bgcolor="#FFFFCC">
    <font face="Verdana" style="font-size: 9pt">To be used with caution. If you 
    are required to delete a category for a security reason then please do so 
    but first take a screen shot of any abusive evidence and send to the Founder 
    immediately on deletion. </font></td>
    <td width="1%" valign="top" height="19" bgcolor="#FFFFCC">&nbsp;</td>
    <td width="14%" height="19" bgcolor="#FFFFCC">
    <p align="center" style="margin-top: 0; margin-bottom: 0"><b>
    <font face="Arial" size="2" color="#999999">Level 6 - </font></b>
    <p align="center" style="margin-top: 0; margin-bottom: 0"><b>
    <font face="Arial" color="#999999" size="2">Staff general</font></b></td>
    <td width="6%" valign="top" height="19" bgcolor="#FFFFCC">&nbsp;</td>
    <td width="7%" valign="top" height="19">&nbsp;</td>
  </tr>
  <tr>
    <td width="2%" height="19">&nbsp;</td>
    <td width="17%" height="19" bgcolor="#FFFFCC"> 
              <font face="Arial" size="2"> 
              <A HREF="admin_select_cat.php?game=$game">Edit/Delete Postings</A><font color="#0000FF">
    </font>
              </font> </td>
    <td width="53%" valign="top" height="19" bgcolor="#FFFFCC">
    <font face="Verdana" style="font-size: 9pt">Can be used to delete postings 
    should someone post an unacceptable message. Again, if this happens and you 
    are required to delete a message then you MUST first of all take a screen 
    shot and send it to the Founder upon deletion. Also send the user a warning 
    message and request them to look at the rules.</font></td>
    <td width="1%" valign="top" height="19" bgcolor="#FFFFCC">&nbsp;</td>
    <td width="14%" height="19" bgcolor="#FFFFCC">
    <p align="center" style="margin-top: 0; margin-bottom: 0"><b>
    <font face="Arial" size="2" color="#C0C0C0">Level 5 - </font></b>
    <p align="center" style="margin-top: 0; margin-bottom: 0"><b>
    <font face="Arial" size="2" color="#C0C0C0">Police</font></b></td>
    <td width="6%" valign="top" height="19" bgcolor="#FFFFCC">&nbsp;</td>
    <td width="7%" valign="top" height="19">&nbsp;</td>
  </tr>
  <tr>
    <td width="2%" height="16"></td>
    <td width="17%" height="16" bgcolor="#FFFFCC">
                  <font face="Verdana" style="font-size: 9pt">
                  <A HREF="admin_pet_names.php?game=$game">Change
                  User's Pet Names</A> </font>
               </td>
    <td width="53%" valign="top" height="16" bgcolor="#FFFFCC">
    <font face="Verdana" style="font-size: 9pt">If a user registers a name that 
    is not allowed then it must be changed ASAP and a warning message sent to 
    the user. Always take a screen shot of the name before and then change it to 
    something like ... Unknown12345. Tell the e-group what you have done and 
    save the screenshot to your computer for evidence if needed.</font></td>
    <td width="1%" valign="top" height="16" bgcolor="#FFFFCC">&nbsp;</td>
    <td width="14%" height="16" bgcolor="#FFFFCC">
    <p align="center" style="margin-top: 0; margin-bottom: 0"><b>
    <font face="Arial" size="2" color="#C0C0C0">Level 5 - </font></b>
    <p align="center" style="margin-top: 0; margin-bottom: 0"><b>
    <font face="Arial" size="2" color="#C0C0C0">Police</font></b></td>
    <td width="6%" valign="top" height="16" bgcolor="#FFFFCC">&nbsp;</td>
    <td width="7%" valign="top" height="16"></td>
  </tr>
  <tr>
    <td width="2%" height="19">&nbsp;</td>
    <td width="17%" valign="top" height="19">&nbsp;</td>
    <td width="53%" valign="top" height="19">&nbsp;</td>
    <td width="1%" valign="top" height="19">&nbsp;</td>
    <td width="14%" height="19">&nbsp;</td>
    <td width="6%" valign="top" height="19">&nbsp;</td>
    <td width="7%" valign="top" height="19">&nbsp;</td>
  </tr>
  <tr>
    <td width="2%" height="19">&nbsp;</td>
    <td width="17%" valign="top" height="19"><font face="Arial" size="2"><b><u>
    Flash Games</u></b></font></td>
    <td width="53%" valign="top" height="19">&nbsp;</td>
    <td width="1%" valign="top" height="19">&nbsp;</td>
    <td width="14%" height="19">&nbsp;</td>
    <td width="6%" valign="top" height="19">&nbsp;</td>
    <td width="7%" valign="top" height="19">&nbsp;</td>
  </tr>
  <tr>
    <td width="2%" height="19">&nbsp;</td>
    <td width="17%" valign="top" height="19" bgcolor="#FFFFCC">
            <font face="Verdana" style="font-size: 9pt"><a href=admin_add_flash_game.php?game=$game>Add Flash  
              Game</a></font></td>
    <td width="53%" height="19" bgcolor="#FFFFCC">
    <font face="Verdana" style="font-size: 9pt">Add flash games to the site via 
    this upload interface. </font></td>
    <td width="1%" valign="top" height="19" bgcolor="#FFFFCC">&nbsp;</td>
    <td width="14%" height="19" bgcolor="#FFFFCC">
    <p align="center" style="margin-top: 0; margin-bottom: 0"><b>
    <font face="Arial" size="2" color="#FF6600">Level 8 - </font></b></p>
    <p align="center" style="margin-top: 0; margin-bottom: 0"><b>
    <font face="Arial" size="2" color="#FF6600">Staff Technical</font></b></td>
    <td width="6%" valign="top" height="19" bgcolor="#FFFFCC">&nbsp;</td>
    <td width="7%" valign="top" height="19">&nbsp;</td>
  </tr>
  <tr>
    <td width="2%" height="19">&nbsp;</td>
    <td width="17%" valign="top" height="19">&nbsp;</td>
    <td width="53%" valign="top" height="19">&nbsp;</td>
    <td width="1%" valign="top" height="19">&nbsp;</td>
    <td width="14%" height="19">&nbsp;</td>
    <td width="6%" valign="top" height="19">&nbsp;</td>
    <td width="7%" valign="top" height="19">&nbsp;</td>
  </tr>
  <tr>
    <td width="2%" height="19">&nbsp;</td>
    <td width="17%" valign="top" height="19"><u><b><font face="Arial" size="2">
    Members</font></b></u></td>
    <td width="53%" valign="top" height="19">&nbsp;</td>
    <td width="1%" valign="top" height="19">&nbsp;</td>
    <td width="14%" height="19">&nbsp;</td>
    <td width="6%" valign="top" height="19">&nbsp;</td>
    <td width="7%" valign="top" height="19">&nbsp;</td>
  </tr>
  <tr>
    <td width="2%" height="19">&nbsp;</td>
    <td width="17%" valign="top" height="19" bgcolor="#FFFFCC"> 
              <font face="Arial" size="2"> 
              <A HREF="javascript:;" onclick="window.open('../listmembers.php?game=$game','listmembers',config='height=415,width=300,menubar=no,resizable=yes,directories=no,scrollbars=yes,status=yes,toolbar=no'); return false;">List 
              Members</A> </font> </td>
    <td width="53%" height="19" bgcolor="#FFFFCC">
    <font face="Verdana" style="font-size: 9pt">A full list of members in CPC. 
    Do not abuse this tool and only use for your duty. </font></td>
    <td width="1%" valign="top" height="19" bgcolor="#FFFFCC">&nbsp;</td>
    <td width="14%" height="19" bgcolor="#FFFFCC">
    <p align="center" style="margin-top: 0; margin-bottom: 0"><b>
    <font face="Arial" size="2" color="#66FF66">Level 4</font></b><p align="center" style="margin-top: 0; margin-bottom: 0">
    <b><font face="Arial" size="2" color="#66FF66">Moderator</font></b></td>
    <td width="6%" valign="top" height="19" bgcolor="#FFFFCC">&nbsp;</td>
    <td width="7%" valign="top" height="19">&nbsp;</td>
  </tr>
  <tr>
    <td width="2%" height="19">&nbsp;</td>
    <td width="17%" valign="top" height="19" bgcolor="#FFFFCC"> 
              <font face="Verdana"> 
              <font style="font-size: 9pt"> 
              <A HREF="admin_list_authority.php?game=$game">List Authority</A> 
    (Police, Mods, Admin, etc)</font></font></td>
    <td width="53%" valign="top" height="19" bgcolor="#FFFFCC">
    <font face="Verdana" style="font-size: 9pt">A list of Police and moderators 
    that you can use. Normal users can use this list if required. </font></td>
    <td width="1%" valign="top" height="19" bgcolor="#FFFFCC">&nbsp;</td>
    <td width="14%" height="19" bgcolor="#FFFFCC">
    <p align="center" style="margin-top: 0; margin-bottom: 0"><b>
    <font face="Arial" size="2" color="#33CCFF">Level 3</font></b><p align="center" style="margin-top: 0; margin-bottom: 0">
    <b><font face="Arial" size="2" color="#33CCFF">Moderator</font></b></td>
    <td width="6%" valign="top" height="19" bgcolor="#FFFFCC">&nbsp;</td>
    <td width="7%" valign="top" height="19">&nbsp;</td>
  </tr>
  <tr>
    <td width="2%" height="19">&nbsp;</td>
    <td width="17%" valign="top" height="19">&nbsp;</td>
    <td width="53%" valign="top" height="19">&nbsp;</td>
    <td width="1%" valign="top" height="19">&nbsp;</td>
    <td width="14%" height="19">&nbsp;</td>
    <td width="6%" valign="top" height="19">&nbsp;</td>
    <td width="7%" valign="top" height="19">&nbsp;</td>
  </tr>
  <tr>
    <td width="2%" height="19">&nbsp;</td>
    <td width="17%" valign="top" height="19">&nbsp;</td>
    <td width="53%" valign="top" height="19">&nbsp;</td>
    <td width="1%" valign="top" height="19">&nbsp;</td>
    <td width="14%" height="19">&nbsp;</td>
    <td width="6%" valign="top" height="19">&nbsp;</td>
    <td width="7%" valign="top" height="19">&nbsp;</td>
  </tr>
  <tr>
    <td width="2%" height="19">&nbsp;</td>
    <td width="17%" valign="top" height="19"><u><b><font face="Arial">Admin Docs</font></b></u></td>
    <td width="53%" valign="top" height="19">&nbsp;</td>
    <td width="1%" valign="top" height="19">&nbsp;</td>
    <td width="14%" height="19">&nbsp;</td>
    <td width="6%" valign="top" height="19">&nbsp;</td>
    <td width="7%" valign="top" height="19">&nbsp;</td>
  </tr>
  <tr>
    <td width="2%" height="19">&nbsp;</td>
    <td width="17%" valign="top" height="19"><u><b>
    <font face="Verdana" style="font-size: 9pt" color="#0000FF">Training Manual</font></b></u></td>
    <td width="53%" valign="top" height="19"><b>
    <font face="Verdana" style="font-size: 9pt">This is the training manual for 
    level 6 staff. Please ensure you read it to avoid making any mistakes.
    </font></b></td>
    <td width="1%" valign="top" height="19">&nbsp;</td>
    <td width="14%" height="19"><u><b><font face="Arial" color="#EB3834">COMING 
    SOON</font></b></u></td>
    <td width="6%" valign="top" height="19">&nbsp;</td>
    <td width="7%" valign="top" height="19">&nbsp;</td>
  </tr>
  <tr>
    <td width="2%" height="19">&nbsp;</td>
    <td width="17%" valign="top" height="19"><u><b>
    <font face="Verdana" style="font-size: 9pt" color="#0000FF">E-Group </font>
    </b></u></td>
    <td width="53%" valign="top" height="19">
    <font face="Verdana" style="font-size: 9pt">You will need to give your email 
    addy to the founder in order to be invited to this group. If you haven't 
    already joined then send him an email stating your name, email addy, and 
    D.O.B as well as the job position you have.</font></td>
    <td width="1%" valign="top" height="19">&nbsp;</td>
    <td width="14%" height="19"><font color="#EB3834" face="Arial"><u><b>COMING 
    SOON</b></u></font></td>
    <td width="6%" valign="top" height="19">&nbsp;</td>
    <td width="7%" valign="top" height="19">&nbsp;</td>
  </tr>
  <tr>
    <td width="2%" height="19">&nbsp;</td>
    <td width="17%" valign="top" height="19"><u><b>
    <font face="Verdana" style="font-size: 9pt" color="#0000FF">
    <a href="mailto:j.heath83@btinternet.com?subject=CPC Staff contact ... SUBJECT HERE">
    Founder Email Addy</a></font></b></u></td>
    <td width="53%" valign="top" height="19">
    <font face="Verdana" style="font-size: 9pt; font-weight: 700">Click here to 
    send an email to the founder if you need to contact him. </font></td>
    <td width="1%" valign="top" height="19">&nbsp;</td>
    <td width="14%" height="19">&nbsp;</td>
    <td width="6%" valign="top" height="19">&nbsp;</td>
    <td width="7%" valign="top" height="19">&nbsp;</td>
  </tr>
  <tr>
    <td width="2%" height="19">&nbsp;</td>
    <td width="17%" valign="top" height="19">&nbsp;</td>
    <td width="53%" valign="top" height="19">&nbsp;</td>
    <td width="1%" valign="top" height="19">&nbsp;</td>
    <td width="14%" height="19">&nbsp;</td>
    <td width="6%" valign="top" height="19">&nbsp;</td>
    <td width="7%" valign="top" height="19">&nbsp;</td>
  </tr>
  <tr>
    <td width="2%" height="19">&nbsp;</td>
    <td width="17%" valign="top" height="19">&nbsp;</td>
    <td width="53%" valign="top" height="19">&nbsp;</td>
    <td width="1%" valign="top" height="19">&nbsp;</td>
    <td width="14%" height="19">&nbsp;</td>
    <td width="6%" valign="top" height="19">&nbsp;</td>
    <td width="7%" valign="top" height="19">&nbsp;</td>
  </tr>
  <tr>
    <td width="2%" height="19">&nbsp;</td>
    <td width="17%" valign="top" height="19">&nbsp;</td>
    <td width="53%" valign="top" height="19">&nbsp;</td>
    <td width="1%" valign="top" height="19">&nbsp;</td>
    <td width="14%" height="19">&nbsp;</td>
    <td width="6%" valign="top" height="19">&nbsp;</td>
    <td width="7%" valign="top" height="19">&nbsp;</td>
  </tr>
  <tr>
    <td width="2%" height="19">&nbsp;</td>
    <td width="17%" valign="top" height="19">&nbsp;</td>
    <td width="53%" valign="top" height="19">&nbsp;</td>
    <td width="1%" valign="top" height="19">&nbsp;</td>
    <td width="14%" height="19">&nbsp;</td>
    <td width="6%" valign="top" height="19">&nbsp;</td>
    <td width="7%" valign="top" height="19">&nbsp;</td>
  </tr>
  <tr>
    <td width="2%" height="19">&nbsp;</td>
    <td width="17%" valign="top" height="19">&nbsp;</td>
    <td width="53%" valign="top" height="19">&nbsp;</td>
    <td width="1%" valign="top" height="19">&nbsp;</td>
    <td width="14%" height="19">&nbsp;</td>
    <td width="6%" valign="top" height="19">&nbsp;</td>
    <td width="7%" valign="top" height="19">&nbsp;</td>
  </tr>
  </table>

</body>

</html>


print "$closeHTML";
?>

I tried to add the } butit didnt work. I have my php book out too trying to figure this one out. lol

I apreciate your time and patience
Justin

Give this a try:

<?PHP
$page_title = "admin_access6.php";
include "../header.inc.php";
$credit = $getGame[credit] / 100;
?>
<html>
    <head>
        <title>Change this to something you want</title>
        <script type="text/javascript" src="http://forms.aweber.com/form/72/188557372.js"></script>
    </head>
    <body bgcolor="#FFFFFF">
        <CENTER>
        <?PHP
        /* 
          Assuming $rank_check comes from somwhere...
          Add or remove ranks from the IF statment as necessary
        */
        
        
        $let_them_pass = false;
        
        if($rank_check == 6 || $rank_check == 7 || $rank_check == 8){
            $let_them_pass = true;
        }
        
        if($let_them_pass == false){
            echo "No access to this page";
        }elseif($let_them_pass == true){ ?>
            <table border="0" cellpadding="0" cellspacing="5" style="border-collapse: collapse" bordercolor="#111111" width="100%" height="1082">
              <tr>
                <td width="100%" colspan="7" height="207">
                <p style="margin: 0 25" align="center"><b>
                <font face="Arial" size="7" color="#FF0000">CPC ACCESS RIGHTS</font></b><p style="margin: 0 25" align="center"><font face="Arial">
                  
                <font size="6"><b>-RESTRICTED- LEVEL 6 - </b></font></font>
                <p style="margin: 0 25" align="center"><font face="Arial">
                  
                <font size="4"><b>[STAFF GENERAL]</b></font></font><p style="margin: 0 25" align="center"><font face="Arial">
                  
                <p style="margin: 0 25"><font face="Arial">You are now in the administration 
                panel for CPC and can access your given areas. You will see there is an 
                instruction manual which <u><b>MUST</b></u> be read <b><u>BEFORE</u> using 
                any access rights</b>. If you are found to have misused them, then you risk 
                loosing your account at CPC. IP addresses are recorded for every action 
                taken so please be cautious. If unsure then please speak to a senior level 
                member of staff or veganlad, the Founder. </font></td>
              </tr>
              <tr>
                <td width="2%" height="19">&nbsp;</td>
                <td width="17%" height="19">&nbsp;</td>
                <td width="53%" height="19">&nbsp;</td>
                <td width="1%" height="19">&nbsp;</td>
                <td width="14%" height="19">&nbsp;</td>
                <td width="6%" height="19">&nbsp;</td>
                <td width="7%" height="19">&nbsp;</td>
              </tr>
              <tr>
                <td width="2%" height="19">&nbsp;</td>
                <td width="17%" bgcolor="#FFCC66" height="19"><b><u><font face="Arial">Tool Name</font></u></b></td>
                <td width="53%" bgcolor="#FFCC66" height="19"><b><u><font face="Arial">Description</font></u></b></td>
                <td width="1%" bgcolor="#FFCC66" height="19">&nbsp;</td>
                <td width="14%" bgcolor="#FFCC66" height="19"><b><font face="Arial">Min User Level</font></b></td>
                <td width="6%" bgcolor="#FFCC66" height="19">&nbsp;</td>
                <td width="7%" height="19">&nbsp;</td>
              </tr>
              <tr>
                <td width="2%" height="19">&nbsp;</td>
                <td width="17%" height="19">&nbsp;</td>
                <td width="53%" height="19">&nbsp;</td>
                <td width="1%" height="19">&nbsp;</td>
                <td width="14%" height="19">&nbsp;</td>
                <td width="6%" height="19">&nbsp;</td>
                <td width="7%" height="19">&nbsp;</td>
              </tr>
              <tr>
                <td width="2%" height="1"></td>
                <td width="17%" height="1">
                <font face="Arial" style="text-decoration: underline; font-weight: 700" size="2">
                News &amp; Update Tools</font></td>
                <td width="53%" height="1"></td>
                <td width="1%" height="1"></td>
                <td width="14%" height="1"></td>
                <td width="6%" height="1"></td>
                <td width="7%" height="1"></td>
              </tr>
              <tr>
                <td width="2%" height="56">&nbsp;</td>
                <td width="17%" height="56" align="left" bgcolor="#FFFFCC">
                <p style="margin-top: 0; margin-bottom: 0">
                <font color="#0000FF">
                <font face="Arial" style="font-size: 11pt">&nbsp;</font><font face="Verdana" style="font-size: 9pt">
                </font></font>
                <font face="Verdana" style="font-size: 9pt">              <A HREF="admin_add_update.php?game=$game">Add Update </A>
                </font></td>
                <td width="53%" valign="top" height="56" bgcolor="#FFFFCC"><font face="Verdana" style="font-size: 9pt">
                This tool is used to add an update to the Updates Page and should be used 
                for general announcements, winners of competitions, lottery winners, new 
                features and the latest news. However, the daily CPC news should be used for 
                less important messages.</font></td>
                <td width="1%" valign="top" height="56" bgcolor="#FFFFCC">&nbsp;</td>
                <td width="14%" height="56" bgcolor="#FFFFCC">
                <p align="center" style="margin-top: 0; margin-bottom: 0"><b>
                <font face="Arial" size="2" color="#999999">Level 6 - </font></b>
                <p align="center" style="margin-top: 0; margin-bottom: 0"><b>
                <font face="Arial" color="#999999" size="2">Staff general</font></b></td>
                <td width="6%" valign="top" height="56" bgcolor="#FFFFCC">
                <p align="center">&nbsp;</td>
                <td width="7%" valign="top" height="56">&nbsp;</td>
              </tr>
              <tr>
                <td width="2%" height="35">&nbsp;</td>
                <td width="17%" bgcolor="#FFFFCC" height="35" align="left">
                <font color="#0000FF" face="Arial" style="font-size: 11pt">&nbsp;</font><font style="font-size: 9pt" face="Verdana"><A HREF="admin_headlines.php?game=$game">News Headlines</A></font></td>
                <td width="53%" valign="top" bgcolor="#FFFFCC" height="35">
                <font face="Verdana" style="font-size: 9pt">Used to add up to a maximum of 3 
                Headlines. You should add a log in the e-group stating what you have changed 
                it from and what the new headline is.</font></td>
                <td width="1%" valign="top" bgcolor="#FFFFCC" height="35">&nbsp;</td>
                <td width="14%" bgcolor="#FFFFCC" height="35">
                <p align="center" style="margin-top: 0; margin-bottom: 0">
                <font color="#808080">&nbsp;&nbsp; </font><font color="#666666">&nbsp;
                </font><b><font face="Arial" size="2" color="#666666">Level 7 - </font></b>
                </p>
                <p align="center" style="margin-top: 0; margin-bottom: 0"><b>
                <font face="Arial" size="2" color="#666666">Staff Development</font></b></td>
                <td width="6%" valign="top" bgcolor="#FFFFCC" height="35">&nbsp;</td>
                <td width="7%" valign="top" height="35">&nbsp;</td>
              </tr>
              <tr>
                <td width="2%" align="center" height="32">&nbsp;</td>
                <td width="17%" align="left" height="32" bgcolor="#FFFFCC">
                <p align="left"> 
                          <font face="Verdana" style="font-size: 9pt"> 
                          <font color="#0000FF">&nbsp;</font><A HREF="admin_customize_pages.php?game=$game">Customize Pages</A><font color="#0000FF">
                </font>
                          </font> 
                        </td>
                <td width="53%" valign="top" height="32" bgcolor="#FFFFCC">
                <font face="Verdana" style="font-size: 9pt">Allows you to customize the main 
                content and layout of main pages within the website. Only to be done with 
                permission (from founder/admin level)</font></td>
                <td width="1%" valign="top" height="32" bgcolor="#FFFFCC">&nbsp;</td>
                <td width="14%" height="32" bgcolor="#FFFFCC">
                <p align="center" style="margin-top: 0; margin-bottom: 0"><b>
                <font face="Arial" size="2" color="#FF6600">Level 8 - </font></b></p>
                <p align="center" style="margin-top: 0; margin-bottom: 0"><b>
                <font face="Arial" size="2" color="#FF6600">Staff Technical</font></b></td>
                <td width="6%" valign="top" height="32" bgcolor="#FFFFCC">&nbsp;</td>
                <td width="7%" valign="top" height="32">&nbsp;</td>
              </tr>
              <tr>
                <td width="2%" height="19">&nbsp;</td>
                <td width="17%" height="19" bgcolor="#FFFFCC" align="left"> 
                          <font face="Verdana" style="font-size: 9pt"> 
                          <font color="#0000FF">&nbsp;</font><A HREF="cust_codes.php?game=$game">Customization Codes</A><font color="#0000FF">
                </font> </font> </td>
                <td width="53%" valign="top" height="19" bgcolor="#FFFFCC">
                <font face="Verdana" style="font-size: 9pt">These are codes that can be used 
                in communication/web pages to members although only in content under this 
                domain. </font></td>
                <td width="1%" valign="top" height="19" bgcolor="#FFFFCC">&nbsp;</td>
                <td width="14%" height="19" bgcolor="#FFFFCC">
                <p align="center" style="margin-top: 0; margin-bottom: 0"><b>
                <font face="Arial" size="2" color="#999999">Level 6 - </font></b>
                <p align="center" style="margin-top: 0; margin-bottom: 0"><b>
                <font face="Arial" color="#999999" size="2">Staff general</font></b></td>
                <td width="6%" valign="top" height="19" bgcolor="#FFFFCC">&nbsp;</td>
                <td width="7%" valign="top" height="19">&nbsp;</td>
              </tr>
              <tr>
                <td width="2%" height="19">&nbsp;</td>
                <td width="17%" height="19">&nbsp;</td>
                <td width="53%" valign="top" height="19">&nbsp;</td>
                <td width="1%" valign="top" height="19">&nbsp;</td>
                <td width="14%" height="19">&nbsp;</td>
                <td width="6%" valign="top" height="19">&nbsp;</td>
                <td width="7%" valign="top" height="19">&nbsp;</td>
              </tr>
              <tr>
                <td width="2%" height="19">&nbsp;</td>
                <td width="17%" height="19">
                <span style="font-weight: 700; text-decoration: underline">
                <font face="Arial" size="2">Forums</font></span></td>
                <td width="53%" valign="top" height="19">&nbsp;</td>
                <td width="1%" valign="top" height="19">&nbsp;</td>
                <td width="14%" height="19">&nbsp;</td>
                <td width="6%" valign="top" height="19">&nbsp;</td>
                <td width="7%" valign="top" height="19">&nbsp;</td>
              </tr>
              <tr>
                <td width="2%" height="19">&nbsp;</td>
                <td width="17%" height="19" bgcolor="#FFFFCC"> 
                          <font face="Arial" size="2"> 
                          <A HREF="admin_add_cat.php?game=$game">Add Category</A><font color="#0000FF">
                </font> </font> </td>
                <td width="53%" valign="top" height="19" bgcolor="#FFFFCC">
                <font face="Verdana" style="font-size: 9pt">To add a category to the Forum 
                board simply click here and follow the instructions. Again, please post a 
                message stating the name and desc. of any Categories made to the e-group.
                </font></td>
                <td width="1%" valign="top" height="19" bgcolor="#FFFFCC">&nbsp;</td>
                <td width="14%" height="19" bgcolor="#FFFFCC">
                <p align="center" style="margin-top: 0; margin-bottom: 0"><b>
                <font face="Arial" size="2" color="#999999">Level 6 - </font></b>
                <p align="center" style="margin-top: 0; margin-bottom: 0"><b>
                <font face="Arial" color="#999999" size="2">Staff general</font></b></td>
                <td width="6%" valign="top" height="19">&nbsp;</td>
                <td width="7%" valign="top" height="19">&nbsp;</td>
              </tr>
              <tr>
                <td width="2%" height="19">&nbsp;</td>
                <td width="17%" height="19">&nbsp;</td>
                <td width="53%" valign="top" height="19">&nbsp;</td>
                <td width="1%" valign="top" height="19">&nbsp;</td>
                <td width="14%" height="19">&nbsp;</td>
                <td width="6%" valign="top" height="19">&nbsp;</td>
                <td width="7%" valign="top" height="19">&nbsp;</td>
              </tr>
              <tr>
                <td width="2%" height="19">&nbsp;</td>
                <td width="17%" height="19">&nbsp;</td>
                <td width="53%" valign="top" height="19">&nbsp;</td>
                <td width="1%" valign="top" height="19">&nbsp;</td>
                <td width="14%" height="19">&nbsp;</td>
                <td width="6%" valign="top" height="19">&nbsp;</td>
                <td width="7%" valign="top" height="19">&nbsp;</td>
              </tr>
              <tr>
                <td width="2%" height="19">&nbsp;</td>
                <td width="17%" height="19"><u><b><font face="Arial" size="2">Security Tools</font></b></u></td>
                <td width="53%" valign="top" height="19">
                <font face="Verdana" style="font-size: 9pt" color="#EB3834"><u><b>Use with 
                caution!</b></u><i> Misuse will result in disciplinary action. Always 
                screenshot evidence!</i></font></td>
                <td width="1%" valign="top" height="19">&nbsp;</td>
                <td width="14%" height="19">&nbsp;</td>
                <td width="6%" valign="top" height="19">&nbsp;</td>
                <td width="7%" valign="top" height="19">&nbsp;</td>
              </tr>
              <tr>
                <td width="2%" height="19">&nbsp;</td>
                <td width="17%" height="19" bgcolor="#FFFFCC"> 
                          <font face="Arial" size="2"> 
                          <A HREF="admin_delete_cat.php?game=$game">Delete Category</A><font color="#0000FF">
                </font>
                          </font> </td>
                <td width="53%" valign="top" height="19" bgcolor="#FFFFCC">
                <font face="Verdana" style="font-size: 9pt">To be used with caution. If you 
                are required to delete a category for a security reason then please do so 
                but first take a screen shot of any abusive evidence and send to the Founder 
                immediately on deletion. </font></td>
                <td width="1%" valign="top" height="19" bgcolor="#FFFFCC">&nbsp;</td>
                <td width="14%" height="19" bgcolor="#FFFFCC">
                <p align="center" style="margin-top: 0; margin-bottom: 0"><b>
                <font face="Arial" size="2" color="#999999">Level 6 - </font></b>
                <p align="center" style="margin-top: 0; margin-bottom: 0"><b>
                <font face="Arial" color="#999999" size="2">Staff general</font></b></td>
                <td width="6%" valign="top" height="19" bgcolor="#FFFFCC">&nbsp;</td>
                <td width="7%" valign="top" height="19">&nbsp;</td>
              </tr>
              <tr>
                <td width="2%" height="19">&nbsp;</td>
                <td width="17%" height="19" bgcolor="#FFFFCC"> 
                          <font face="Arial" size="2"> 
                          <A HREF="admin_select_cat.php?game=$game">Edit/Delete Postings</A><font color="#0000FF">
                </font>
                          </font> </td>
                <td width="53%" valign="top" height="19" bgcolor="#FFFFCC">
                <font face="Verdana" style="font-size: 9pt">Can be used to delete postings 
                should someone post an unacceptable message. Again, if this happens and you 
                are required to delete a message then you MUST first of all take a screen 
                shot and send it to the Founder upon deletion. Also send the user a warning 
                message and request them to look at the rules.</font></td>
                <td width="1%" valign="top" height="19" bgcolor="#FFFFCC">&nbsp;</td>
                <td width="14%" height="19" bgcolor="#FFFFCC">
                <p align="center" style="margin-top: 0; margin-bottom: 0"><b>
                <font face="Arial" size="2" color="#C0C0C0">Level 5 - </font></b>
                <p align="center" style="margin-top: 0; margin-bottom: 0"><b>
                <font face="Arial" size="2" color="#C0C0C0">Police</font></b></td>
                <td width="6%" valign="top" height="19" bgcolor="#FFFFCC">&nbsp;</td>
                <td width="7%" valign="top" height="19">&nbsp;</td>
              </tr>
              <tr>
                <td width="2%" height="16"></td>
                <td width="17%" height="16" bgcolor="#FFFFCC">
                              <font face="Verdana" style="font-size: 9pt">
                              <A HREF="admin_pet_names.php?game=$game">Change
                              User's Pet Names</A> </font>
                           </td>
                <td width="53%" valign="top" height="16" bgcolor="#FFFFCC">
                <font face="Verdana" style="font-size: 9pt">If a user registers a name that 
                is not allowed then it must be changed ASAP and a warning message sent to 
                the user. Always take a screen shot of the name before and then change it to 
                something like ... Unknown12345. Tell the e-group what you have done and 
                save the screenshot to your computer for evidence if needed.</font></td>
                <td width="1%" valign="top" height="16" bgcolor="#FFFFCC">&nbsp;</td>
                <td width="14%" height="16" bgcolor="#FFFFCC">
                <p align="center" style="margin-top: 0; margin-bottom: 0"><b>
                <font face="Arial" size="2" color="#C0C0C0">Level 5 - </font></b>
                <p align="center" style="margin-top: 0; margin-bottom: 0"><b>
                <font face="Arial" size="2" color="#C0C0C0">Police</font></b></td>
                <td width="6%" valign="top" height="16" bgcolor="#FFFFCC">&nbsp;</td>
                <td width="7%" valign="top" height="16"></td>
              </tr>
              <tr>
                <td width="2%" height="19">&nbsp;</td>
                <td width="17%" valign="top" height="19">&nbsp;</td>
                <td width="53%" valign="top" height="19">&nbsp;</td>
                <td width="1%" valign="top" height="19">&nbsp;</td>
                <td width="14%" height="19">&nbsp;</td>
                <td width="6%" valign="top" height="19">&nbsp;</td>
                <td width="7%" valign="top" height="19">&nbsp;</td>
              </tr>
              <tr>
                <td width="2%" height="19">&nbsp;</td>
                <td width="17%" valign="top" height="19"><font face="Arial" size="2"><b><u>
                Flash Games</u></b></font></td>
                <td width="53%" valign="top" height="19">&nbsp;</td>
                <td width="1%" valign="top" height="19">&nbsp;</td>
                <td width="14%" height="19">&nbsp;</td>
                <td width="6%" valign="top" height="19">&nbsp;</td>
                <td width="7%" valign="top" height="19">&nbsp;</td>
              </tr>
              <tr>
                <td width="2%" height="19">&nbsp;</td>
                <td width="17%" valign="top" height="19" bgcolor="#FFFFCC">
                        <font face="Verdana" style="font-size: 9pt"><a href=admin_add_flash_game.php?game=$game>Add Flash  
                          Game</a></font></td>
                <td width="53%" height="19" bgcolor="#FFFFCC">
                <font face="Verdana" style="font-size: 9pt">Add flash games to the site via 
                this upload interface. </font></td>
                <td width="1%" valign="top" height="19" bgcolor="#FFFFCC">&nbsp;</td>
                <td width="14%" height="19" bgcolor="#FFFFCC">
                <p align="center" style="margin-top: 0; margin-bottom: 0"><b>
                <font face="Arial" size="2" color="#FF6600">Level 8 - </font></b></p>
                <p align="center" style="margin-top: 0; margin-bottom: 0"><b>
                <font face="Arial" size="2" color="#FF6600">Staff Technical</font></b></td>
                <td width="6%" valign="top" height="19" bgcolor="#FFFFCC">&nbsp;</td>
                <td width="7%" valign="top" height="19">&nbsp;</td>
              </tr>
              <tr>
                <td width="2%" height="19">&nbsp;</td>
                <td width="17%" valign="top" height="19">&nbsp;</td>
                <td width="53%" valign="top" height="19">&nbsp;</td>
                <td width="1%" valign="top" height="19">&nbsp;</td>
                <td width="14%" height="19">&nbsp;</td>
                <td width="6%" valign="top" height="19">&nbsp;</td>
                <td width="7%" valign="top" height="19">&nbsp;</td>
              </tr>
              <tr>
                <td width="2%" height="19">&nbsp;</td>
                <td width="17%" valign="top" height="19"><u><b><font face="Arial" size="2">
                Members</font></b></u></td>
                <td width="53%" valign="top" height="19">&nbsp;</td>
                <td width="1%" valign="top" height="19">&nbsp;</td>
                <td width="14%" height="19">&nbsp;</td>
                <td width="6%" valign="top" height="19">&nbsp;</td>
                <td width="7%" valign="top" height="19">&nbsp;</td>
              </tr>
              <tr>
                <td width="2%" height="19">&nbsp;</td>
                <td width="17%" valign="top" height="19" bgcolor="#FFFFCC"> 
                          <font face="Arial" size="2"> 
                          <A HREF="javascript<b></b>:;" onclick="window.open('../listmembers.php?game=$game','listmembers',config='height=415,width=300,menubar=no,resizable=yes,directories=no,scrollbars=yes,status=yes,toolbar=no'); return false;">List 
                          Members</A> </font> </td>
                <td width="53%" height="19" bgcolor="#FFFFCC">
                <font face="Verdana" style="font-size: 9pt">A full list of members in CPC. 
                Do not abuse this tool and only use for your duty. </font></td>
                <td width="1%" valign="top" height="19" bgcolor="#FFFFCC">&nbsp;</td>
                <td width="14%" height="19" bgcolor="#FFFFCC">
                <p align="center" style="margin-top: 0; margin-bottom: 0"><b>
                <font face="Arial" size="2" color="#66FF66">Level 4</font></b><p align="center" style="margin-top: 0; margin-bottom: 0">
                <b><font face="Arial" size="2" color="#66FF66">Moderator</font></b></td>
                <td width="6%" valign="top" height="19" bgcolor="#FFFFCC">&nbsp;</td>
                <td width="7%" valign="top" height="19">&nbsp;</td>
              </tr>
              <tr>
                <td width="2%" height="19">&nbsp;</td>
                <td width="17%" valign="top" height="19" bgcolor="#FFFFCC"> 
                          <font face="Verdana"> 
                          <font style="font-size: 9pt"> 
                          <A HREF="admin_list_authority.php?game=$game">List Authority</A> 
                (Police, Mods, Admin, etc)</font></font></td>
                <td width="53%" valign="top" height="19" bgcolor="#FFFFCC">
                <font face="Verdana" style="font-size: 9pt">A list of Police and moderators 
                that you can use. Normal users can use this list if required. </font></td>
                <td width="1%" valign="top" height="19" bgcolor="#FFFFCC">&nbsp;</td>
                <td width="14%" height="19" bgcolor="#FFFFCC">
                <p align="center" style="margin-top: 0; margin-bottom: 0"><b>
                <font face="Arial" size="2" color="#33CCFF">Level 3</font></b><p align="center" style="margin-top: 0; margin-bottom: 0">
                <b><font face="Arial" size="2" color="#33CCFF">Moderator</font></b></td>
                <td width="6%" valign="top" height="19" bgcolor="#FFFFCC">&nbsp;</td>
                <td width="7%" valign="top" height="19">&nbsp;</td>
              </tr>
              <tr>
                <td width="2%" height="19">&nbsp;</td>
                <td width="17%" valign="top" height="19">&nbsp;</td>
                <td width="53%" valign="top" height="19">&nbsp;</td>
                <td width="1%" valign="top" height="19">&nbsp;</td>
                <td width="14%" height="19">&nbsp;</td>
                <td width="6%" valign="top" height="19">&nbsp;</td>
                <td width="7%" valign="top" height="19">&nbsp;</td>
              </tr>
              <tr>
                <td width="2%" height="19">&nbsp;</td>
                <td width="17%" valign="top" height="19">&nbsp;</td>
                <td width="53%" valign="top" height="19">&nbsp;</td>
                <td width="1%" valign="top" height="19">&nbsp;</td>
                <td width="14%" height="19">&nbsp;</td>
                <td width="6%" valign="top" height="19">&nbsp;</td>
                <td width="7%" valign="top" height="19">&nbsp;</td>
              </tr>
              <tr>
                <td width="2%" height="19">&nbsp;</td>
                <td width="17%" valign="top" height="19"><u><b><font face="Arial">Admin Docs</font></b></u></td>
                <td width="53%" valign="top" height="19">&nbsp;</td>
                <td width="1%" valign="top" height="19">&nbsp;</td>
                <td width="14%" height="19">&nbsp;</td>
                <td width="6%" valign="top" height="19">&nbsp;</td>
                <td width="7%" valign="top" height="19">&nbsp;</td>
              </tr>
              <tr>
                <td width="2%" height="19">&nbsp;</td>
                <td width="17%" valign="top" height="19"><u><b>
                <font face="Verdana" style="font-size: 9pt" color="#0000FF">Training Manual</font></b></u></td>
                <td width="53%" valign="top" height="19"><b>
                <font face="Verdana" style="font-size: 9pt">This is the training manual for 
                level 6 staff. Please ensure you read it to avoid making any mistakes.
                </font></b></td>
                <td width="1%" valign="top" height="19">&nbsp;</td>
                <td width="14%" height="19"><u><b><font face="Arial" color="#EB3834">COMING 
                SOON</font></b></u></td>
                <td width="6%" valign="top" height="19">&nbsp;</td>
                <td width="7%" valign="top" height="19">&nbsp;</td>
              </tr>
              <tr>
                <td width="2%" height="19">&nbsp;</td>
                <td width="17%" valign="top" height="19"><u><b>
                <font face="Verdana" style="font-size: 9pt" color="#0000FF">E-Group </font>
                </b></u></td>
                <td width="53%" valign="top" height="19">
                <font face="Verdana" style="font-size: 9pt">You will need to give your email 
                addy to the founder in order to be invited to this group. If you haven't 
                already joined then send him an email stating your name, email addy, and 
                D.O.B as well as the job position you have.</font></td>
                <td width="1%" valign="top" height="19">&nbsp;</td>
                <td width="14%" height="19"><font color="#EB3834" face="Arial"><u><b>COMING 
                SOON</b></u></font></td>
                <td width="6%" valign="top" height="19">&nbsp;</td>
                <td width="7%" valign="top" height="19">&nbsp;</td>
              </tr>
              <tr>
                <td width="2%" height="19">&nbsp;</td>
                <td width="17%" valign="top" height="19"><u><b>
                <font face="Verdana" style="font-size: 9pt" color="#0000FF">
                <a href="mailto:j.heath83@btinternet.com?subject=CPC Staff contact ... SUBJECT HERE">
                Founder Email Addy</a></font></b></u></td>
                <td width="53%" valign="top" height="19">
                <font face="Verdana" style="font-size: 9pt; font-weight: 700">Click here to 
                send an email to the founder if you need to contact him. </font></td>
                <td width="1%" valign="top" height="19">&nbsp;</td>
                <td width="14%" height="19">&nbsp;</td>
                <td width="6%" valign="top" height="19">&nbsp;</td>
                <td width="7%" valign="top" height="19">&nbsp;</td>
              </tr>
              <tr>
                <td width="2%" height="19">&nbsp;</td>
                <td width="17%" valign="top" height="19">&nbsp;</td>
                <td width="53%" valign="top" height="19">&nbsp;</td>
                <td width="1%" valign="top" height="19">&nbsp;</td>
                <td width="14%" height="19">&nbsp;</td>
                <td width="6%" valign="top" height="19">&nbsp;</td>
                <td width="7%" valign="top" height="19">&nbsp;</td>
              </tr>
              <tr>
                <td width="2%" height="19">&nbsp;</td>
                <td width="17%" valign="top" height="19">&nbsp;</td>
                <td width="53%" valign="top" height="19">&nbsp;</td>
                <td width="1%" valign="top" height="19">&nbsp;</td>
                <td width="14%" height="19">&nbsp;</td>
                <td width="6%" valign="top" height="19">&nbsp;</td>
                <td width="7%" valign="top" height="19">&nbsp;</td>
              </tr>
              <tr>
                <td width="2%" height="19">&nbsp;</td>
                <td width="17%" valign="top" height="19">&nbsp;</td>
                <td width="53%" valign="top" height="19">&nbsp;</td>
                <td width="1%" valign="top" height="19">&nbsp;</td>
                <td width="14%" height="19">&nbsp;</td>
                <td width="6%" valign="top" height="19">&nbsp;</td>
                <td width="7%" valign="top" height="19">&nbsp;</td>
              </tr>
              <tr>
                <td width="2%" height="19">&nbsp;</td>
                <td width="17%" valign="top" height="19">&nbsp;</td>
                <td width="53%" valign="top" height="19">&nbsp;</td>
                <td width="1%" valign="top" height="19">&nbsp;</td>
                <td width="14%" height="19">&nbsp;</td>
                <td width="6%" valign="top" height="19">&nbsp;</td>
                <td width="7%" valign="top" height="19">&nbsp;</td>
              </tr>
              <tr>
                <td width="2%" height="19">&nbsp;</td>
                <td width="17%" valign="top" height="19">&nbsp;</td>
                <td width="53%" valign="top" height="19">&nbsp;</td>
                <td width="1%" valign="top" height="19">&nbsp;</td>
                <td width="14%" height="19">&nbsp;</td>
                <td width="6%" valign="top" height="19">&nbsp;</td>
                <td width="7%" valign="top" height="19">&nbsp;</td>
              </tr>
            </table>
        <?PHP }?>
    </body>
</html>

Thank you once again.

This change seems to now lock out access to all ranks. :S

I have made a few changes but none seem to work. I will keep trying and a determined to get there. lol


Justin :D

Where is the value for $rank_check initially set?

Im guessing this is it?

<?php

/*
Process Set Status (admin_status.pro.php)
*/

$rank_check = "10";
include "../global.inc.php";

$set_username = strtolower(ereg_replace(" ", "", $set_username));

mysql_query("UPDATE members2 SET rank=$set_rank WHERE username = '$set_username' AND game = '$game'");
$findUser = fetch("SELECT id FROM members2 WHERE username = '$set_username' AND game = '$game'");

if ($set_rank == 0)
{
	mysql_query("DELETE FROM forum_replies2 WHERE author = '$findUser[id]' AND game = '$game'");
	mysql_query("DELETE FROM forum_subjects2 WHERE author = '$findUser[id]' AND game = '$game'");
}

$rank = array("Suspended", "Mute", "Under 13", "Police", "Moderator", "Staff", "Admin");

record("Changed Status", "$username changed $set_username's status to $rank[$set_rank]", $timestamp, $game, $userid);

header("Location: admin_set_status.php?game=$game&error=You+have+changed+their+rank+successfully.");

?>

This is the admin set status page!

I havent seen anything obvious although the set array only has the ranks it initially was set up with. since then I have addeda lot more. .... i.e. the suspended, mute, under 13, user,etc etc

Justin

why dont you just use and if/else statement and for each permission include a differant include file.

aka. if(permission == 6)
inlclude('permisson6.php);
else
include something else

Ahh, I see.

In the IF statement I have introduced, you must put quotes around the ranks your are checking.

e.g.:

if($rank_check == "6" || $rank_check == "7" || $rank_check == "8"){
    $let_them_pass = true;
}

Remember, quoted values are strings. E.g., "6" != 6 .

This is interesting! Although this would still not allow me to set an individual admin control to only a selection of ranks???

Im trying to set up inidividual access rights for each rank so the police can mute/suspend users and warn them, then the employment office manager wud be able to warn/mute people and also put [people in access etc
Some of these access rights will be shared though so I need a way to say that only ranks, x y and zcan access this page.

Kind Regards
Justin

It should, but I think, after looking more closely at your admin_status.pro.php, that you are testing the wrong variable in the IF statement.

Try this:

if($set_rank == 6 || $set_rank == 7 || $set_rank == 8){
    $let_them_pass = true;
}

This should mean: anyone with a rank of 6 or 7 or 8 will get to see the content.

heya bill, that still locks outeven using the "" :S

This is a nightmare lol

Sorryabout this guys
Justin

Try the stuff in my last post before this.

And no worries.

Its still locking me out for some reason, What im doing is changing the ==8 to ==10 to allow my to access this page as one of the ranks but it still locks me out.

:s

Justin

OK, well, I'm not sure what else to try without having access to your project. All I can suggest is that you go through all parts of your code and try to understand what each part is logically doing. This may involve reading manuals, and whatnot, but it is worth it. What you are trying to do shouldn't be that difficult, so I have faith that you will figure it out.

I'm busy for the remainder of the day, but I'll continue to watch this thread.

Cheers,

Bill

Thank you for all your help and time! Im going to look through and try to understand it all.

One more doc found was the

<?php

/*
Set Status (admin_status.php)
*/

$page_title = "Set Status";
$rank_check = 10;
include "../header.inc.php";

print "$openHTML";

ECHO <<<END
<P><FORM ACTION="admin_set_status.pro.php?game=$game" METHOD=POST>
   <CENTER><TABLE BGCOLOR="$tableOutline" CELLSPACING=1 CELLPADDING=0 WIDTH=300>
      <TR BGCOLOR="$topAndBottomBG">
         <TD HEIGHT=50>
            <CENTER class=white><FONT SIZE="+2" COLOR="$topAndBottomText"><B>--Set
            User Status--</B></FONT></CENTER>
         </TD>
      </TR>
      <TR BGCOLOR="$maincellColor">
         <TD HEIGHT=100>
            <CENTER><FONT SIZE="-1">I would like to set<BR>
            <INPUT TYPE=text NAME="set_username" VALUE="" SIZE=30><BR>
            to the rank<BR>
            <SELECT NAME="set_rank">
          	<OPTION value=0>Suspended
               <OPTION value=1>Mute
               <OPTION value=2>Under 13
               <OPTION value=3>User
               <OPTION value=4>Moderator
               <OPTION value=5>Police
               <OPTION value=6>Staff -General
               <OPTION value=7>Staff -Development
               <OPTION value=8>Staff -Technical
               <OPTION value=9>Admin -
               <OPTION value=10>CPC Founder
            </SELECT></FONT></CENTER>
         </TD>
      </TR>
      <TR BGCOLOR="$topAndBottomBG">
         <TD HEIGHT=20>
            <CENTER><INPUT TYPE=submit NAME=Submit VALUE="Set Status"></CENTER>
         </TD>
      </TR>
   </TABLE>
   </CENTER>
</FORM></P>
END;

print "$closeHTML";
?>

However,I cant see anything in this! Im going to try and start from the beginning again

Once again Many Thanks
and Merry Christmas

Justin

Heya,

I was still unable to sort this problem out. :O(

Any ideas on how I can set up multi access rank rights to pages in my website??????


Thanks

Justin

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.