";
- $sql = "SELECT text FROM projects
- WHERE title = ?";
- $result = $this->query($sql, "s", $_GET['project']);
- if ($result = $result[0]['text']) {
- $text = str_replace("class=\"exhibit\"", "class=\"exhibit\" style=\"display:block;\"", $result);
- echo $text;
- echo "
";
- } else {
- throw new notFound();
- }
- }
+
+ protected function display_exhibits() {
+ echo "";
+ $sql = "SELECT text FROM projects
+ WHERE title = ?";
+ $result = $this->query($sql, "s", $_GET['project']);
+ if ($result = $result[0]['text']) {
+ $text = str_replace("class='exhibit'", "class='exhibit' style='display:block;'", $result);
+ echo $text;
+ echo "
";
+ } else {
+ throw new notFound();
+ }
+ }
+
}
+
class page extends cms {
+
private $page = 1;
private $offset = 0;
private $notes_per_page = 4;
@@ -235,72 +239,94 @@ class page extends cms {
public function __construct() {
parent::__construct();
- $this->page_offset();
+ $this->page_offset();
+ $this->scripts = "
+
+
+ ";
+ echo "
";
$sql = "SELECT date_posted, title, url, text
FROM notes ORDER BY date_posted DESC
- LIMIT ?, ?";
- $result = $this->query($sql, "ii",
- $this->offset,
- $this->notes_per_page);
- foreach ($result as $row => $entry) {
- $title = $entry['title'];
- $url = '/note/' . $entry['url'];
- $date_posted = explode("-", $entry['date_posted']);
- $year_posted = $date_posted[0];
- $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 "
";
- }
- echo "
";
- $this->write_navigation();
+ LIMIT ?, ?";
+ $result = $this->query($sql, "ii",
+ $this->offset,
+ $this->notes_per_page);
+ foreach ($result as $row => $entry) {
+ $title = $entry['title'];
+ $url = '/note/' . $entry['url'];
+ $date_posted = explode("-", $entry['date_posted']);
+ $year_posted = $date_posted[0];
+ $month_posted = $date_posted[1];
+ $datetime_posted = explode(' ', $date_posted[2]);
+ $day_posted = $datetime_posted[0];
+ $text = $entry['text'];
+ echo <<
+
+ $year_posted/$month_posted/$day_posted/$title
+
+ $text
+
+END_NOTE;
+ }
+ echo "
$author
"; + echo <<