/** * Sitemap XML content * * @access public * @return string XML content */ function SitemapXML() { header('Content-Type: text/xml; charset=utf-8'); $model = $this->gadget->model->load('Sitemap'); $gadget = jaws()->request->fetch('gname', 'get'); $gadget = Jaws_Gadget::filter($gadget); if (empty($gadget)) { return $model->GetSitemapXML(); } else { $xml = $model->GetGadgetSitemapXML($gadget); if (empty($xml)) { return Jaws_HTTPError::Get(404); } return $xml; } }
require_once 'include/Jaws/Utils.php'; header('Location: ' . Jaws_Utils::getBaseURL('/') . 'install/index.php'); exit; } else { require $root . '/config/JawsConfig.php'; } require_once JAWS_PATH . 'include/Jaws/InitApplication.php'; $IsIndex = false; $objAction = null; $IsReqActionStandAlone = false; // Only registered user can access not global website $AccessToWebsiteDenied = !$GLOBALS['app']->Session->Logged() && $GLOBALS['app']->Registry->fetch('global_website', 'Settings') == 'false'; // Get forwarded error from webserver $ReqError = jaws()->request->fetch('http_error', 'get'); if (empty($ReqError) && $GLOBALS['app']->Map->Parse()) { $ReqGadget = Jaws_Gadget::filter(jaws()->request->fetch('gadget')); $ReqAction = Jaws_Gadget_Action::filter(jaws()->request->fetch('action')); if (empty($ReqGadget)) { $IsIndex = true; $ReqGadget = $GLOBALS['app']->Registry->fetchByUser($GLOBALS['app']->Session->GetAttribute('layout'), 'main_gadget', 'Settings'); } if (!empty($ReqGadget)) { if (Jaws_Gadget::IsGadgetEnabled($ReqGadget)) { $objAction = Jaws_Gadget::getInstance($ReqGadget)->action->load(); if (Jaws_Error::IsError($objAction)) { Jaws_Error::Fatal("Error loading gadget: {$ReqGadget}"); } if (!$GLOBALS['app']->Session->GetPermission($ReqGadget, 'default')) { $ReqError = '403'; } // check referrer host for internal action
* @copyright 2005-2015 Jaws Development Group * @license http://www.gnu.org/copyleft/lesser.html */ define('JAWS_SCRIPT', 'admin'); define('BASE_SCRIPT', basename(__FILE__)); // Redirect to the installer if JawsConfig can't be found. $root = dirname(__FILE__); if (!file_exists($root . '/config/JawsConfig.php')) { require_once 'include/Jaws/Utils.php'; header('Location: ' . Jaws_Utils::getBaseURL('/') . 'install/index.php'); exit; } else { require $root . '/config/JawsConfig.php'; } require_once JAWS_PATH . 'include/Jaws/InitApplication.php'; $ReqGadget = Jaws_Gadget::filter(jaws()->request->fetch('gadget', array('post', 'get'))); $ReqAction = Jaws_Gadget_Action::filter(jaws()->request->fetch('action', array('post', 'get'))); if (empty($ReqGadget)) { $ReqGadget = 'ControlPanel'; $ReqAction = ''; } $httpAuthEnabled = $GLOBALS['app']->Registry->fetch('http_auth', 'Settings') == 'true'; if ($httpAuthEnabled) { require_once JAWS_PATH . 'include/Jaws/HTTPAuth.php'; $httpAuth = new Jaws_HTTPAuth(); } // Check for login action is requested if (!$GLOBALS['app']->Session->Logged()) { $loginMsg = ''; if ($ReqGadget == 'ControlPanel' && $ReqAction == 'Login' || $httpAuthEnabled && isset($_SERVER['PHP_AUTH_USER'])) { if ($httpAuthEnabled) {