• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Solved Sorry You Don't have access to this page

Imfreezing

Krossa Kapitalismen
Joined
Jun 7, 2012
Messages
1,009
Solutions
1
Reaction score
88
Location
Edron
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,
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>';
}
    ?>
 
I was asked by @StreamSide to have a look and see if I could help you. A white page usually means that you have got an error, but it is being suppressed. You could either send me your TeamViewer credentials through a private message and I'll help you out that way, or you could, in your index.php file, change the error_reporting(E_ALL ^ E_STRICT ^ E_NOTICE); line to error_reporting(E_ALL); to display all errors (this is not recommended in production environments, so once you're done, change it to error_reporting(0); to disable any errors from being displayed.

Disable the DEBUG_DATABASE constant again, and check whether you receive any PHP errors or not, if you do, please share them with us.
Solved!, Don't really wanna bump this,but i have too say
This guy is a beast!! helped me with aloot of nasty buggs on my website,Really appriacted <3 (no homo)
and also thank you @StreamSide For calling him out ofc
 
Back
Top