X-Git-Url: https://disinclined.org/git/?a=blobdiff_plain;f=cms.php;h=1f455a4c1c35f480877bc552295474c1251fe3ed;hb=4a70b93a36c54e64e32e6d34e8d79dbb8fc8789c;hp=bd7ed60536fcaed9f1ae7b36212861b2ecb77fd9;hpb=ab2ed4cb0b2a7a397e868ca3ce6f7cde7a306b32;p=dylansserver.git diff --git a/cms.php b/cms.php index bd7ed60..1f455a4 100644 --- a/cms.php +++ b/cms.php @@ -6,7 +6,6 @@ abstract class cms { protected $db; protected $recaptcha_publickey; protected $recaptcha_privatekey; - protected $scripts; public $title; public $home_link; @@ -70,63 +69,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() { @@ -221,24 +163,6 @@ class page extends cms { public function __construct() { parent::__construct(); $this->page_offset(); - $this->scripts = " - - - - - - "; } private function page_offset() { @@ -309,30 +233,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; @@ -587,18 +487,15 @@ class archive extends cms { class rss extends cms { + public function display() { + require_once("view/rss.php"); + } + + public function display_items() { $result = $this->db->query("SELECT date_posted, title, text, url FROM notes ORDER BY date_posted DESC LIMIT 5"); - echo << - - dylansserver.com/notes/rss - http://dylansserver.com/notes - dylansserver.com/notes/rss - -END_OF_ENTRY; while ($entry = $result->fetch_object()) { $title = $entry->title; $date_posted = $entry->date_posted; @@ -614,18 +511,13 @@ END_OF_ENTRY; $description = substr($text, '0', ($end_of_first_sentence + 1)); } } - echo << - $title - $url - $url - $description - -END_OF_ENTRY; + echo ""; + echo " $title"; + echo " $url"; + echo " $url"; + echo " $description"; + echo ""; } - echo ""; - echo ""; - } }