|
|
ef5584 |
|
|
|
ef5584 |
/***********************************************************************
|
|
|
ef5584 |
|
|
|
ef5584 |
Copyright (C) 2002-2008 PunBB
|
|
|
ef5584 |
|
|
|
ef5584 |
This file is part of PunBB.
|
|
|
ef5584 |
|
|
|
ef5584 |
PunBB is free software; you can redistribute it and/or modify it
|
|
|
ef5584 |
under the terms of the GNU General Public License as published
|
|
|
ef5584 |
by the Free Software Foundation; either version 2 of the License,
|
|
|
ef5584 |
or (at your option) any later version.
|
|
|
ef5584 |
|
|
|
ef5584 |
PunBB is distributed in the hope that it will be useful, but
|
|
|
ef5584 |
WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
ef5584 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
ef5584 |
GNU General Public License for more details.
|
|
|
ef5584 |
|
|
|
ef5584 |
You should have received a copy of the GNU General Public License
|
|
|
ef5584 |
along with this program; if not, write to the Free Software
|
|
|
ef5584 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
|
|
ef5584 |
MA 02111-1307 USA
|
|
|
ef5584 |
|
|
|
ef5584 |
************************************************************************/
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
// Make sure no one attempts to run this script "directly"
|
|
|
ef5584 |
if (!defined('PUN'))
|
|
|
ef5584 |
exit;
|
|
|
ef5584 |
|
|
|
ef5584 |
$tpl_temp = trim(ob_get_contents());
|
|
|
ef5584 |
$tpl_main = str_replace('<pun_main>', $tpl_temp, $tpl_main);
|
|
|
ef5584 |
ob_end_clean();
|
|
|
ef5584 |
// END SUBST - <pun_main>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
// START SUBST - <pun_footer>
|
|
|
ef5584 |
ob_start();
|
|
|
ef5584 |
|
|
|
ef5584 |
?>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
// If no footer style has been specified, we use the default (only copyright/debug info)
|
|
|
ef5584 |
$footer_style = isset($footer_style) ? $footer_style : NULL;
|
|
|
ef5584 |
|
|
|
ef5584 |
if ($footer_style == 'index' || $footer_style == 'search')
|
|
|
ef5584 |
{
|
|
|
ef5584 |
if (!$pun_user['is_guest'])
|
|
|
ef5584 |
{
|
|
|
ef5584 |
echo "\n\t\t\t".''."\n\t\t\t\t".'- '.$lang_common['Search links'].'
'."\n\t\t\t\t".'- '.$lang_common['Show recent posts'].'
'."\n";
|
|
|
ef5584 |
echo "\t\t\t\t".''.$lang_common['Show unanswered posts'].''."\n";
|
|
|
ef5584 |
|
|
|
ef5584 |
if ($pun_config['o_subscriptions'] == '1')
|
|
|
ef5584 |
echo "\t\t\t\t".''.$lang_common['Show subscriptions'].''."\n";
|
|
|
ef5584 |
|
|
|
ef5584 |
echo "\t\t\t\t".''.$lang_common['Show your posts'].''."\n\t\t\t".''."\n";
|
|
|
ef5584 |
}
|
|
|
ef5584 |
else
|
|
|
ef5584 |
{
|
|
|
ef5584 |
if ($pun_user['g_search'] == '1')
|
|
|
ef5584 |
{
|
|
|
ef5584 |
echo "\n\t\t\t".''."\n\t\t\t\t".'- '.$lang_common['Search links'].'
- '.$lang_common['Show recent posts'].'
'."\n";
|
|
|
ef5584 |
echo "\t\t\t\t".''.$lang_common['Show unanswered posts'].''."\n\t\t\t".''."\n";
|
|
|
ef5584 |
}
|
|
|
ef5584 |
}
|
|
|
ef5584 |
}
|
|
|
ef5584 |
else if ($footer_style == 'viewforum' || $footer_style == 'viewtopic')
|
|
|
ef5584 |
{
|
|
|
ef5584 |
echo "\n\t\t\t".''."\n";
|
|
|
ef5584 |
|
|
|
ef5584 |
// Display the "Jump to" drop list
|
|
|
ef5584 |
if ($pun_config['o_quickjump'] == '1')
|
|
|
ef5584 |
{
|
|
|
ef5584 |
// Load cached quickjump
|
|
|
ef5584 |
@include PUN_ROOT.'cache/cache_quickjump_'.$pun_user['g_id'].'.php';
|
|
|
ef5584 |
if (!defined('PUN_QJ_LOADED'))
|
|
|
ef5584 |
{
|
|
|
ef5584 |
require_once PUN_ROOT.'include/cache.php';
|
|
|
ef5584 |
generate_quickjump_cache($pun_user['g_id']);
|
|
|
ef5584 |
require PUN_ROOT.'cache/cache_quickjump_'.$pun_user['g_id'].'.php';
|
|
|
ef5584 |
}
|
|
|
ef5584 |
}
|
|
|
ef5584 |
|
|
|
ef5584 |
if ($footer_style == 'viewforum' && $is_admmod)
|
|
|
ef5584 |
echo "\t\t\t".''.$lang_common['Moderate forum'].' '."\n";
|
|
|
ef5584 |
else if ($footer_style == 'viewtopic' && $is_admmod)
|
|
|
ef5584 |
{
|
|
|
ef5584 |
echo "\t\t\t".'- '.$lang_topic['Mod controls'].'
- '.$lang_common['Delete posts'].'
'."\n";
|
|
|
ef5584 |
echo "\t\t\t".''.$lang_common['Move topic'].''."\n";
|
|
|
ef5584 |
|
|
|
ef5584 |
if ($cur_topic['closed'] == '1')
|
|
|
ef5584 |
echo "\t\t\t".''.$lang_common['Open topic'].''."\n";
|
|
|
ef5584 |
else
|
|
|
ef5584 |
echo "\t\t\t".''.$lang_common['Close topic'].''."\n";
|
|
|
ef5584 |
|
|
|
ef5584 |
if ($cur_topic['sticky'] == '1')
|
|
|
ef5584 |
echo "\t\t\t".''.$lang_common['Unstick topic'].''."\n";
|
|
|
ef5584 |
else
|
|
|
ef5584 |
echo "\t\t\t".''.$lang_common['Stick topic'].''."\n";
|
|
|
ef5584 |
}
|
|
|
ef5584 |
|
|
|
ef5584 |
echo "\t\t\t".''."\n";
|
|
|
ef5584 |
}
|
|
|
ef5584 |
|
|
|
ef5584 |
?>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
// Display debug info (if enabled/defined)
|
|
|
ef5584 |
if (defined('PUN_DEBUG'))
|
|
|
ef5584 |
{
|
|
|
ef5584 |
// Calculate script generation time
|
|
|
ef5584 |
list($usec, $sec) = explode(' ', microtime());
|
|
|
ef5584 |
$time_diff = sprintf('%.3f', ((float)$usec + (float)$sec) - $pun_start);
|
|
|
ef5584 |
echo "\t\t\t".'[ Generated in '.$time_diff.' seconds, '.$db->get_num_queries().' queries executed ] '."\n";
|
|
|
ef5584 |
}
|
|
|
ef5584 |
|
|
|
ef5584 |
?>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
Powered by PunBB© Copyright 2002–2008 PunBB
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
// End the transaction
|
|
|
ef5584 |
$db->end_transaction();
|
|
|
ef5584 |
|
|
|
ef5584 |
// Display executed queries (if enabled)
|
|
|
ef5584 |
if (defined('PUN_SHOW_QUERIES'))
|
|
|
ef5584 |
display_saved_queries();
|
|
|
ef5584 |
|
|
|
ef5584 |
$tpl_temp = trim(ob_get_contents());
|
|
|
ef5584 |
$tpl_main = str_replace('<pun_footer>', $tpl_temp, $tpl_main);
|
|
|
ef5584 |
ob_end_clean();
|
|
|
ef5584 |
// END SUBST - <pun_footer>
|
|
|
ef5584 |
|
|
|
ef5584 |
|
|
|
ef5584 |
// Close the db connection (and free up any result data)
|
|
|
ef5584 |
$db->close();
|
|
|
ef5584 |
|
|
|
ef5584 |
// Spit out the page
|
|
|
ef5584 |
exit($tpl_main);
|