db_Select("gsitemap", "*", "gsitemap_active IN (".USERCLASS_LIST.") ORDER BY gsitemap_order ");
$nfArray = $sql -> db_getList();
$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(SITENAME." : ".GSLAN_Name."", $text);
require_once(FOOTERF);
exit;
}
$xml = "
";
$sql -> db_Select("gsitemap", "*", "gsitemap_active IN (".USERCLASS_LIST.") ORDER BY gsitemap_order ");
$smArray = $sql -> db_getList();
foreach($smArray as $sm)
{
$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;
}
?>