header($sResponse); header('Location: ' . $target_url); exit; // make sure that subsequent code will not be executed } require_once WB_PATH . '/framework/class.frontend.php'; // Create new frontend object $wb = new frontend(); // Figure out which page to display // Stop processing if intro page was shown $wb->page_select() or die; // Collect info about the currently viewed page // and check permissions $wb->get_page_details(); // Collect general website settings $wb->get_website_settings(); // Load functions available to templates, modules and code sections // also, set some aliases for backward compatibility require WB_PATH . '/framework/frontend.functions.php'; // redirect menu-link $this_page_id = PAGE_ID; $php43 = version_compare(phpversion(), '4.3', '>='); $sql = 'SELECT `module`, `block` FROM `' . TABLE_PREFIX . 'sections` '; $sql .= 'WHERE `page_id` = ' . (int) $this_page_id . ' AND `module` = "menu_link"'; $query_this_module = $database->query($sql); if ($query_this_module->numRows() == 1) { // get target_page_id $sql = 'SELECT * FROM `' . TABLE_PREFIX . 'mod_menu_link` WHERE `page_id` = ' . (int) $this_page_id; $query_tpid = $database->query($sql); if ($query_tpid->numRows() == 1) { $res = $query_tpid->fetchRow();