[Request][Client Error]Look at photo below

Alb

Member
Dec 26, 2013
59
7
You must be registered for see images attach

Can someone please help and tell me why this error has happened?
 

Alb

Member
Dec 26, 2013
59
7
Thats code for global.php
Code:
<?php
//Installation files? - Start
if(file_exists('ainstall.php'))
{
    echo 'Go to <a href="install.php">install.php</a>';
    die;
}
if(file_exists('aupdate.php'))
{
    echo 'Go to <a href="update.php">update.php</a>';
    die;
}
//Installation files? - End
define('SEP', DIRECTORY_SEPARATOR);
$dir = str_replace('register'.SEP, '', dirname(__FILE__).SEP);
$dir = str_replace('functions'.SEP, '', $dir);
$dir = str_replace('housekeeping'.SEP, '', $dir);
define('DIR', $dir);
define('DOCUMENT_ROOT', DIR.SEP);
define('INCLUDES', DIR.'inc'.SEP);
define('WWW', 'http://'.$_SERVER['SERVER_NAME']);

session_start();

require_once DOCUMENT_ROOT.'config.php';

$connect = mysql_connect($host, $username, $password) or die("Could not connect to server, error: ".mysql_error());
mysql_select_db($dbname, $connect) or die("Could not connect to database, error: ".mysql_error());

require_once INCLUDES."class.core.php";
require_once INCLUDES."class.users.php";

$core = new Core();
$users = new Users();

require_once DOCUMENT_ROOT.'lang/'.$language.'.php';

define('MAINTENANCE', $core->Maintenance());

if(USERNAME_REQUIRED == TRUE && !isset($_SESSION["username"]))
header("Location: ".WWW."/characters.php");
if(ACCOUNT_REQUIRED == TRUE && !isset($_SESSION["account"]))
header("Location: ".WWW."/index.php");

$sitename = $core->CmsSetting('cms_name');

if(isset($_SESSION["username"]))
{
$username = $core->EscapeString($_SESSION['username']);
if($users->CheckBan($username))
header($users->BanInfo($username));
}

if(MAINTENANCE && !$users->UserPermission('hk_login', $username) && !defined('MAINTENANCE_PAGE'))
header("Location: ".WWW."/maintenance.php");
?>
 

Zaka

Programmer
Feb 9, 2012
471
121
replace your code with this one:
PHP:
<?php
define('USERNAME_REQUIRED', TRUE);
define('ACCOUNT_REQUIRED', TRUE);
include("../global.php");
if(!isset($_SESSION["username"]))
header("Location: ../characters.php");
elseif(!isset($_SESSION["account"]))
header("Location: ../index.php");
$username = $_SESSION['username'];
$ban = mysql_query("SELECT * FROM bans WHERE bantype = 'user' AND value ='".$username."' AND expire > ".time()."");
if(mysql_num_rows($ban) > 0)
{
session_destroy();
header("Location: index.php?error=ban");
die;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/2245/xhtml">
<head>
<link type="text/css" rel="stylesheet" href="../Public/Styles/<?php echo $currentstyle ?>/CSS/main.css" />
</head>
<body style="text-align:center">
        <table style="padding:50px 50px 50px 50px;">
            <tr>
                <td width="30%"></td>
                <td style="width:64px; height:64px; background-image:url(/Public/Styles/Default/Images/icons/warning_64.png); background-repeat:no-repeat"></td>
                <td style="width:400px">
                    <strong>A problem occurred, sorry Lewis!</strong><br/>
                    Please try reloading the hotel, if the problem continues wait a few minutes before trying again. If you are unable to get onto the hotel for a long peroid of time please report the issue on our forums.
                </td>
                <td width="30%"></td>
            </tr>
        </table>
    <?php include("../system/footer.php"); ?>
</body>
 

Users who are viewing this thread

Top