Imfreezing
Krossa Kapitalismen
Hello otlanders,When i try to make a custom page on my server that haves Admin access only,It only comes up
this Sorry, you have not the rights to access this page. But then it shows everything below,I want it too just say Sorry, you have not the rights to access this page. when im a visiter,and When im on a admin i can pass,
this Sorry, you have not the rights to access this page. But then it shows everything below,I want it too just say Sorry, you have not the rights to access this page. when im a visiter,and When im on a admin i can pass,
Code:
<?php
if(!defined('INITIALIZED'))
exit;
if($group_id_of_acc_logged >= $config['site']['access_admin_panel'])
{
}
else
{
$main_content .= 'Sorry, you have not the rights to access this page.';
}
$auctions = $SQL->query('SELECT `auction_system`.`player`, `auction_system`.`id`, `auction_system`.`item_name`, `auction_system`.`item_id`, `auction_system`.`count`, `auction_system`.`cost`, `auction_system`.`date`, `players`.`name` FROM `auction_system`, `players` WHERE `players`.`id` = `auction_system`.`player` ORDER BY `auction_system`.`id` DESC')->fetchAll();
$players = 0;
$main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><b>Instruction<b></TD></TR><TR BGCOLOR='.$config['site']['darkborder'].'><TD><center><h2>Bettingadmin</h2><b>Watch bets from here</b><br /><small></small><br /><br /><B></b><br /><small></small><br /><br /><b></b><br /><small>example: !offer remove, 1943</small><br /><br /><b>!offer withdraw</b><br /><small>Use this command to get money for sold items.</small></center></TR></TD></TABLE><br />';
if(empty($auctions))
{
$main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><b>Auctions</b></td></TR><TR BGCOLOR='.$config['site']['darkborder'].'><TD>Currently is no one active Auction.</TD></TR></TABLE>';
$main_content .= '<br /><p align="right"><small>System created by <a href="http://otland.net/members/vDk/">vDk</a>.</small> And remade by <a href="http://otland.net/members/Imfreezing/">Imfreezing</a></small></p>';
}
else
{
foreach($auctions as $auction) {
$players++;
if(is_int($players / 2))
$bgcolor = $config['site']['lightborder'];
else
$bgcolor = $config['site']['darkborder'];
$cost = round($auction['cost']/1000, 2);
$content .= '<TR BGCOLOR='.$bgcolor.'><TD><center>'.$auction['id'].'</center></TD><TD><center><img src="http://item-images.ots.me/860/'.$auction['item_id'].'.gif"/></center></TD><TD><center>'.$auction['item_name'].'</center></TD><TD><center><a href="?subtopic=characters&name='.urlencode($auction['name']).'">'.$auction['name'].'</a></center></TD><TD><center>'.$auction['count'].'</center></TD><TD><center>'.$cost.'k<br /><small>'.$auction['cost'].'gp</small></center></TD><TD><center>!offer buy, '.$auction['id'].'</center></TR>';
}
$main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><b><center>ID</center></b></TD><TD class="white"><b><center>Image</center></b></TD><TD class="white"><b><center>Betting Item</center></b></TD><TD class="white"><b><center>Player</center></b></TD><TD class="white"><b><center>Count</center></b></TD><TD class="white"><b><center>Nothing</center></b></td><TD class="white"><b><center>!removebet</center></b></td></TR>'.$content.'</TABLE>';
$main_content .= '<br /><p align="right"><small>System created by <a href="http://otland.net/members/vDk/">vDk</a>.</small> And remade by <a href="http://otland.net/members/imfreezing.159326/">Imfreezing</a></small></p>';
}
?>