Blame Identity/Webenv/App/Punbb/footer.php

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

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

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

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

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

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