<?
//xml contect type
header("Content-Type: text/xml;charset=utf-8");

//timezone
date_default_timezone_set('Asia/Dubai');

//db connect
include('/home/hotwallp/arab-world.press/docs/framework/sql.php');

//start sitemap xml
echo '<?xml version="1.0" encoding="UTF-8"?>';

?>
	<urlset
		xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
		xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
		http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">

<!-- General Pages -->
<url>
	<loc>http://arab-world.press/</loc>
	<priority>1.00</priority>
	<changefreq>weekly</changefreq>
</url>
<url>
	<loc>http://arab-world.press/personality/</loc>
	<priority>0.90</priority>
	<changefreq>weekly</changefreq>
</url>

<!-- Review -->
<url>
	<loc>http://arab-world.press/review/</loc>
	<priority>0.90</priority>
	<changefreq>weekly</changefreq>
</url>

<?

//categories
$res=mysql_query('SELECT * FROM `review-categories` ORDER BY `TITLEID` ASC;');
while($data=mysql_fetch_array($res))
	{
	echo '
<url>
	<loc>http://arab-world.press/review/'.$data['TITLEID'].'/</loc>
	<priority>0.90</priority>
	<changefreq>weekly</changefreq>
</url>';	
	}
	
//experts		
$res=mysql_query('SELECT * FROM `review-experts` ORDER BY `DATE` DESC;');
while($data=mysql_fetch_array($res))
	{
	echo '
<url>
	<loc>http://arab-world.press/review/'.$data['NAMEID'].'/</loc>
	<priority>0.90</priority>
	<changefreq>weekly</changefreq>
</url>';	
	}
	
//articles
$res=mysql_query('SELECT * FROM `review` ORDER BY `DATE` DESC LIMIT 1000;');
while($data=mysql_fetch_array($res))
	{
	echo '
<url>
	<loc>http://arab-world.press/review/item/'.$data['ID'].'/</loc>
	<priority>0.80</priority>
	<lastmod>'.date("Y-m-d",strtotime($data['DATE'])).'</lastmod>
</url>';	
	}			

?>


<!-- News of Dubai Messenger -->
<url>
	<loc>http://arab-world.press/news/</loc>
	<priority>0.90</priority>
	<lastmod><?=date('Y-m-d')?></lastmod>
	<changefreq>daily</changefreq>
</url>

<?

$res=mysql_query('SELECT * FROM `news` WHERE `STATUS` = 0 ORDER BY `DATE` DESC LIMIT 1000;');
while($data=mysql_fetch_array($res))
	{
	echo '
<url>
	<loc>http://arab-world.press/news/'.$data['TITLEID'].'/</loc>
	<priority>0.80</priority>
	<lastmod>'.date("Y-m-d",strtotime($data['DATE'])).'</lastmod>
</url>';	
	}
?>

<!-- Static Other Pages -->
<url>
	<loc>http://arab-world.press/about/</loc>
	<priority>0.60</priority>
	<lastmod><?=date('Y-m').'-01'?></lastmod>
	<changefreq>monthly</changefreq>
</url>
<url>
	<loc>http://arab-world.press/partners/</loc>
	<priority>0.60</priority>
	<lastmod><?=date('Y-m').'-01'?></lastmod>
	<changefreq>monthly</changefreq>
</url>
<url>
	<loc>http://arab-world.press/contacts/</loc>
	<priority>0.50</priority>
	<lastmod><?=date('Y-m').'-01'?></lastmod>
	<changefreq>monthly</changefreq>
</url>
<url>
	<loc>http://arab-world.press/dubaimessenger/</loc>
	<priority>0.50</priority>
	<lastmod><?=date('Y-m').'-01'?></lastmod>
	<changefreq>monthly</changefreq>
</url>
<url>
	<loc>http://arab-world.press/order/</loc>
	<priority>0.50</priority>
	<lastmod><?=date('Y-m').'-01'?></lastmod>
	<changefreq>monthly</changefreq>
</url>
<url>
	<loc>http://arab-world.press/search/</loc>
	<priority>0.50</priority>
	<lastmod><?=date('Y-m').'-01'?></lastmod>
	<changefreq>monthly</changefreq>
</url>
<url>
	<loc>http://arab-world.press/vacancy/</loc>
	<priority>0.50</priority>
	<lastmod><?=date('Y-m').'-01'?></lastmod>
	<changefreq>monthly</changefreq>
</url>

<!-- English Version -->
<url>
	<loc>http://arab-world.press/en/</loc>
	<priority>0.70</priority>
	<changefreq>monthly</changefreq>
</url>

</urlset>
<? include('/home/vhosts/arab-world.press/httpdocs/framework/end.php'); ?>