diff --git a/dwoo/templates/news.tpl b/dwoo/templates/news.tpl index 18373ec..0c67881 100644 --- a/dwoo/templates/news.tpl +++ b/dwoo/templates/news.tpl @@ -1,26 +1,58 @@ +{if !$partial} + + {$dwoo.const.KU_NAME} {for style $styles} {/for} - + + -
+
{if $dwoo.const.KU_SLOGAN neq ''}

{$dwoo.const.KU_SLOGAN}

{/if} +{/if} +
{foreach item=entry from=$entries}

{$entry.subject|stripslashes}{if $dwoo.get.p eq ''} by {if $entry.email neq ''}{/if}{$entry.poster|stripslashes}{if $entry.email neq ''}{/if} - {$entry.timestamp|date_format:"%D @ %I:%M %p %Z"}{/if} @@ -28,6 +60,36 @@
{$entry.message|stripslashes}


{/foreach} - {$botads} +
+{$botads} +{if !$partial} + - \ No newline at end of file + +{/if} \ No newline at end of file diff --git a/news.php b/news.php index 143d647..09eb60a 100644 --- a/news.php +++ b/news.php @@ -35,9 +35,20 @@ $botads = $tc_db->GetOne("SELECT code FROM `" . KU_DBPREFIX . "ads` WHERE `posit $dwoo_data->assign('topads', $topads); $dwoo_data->assign('botads', $botads); +if(isset($_GET['partial'])) $partial = true; +else $partial = false; -$entries = $tc_db->GetAll("SELECT * FROM `" . KU_DBPREFIX . "front` WHERE `page` = 0 ORDER BY `timestamp` DESC"); +$dwoo_data->assign('partial', $partial); +if (!isset($_GET['p'])) $_GET['p'] = ''; + +if ($_GET['p'] == 'faq') { + $entries = $tc_db->GetAll("SELECT * FROM `" . KU_DBPREFIX . "front` WHERE `page` = 1 ORDER BY `order` ASC"); +} elseif ($_GET['p'] == 'rules') { + $entries = $tc_db->GetAll("SELECT * FROM `" . KU_DBPREFIX . "front` WHERE `page` = 2 ORDER BY `order` ASC"); +} else { + $entries = $tc_db->GetAll("SELECT * FROM `" . KU_DBPREFIX . "front` WHERE `page` = 0 ORDER BY `timestamp` DESC"); +} $styles = explode(':', KU_MENUSTYLES); $dwoo_data->assign('styles', $styles);