Location: PHPKode > scripts > Particle Gallery > includes/page_header.php
<?php
if (!defined("IN_SCRIPT")){
	die("Hacking attempt");
}

// set up the template
include("template.php");

// create template from class
$t = new Template(skinget());

// work out the page title
if ($pagetitle == ""){
	$pagetitle = $config["sitename"];
} else {
	$pagetitle = $config["sitename"] . " - " . $pagetitle;
}

// set up some variables
$t->set_var("SITENAME", $config["sitename"]);
$t->set_var("DATETIME", date($config["dateformat"]));
$t->set_var("VERSION", $config["version"]);
$t->set_var("PAGETITLE", $pagetitle);
$t->set_var("META_DESCRIPTION", $config["metadescription"]);
$t->set_var("META_KEYWORDS", $config["metakeywords"]);
$t->set_var("CSS_CODE", $t->csscode());
$t->set_var("IMAGES_DIR", $config["virtualpath"] . $t->imagesdir);
$t->set_var("ROOT", $config["virtualpath"]);

// top menu
$t->set_var("TOPMENU_L_ADMIN", "admin.php");
$t->set_var("TOPMENU_L_MODERATE", "moderate.php");
$t->set_var("TOPMENU_L_POPULAR", "rank.php?mode=popular");
$t->set_var("TOPMENU_L_RANDOM", "random.php");
$t->set_var("TOPMENU_L_RECENT", "rank.php?mode=recent");
$t->set_var("TOPMENU_L_SEARCH", "search.php");
$t->set_var("TOPMENU_L_USERS", "auth.php");

// work out breadcrumbs
$bread = ($bread <> "") ? $bread : breadcrumbs();
$t->set_var("BREADCRUMBS", $bread);

// parse the skin selector?
if ($config["skinselector"] == "true"){
	$t->set_var("SKIN_SELECTOR", skinselector());
}

// parse in the admin link?
if ($config["showadminlink"] == "true"){
	if (!$_SERVER["REQUEST_URI"]){
		$url = "admin.php";
	} else {
		$url = "admin.php?from=" . $_SERVER["REQUEST_URI"];
	}
	
	$t->set_var("ADMIN_LINK", '<a href="' . $config["virtualpath"] . $url . '">Admin</a>');
}

// licence information?
if ($config["licenceinfo"] <> ""){
	$t->set_file("licenceinfo", "licence_info");
	$t->set_var("LICENCE_TEXT", $config["licenceinfo"]);
	$t->parse("LICENCE_INFO", "licenceinfo");
}

// parse and output straight away
$t->set_file("page_header", "overall_header");
$t->parse("page_all", "page_header", true);
?>
Return current item: Particle Gallery