From: Dylan Lloyd Date: Sat, 26 Mar 2011 20:02:48 +0000 (-0400) Subject: Moved script logic to respective classes X-Git-Url: https://disinclined.org/git/?a=commitdiff_plain;h=f4e95bddee9079e56f5ffbfe8ede9875b0d7bd49;p=dylansserver.git Moved script logic to respective classes --- diff --git a/index.php b/index.php index 54b5bf2..c2fb078 100644 --- a/index.php +++ b/index.php @@ -6,6 +6,7 @@ abstract class cms { protected $db; protected $recaptcha_publickey; protected $recaptcha_privatekey; + protected $scripts; public $title; public $home_link; @@ -71,16 +72,9 @@ abstract class cms { public function display_head($title = "dylansserver", $home_link = "/") { - $scripts = ""; + $scripts = $this->scripts; $stylesheets = ""; - if (cms::determine_type() == "index") { - $scripts = ""; - $home_link = "http://validator.w3.org/unicorn/check?ucn_uri=dylansserver.com&ucn_task=conformance#"; - } else if ($this->determine_type() == 'note' - && isset($_GET['comments'])) { - $scripts = ""; - $scripts .= ""; - } + $home_link = "http://validator.w3.org/unicorn/check?ucn_uri=dylansserver.com&ucn_task=conformance#"; echo << @@ -139,6 +133,7 @@ END_OF_CLOSE; class index extends cms { public function display() { + $this->scripts = ""; $this->display_head(); $this->display_exhibits(); echo "