Location: PHPKode > scripts > GuestCal > guestcal-2.1.2/admin/index.php
<?php
/**
 * This file is part of GuestCal v2.1.2.
 * 
 * License information available at http://www.guestcal.com/
 * ©2009 dotplex e.K. (hide@address.com)
 */

// Globals
define ('BASEDIR', '../');

// Initiate page
require_once BASEDIR . 'includes/ini.inc.php';

if (!$db -> error) {
	$pageTitle = str ('admin');
	// Page selection
	$r .= '<p id="menu"><a href="?page=entries">' . str ('adminEntries') . '</a> | <a href="?page=classes">' . str ('adminClasses') . '</a> | <a href="?page=objects">' . str ('adminObjects') . '</a> | <a href="?page=import">' . str ('adminImport') . '</a> | <a href="?page=prefs">' . str ('adminPrefs') . '</a></p>';
	$pages = array ('entries', 'classes', 'objects', 'import', 'prefs');
	if (isset ($_GET['page']) && in_array ($_GET['page'], $pages))
		$page = $_GET['page'];
	else
		$page = 'entries';
	require_once (BASEDIR . 'admin/pages/' . $page . '.php');
}

$db -> close ();

// HTML-Head
if (file_exists ($templateAdminPath . 'head.php')) {
	require_once $templateAdminPath . 'head.php';
}
if (!$db -> error)
	echo echoChooseLanguage ('?');
echo '<h1>' . $pageTitle . '</h1>';
echo $r;

// Check for updates
if (!$db -> error)
	echo '<iframe width="600" height="50" scrolling="no" frameborder="0" src="http://www.guestcal.com/versioncheck.php?lang=' . $GLOBALS['langAbbr'] . '&amp;version=' . VERSION . '"></iframe>';

// HTML-Foot
if (file_exists ($templateAdminPath . 'foot.php')) {
	require_once $templateAdminPath . 'foot.php';
}

?>
Return current item: GuestCal