X-Git-Url: https://disinclined.org/git/?a=blobdiff_plain;ds=inline;f=index.php;h=de2747353f677915f413a8b955f2dedba2039e93;hb=f4c8db9bb6ec2a5d5c027b679b643104b6f2674b;hp=c6914b164cb609199462699d53eb6ca8777418ba;hpb=be5a0cbae65d695ff538d62af97a57637ff00d86;p=dylansserver.git diff --git a/index.php b/index.php index c6914b1..de27473 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,17 +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') { - $scripts = ""; - $scripts .= ""; - $scripts .= ""; - $scripts .= ""; - } + $home_link = "http://validator.w3.org/unicorn/check?ucn_uri=dylansserver.com&ucn_task=conformance#"; echo << @@ -93,7 +86,7 @@ abstract class cms { $this->title - + $stylesheets $scripts @@ -140,6 +133,7 @@ END_OF_CLOSE; class index extends cms { public function display() { + $this->scripts = ""; $this->display_head(); $this->display_exhibits(); echo ""; @@ -282,10 +276,15 @@ class page extends cms { $month_posted = $date_posted[1]; $datetime_posted = explode(' ', $date_posted[2]); $day_posted = $datetime_posted[0]; - echo ""; - echo "$year_posted/$month_posted/$day_posted/$title"; - echo $entry['text']; - echo ""; + $text = $entry['text']; + echo << + + $year_posted/$month_posted/$day_posted/$title + + $text + +END_NOTE; } echo ""; $this->write_navigation(); @@ -324,6 +323,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;