<?php
/* $Id: wrapper.footer.default 18730 2008-11-17 23:03:22Z JensT $
 *
 * This footer file detects whether Gallery is embedded in any
 * known PHP applications and then decorates Gallery appropriately.
 */

global $GALLERY_EMBEDDED_INSIDE_TYPE;

if (isDebugging()) {
	$infoText = sprintf(gTranslate('core', "Debug ON! Level %s"), $gallery->app->debuglevel) . '<br>';
	if (empty($GALLERY_EMBEDDED_INSIDE_TYPE)) {
		$infoText .= 'Standalone';
	}
	else {
		$infoText .= 'Embedded in: '. $GALLERY_EMBEDDED_INSIDE_TYPE;

		switch($GALLERY_EMBEDDED_INSIDE_TYPE) {
			case 'phpnuke':
			case 'cpgnuke':
			case 'phpBB2':
			case 'GeekLog':
			break;

			case 'postnuke':
				$infoText .= ' ' . $GALLERY_POSTNUKE_VERSION;
			break;

			case 'zikula':
				$infoText .= ' ' . PN_VERSION_NUM;
			break;
		}
	}

	$infoText .= " ; Username: " . $gallery->user->getUsername();
	echo gallery_info($infoText);
}

switch($GALLERY_EMBEDDED_INSIDE_TYPE) {
	case 'phpnuke':
	case 'postnuke':
	case 'cpgnuke':
	case 'zikula':
		/*
		 * We can control whether we see the right side blocks
		 * by setting the value of the $index variable.  To
		 * see the blocks, set $index to 1.  To hide them set
		 * $index to 0.  We default to 0 to leave more room for
		 * the photos.  If you change this value, you should
		 * also change it in wrapper.header
		 */
		global $index;
		global $GALLERY_POSTNUKE_VERSION;
		$index = 0;

		CloseTable();
		include('footer.php');
	break;

	case 'phpBB2':
		/*
		** PhpBB2 doesn't require the OpenTable() function or any of the
		** other functions that are native to Nuke.
		*/

		global $phpbb_root_path;
		global $userdata;
		global $phpEx;
		global $gen_simple_header;
		global $template;
		global $board_config;
		global $db;
		global $do_gzip_compress;
		global $lang;

		include (PHPBB_ROOT_PATH . "includes/page_tail.php");
	break;

	case 'GeekLog':

	/*
	** We can control whether we see the right side blocks
	** by setting passing a parameter to COM_siteFooter.
	** To see the blocks, pass true; to hide them pass false.
	*/

		echo COM_siteFooter( false );
	break;

}
includeTemplate('footer.tpl');

?>
