headCode['jQuery'] = ''; $this->headCode['jQueryUI'] = ''; $this->headCode['jValidate'] = ''; $this->headCode['schedInput'] = ''; $this->headCode['outputPrintStyle'] = ''; $this->headCode['outputStyle'] = ''; $this->headCode['gliderHeadcode'] = ''; $this->headCode['uiTabsKeyboard'] = ''; $this->headCode['displayTables'] = ''; $this->pagetitle = $ntitle; $this->scripts = $nscripts; /* compliant browsers which care, such as gecko, explicitly request xhtml: */ if(!empty($_SERVER['HTTP_ACCEPT']) && strpos($_SERVER['HTTP_ACCEPT'], 'application/xhtml+xml') !== FALSE || !strlen($_SERVER['HTTP_ACCEPT']) /* then the browser doesn't care :-) */) { $this->xhtml = TRUE; header('Content-Type: application/xhtml+xml; charset=utf-8'); } else header('Content-Type: text/html; charset=utf-8'); if (count($ga_trackers)) { $ga_www = 'http://www.'; if ($_SERVER['SERVER_PORT'] != 80) $ga_www = 'https://ssl.'; $this->trackingcode = '' . "\n" . $this->trackingcode . ' \n"; } self::session_start(); /* everything that needs sessions started to work: */ $this->school = school_load_guess(); if($immediate && $ntitle != "NOHEAD") $this->head(); } /** * \brief * Adds some headcode to this page. * * \param $key * The key to register this headcode under. * \param $code * The actual code, such as a . * \param $enable * Whether or not to enable this code while adding it. */ public function headcode_add($key, $code, $enable = FALSE) { $this->headCode[$key] = $code; if ($enable) $this->scripts[] = $key; } // Public functions/vars /** * \brief * Output the HTML header for a page, including the and
bodyargs.' >'; echo $this->trackingcode; echo '*/ public function head() { $this->pageGenTime = round(microtime(), 3); if ($this->xhtml) echo '' . "\n"; echo 'doctype . '> htmlargs . '>
'; // Write out all passed scripts foreach ($this->scripts as $i) echo ' ' . $this->headCode["$i"] . "\n"; echo '