$value) { $$key = $value; } } // Run module require ('../modules/'.$module_basename.".php"); // if there is no $module_params array we create empty one // to fix a bug where paramless module does not show // -zch 11.07.2007 if (!isset($module_params) ) { $module_params = array(); } // Check visibility if (isset($module_params) && !isset($module_params['invisible'])) { // Assign variables from module foreach ($module_params as $key => $value){ $smarty->assign("$key", $value); } $module_output = $smarty->fetch($module_basename.".tpl"); // Unassign module variables.. protect leaks foreach ($module_params as $key => $value){ $smarty->clear_assign($key); } } else $module_output = null; return $module_output; } $page = "frontpage"; if (isset($_GET['site']) && isset($page_modules[$_GET['site']])) $page = $_GET['site']; $content_modules = $page_modules[$page]; $smarty->assign('SITE', SITE); $smarty->assign('LANG', LANG); $smarty->config_load(SITE_PWD.'/configs/lang_'.LANG.'.conf'); $smarty->assign("header_output", create_content_output($content_modules['header'])); $smarty->assign("left_output", create_content_output($content_modules['left'])); $smarty->assign("center_output", create_content_output($content_modules['center'])); $smarty->assign("right_output", create_content_output($content_modules['right'])); $smarty->assign("footer_output", create_content_output($content_modules['footer'])); if (isset($_SESSION['counter'])) $smarty->assign('counter', $_SESSION['counter']); if (isset($_SESSION['login_name'])) $smarty->assign('login_name', $_SESSION['login_name']); $page_generation_end = $db->db->microtime_float(); $smarty->assign('page_time', substr(($page_generation_end - $page_generation_start), 0, 5)); $smarty->assign('errors', $errors); $smarty->assign('infos', $infos); $smarty->display('index4.tpl'); ?>