I'm having trouble with one page on my site. It'll work fine for a couple of refreshes (less than a second to load), then either after a couple, or when i change anything on it it just doesn't load. Firefox tab has the Loading text on it, the status bar says Done, and thats all it does.
The page is made up of several (couple of includes & templates)
The page itself
http://new.midnighttempest.com/viewcards.php?user=desbrina
Other pages with incorrect usernames load instantly with the user not found, such as
http://new.midnighttempest.com/viewcards.php?user=des
The php file
<?php
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'includes/functions_userpage.' . $phpEx);
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();
$userpage = new userPage();
if(!isset($_GET['user']))
{
trigger_error("There is no user selected");
}
page_header('User: ' . $_GET['user']);
// Get the details of the user
$sql_array = array(
'SELECT' => 'u.user_id, s.levelbadge, s.linkbutton, s.prejoinbadge, s.layout, s.bgcolour, s.fcolour, s.bimage',
'FROM' => array(USERS_TABLE => 'u'),
'LEFT_JOIN' => array(
array(
'FROM' => array(SETTINGS_TABLE => 's'),
'ON' => 's.userid = u.user_id'
)
),
'WHERE' => "u.username = '" . $_GET['user'] . "'"
);
$sql = $db->sql_build_query('SELECT', $sql_array);
$result = $db->sql_query($sql);
$users = $db->sql_fetchrow($result);
if(!$users)
{
trigger_error("No user by the name <strong>".$_GET['user']."</strong>");
}
if($users['layout'] == '1')
{
// Single
$body = 'users-single.html';
}
else
{
// Multiple
if(!isset($_GET['page']) || $_GET['page'] == 'home')
{
$body = 'users-multi-home.html';
}
elseif($_GET['page'] == 'mastered')
{
$body = 'users-multi-mastered.html';
}
elseif($_GET['page'] == 'collect')
{
$body = 'users-multi-collect.html';
}
elseif($_GET['page'] == 'keep')
{
$body = 'users-multi-keep.html';
}
elseif($_GET['page'] == 'willtrade')
{
$body = 'users-multi-willtrade.html';
}
elseif($_GET['page'] == 'misc')
{
$body = 'users-multi-misc.html';
}
}
$template->set_filenames(
array(
'body' => $body,
)
);
$template->assign_vars(
array(
'WILLTRADE' => $userpage->getWillTrade($users['user_id']),
'BGCOLOUR' => $users['bgcolour'],
'FCOLOUR' => $users['fcolour'],
'BIMAGE' => $users['bimage'],
'USER' => $_GET['user'],
'COLLECT' => $userpage->getCollecting($users['user_id']),
'KEEP' => $userpage->getKeeping($users['user_id']),
'LEVEL' => '<a href="/main.php"><img src="'.$users['levelbadge'].'" alt="Level Badge" border="0" /></a>',
'LINK' => '<a href="/main.php"><img src="'.$users['linkbutton'].'" alt="Link Button" border="0" /></a>',
'PREJOIN' => '<a href="/main.php"><img src="'.$users['prejoinbadge'].'" alt="Prejoin Badge" border="0" /></a>',
'CARDCOUNT' => $userpage->getCardCount($users['user_id']),
'MASTERED' => $userpage->getMastered($users['user_id']),
'LOG' => $userpage->getLog($users['user_id']),
'MEMBER' => $userpage->getMembers($users['user_id']),
'COUPONS' => $userpage->getCoupons($users['user_id']),
'STAMPS' => $userpage->getStamps($users['user_id']),
'DOUBLES' => $userpage->getDoubles($users['user_id']),
'PENDING' => $userpage->getPending($users['user_id'])
)
);
page_footer();
?>
with extra functions within the functions_userpage file
http://pastebin.com/m6031c91a - too long for the post
the template (one of them, all are similar)
<!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/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Midnight Tempest • User: {USER}</title>
<style type="text/css">
<!--
body {
font-family: Verdana, Arial, Helvetica, sans-serif;
color: #{FCOLOUR};
background-color: #{BGCOLOUR};
background-repeat: repeat;
background-image: url({IMAGE});
}
-->
</style>
</head>
<body>
<p>{LEVEL}<br />
{LINK}<br />
{PREJOIN}<br />
<br />
{CARDCOUNT}
</p>
<p> </p>
<p>{MASTERED}</p>
<p>{COLLECT}</p>
<p>{KEEP}</p>
<p>{WILLTRADE} </p>
<p>{MEMBER}</p>
<p>{DOUBLES}</p>
<p>{PENDING}</p>
<p>{COUPONS}</p>
<p>{STAMPS}</p>
<p>{LOG}</p>
</body>
</html>
Any idea why this page doesn't load.
The error log gives no help, just a few file not founds to do with images, and not actually having a 404 & robots.txt files, which have been sorted anyway. The problem seems to be to do with firefox, since it loads fine in IE
Also, on this page
http://new.midnighttempest.com/randomizer.php
there is a huge gap between the images on the normal cards and the hr. This only happens on firefox as well