X-Git-Url: https://disinclined.org/git/?a=blobdiff_plain;f=cms.php;h=f3902b336c22cb47e922adf794bf86b80cabcba5;hb=8b7b8fa879010e1418c4c68aee73fe00c5ae43a7;hp=00a8d7c151adc54074a4a4674d65ae39428a4349;hpb=881515b9693cfac8ea4bda6a3f466766bb582430;p=dylansserver.git diff --git a/cms.php b/cms.php index 00a8d7c..f3902b3 100644 --- a/cms.php +++ b/cms.php @@ -70,63 +70,6 @@ abstract class cms { } $statement->free_result(); return $return; - } - - public function display_head($title = "dylansserver", - $home_link = "/") { - $scripts = $this->scripts; - $stylesheets = ""; - $home_link = "http://validator.w3.org/unicorn/check?ucn_uri=dylansserver.com&ucn_task=conformance#"; - echo << - - - - - - - $this->title - - $stylesheets - $scripts - - - -
- - -
-END_OF_HEAD; - } - - public function display_contact() { - echo <<

dylan

@psu.edu -
-END_OF_CONTACT; - } - - public function display_close($show_contact = true) { - if ($show_contact) { - $this->display_contact(); - } - echo << -
-
-
- - -END_OF_CLOSE; - ob_flush(); } public function init() { @@ -168,61 +111,7 @@ END_OF_CLOSE; class index extends cms { public function display() { - $this->scripts = ""; - $this->display_head(); - $this->display_exhibits(); - echo ""; - $this->display_close($show_contact = false); + require_once("view/index.php"); } protected function display_exhibits() { @@ -236,11 +125,6 @@ OTHER_PROJECTS; } private function list_projects() { - echo << -

my projects:

- -HEREDOC; $sql = "SELECT title FROM projects ORDER BY rank"; $result = $this->db->query($sql); while ($entry = $result->fetch_object()) { @@ -368,30 +252,6 @@ class note extends cms { public $number_of_comments; public function __construct() { - $this->scripts = " - - - - - - "; - - if (isset($_GET['comments'])) { - $this->scripts .= " - - "; - } parent::__construct(); if (isset($_GET['comments'])) { $this->comments_enabled = true; @@ -583,7 +443,10 @@ class archive extends cms { } public function display() { - $this->display_head(); + require_once("view/archive.php"); + } + + public function display_notes() { switch (true) { case (isset($_GET['year']) && !isset($_GET['month']) && !isset($_GET['day'])): @@ -632,20 +495,11 @@ class archive extends cms { echo ""; } echo ""; - $this->write_navigation(); } else { echo "
"; echo "

sorry, nothing here

"; echo "
Empty set (0.00 sec)
"; } - $this->display_close(); - } - - private function write_navigation() { - echo "
"; - echo ""; } }