diff --git a/inc/class.page.php b/inc/class.page.php --- a/inc/class.page.php +++ b/inc/class.page.php @@ -1,20 +1,18 @@ var _gaq = _gaq || []; @@ -27,14 +25,6 @@ class page { })(); '; // Google analytics ga.js tracking code - public $tablestripe = ''; - private $title = ''; // Title of page private $scripts = ''; // Scripts to include on page @@ -43,6 +33,10 @@ class page { $this->scripts .= $nscripts; if($ntitle != "NOHEAD") $this->head(); + + $headCode['jquery'] = ''; + $headCode['jValidate'] = ''; + $headCode['schedInput'] = ''; } private function top(){ @@ -54,38 +48,33 @@ class page { // Public functions/vars - public function head(){ + private function head(){ session_start(); - - // @TODO: Add capability to load additional javascripts and stylesheets in array form - $this->pageGenTime = round(microtime(), 3); echo 'doctype . '> htmlargs . '> ' . $this->title . ' :: ' . $this->base_title . ' - - '; + '; - echo $this->scripts; - echo ' + // Write out all passed scripts + foreach ($this->scripts as $script) + echo $headCode[$script]; + + echo ' bodyargs.' >'; echo $this->top(); // Write out top } - public function foot(){ echo ''; $this->pageGenTime = round(microtime(), 3); - echo ''; + echo ''; echo $this->trackingcode; echo ''; } - public function secondsToCompound($seconds) { $ret = ""; $hours = intval(intval($seconds) / 3600);