"Template", "tagline" => "A Tyzoid Production", "showbar" => true, "loginbar" => "" ); /** * Constructor * * @param string $title - the title of the page * @param mixed $scripts - the url (or array of urls) of the script(s) to include * @param mixed $stylesheets - the url (or array of urls) of the stylesheet(s) to include */ public function __construct($title = null, $scripts = null, $stylesheets = null){ // Page Title if (! empty($title)) $this->title = $title; if (! empty($scripts) && is_array($scripts)) $this->scripts = array_merge($scripts, $this->scripts); else if (! empty($scripts)) $this->addScript($scripts); if (! empty($stylesheets) && is_array($stylesheets)) $this->stylesheets = array_merge($stylesheets, $this->stylesheets); else if (! empty($stylesheets)) $this->addStyle($stylesheets); } public function setTitle($title){ $this->title = $title; } public function addScript($script){ if (empty($script) || strncmp($script, '/', 1) !== 0) return false; $this->scripts[] = $script; return true; } public function addStyle($stylesheet){ if (empty($stylesheet) || strncmp($stylesheet, '/', 1) !== 0) return false; $this->stylesheets[] = $stylesheet; return true; } public function setAttribute($attribute, $value){ $this->attributes[$attribute] = $value; } public function output($return = false){ global $user; // Doctype $html = "\n"; $html .= "\n"; $html .= "\t
\n"; // Page Attributes/Head information $html .= "\t\t