From 4a70b93a36c54e64e32e6d34e8d79dbb8fc8789c Mon Sep 17 00:00:00 2001 From: Dylan Lloyd Date: Thu, 22 Mar 2012 19:24:34 -0400 Subject: [PATCH] rss now from view/rss.php --- cms.php | 30 +++++++++++------------------- view/rss.php | 9 +++++++++ 2 files changed, 20 insertions(+), 19 deletions(-) create mode 100644 view/rss.php diff --git a/cms.php b/cms.php index b4790b2..1f455a4 100644 --- a/cms.php +++ b/cms.php @@ -487,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; @@ -514,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 ""; - } } diff --git a/view/rss.php b/view/rss.php new file mode 100644 index 0000000..2f55ca3 --- /dev/null +++ b/view/rss.php @@ -0,0 +1,9 @@ + + + dylansserver.com/notes/rss + http://dylansserver.com/notes + dylansserver.com/notes/rss + + display_items() ?> + + -- 2.30.2