diff --git a/inc/class.page.php b/inc/class.page.php --- a/inc/class.page.php +++ b/inc/class.page.php @@ -53,8 +53,6 @@ if (file_exists($config_inc)) { } - - //************************************************** // class.page.php Author: Ethan Zonca // @@ -66,32 +64,25 @@ class page { /* Site-wide configuration options */ - private $base_title = 'SlatePermutate :: Find the schedule that works for you!'; + private $base_title = 'SlatePermutate - Find the schedule that works for you!'; private $doctype = 'html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"'; private $htmlargs = 'xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"'; - private $bodyargs = ''; - - public $lastJobTable = ''; private $pageGenTime = 0; - /* Whether or not to output valid XHTML */ private $xhtml = FALSE; /* Scripts and styles */ private $headCode = array(); - /* - * Google analytics ga.js tracking code. Expanded in __construct(). - */ - private $trackingcode = ''; - + private $trackingcode = ''; // Tracking code private $pagetitle = ''; // Title of page private $scripts = array(); // Scripts to include on page /* the current school. See get_school(). */ private $school; + /** * \param $ntitle * Must be a valid HTML string (i.e., escaped with htmlentities()). @@ -100,11 +91,14 @@ class page */ public function __construct($ntitle, $nscripts = array(), $immediate = TRUE) { + /* Begin tracking generation time */ + $this->pageGenTime = round(microtime(),4); + global $ga_trackers; require_once('school.inc'); - // Scripts and styles available to include + /* Scripts and styles available for inclusion */ $this->headCode['jQuery'] = ''; $this->headCode['jQueryUI'] = ''; $this->headCode['jValidate'] = ''; @@ -115,6 +109,7 @@ class page $this->headCode['gliderHeadcode'] = ''; $this->headCode['uiTabsKeyboard'] = ''; $this->headCode['displayTables'] = ''; + $this->pagetitle = $ntitle; $this->scripts = $nscripts; @@ -197,42 +192,38 @@ class page public function headcode_add($key, $code, $enable = FALSE) { $this->headCode[$key] = $code; - if ($enable) + if ($enable) { $this->scripts[] = $key; + } } /** * \brief - * Output the HTML header for a page, including the and
bodyargs.'>'. PHP_EOL . - '
'. PHP_EOL . @@ -244,10 +235,12 @@ class page '
+ * Output the HTML header for a page, including ,
, and opening structure */ public function head() { - $this->pageGenTime = round(microtime(), 3); - if ($this->xhtml) + if ($this->xhtml) { echo '' . PHP_EOL; + } echo 'doctype . '>'. PHP_EOL . 'htmlargs . '>'. PHP_EOL . '
'. PHP_EOL . - '
'. PHP_EOL . + '
'. PHP_EOL . ' '. PHP_EOL . ' '. PHP_EOL . - ' '. PHP_EOL; + ' '. PHP_EOL; // Write out all passed scripts foreach ($this->scripts as $i) echo ' ' . $this->headCode["$i"] . "\n"; echo ' ' . PHP_EOL . - '