<?
include "common/inc/dbconn.php";

$plk = $_SERVER[HTTP_HOST]; 
$result = sql_query("select * from m_store_info where domain = '$plk' and dStatus = '0'", true, false);

$store_data= sql_fetch_array($result);

$domain = $store_data[domain];
$mod_time = date("Y-m-d",$store_data[input_time]);

$xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
$xml .= "<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">";
$xml .= "<url>";
$xml .= "<loc>http://".$domain."/</loc>";
$xml .= "<lastmod>".$mod_time."</lastmod>";
$xml .= "<changefreq>monthly</changefreq>";
$xml .= "<priority>0.8</priority>";
$xml .= "</url>";
$xml .= "</urlset> ";
header('Content-type: text/xml');
echo $xml;

?>