* @license http://www.gnu.org/copyleft/gpl.html GNU GPL * @copyright (C) 2006,2007 Catalyst IT Ltd http://catalyst.net.nz * */ define('INTERNAL', 1); define('PUBLIC', 1); define('MENUITEM', 'home'); require('init.php'); // check to see if we're installed... if (!get_config('installed')) { redirect(get_config('wwwroot') . 'admin/index.php'); } // Check for whether the user is logged in, before processing the page. After // this, we can guarantee whether the user is logged in or not for this page. if (!$SESSION->is_logged_in()) { require_once('form.php'); $form = auth_get_login_form(); $form['renderer'] = 'div'; $login_form = form($form); } $smarty = smarty(); if (!$SESSION->is_logged_in()) { $smarty->assign('login_form', $login_form); } $smarty->display('index.tpl'); ?>