Housekeeping Access: Change Ranks

Status
Not open for further replies.

Muffmuncher

Member
Jan 11, 2012
61
12
Which file is it to edit so writers are able to access the housekeeping and post news?

Okay I got it. But meanwhile in dash.php (complete code):
PHP:
 <div id="main">
    <div id="links"></div>
    <div id="header">
      <div id="logo">
        <div id="logo_text">
          <!-- class="logo_colour", allows you to change the color of the logo text -->
          <h1>ASE</h1>
        </div>
      </div>
    </div>
    <div id="site_content">
      <div id="sidebar_container">
        <!-- insert your sidebar items here -->
        <div class="sidebar">
          <div class="sidebar_top"></div>
          <div class="sidebar_item">
          <br />
          [ <a href='dash'>Return to Dashboard</a> ] [ <a href='logout.php'>Log out</a> ]<br /> <br />
            <p>
            <?php if(mysql_result(mysql_query("SELECT rank FROM users WHERE id = '" . $_SESSION['user']['id'] . "'"), 0) >= 5)
            { ?>
            Player Management <br /> <img src='../app/tpl/skins/<?php echo $_CONFIG['template']['style']; ?>/hk/images/line.png'> <br />
            &raquo; <a href='sub'>Last 50 VIP purchases</a> <br />
            &raquo; <a href='vip'>Give a user Regular VIP</a> <br />
            &raquo; <a href='svip'>Give a user Super VIP</a> <br />
            &raquo; <a href='edit'>Edit a users account</a> <br />
            <br />
            Administration <br /> <img src='../app/tpl/skins/<?php echo $_CONFIG['template']['style']; ?>/hk/images/line.png'> <br />
            &raquo; <a href='news'>Post news article</a><br />
            <br />
            <?php } if(mysql_result(mysql_query("SELECT rank FROM users WHERE id = '" . $_SESSION['user']['id'] . "'"), 0) >= 5) { ?>
            Moderation <br /> <img src='../app/tpl/skins/<?php echo $_CONFIG['template']['style']; ?>/hk/images/line.png'> <br />
            &raquo; <a href='banlist'>Ban List</a> <br />
            &raquo; <a href='ip'>IP lookup</a> <br />
            <br />
           
            <?php } ?>
            <br />
            Statistics<br />
            <img src='../app/tpl/skins/<?php echo $_CONFIG['template']['style']; ?>/hk/images/line.png'> <br />
                    Server Status:
            {status} <br />
            {online} user(s) online <br />
   
            </p>
          </div>
          <div class="sidebar_base"></div>
        </div>
      </div>
      <div id="content_container">
 
        <div id="content">
          <!-- insert the page content here -->
          <br />         
 
          <?php
 
echo "<center>Please choose an option from the menu to the left.</center>";
 
?>
 
        </div>
 
      </div>
    </div>
  </div>
  <center>Powered by ZapASE by Jontycat - Design by Predict</center>
  <center>Implemented into RevCMS by Kryptos</center><br />

This part:
PHP:
            <?php if(mysql_result(mysql_query("SELECT rank FROM users WHERE id = '" . $_SESSION['user']['id'] . "'"), 0) >= 5)
            { ?>
            Player Management <br /> <img src='../app/tpl/skins/<?php echo $_CONFIG['template']['style']; ?>/hk/images/line.png'> <br />
            &raquo; <a href='sub'>Last 50 VIP purchases</a> <br />
            &raquo; <a href='vip'>Give a user Regular VIP</a> <br />
            &raquo; <a href='svip'>Give a user Super VIP</a> <br />
            &raquo; <a href='edit'>Edit a users account</a> <br />
            <br />
            Administration <br /> <img src='../app/tpl/skins/<?php echo $_CONFIG['template']['style']; ?>/hk/images/line.png'> <br />
            &raquo; <a href='news'>Post news article</a><br />
            <br />
            <?php } if(mysql_result(mysql_query("SELECT rank FROM users WHERE id = '" . $_SESSION['user']['id'] . "'"), 0) >= 5) { ?>
            Moderation <br /> <img src='../app/tpl/skins/<?php echo $_CONFIG['template']['style']; ?>/hk/images/line.png'> <br />
            &raquo; <a href='banlist'>Ban List</a> <br />
            &raquo; <a href='ip'>IP lookup</a> <br />
            <br />
           
            <?php } ?>

When I change it so it looks like:
PHP:
            <?php if(mysql_result(mysql_query("SELECT rank FROM users WHERE id = '" . $_SESSION['user']['id'] . "'"), 0) >= 7)
            { ?>
            Player Management <br /> <img src='../app/tpl/skins/<?php echo $_CONFIG['template']['style']; ?>/hk/images/line.png'> <br />
            &raquo; <a href='sub'>Last 50 VIP purchases</a> <br />
            &raquo; <a href='vip'>Give a user Regular VIP</a> <br />
            &raquo; <a href='svip'>Give a user Super VIP</a> <br />
            &raquo; <a href='edit'>Edit a users account</a> <br />
            <br />
            <?php if(mysql_result(mysql_query("SELECT rank FROM users WHERE id = '" . $_SESSION['user']['id'] . "'"), 0) >= 5)
            { ?>
            Administration <br /> <img src='../app/tpl/skins/<?php echo $_CONFIG['template']['style']; ?>/hk/images/line.png'> <br />
            &raquo; <a href='news'>Post news article</a><br />
            <br />
            <?php } if(mysql_result(mysql_query("SELECT rank FROM users WHERE id = '" . $_SESSION['user']['id'] . "'"), 0) >= 5) { ?>
            Moderation <br /> <img src='../app/tpl/skins/<?php echo $_CONFIG['template']['style']; ?>/hk/images/line.png'> <br />
            &raquo; <a href='banlist'>Ban List</a> <br />
            &raquo; <a href='ip'>IP lookup</a> <br />
            <br />
           
            <?php } ?>
I get an error. I am trying to get Player Management to be seen only by rank 7 or above, and post news article by rank 5 or above.
 

HabPRO

HabPRO Hotel: The comeback!
May 17, 2012
111
30
Code:
            <?php if(mysql_result(mysql_query("SELECT rank FROM users WHERE id = '" . $_SESSION['user']['id'] . "'"), 0) >= 7)
            { ?>
            Player Management <br /> <img src='../app/tpl/skins/<?php echo $_CONFIG['template']['style']; ?>/hk/images/line.png'> <br />
            &raquo; <a href='sub'>Last 50 VIP purchases</a> <br />
            &raquo; <a href='vip'>Give a user Regular VIP</a> <br />
            &raquo; <a href='svip'>Give a user Super VIP</a> <br />
            &raquo; <a href='edit'>Edit a users account</a> <br />
            <br />
            <?php } if(mysql_result(mysql_query("SELECT rank FROM users WHERE id = '" . $_SESSION['user']['id'] . "'"), 0) >= 5)
            { ?>
            Administration <br /> <img src='../app/tpl/skins/<?php echo $_CONFIG['template']['style']; ?>/hk/images/line.png'> <br />
            &raquo; <a href='news'>Post news article</a><br />
            <br />
            <?php } if(mysql_result(mysql_query("SELECT rank FROM users WHERE id = '" . $_SESSION['user']['id'] . "'"), 0) >= 5) { ?>
            Moderation <br /> <img src='../app/tpl/skins/<?php echo $_CONFIG['template']['style']; ?>/hk/images/line.png'> <br />
            &raquo; <a href='banlist'>Ban List</a> <br />
            &raquo; <a href='ip'>IP lookup</a> <br />
            <br />
         
            <?php } ?>

Now this should work properly. That's the part corrected for you.
 

Muffmuncher

Member
Jan 11, 2012
61
12
Code:
            <?php if(mysql_result(mysql_query("SELECT rank FROM users WHERE id = '" . $_SESSION['user']['id'] . "'"), 0) >= 7)
            { ?>
            Player Management <br /> <img src='../app/tpl/skins/<?php echo $_CONFIG['template']['style']; ?>/hk/images/line.png'> <br />
            &raquo; <a href='sub'>Last 50 VIP purchases</a> <br />
            &raquo; <a href='vip'>Give a user Regular VIP</a> <br />
            &raquo; <a href='svip'>Give a user Super VIP</a> <br />
            &raquo; <a href='edit'>Edit a users account</a> <br />
            <br />
            <?php } if(mysql_result(mysql_query("SELECT rank FROM users WHERE id = '" . $_SESSION['user']['id'] . "'"), 0) >= 5)
            { ?>
            Administration <br /> <img src='../app/tpl/skins/<?php echo $_CONFIG['template']['style']; ?>/hk/images/line.png'> <br />
            &raquo; <a href='news'>Post news article</a><br />
            <br />
            <?php } if(mysql_result(mysql_query("SELECT rank FROM users WHERE id = '" . $_SESSION['user']['id'] . "'"), 0) >= 5) { ?>
            Moderation <br /> <img src='../app/tpl/skins/<?php echo $_CONFIG['template']['style']; ?>/hk/images/line.png'> <br />
            &raquo; <a href='banlist'>Ban List</a> <br />
            &raquo; <a href='ip'>IP lookup</a> <br />
            <br />
       
            <?php } ?>

Now this should work properly. That's the part corrected for you.
Thanks, it now works! Perhaps you can explain so I'll learn? I don't see where you made a change to though.
 

HabPRO

HabPRO Hotel: The comeback!
May 17, 2012
111
30
I expected that you are using an opening { parenthesis and } closing one. I checked the pattern through the PHP codes and saw that there were multiple repeatance of { opening, and being left opened, it serves you are 500 error.

I used to work on the housekeeping on my hotel myself along with Nathan until I pointed out it's with those parenthesis that serves the error. :)
 
Status
Not open for further replies.

Users who are viewing this thread

Top