<?
  /* Main include info */
  ini_set('include_path',"/usr/web/sites/ubixonline.com/include/");
  include("site.inc");

  /* Assign the page title */
  $data[tpl]->assign("PAGE_TITLE","ubixonline.com");

  /* Main defines */
  $data[tpl]->define(array(index=>"index/index.html"));
  $data[tpl]->define(array(menu=>"menu/blank.html"));
  $data[tpl]->define(array(body=>"main/main.html"));

  DoSession($data);
  if ($data[gid] == 1)
    $data[tpl]->define(array(menu=>"menu/admin.html"));
  else
    $data[tpl]->define(array(menu=>"menu/user.tpl"));


  $query = "SELECT first_name FROM users WHERE uid = $data[uid]";
  $result = mysql_query($query);

  $data[tpl]->assign(FIRSTNAME,mysql_result($result,0,'first_name'));

  $query = "SELECT * FROM news ORDER BY date DESC";
  $result = mysql_query($query);
  for ($i = 0;$i < mysql_numrows($result);$i++) {
    $news .= date("F j, Y",mysql_result($result,$i,'date')) . " - ";
    $news .= mysql_result($result,$i,'headline') . "<BR>\n";
    }
  $data[tpl]->assign(NEWS,$news);

  $data[tpl]->parse(MENU, array("menu"));

  /* Parse and print */
  $data[tpl]->parse(BODY, array("body"));
  $data[tpl]->parse(INDEX, array("index"));
  $data[tpl]->FastPrint("INDEX");
?>
