<?PHP
require_once "session.php";
require_once "functions.php";
//retrieve companies list
$select = "SELECT * FROM er_companies order by company";
$result = runSQL($select);
//retrieve all todos list
$get_todos = "select * from er_todos where (status !='1' or status is NULL) order by deadline"; // group by company_id
$result_todos = runSQL($get_todos);
//retrieve all FORMA information
$get_forma_info = "select * from er_forma"; //group by company_id order by year // where year='2004'
$result_forma_info = runSQL($get_forma_info);
//prepare
tpl_list_companies($result);
tpl_list_todos($result_todos);
tpl_list_forma_info($result_forma_info);
tpl_footer();
tpl_header('browse');
//display templates
$smarty->display('header.tpl');
flush();
$smarty->display('index.tpl');
$smarty->display('footer.tpl');
?>