X-Git-Url: https://disinclined.org/git/?a=blobdiff_plain;f=index.php;h=5c6a7f52ad829b69785ca43baa45580961c77432;hb=3287504436374babf203180d8b25def2cfc8dacd;hp=dacc71689d4f8f6241c11530fad34853756ad13d;hpb=51373285852bc0849f42a7610b1fac4937f699f9;p=dylansserver.git diff --git a/index.php b/index.php index dacc716..5c6a7f5 100644 --- a/index.php +++ b/index.php @@ -2,10 +2,11 @@ abstract class cms { - private $config_file = '/etc/dylanstestserver.ini'; + private $config_file = '/etc/dylansserver.ini'; protected $db; protected $recaptcha_publickey; protected $recaptcha_privatekey; + protected $scripts; public $title; public $home_link; @@ -39,7 +40,9 @@ abstract class cms { return 'index'; } else if (isset($_GET['project'])) { return 'project'; - } else if (isset($_GET['challenge'])) { + } else if (isset($_GET['rss'])) { + return 'rss'; + } else if (isset($_GET['challenge'])) { return 'captcha'; } } @@ -69,19 +72,11 @@ abstract class cms { return $return; } - public function display_head($title = "dylanstestserver", + 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=dylanstestserver.com&ucn_task=conformance#"; - } else if ($this->determine_type() == 'note') { - $scripts = ""; - $scripts .= ""; - $scripts .= ""; - $scripts .= ""; - } + $home_link = "http://validator.w3.org/unicorn/check?ucn_uri=dylansserver.com&ucn_task=conformance#"; echo << @@ -93,7 +88,7 @@ abstract class cms { $this->title - + $stylesheets $scripts @@ -102,7 +97,7 @@ abstract class cms {
@@ -140,6 +135,7 @@ END_OF_CLOSE; class index extends cms { public function display() { + $this->scripts = ""; $this->display_head(); $this->display_exhibits(); echo "
+END_NOTE; } echo ""; $this->write_navigation(); @@ -324,6 +325,11 @@ class note extends cms { public $number_of_comments; public function __construct() { + if (isset($_GET['comments'])) { + $this->scripts = " + + "; + } parent::__construct(); if (isset($_GET['comments'])) { $this->comments_enabled = true; @@ -410,7 +416,7 @@ END_OF_NOTE; private function write_navigation() { echo << +