<?php
require("./SSI.php");
echo '<html>
<head>
<title>PAGE TITLE</title>
<!-- The ?rc3 part of this link is just here to make sure browsers don\'t cache it wrongly. -->
<link rel="stylesheet" type="text/css" href="'
, $settings['theme_url'], '/style.css?rc3" />
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/print.css?rc3" media="print" />
</head>
<body class="windowbg">
PAGE CONTENT
</body>
</html>'
;
?>'
How come a ?> appears on the top of the page when I view it? And how do I get rid of it?

Busy posted this at 09:36—30th October 2006.
He has: 6,151 posts
Joined: May 2001
do this:
<?phprequire("./SSI.php");
?>
<html>
<head>
<title>PAGE TITLE</title>
<!-- The ?rc3 part of this link is just here to make sure browsers don\'t cache it wrongly. -->
<link rel="stylesheet" type="text/css" href="<?=$settings['theme_url']?>/style.css?rc3" />
<link rel="stylesheet" type="text/css" href="<?=$settings['default_theme_url']?>/print.css?rc3" media="print" />
</head>
<body class="windowbg">
PAGE CONTENT
</body>
</html>
'
if PAGE CONTENT is a PHP variable wrap it in php tags.
Not sure if it is your code or the forum doing it, but the commas (href="', $settings['...) on the href bits should be full stops href="'. $settings[ ...
You didn't say echo ... was being shown on the screen so I assume you are either saving this as a .php file or you have added a .htaccess file so as to view a .html file as a .php file
<?bhb if(broken){ echo("It wasn't me
"); } ?>
Learn HTML the ez way - EzHTML.net
Some people are like slinkies, they dont really serve any purpose but they still bring a smile to your face when you push them down the stairs ...
rctxtreme posted this at 05:07—31st October 2006.
They have: 13 posts
Joined: Oct 2006
Still there. It is a php file. And the commas were used in the index.template.php file for SMF Default, so why should it be full stops?
Busy posted this at 08:57—31st October 2006.
He has: 6,151 posts
Joined: May 2001
Check the SSI.php file for the ?>
the comma is like a continue/and, the full stop like a break/insert
echo "stuff goes here ". $variable ." more stuff ";
same for single quotes (double just stands out more on here)
commas are used in things like javascript to continue long lines
<?bhb if(broken){ echo("It wasn't me
"); } ?>
Learn HTML the ez way - EzHTML.net
Some people are like slinkies, they dont really serve any purpose but they still bring a smile to your face when you push them down the stairs ...
rctxtreme posted this at 10:25—31st October 2006.
They have: 13 posts
Joined: Oct 2006
The ?> is at the end of SSI.php:
// Check the passed ID_MEMBER/password. If $is_username is true, treats $id as a username.function ssi_checkPassword($id = null, $password = null, $is_username = false)
{
global $db_prefix, $sourcedir;
// If $id is null, this was most likely called from a query string and should do nothing.
if ($id === null)
return;
$request = db_query("
SELECT passwd, memberName, is_activated
FROM {$db_prefix}members
WHERE " . ($is_username ? 'memberName' : 'ID_MEMBER') . " = '$id'
LIMIT 1", __FILE__, __LINE__);
list ($pass, $user, $active) = mysql_fetch_row($request);
mysql_free_result($request);
return sha1(strtolower($user) . $password) == $pass && $active == 1;
}
?>
'
Busy posted this at 20:41—31st October 2006.
He has: 6,151 posts
Joined: May 2001
If that is the whole SSI.php file contents, then add a <?php at the very top of the file
rctxtreme posted this at 05:22—1st November 2006.
They have: 13 posts
Joined: Oct 2006
>_<
<?php/******************************************************************************
* SSI.php *
*******************************************************************************
* SMF: Simple Machines Forum *
* Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com) *
* =========================================================================== *
* Software Version: SMF 1.1 RC3 *
* Software by: Simple Machines (http://www.simplemachines.org) *
* Copyright 2001-2006 by: Lewis Media (http://www.lewismedia.com) *
* Support, News, Updates at: http://www.simplemachines.org *
*******************************************************************************
* This program is free software; you may redistribute it and/or modify it *
* under the terms of the provided license as published by Lewis Media. *
* *
* This program is distributed in the hope that it is and will be useful, *
* but WITHOUT ANY WARRANTIES; without even any implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* *
* See the "license.txt" file for details of the Simple Machines license. *
* The latest version can always be found at http://www.simplemachines.org. *
******************************************************************************/
// Don't do anything if SMF is already loaded.
if (defined('SMF'))return true; define('SMF', 'SSI'); // We're going to want a few globals... these are all set later.
global $time_start, $maintenance, $msubject, $mmessage, $mbname, $language;
global $boardurl, $boarddir, $sourcedir, $webmaster_email, $cookiename;
global $db_server, $db_name, $db_user, $db_prefix, $db_persist, $db_error_send, $db_last_error;
global $db_connection, $modSettings, $context, $sc, $user_info, $topic, $board, $txt; // Remember the current configuration so it can be set back.
$ssi_magic_quotes_runtime = get_magic_quotes_runtime();
@set_magic_quotes_runtime(0);
$time_start = microtime(); // Get the forum's settings for database and file paths.
require_once(dirname(__FILE__) . '/Settings.php'); $ssi_error_reporting = error_reporting(E_ALL); // Don't do john didley if the forum's been shut down competely.
if ($maintenance == 2 && (!isset($ssi_maintenance_off) || $ssi_maintenance_off !== true))
die($mmessage); // Fix for using the current directory as a path.
if (substr($sourcedir, 0, 1) == '.' && substr($sourcedir, 1, 1) != '.')
$sourcedir = dirname(__FILE__) . substr($sourcedir, 1); // Load the important includes.
require_once($sourcedir . '/QueryString.php');
require_once($sourcedir . '/Subs.php');
require_once($sourcedir . '/Errors.php');
require_once($sourcedir . '/Load.php');
require_once($sourcedir . '/Security.php');
if (@
version_compare(PHP_VERSION, '4.2.3') != 1)require_once($sourcedir . '/Subs-Compat.php'); // Connect to the MySQL database.
if (empty($db_persist))
$db_connection = @mysql_connect($db_server, $db_user, $db_passwd);
else
$db_connection = @mysql_pconnect($db_server, $db_user, $db_passwd);
if ($db_connection === false)
return false; // Add the database onto the prefix to avoid conflicts with other scripts.
if (strpos($db_prefix, '.') === false)
$db_prefix = is_numeric(substr($db_prefix, 0, 1)) ? $db_name . '.' . $db_prefix : '`' . $db_name . '`.' . $db_prefix;
else
@mysql_select_db($db_name, $db_connection); // Load installed 'Mods' settings.
reloadSettings();
// Clean the request variables.
cleanRequest(); // Check on any hacking attempts.
if (isset($_REQUEST['GLOBALS']) || isset($_COOKIE['GLOBALS']))
die('Hacking attempt...');
elseif (isset($_REQUEST['ssi_theme']) && (int) $_REQUEST['ssi_theme'] == (int) $ssi_theme)
die('Hacking attempt...');
elseif (isset($_COOKIE['ssi_theme']) && (int) $_COOKIE['ssi_theme'] == (int) $ssi_theme)
die('Hacking attempt...');
elseif (isset($_REQUEST['ssi_layers']))
{
if ((get_magic_quotes_gpc() ? addslashes($_REQUEST['ssi_layers']) : $_REQUEST['ssi_layers']) == htmlspecialchars($ssi_layers))
die('Hacking attempt...');
}
if (isset($_REQUEST['context']))
die('Hacking attempt...'); // Make sure wireless is always off.
define('WIRELESS', false); // Gzip output? (because it must be boolean and true, this can't be hacked.)
if (isset($ssi_gzip) && $ssi_gzip === true && @ini_get('zlib.output_compression') != '1' && @ini_get('output_handler') != 'ob_gzhandler' && @version_compare(PHP_VERSION, '4.2.0') != -1)
ob_start('ob_gzhandler');
else
$modSettings['enableCompressedOutput'] = '0'; // Primarily, this is to fix the URLs...
ob_start('ob_sessrewrite'); // Start the session... known to scramble SSI includes in cases...
if (!headers_sent())
loadSession();
else
{
if (isset($_COOKIE[session_name()]) || isset($_REQUEST[session_name()]))
{
// Make a stab at it, but ignore the E_WARNINGs generted because we can't send headers.
$temp = error_reporting(error_reporting() & !E_WARNING);
loadSession();
error_reporting($temp);
}
if (!isset(
$_SESSION['rand_code']))$_SESSION['rand_code'] = '';
$sc = &$_SESSION['rand_code'];
} // Get rid of $board and $topic... do stuff loadBoard would do.
unset($board);
unset($topic);
$user_info['is_mod'] = false;
$context['user']['is_mod'] = false;
$context['linktree'] = array(); // Load the user and their cookie, as well as their settings.
loadUserSettings();
// Load the current or SSI theme. (just ues $ssi_theme = ID_THEME;)
loadTheme(isset($ssi_theme) ? (int) $ssi_theme : 0); // Take care of any banning that needs to be done.
if (isset($_REQUEST['ssi_ban']) || (isset($ssi_ban) && $ssi_ban === true))
is_not_banned(); // Load the current user's permissions....
loadPermissions(); // Load the stuff like the menu bar, etc.
if (isset($ssi_layers))
{
$context['template_layers'] = $ssi_layers;
template_header();
}
else
setupThemeContext(); // Make sure they didn't muss around with the settings... but only if it's not cli.
if (isset($_SERVER['REMOTE_ADDR']) && !isset($_SERVER['is_cli']) && session_id() == '')
trigger_error($txt['ssi_session_broken'], E_USER_NOTICE); // Without visiting the forum this session variable might not be set on submit.
if (!isset($_SESSION['USER_AGENT']) && (!isset($_GET['ssi_function']) || $_GET['ssi_function'] !== 'pollVote'))
$_SESSION['USER_AGENT'] = $_SERVER['HTTP_USER_AGENT']; // Call a function passed by GET.
if (isset($_GET['ssi_function']) && function_exists('ssi_' . $_GET['ssi_function']))
{
call_user_func('ssi_' . $_GET['ssi_function']);
exit;
}
if (isset($_GET['ssi_function']))
exit;
// You shouldn't just access SSI.php directly by URL!!
elseif (basename($_SERVER['PHP_SELF']) == 'SSI.php')
die(sprintf($txt['ssi_not_direct'], $user_info['is_admin'] ? '\'' . addslashes(__FILE__) . '\'' : '\'SSI.php\'')); error_reporting($ssi_error_reporting);
@set_magic_quotes_runtime($ssi_magic_quotes_runtime);
return
true; // This shuts down the SSI and shows the footer.function ssi_shutdown()
{
if (!isset($_GET['ssi_function']) || $_GET['ssi_function'] != 'shutdown')
template_footer();
} // Display a welcome message, like: Hey, User, you have 0 messages, 0 are new.
function ssi_welcome($output_method = 'echo')
{
global $context, $txt, $scripturl;
if (
$output_method == 'echo'){
if ($context['user']['is_guest'])
echo $txt['welcome_guest'];
else
echo $txt['hello_member'], ' <b>', $context['user']['name'], '</b>', allowedTo('pm_read') ? ', ' . $txt[152] . ' <a href="' . $scripturl . '?action=pm">' . $context['user']['messages'] . ' ' . ($context['user']['messages'] == '1' ? $txt[471] : $txt[153]) . '</a>' . $txt['newmessages4'] . ' ' . $context['user']['unread_messages'] . ' ' . ($context['user']['unread_messages'] == '1' ? $txt['newmessages0'] : $txt['newmessages1']) : '', '.';
}
// Don't echo... then do what?!
else
return $context['user'];
} // Display a menu bar, like is displayed at the top of the forum.
function ssi_menubar($output_method = 'echo')
{
global $context;
if (
$output_method == 'echo')template_menu();
// What else could this do?
else
return $context;
} // Show a logout link.
function ssi_logout($redirect_to = '', $output_method = 'echo')
{
global $context, $txt, $scripturl, $sc;
if (
$redirect_to != '')$_SESSION['logout_url'] = $redirect_to;
// Guests can't log out.if ($context['user']['is_guest'])
return false;
echo
'<a href="', $scripturl, '?action=logout;sesc=', $sc, '">', $txt[108], '</a>';} // Recent post list: [board] Subject by Poster Date
function ssi_recentPosts($num_recent = 8, $exclude_boards = null, $output_method = 'echo')
{
global $context, $settings, $scripturl, $txt, $db_prefix, $ID_MEMBER;
global $user_info, $modSettings, $func;
if (
$exclude_boards === null && !empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0)$exclude_boards = array($modSettings['recycle_board']);
else
$exclude_boards = empty($exclude_boards) ? array() : $exclude_boards;
// Find all the posts. Newer ones will have higher IDs.$request = db_query("
SELECT
m.posterTime, m.subject, m.ID_TOPIC, m.ID_MEMBER, m.ID_MSG, m.ID_BOARD, b.name AS bName,
IFNULL(mem.realName, m.posterName) AS posterName, " . ($user_info['is_guest'] ? '1 AS isRead, 0 AS new_from' : '
IFNULL(lt.ID_MSG, IFNULL(lmr.ID_MSG, 0)) >= m.ID_MSG_MODIFIED AS isRead,
IFNULL(lt.ID_MSG, IFNULL(lmr.ID_MSG, -1)) + 1 AS new_from') . ", LEFT(m.body, 384) AS body, m.smileysEnabled
FROM ({$db_prefix}messages AS m, {$db_prefix}boards AS b)
LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER)" . (!$user_info['is_guest'] ? "
LEFT JOIN {$db_prefix}log_topics AS lt ON (lt.ID_TOPIC = m.ID_TOPIC AND lt.ID_MEMBER = $ID_MEMBER)
LEFT JOIN {$db_prefix}log_mark_read AS lmr ON (lmr.ID_BOARD = m.ID_BOARD AND lmr.ID_MEMBER = $ID_MEMBER)" : '') . "
WHERE m.ID_MSG >= " . ($modSettings['maxMsgID'] - 25 * min($num_recent, 5)) . "
AND b.ID_BOARD = m.ID_BOARD" . (empty($exclude_boards) ? '' : "
AND b.ID_BOARD NOT IN (" . implode(', ', $exclude_boards) . ")") . "
AND $user_info[query_see_board]
ORDER BY m.ID_MSG DESC
LIMIT $num_recent", __FILE__, __LINE__);
$posts = array();
while ($row = mysql_fetch_assoc($request))
{
$row['body'] = strip_tags(strtr(parse_bbc($row['body'], $row['smileysEnabled'], $row['ID_MSG']), array('<br />' => '
')));
if ($func['strlen']($row['body']) > 128)
$row['body'] = $func['substr']($row['body'], 0, 128) . '...';
// Censor it!censorText($row['subject']);
censorText($row['body']);
// Build the array.$posts[] = array(
'board' => array(
'id' => $row['ID_BOARD'],
'name' => $row['bName'],
'href' => $scripturl . '?board=' . $row['ID_BOARD'] . '.0',
'link' => '<a href="' . $scripturl . '?board=' . $row['ID_BOARD'] . '.0">' . $row['bName'] . '</a>'
),
'topic' => $row['ID_TOPIC'],
'poster' => array(
'id' => $row['ID_MEMBER'],
'name' => $row['posterName'],
'href' => empty($row['ID_MEMBER']) ? '' : $scripturl . '?action=profile;u=' . $row['ID_MEMBER'],
'link' => empty($row['ID_MEMBER']) ? $row['posterName'] : '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">' . $row['posterName'] . '</a>'
),
'subject' => $row['subject'],
'short_subject' => shorten_subject($row['subject'], 25),
'preview' => $row['body'],
'time' => timeformat($row['posterTime']),
'timestamp' => forum_time(true, $row['posterTime']),
'href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.msg' . $row['ID_MSG'] . ';topicseen#new',
'link' => '<a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '.msg' . $row['ID_MSG'] . '#msg' . $row['ID_MSG'] . '">' . $row['subject'] . '</a>',
'new' => !empty($row['isRead']),
'new_from' => $row['new_from'],
);
}
mysql_free_result($request);
// Just return it.if ($output_method != 'echo' || empty($posts))
return $posts;
echo
'<table border="0" class="ssi_table">';
foreach ($posts as $post)
echo '
<tr>
<td align="right" valign="top" nowrap="nowrap">
[', $post['board']['link'], ']
</td>
<td valign="top">
<a href="', $post['href'], '">', $post['subject'], '</a>
', $txt[525], ' ', $post['poster']['link'], '
', $post['new'] ? '' : '<a href="' . $scripturl . '?topic=' . $post['topic'] . '.msg' . $post['new_from'] . ';topicseen#new"><img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" alt="' . $txt[302] . '" border="0" /></a>', '
</td>
<td align="right" nowrap="nowrap">
', $post['time'], '
</td>
</tr>';
echo '
</table>';
} // Recent topic list: [board] Subject by Poster Date
function ssi_recentTopics($num_recent = 8, $exclude_boards = null, $output_method = 'echo')
{
global $context, $settings, $scripturl, $txt, $db_prefix, $ID_MEMBER;
global $user_info, $modSettings, $func;
if (
$exclude_boards === null && !empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0)$exclude_boards = array($modSettings['recycle_board']);
else
$exclude_boards = empty($exclude_boards) ? array() : $exclude_boards;
$stable_icons = array('xx', 'thumbup', 'thumbdown', 'exclamation', 'question', 'lamp', 'smiley', 'angry', 'cheesy', 'grin', 'sad', 'wink', 'moved', 'recycled', 'wireless');$icon_sources = array();
foreach ($stable_icons as $icon)
$icon_sources[$icon] = 'images_url';
// Find all the posts in distinct topics. Newer ones will have higher IDs.$request = db_query("
SELECT
m.posterTime, ms.subject, m.ID_TOPIC, m.ID_MEMBER, m.ID_MSG, b.ID_BOARD, b.name AS bName,
IFNULL(mem.realName, m.posterName) AS posterName, " . ($user_info['is_guest'] ? '1 AS isRead, 0 AS new_from' : '
IFNULL(lt.ID_MSG, IFNULL(lmr.ID_MSG, 0)) >= m.ID_MSG_MODIFIED AS isRead,
IFNULL(lt.ID_MSG, IFNULL(lmr.ID_MSG, -1)) + 1 AS new_from') . ", LEFT(m.body, 384) AS body, m.smileysEnabled, m.icon
FROM ({$db_prefix}messages AS m, {$db_prefix}topics AS t, {$db_prefix}boards AS b, {$db_prefix}messages AS ms)
LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER)" . (!$user_info['is_guest'] ? "
LEFT JOIN {$db_prefix}log_topics AS lt ON (lt.ID_TOPIC = t.ID_TOPIC AND lt.ID_MEMBER = $ID_MEMBER)
LEFT JOIN {$db_prefix}log_mark_read AS lmr ON (lmr.ID_BOARD = b.ID_BOARD AND lmr.ID_MEMBER = $ID_MEMBER)" : '') . "
WHERE t.ID_LAST_MSG >= " . ($modSettings['maxMsgID'] - 35 * min($num_recent, 5)) . "
AND t.ID_LAST_MSG = m.ID_MSG
AND b.ID_BOARD = t.ID_BOARD" . (empty($exclude_boards) ? '' : "
AND b.ID_BOARD NOT IN (" . implode(', ', $exclude_boards) . ")") . "
AND $user_info[query_see_board]
AND ms.ID_MSG = t.ID_FIRST_MSG
ORDER BY t.ID_LAST_MSG DESC
LIMIT $num_recent", __FILE__, __LINE__);
$posts = array();
while ($row = mysql_fetch_assoc($request))
{
$row['body'] = strip_tags(strtr(parse_bbc($row['body'], $row['smileysEnabled'], $row['ID_MSG']), array('<br />' => '
')));
if ($func['strlen']($row['body']) > 128)
$row['body'] = $func['substr']($row['body'], 0, 128) . '...';
// Censor the subject.censorText($row['subject']);
censorText($row['body']);
if (empty(
$modSettings['messageIconChecks_disable']) && !isset($icon_sources[$row['icon']]))$icon_sources[$row['icon']] = file_exists($settings['theme_dir'] . '/images/post/' . $row['icon'] . '.gif') ? 'images_url' : 'default_images_url';
// Build the array.$posts[] = array(
'board' => array(
'id' => $row['ID_BOARD'],
'name' => $row['bName'],
'href' => $scripturl . '?board=' . $row['ID_BOARD'] . '.0',
'link' => '<a href="' . $scripturl . '?board=' . $row['ID_BOARD'] . '.0">' . $row['bName'] . '</a>'
),
'topic' => $row['ID_TOPIC'],
'poster' => array(
'id' => $row['ID_MEMBER'],
'name' => $row['posterName'],
'href' => empty($row['ID_MEMBER']) ? '' : $scripturl . '?action=profile;u=' . $row['ID_MEMBER'],
'link' => empty($row['ID_MEMBER']) ? $row['posterName'] : '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">' . $row['posterName'] . '</a>'
),
'subject' => $row['subject'],
'short_subject' => shorten_subject($row['subject'], 25),
'preview' => $row['body'],
'time' => timeformat($row['posterTime']),
'timestamp' => forum_time(true, $row['posterTime']),
'href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.msg' . $row['ID_MSG'] . ';topicseen#new',
'link' => '<a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '.msg' . $row['ID_MSG'] . '#new">' . $row['subject'] . '</a>',
'new' => !empty($row['isRead']),
'new_from' => $row['new_from'],
'icon' => '<img src="' . $settings[$icon_sources[$row['icon']]] . '/post/' . $row['icon'] . '.gif" align="middle" alt="' . $row['icon'] . '" border="0" />',
);
}
mysql_free_result($request);
// Just return it.if ($output_method != 'echo' || empty($posts))
return $posts;
echo
'<table border="0" class="ssi_table">';
foreach ($posts as $post)
echo '
<tr>
<td align="right" valign="top" nowrap="nowrap">
[', $post['board']['link'], ']
</td>
<td valign="top">
<a href="', $post['href'], '">', $post['subject'], '</a>
', $txt[525], ' ', $post['poster']['link'], '
', $post['new'] ? '' : '<a href="' . $scripturl . '?topic=' . $post['topic'] . '.msg' . $post['new_from'] . ';topicseen#new"><img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" alt="' . $txt[302] . '" border="0" /></a>', '
</td>
<td align="right" nowrap="nowrap">
', $post['time'], '
</td>
</tr>';
echo '
</table>';
} // Show the top poster's name and profile link.
function ssi_topPoster($topNumber = 1, $output_method = 'echo')
{
global $db_prefix, $scripturl;
// Find the latest poster.$request = db_query("
SELECT ID_MEMBER, realName, posts
FROM {$db_prefix}members
ORDER BY posts DESC
LIMIT $topNumber", __FILE__, __LINE__);
$return = array();
while ($row = mysql_fetch_assoc($request))
$return[] = array(
'id' => $row['ID_MEMBER'],
'name' => $row['realName'],
'href' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'],
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">' . $row['realName'] . '</a>',
'posts' => $row['posts']
);
mysql_free_result($request);
// Just return all the top posters.if ($output_method != 'echo')
return $return;
// Make a quick array to list the links in.$temp_array = array();
foreach ($return as $member)
$temp_array[] = $member['link'];
echo
implode(', ', $temp_array);} // Show boards by activity.
function ssi_topBoards($num_top = 10, $output_method = 'echo')
{
global $context, $settings, $db_prefix, $txt, $scripturl, $ID_MEMBER, $user_info, $modSettings;
// Find boards with lots of posts.$request = db_query("
SELECT
b.name, b.numTopics, b.numPosts, b.ID_BOARD," . (!$user_info['is_guest'] ? ' 1 AS isRead' : '
(IFNULL(lb.ID_MSG, 0) >= b.ID_LAST_MSG) AS isRead') . "
FROM {$db_prefix}boards AS b
LEFT JOIN {$db_prefix}log_boards AS lb ON (lb.ID_BOARD = b.ID_BOARD AND lb.ID_MEMBER = $ID_MEMBER)
WHERE $user_info[query_see_board]" . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? "
AND b.ID_BOARD != " . (int) $modSettings['recycle_board'] : ''