<?php
header("Content-type: text/xml");
include_once 'includes/bootstrap.inc' ;
include_once 'includes/common.inc' ;
include_once 'includes/content.inc' ;
global $db,$sitepath ;


$sitename = getSetting("sitename", $db) ;
$email = getSetting("contact_email", $db) ;
$sitetitle = getSetting("sitetitle", $db) ;
echo '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:video="http://www.google.com/schemas/sitemap-video/1.0">';

	$db->query('SELECT * FROM media ORDER BY id DESC') ;
	while ($row = $db->fetch()) {
echo '<url>
	<loc>'.$sitepath.'play/'.$row['url'].'</loc>
		<video:video>
		<video:thumbnail_loc>'.$sitepath.'uploads/thumbs/'.$row['thumb'].'.large.jpg</video:thumbnail_loc>
		<video:content_loc>'.$sitepath.'uploads/'.$row['mediaurl'].'</video:content_loc>
		<video:title>'.$row['title'].'</video:title>
		<video:description>'.$row['description'].'</video:description>
		</video:video>
</url>' ;
}
echo '</urlset>';
?>