echo _XMAP_MSG_NO_SITEMAP; return; } if ($view == 'xml') { Header("Content-type: text/xml; charset=UTF-8"); Header("Content-encoding: UTF-8"); } global $xmap; $xmapCache = XmapCache::getCache($xSitemap); $excluded_items = $xSitemap->getExcludedItems(); if ($xSitemap->usecache) { $lang = JFactory::getLanguage(); $xmapCache->call('xmapCallShowSitemap', $view, $xSitemap->id, $excluded_items, $lang->getName(), $mainframe->getCfg('sef'), $user->get('id'), $news); // call plugin's handler function } else { xmapCallShowSitemap($view, $xSitemap->id, $excluded_items); } switch ($view) { case 'html': $xSitemap->views_html++; $xSitemap->lastvisit_html = time(); $xSitemap->save(); break; case 'xml': $xSitemap->views_xml++; $xSitemap->lastvisit_xml = time(); $xSitemap->save(); $scriptname = basename($_SERVER['SCRIPT_NAME']); $no_html = intval(JRequest::getVar('no_html', '0', "REQUEST")); if ($view == 'xml' && $scriptname != 'index2.php' || $no_html != 1) { die;
$xSitemap->load($sitemapid); if (!$xSitemap->id) { echo _XMAP_MSG_NO_SITEMAP; return; } if ($view == 'xml') { Header("Content-type: text/xml; charset=UTF-8"); Header("Content-encoding: UTF-8"); } global $xmap; $xmapCache = XmapCache::getCache($xSitemap); if ($xSitemap->usecache) { $xmapCache->call('xmapCallShowSitemap', $view, $xSitemap->id, $mosConfig_locale, $mosConfig_sef); // call plugin's handler function } else { xmapCallShowSitemap($view, $xSitemap->id); } switch ($view) { case 'html': $xSitemap->views_html++; $xSitemap->lastvisit_html = time(); $xSitemap->save(); break; case 'xml': $xSitemap->views_xml++; $xSitemap->lastvisit_xml = time(); $xSitemap->save(); $scriptname = basename($_SERVER['SCRIPT_NAME']); $no_html = intval(mosGetParam($_REQUEST, 'no_html', '0')); if ($view == 'xml' && $scriptname != 'index2.php' || $no_html != 1) { die;