Haha after rereading it is sorta scary. Anyhow I havn't implemented anything new yet but I was testing my modules and wrote a simple news one, here it is:
<?php
global $Disp;
global $DB;
$Display = new dtDisplay("news.tpl");
$action = $_GET['action'];
switch ($action)
{
case "":
$query = $DB->PerformQuery("SELECT * FROM site_news LIMIT 1");
if ($DB->GetRowCount($query) == 0)
{
$Disp->assign("News_Count", 0);
} else {
$news_array = array();
$i = 0;
while ($result = $DB->FetchArray($query))
{
$news_array[$i]['Subject'] = $result['Subject'];
$news_array[$i]['Author'] = $result['Author'];
$news_array[$i]['Message'] = nl2br($result['Message']);
$i++;
}
$Display->assign("News_Count", $i);
$Display->assign("News_Item", $news_array);
}
$Disp->assign("Content", $Display->fetch("news.tpl"));
break;
}
?>