jimport('joomla.application.helper'); jimport('joomla.filesystem.file'); require_once JApplicationHelper::getPath('admin_html', 'com_jcrawler'); $task = JRequest::getVar('task', ''); switch ($task) { case 'submit': submit($option); break; case 'notify': notify($option); break; case 'updatecheck': updatecheck($option); break; default: HTML_jcrawler::showForm($option); break; } $stack = array(); $disallow_file = array(); function submit($option) { global $stack, $mainframe; // get values from gui of script $website = JRequest::getVar('http_host', 'none', 'POST', 'STRING', JREQUEST_ALLOWHTML); if (substr($website, -1) != "/") { $website = $website . "/"; } $page_root = JRequest::getVar('document_root', 'none', 'POST', 'STRING', JREQUEST_ALLOWHTML); $sitemap_file = $page_root . JRequest::getVar('sitemap_url', 'none', 'POST', 'STRING', JREQUEST_ALLOWHTML); $sitemap_url = $website . JRequest::getVar('sitemap_url', 'none', 'POST', 'STRING', JREQUEST_ALLOWHTML);