From e6d7e71175e388b7d5e356eebb9ff350c941026e Mon Sep 17 00:00:00 2001 From: Savetheinternet Date: Sat, 28 May 2011 01:47:59 +1000 Subject: renamed "homepage" directory to "themes" --- templates/themes/frameset/theme.php | 134 ++++++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 templates/themes/frameset/theme.php (limited to 'templates/themes/frameset/theme.php') diff --git a/templates/themes/frameset/theme.php b/templates/themes/frameset/theme.php new file mode 100644 index 00000000..6aa126c8 --- /dev/null +++ b/templates/themes/frameset/theme.php @@ -0,0 +1,134 @@ +' + . '' + . '' + . '' + . '' . $settings['title'] . '' + . '' + // Sidebar + . '' + // Main + . '' + // Finish page + . ''; + } + + // Build news page + public static function news($settings) { + global $config; + + // HTML5 + $body = '' + . '' + . '' + . 'News' + . ''; + + $body .= '

' . $settings['title'] . '

' + . '
' . ($settings['subtitle'] ? utf8tohtml($settings['subtitle']) : '') . '
'; + + $query = query("SELECT * FROM `news` ORDER BY `time` DESC") or error(db_error()); + if($query->rowCount() == 0) { + $body .= '

(No news to show.)

'; + } else { + // List news + while($news = $query->fetch()) { + $body .= '
' . + '

' . + ($news['subject'] ? + $news['subject'] + : + 'no subject' + ) . + ' — by ' . + $news['name'] . + ' at ' . + date($config['post_date'], $news['time']) . + '

' . $news['body'] . '

'; + } + } + + // Finish page + $body .= ''; + + return $body; + } + + // Build sidebar + public static function sidebar($settings) { + global $config, $board; + + $body = '' + . '' + . '' + . '' + . '' + . '' . $settings['title'] . '' + . ''; + + $body .= '
' . $settings['title'] . '
'; + + + $body .= '
Boards
'; + + // Finish page + $body .= ''; + + return $body; + } + }; + +?> \ No newline at end of file -- cgit v1.3