Blame Extras/Punbb/footer.php

4c79b5
4c79b5
/***********************************************************************
4c79b5
4c79b5
  Copyright (C) 2002-2008  PunBB
4c79b5
4c79b5
  This file is part of PunBB.
4c79b5
4c79b5
  PunBB is free software; you can redistribute it and/or modify it
4c79b5
  under the terms of the GNU General Public License as published
4c79b5
  by the Free Software Foundation; either version 2 of the License,
4c79b5
  or (at your option) any later version.
4c79b5
4c79b5
  PunBB is distributed in the hope that it will be useful, but
4c79b5
  WITHOUT ANY WARRANTY; without even the implied warranty of
4c79b5
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
4c79b5
  GNU General Public License for more details.
4c79b5
4c79b5
  You should have received a copy of the GNU General Public License
4c79b5
  along with this program; if not, write to the Free Software
4c79b5
  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
4c79b5
  MA  02111-1307  USA
4c79b5
4c79b5
************************************************************************/
4c79b5
4c79b5
4c79b5
// Make sure no one attempts to run this script "directly"
4c79b5
if (!defined('PUN'))
4c79b5
	exit;
4c79b5
4c79b5
$tpl_temp = trim(ob_get_contents());
4c79b5
$tpl_main = str_replace('<pun_main>', $tpl_temp, $tpl_main);
4c79b5
ob_end_clean();
4c79b5
// END SUBST - <pun_main>
4c79b5
4c79b5
4c79b5
// START SUBST - <pun_footer>
4c79b5
ob_start();
4c79b5
4c79b5
?>
4c79b5
4c79b5
	

4c79b5
	
4c79b5
		
4c79b5
4c79b5
4c79b5
// If no footer style has been specified, we use the default (only copyright/debug info)
4c79b5
$footer_style = isset($footer_style) ? $footer_style : NULL;
4c79b5
4c79b5
if ($footer_style == 'index' || $footer_style == 'search')
4c79b5
{
4c79b5
	if (!$pun_user['is_guest'])
4c79b5
	{
4c79b5
		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";
4c79b5
		echo "\t\t\t\t".'
'.$lang_common['Show unanswered posts'].'
'."\n";
4c79b5
4c79b5
		if ($pun_config['o_subscriptions'] == '1')
4c79b5
			echo "\t\t\t\t".'
'.$lang_common['Show subscriptions'].'
'."\n";
4c79b5
4c79b5
		echo "\t\t\t\t".'
'.$lang_common['Show your posts'].'
'."\n\t\t\t".''."\n";
4c79b5
	}
4c79b5
	else
4c79b5
	{
4c79b5
		if ($pun_user['g_search'] == '1')
4c79b5
		{
4c79b5
			echo "\n\t\t\t".'
'."\n\t\t\t\t".'
'.$lang_common['Search links'].'
'.$lang_common['Show recent posts'].'
'."\n";
4c79b5
			echo "\t\t\t\t".'
'.$lang_common['Show unanswered posts'].'
'."\n\t\t\t".''."\n";
4c79b5
		}
4c79b5
	}
4c79b5
}
4c79b5
else if ($footer_style == 'viewforum' || $footer_style == 'viewtopic')
4c79b5
{
4c79b5
	echo "\n\t\t\t".'
'."\n";
4c79b5
4c79b5
	// Display the "Jump to" drop list
4c79b5
	if ($pun_config['o_quickjump'] == '1')
4c79b5
	{
4c79b5
		// Load cached quickjump
4c79b5
		@include PUN_ROOT.'cache/cache_quickjump_'.$pun_user['g_id'].'.php';
4c79b5
		if (!defined('PUN_QJ_LOADED'))
4c79b5
		{
4c79b5
			require_once PUN_ROOT.'include/cache.php';
4c79b5
			generate_quickjump_cache($pun_user['g_id']);
4c79b5
			require PUN_ROOT.'cache/cache_quickjump_'.$pun_user['g_id'].'.php';
4c79b5
		}
4c79b5
	}
4c79b5
4c79b5
	if ($footer_style == 'viewforum' && $is_admmod)
4c79b5
		echo "\t\t\t".'

'.$lang_common['Moderate forum'].'

'."\n";
4c79b5
	else if ($footer_style == 'viewtopic' && $is_admmod)
4c79b5
	{
4c79b5
		echo "\t\t\t".'
'.$lang_topic['Mod controls'].'
'.$lang_common['Delete posts'].'
'."\n";
4c79b5
		echo "\t\t\t".'
'.$lang_common['Move topic'].'
'."\n";
4c79b5
4c79b5
		if ($cur_topic['closed'] == '1')
4c79b5
			echo "\t\t\t".'
'.$lang_common['Open topic'].'
'."\n";
4c79b5
		else
4c79b5
			echo "\t\t\t".'
'.$lang_common['Close topic'].'
'."\n";
4c79b5
4c79b5
		if ($cur_topic['sticky'] == '1')
4c79b5
			echo "\t\t\t".'
'.$lang_common['Unstick topic'].'
'."\n";
4c79b5
		else
4c79b5
			echo "\t\t\t".'
'.$lang_common['Stick topic'].'
'."\n";
4c79b5
	}
4c79b5
4c79b5
	echo "\t\t\t".''."\n";
4c79b5
}
4c79b5
4c79b5
?>
4c79b5
4c79b5
4c79b5
// Display debug info (if enabled/defined)
4c79b5
if (defined('PUN_DEBUG'))
4c79b5
{
4c79b5
	// Calculate script generation time
4c79b5
	list($usec, $sec) = explode(' ', microtime());
4c79b5
	$time_diff = sprintf('%.3f', ((float)$usec + (float)$sec) - $pun_start);
4c79b5
	echo "\t\t\t".'

[ Generated in '.$time_diff.' seconds, '.$db->get_num_queries().' queries executed ]

'."\n";
4c79b5
}
4c79b5
4c79b5
?>
4c79b5
			
4c79b5
		
4c79b5
	
4c79b5
4c79b5
4c79b5
Powered by PunBB
© Copyright 20022008 PunBB
4c79b5
4c79b5
4c79b5
4c79b5
4c79b5
// End the transaction
4c79b5
$db->end_transaction();
4c79b5
4c79b5
// Display executed queries (if enabled)
4c79b5
if (defined('PUN_SHOW_QUERIES'))
4c79b5
	display_saved_queries();
4c79b5
4c79b5
$tpl_temp = trim(ob_get_contents());
4c79b5
$tpl_main = str_replace('<pun_footer>', $tpl_temp, $tpl_main);
4c79b5
ob_end_clean();
4c79b5
// END SUBST - <pun_footer>
4c79b5
4c79b5
4c79b5
// Close the db connection (and free up any result data)
4c79b5
$db->close();
4c79b5
4c79b5
// Spit out the page
4c79b5
exit($tpl_main);