function display($tpl = null) { echo "<h2>" . JText::_($GLOBALS["COM_NAME"] . "_ERR_PROVIDE_VALID_URL") . "</h2>"; $application = JFactory::getApplication("site"); $menu = $application->getMenu(); $valid_items = $menu->getItems("component", $GLOBALS["com_name"]); echo "<ul>"; foreach ($valid_items as $valid_item) { echo '<li><a href="' . FGetLink($valid_item->id) . '">' . $valid_item->title . '</a></li>'; } echo "</ul>"; // See the documentation string JFactory::getLanguage()->load("com_foxcontact", JPATH_ADMINISTRATOR); echo '<p><a href="http://www.fox.ra.it/forum/22-how-to/1574-hide-the-contact-page-menu-item.html">' . JText::_($GLOBALS["COM_NAME"] . "_DOCUMENTATION") . "</a></p>"; }
function HeaderRedirect(&$params) { $redirect = $params->get("email_sent_action", 0); if (!$redirect) { return; } $link = FGetLink(intval($params->get("email_sent_page", 0))); if (!$link) { return; } switch ($redirect) { case 1: // Use a dedicated thank you page header("Location: " . $link); break; case 2: // Show thank you message and redirect after 5 seconds header("refresh:5;url=" . $link); } }
$me = basename(__FILE__); $name = substr($me, 0, strrpos($me, '.')); include realpath(dirname(__FILE__) . DS . $name . ".inc"); require_once realpath(dirname(__FILE__) . DS . 'lib') . DS . 'functions.php'; if ($activemenu) { $document = JFactory::getDocument(); // Add a stylesheet $css = JURI::base() . "components/" . $application->scope . "/css/neon.css"; $document->addStyleSheet($css); // import joomla controller library jimport('joomla.application.component.controller'); // Get an instance of the controller prefixed by FoxContact $controller = JController::getInstance('FoxContact'); // Perform the Request task $controller->execute(JRequest::getCmd('task')); // Redirect if set by the controller $controller->redirect(); } else { echo "<h2>" . $lang->_($GLOBALS["COM_NAME"] . "_ERR_PROVIDE_VALID_URL") . "</h2>"; $valid_items = $menu->getItems("component", $GLOBALS["com_name"]); echo "<ul>"; foreach ($valid_items as &$valid_item) { // $id = $valid_item->id; // $link = $valid_item->link; echo '<li><a href="' . FGetLink($valid_item->id) . '">' . $valid_item->title . '</a></li>'; } echo "</ul>"; // See the documentation string $lang->load('com_foxcontact.sys', JPATH_ADMINISTRATOR); echo '<p><a href="http://www.fox.ra.it/forum/22-how-to/1574-hide-the-contact-page-menu-item.html">' . $lang->_($GLOBALS["COM_NAME"] . "_DOCUMENTATION") . "</a></p>"; }