retrieve("gsitemap", "*", "gsitemap_active IN (".USERCLASS_LIST.") ORDER BY gsitemap_order ",true);
if(deftrue('BOOTSTRAP'))
{
$bread = array(
0 => array('text' => $tp->toHTML(GSLAN_Name), 'url'=> null ) // e107::url('gsitemap','index')
);
$text = e107::getForm()->breadcrumb($bread);
e107::breadcrumb($bread);
}
else
{
$text = '';
}
$text .= "
";
foreach($nfArray as $nfa)
{
$url = (substr($nfa['gsitemap_url'],0,4)== "http")? $nfa['gsitemap_url'] : SITEURL.$tp->replaceConstants($nfa['gsitemap_url'],TRUE);
$text .= "- ".$tp->toHTML($nfa['gsitemap_cat'],"","defs").": ".$tp->toHTML($nfa['gsitemap_name'],"","defs")."
\n";
}
$text .= "
";
$ns -> tablerender(GSLAN_Name."", $text);
require_once(FOOTERF);
exit;
}
header('Content-type: application/xml', TRUE);
$xml = "
";
$smArray = $sql ->retrieve("gsitemap", "*", "gsitemap_active IN (".USERCLASS_LIST.") ORDER BY gsitemap_order ",true);
foreach($smArray as $sm)
{
if($sm['gsitemap_url'][0] == '/') $sm['gsitemap_url'] = ltrim($sm['gsitemap_url'], '/');
$loc = (substr($sm['gsitemap_url'],0,4)== "http")? $sm['gsitemap_url'] : SITEURL.$tp->replaceConstants($sm['gsitemap_url'],TRUE);
$xml .= "
".$loc."
".get_iso_8601_date($sm['gsitemap_lastmod'])."
".$sm['gsitemap_freq']."
".$sm['gsitemap_priority']."
";
}
$xml .= "
";
echo $xml;
/* ungu at terong dot com */
function get_iso_8601_date($int_date)
{
$date_mod = date('Y-m-d\TH:i:s', $int_date);
$pre_timezone = date('O', $int_date);
$time_zone = substr($pre_timezone, 0, 3).":".substr($pre_timezone, 3, 2);
$date_mod .= $time_zone;
return $date_mod;
}