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):
This part:
When I change it so it looks like:
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.
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 />
» <a href='sub'>Last 50 VIP purchases</a> <br />
» <a href='vip'>Give a user Regular VIP</a> <br />
» <a href='svip'>Give a user Super VIP</a> <br />
» <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 />
» <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 />
» <a href='banlist'>Ban List</a> <br />
» <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 />
» <a href='sub'>Last 50 VIP purchases</a> <br />
» <a href='vip'>Give a user Regular VIP</a> <br />
» <a href='svip'>Give a user Super VIP</a> <br />
» <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 />
» <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 />
» <a href='banlist'>Ban List</a> <br />
» <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 />
» <a href='sub'>Last 50 VIP purchases</a> <br />
» <a href='vip'>Give a user Regular VIP</a> <br />
» <a href='svip'>Give a user Super VIP</a> <br />
» <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 />
» <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 />
» <a href='banlist'>Ban List</a> <br />
» <a href='ip'>IP lookup</a> <br />
<br />
<?php } ?>