assign('error', array_merge($g['error'], $_SESSION['error'])); unset($_SESSION['error']); // finalize template $g['smarty']->assign('title', $g['title']); $g['smarty']->assign('weburl', $g['weburl']); $g['smarty']->assign('role', $g['user']->role); $g['smarty']->assign('page', $_GET['do']); $g['smarty']->display('index.tpl');