function display($tpl = null) { $language = JFactory::getLanguage(); $application = JFactory::getApplication("site"); $menu = $application->getMenu(); echo "<h2>" . $language->_($GLOBALS["COM_NAME"] . "_ERR_PROVIDE_VALID_URL") . "</h2>"; $valid_items = $menu->getItems("component", $GLOBALS["com_name"]); echo "<ul>"; foreach ($valid_items as &$valid_item) { echo '<li><a href="' . B2JGetLink($valid_item->id) . '">' . $valid_item->title . '</a></li>'; } echo "</ul>"; $language->load("com_b2jcontact", JPATH_ADMINISTRATOR); }
function B2JHeaderRedirect(&$params) { $redirect = $params->get("email_sent_action", 0); if (!$redirect) { return; } $link = B2JGetLink(intval($params->get("email_sent_page", 0))); if (!$link) { return; } switch ($redirect) { case 1: header("Location: " . $link); break; case 2: header("refresh:5;url=" . $link); } }