var _gaq = _gaq || []; _gaq.push([\'_setAccount\', \'UA-17441156-1\']); _gaq.push([\'_trackPageview\']); (function() { var ga = document.createElement(\'script\'); ga.type = \'text/javascript\'; ga.async = true; ga.src = (\'https:\' == document.location.protocol ? \'https://ssl\' : \'http://www\') + \'.google-analytics.com/ga.js\'; var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(ga, s); })(); '; // Google analytics ga.js tracking code private $title = ''; // Title of page private $scripts = array(); // Scripts to include on page public function __construct($ntitle, $nscripts = array() ){ // Scripts and styles available to include $this->headCode['jQuery'] = ''; $this->headCode['jValidate'] = ''; $this->headCode['schedInput'] = ''; $this->title = $ntitle; $this->scripts = $nscripts; if($ntitle != "NOHEAD") $this->head(); } private function top(){ echo '
'; } // Public functions/vars private function head(){ session_start(); $this->pageGenTime = round(microtime(), 3); echo 'doctype . '> htmlargs . '> ' . $this->title . ' :: ' . $this->base_title . ' '; // Write out all passed scripts foreach ($this->scripts as $i){ echo $this->headCode["$i"]; } echo ' bodyargs.' >'; echo $this->top(); // Write out top } public function foot(){ echo '
'; $this->pageGenTime = round(microtime(), 3); echo ''; echo $this->trackingcode; echo ''; } public function secondsToCompound($seconds) { $ret = ""; $hours = intval(intval($seconds) / 3600); $ret .= "$hours:"; $minutes = bcmod((intval($seconds) / 60),60); $ret .= "$minutes:"; $seconds = bcmod(intval($seconds),60); $ret .= "$seconds"; return $ret; } public function showSavedScheds($session) { echo '

'; if(isset($session['saved']) && count($session['saved']) > 0){ echo '

Saved Schedules:

'; foreach($session['saved'] as $key => $schedule){ $sch = unserialize($schedule); echo "#" . ($key + 1) . " - " . $sch->getName() . "
"; } echo '
'; } echo '

'; } } ?>