"../index.php",
"Games" => "../categories/all.php",
"Developers" => "../developers/my_games.php",
"Help" => "../help/about.php",
"Account" => "../account/profile.php");
# arrays to hold submenu items
// to add a new link to a menu just add "
" => "" into the
// desired submenu.
public $submenugames = array("All Games" => "../categories/all.php",
"Action" => "../categories/action.php",
"Adventure/RPG" => "../categories/adventure_rpg.php",
"Puzzle" => "../categories/puzzle.php");
public $submenudev = array("Forum" => "#",
"My Games" => "../developers/my_games.php");
public $submenuhelp = array("About Us" => "../help/about.php",
"FAQ" => "../help/faq.php",
"Privacy" => "../help/privacy.php",
"Terms of Use" => "../help/terms_of_use.php",
"Contact Us" => "../help/contact.php");
public $submenuacc = array("Profile" => "../account/profile.php",
"Login" => "../account/login.php",
"Logout" => "../account/logout.php",
"Register" => "../account/register.php");
// class Page's operations
public function __set($name, $value) {
$this->$name = $value;
}
#
// Call this function to generate a new page with header navbar and footer.
// be sure to add body content inside
// $pagename->content = '';
#
public function Display() {
echo "";
echo "
\n\n";
$this -> DisplayTitle();
$this -> DisplayKeywords();
$this -> DisplayStyles();
echo "\n\n
\n\n\n";
}
// Title
public function DisplayTitle() {
echo "".$this->title."";
}
// Keywords
public function DisplayKeywords() {
echo "keywords."\" />";
}
// CSS
public function DisplayStyles() {
?>
New to U Games - A place for Flash developers to share their creations.
";
}
public function DisplaySubMenu($i, $submenugames, $submenudev, $submenuhelp, $submenuacc) {
switch($i) {
case "0" :
#close top menubutton
echo "";
break;
case "1" :
#generate submenugames and close top menubutton
echo "
\n";
break;
}
}
#
// Checks if the passed url is located in the current directory.
// used to highlight the menu item user has navigated to.
#
public function IsURLCurrentDirectory($url) {
#get parent directory of url
$parentDirectory = dirname($url);
#get current directory
$currentDirectory = dirname($_SERVER['PHP_SELF']);
#if parent directory == current directory, return true
#else, return false
if (strpos($_SERVER['PHP_SELF'], $parentDirectory )==false) {
return false;
} else {
return true;
}
}
// creates a button
public function DisplayButton($name, $url, $active = true) {
if ($active) {
echo "