Broken images begone!

Who wants to go next?


git-svn-id: file:///svn/phpbb/trunk@5606 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Graham Eames 2006-03-06 17:30:29 +00:00
parent 3eb7f4ec28
commit 2246c8d600

View file

@ -254,7 +254,7 @@ class dbal
*/ */
function sql_report($mode, $query = '') function sql_report($mode, $query = '')
{ {
global $cache, $starttime, $phpbb_root_path; global $cache, $starttime, $phpbb_root_path, $user;
if (empty($_GET['explain'])) if (empty($_GET['explain']))
{ {
@ -278,27 +278,43 @@ class dbal
$mtime = explode(' ', microtime()); $mtime = explode(' ', microtime());
$totaltime = $mtime[0] + $mtime[1] - $starttime; $totaltime = $mtime[0] + $mtime[1] - $starttime;
echo ' echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">';
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8869-1"><meta http-equiv="Content-Style-Type" content="text/css"><link rel="stylesheet" href="' . $phpbb_root_path . 'adm/style/sql_report.css" type="text/css"> echo '<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">';
<style type="text/css"> th { background-image: url(\'' . $phpbb_root_path . 'adm/images/cellpic3.gif\') } td.cat { background-image: url(\'' . $phpbb_root_path . 'adm/images/cellpic1.gif\') } </style> echo '<head>';
<title>Explain</title></head><body> echo '<meta http-equiv="content-type" content="text/html; charset=utf-8" />';
<table width="100%" cellspacing="0" cellpadding="0" border="0"><tr> echo '<title>SQL Report</title>';
<td><a href="' . htmlspecialchars(preg_replace('/&explain=([^&]*)/', '', $_SERVER['REQUEST_URI'])) . '"><img src="' . $phpbb_root_path . 'adm/images/header_left.jpg" width="200" height="60" alt="phpBB Logo" title="phpBB Logo" border="0" /></a></td> echo '<link href="' . $phpbb_root_path . 'adm/style/admin.css" rel="stylesheet" type="text/css" media="screen" />';
<td width="100%" background="' . $phpbb_root_path . 'adm/images/header_bg.jpg" height="60" align="right" nowrap="nowrap"><span class="maintitle">SQL Report</span> &nbsp; &nbsp; &nbsp;</td> echo '<link href="' . $phpbb_root_path . 'adm/style/sql_report.css" rel="stylesheet" type="text/css" media="screen" />';
</tr></table> echo '</head>';
<br clear="all"/> echo '<body id="errorpage">';
<table width="95%" cellspacing="1" cellpadding="4" border="0" align="center"><tr> echo '<div id="wrap">';
<td height="40" align="center" valign="middle"><b>Page generated in ' . round($totaltime, 4) . " seconds with {$this->num_queries} queries" . (($this->cache_num_queries) ? " + {$this->cache_num_queries} " . (($this->cache_num_queries == 1) ? 'query' : 'queries') . ' returning data from cache' : '') . '</b></td> echo ' <div id="page-header">';
</tr><tr> echo ' <a href="' . htmlspecialchars(preg_replace('/&explain=([^&]*)/', '', $_SERVER['REQUEST_URI'])) . '">Return to previous page</a>';
<td align="center" nowrap="nowrap">Time spent on MySQL queries: <b>' . round($this->sql_time, 5) . 's</b> | Time spent on PHP: <b>' . round($totaltime - $this->sql_time, 5) . 's</b></td> echo ' </div>';
</tr></table> echo ' <div id="page-body">';
<table width="95%" cellspacing="1" cellpadding="4" border="0" align="center"><tr> echo ' <div class="panel">';
<td> echo ' <span class="corners-top"><span></span></span>';
' . $this->sql_report . '</td> echo ' <div id="content">';
</tr></table> echo ' <h1>SQL Report</h1>';
<br /> echo ' <table width="95%" cellspacing="1" cellpadding="4" border="0" align="center"><tr>
</body></html> <td height="40" align="center" valign="middle"><b>Page generated in ' . round($totaltime, 4) . " seconds with {$this->num_queries} queries" . (($this->cache_num_queries) ? " + {$this->cache_num_queries} " . (($this->cache_num_queries == 1) ? 'query' : 'queries') . ' returning data from cache' : '') . '</b></td>
'; </tr><tr>
<td align="center" nowrap="nowrap">Time spent on MySQL queries: <b>' . round($this->sql_time, 5) . 's</b> | Time spent on PHP: <b>' . round($totaltime - $this->sql_time, 5) . 's</b></td>
</tr></table>
<table width="95%" cellspacing="1" cellpadding="4" border="0" align="center"><tr>
<td>' . $this->sql_report . '</td>
</tr></table>';
echo ' </div>';
echo ' <span class="corners-bottom"><span></span></span>';
echo ' </div>';
echo ' </div>';
echo ' <div id="page-footer">';
echo ' Powered by phpBB &copy; ' . date('Y') . ' <a href="http://www.phpbb.com/">phpBB Group</a>';
echo ' </div>';
echo '</div>';
echo '</body>';
echo '</html>';
exit; exit;
break; break;