From 853193f66b966ff0bd8c13cc94ee3457d3543d1f Mon Sep 17 00:00:00 2001 From: Dylan Lloyd Date: Thu, 22 Mar 2012 18:29:51 -0400 Subject: [PATCH] class archive pages now from view/archive.php --- cms.php | 14 ++++------- view/archive.php | 62 ++++++++++++++++++++++++++++++++++++++++++++++++ view/note.php | 15 +----------- 3 files changed, 67 insertions(+), 24 deletions(-) create mode 100644 view/archive.php diff --git a/cms.php b/cms.php index 00a8d7c..845eda9 100644 --- a/cms.php +++ b/cms.php @@ -583,7 +583,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 +635,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 ""; } } diff --git a/view/archive.php b/view/archive.php new file mode 100644 index 0000000..2829668 --- /dev/null +++ b/view/archive.php @@ -0,0 +1,62 @@ + + + + + <?php echo $this->title; ?> + + + + + + + + + + + + +
+ + +
+
+ display_notes() ?> + + +
+
+
+
+ + diff --git a/view/note.php b/view/note.php index 7c1c0c3..8053918 100644 --- a/view/note.php +++ b/view/note.php @@ -39,22 +39,9 @@

year_posted/$this->month_posted/$this->day_posted/" ?> - title ?>

+ title ?> text ?>
- comments_enabled) { - $this->display_comments(); - $this->display_comment_form(); - } ?> -
-

dylan

@psu.edu -- 2.30.2