Location: PHPKode > projects > Terra Nova > index.php
<?php

$require_login = false;
$gamescript = false;

include("common.php");

$page->Assign("username",$username);

if($loggedin==true)
{
$welcometext = $page->FetchTemplate("loggedin_welcometext");
}
else
{
$welcometext = $page->FetchTemplate("notloggedin_welcometext");
}

$page->Assign("welcometext","$welcometext");

$mainbox = newbox("Welcome","$welcometext");

//display news html

$newshtmldat = $db->select("*","news","news_id>0 ORDER BY news_postdate DESC",0);

while($row = mysql_fetch_array($newshtmldat))
{

$newsbox = newbox("$row[news_title]","$row[news_content]");
$newshtml .= $newsbox . "<BR>";

}

//first check to see if any categories or forums have been defined...
//if not, direct user to the admin center...

$content .= $mainbox;

$content .= $newshtml;

$page->Assign("content",$content);

$page->Display("template");

?>
Return current item: Terra Nova