File: /home/httpd/html/tubeshemale.com/public_html/sitemapMiscPages.php
<?
session_start();
header('Content-type: text/xml; charset=UTF-8');
include('admin/db.php');
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
$urlsArray = array('','channels.php','login.php','signup.php');
foreach($urlsArray as $i) {
?>
<url>
<loc><? echo $basehttp; ?>/<? echo $i; ?></loc>
<changefreq>hourly</changefreq>
<priority>1.00</priority>
</url>
<?
}
//top rated
$result_count = mysql_query("SELECT content.record_num FROM content, ratings WHERE approved = 2 AND content.record_num = ratings.id AND ratings.total_votes > $minimum_votes AND content.enabled = 1 GROUP BY content.record_num") or die(mysql_error());
$total_results = mysql_num_rows($result_count);
$total_pages = ceil($total_results / $results_per_page);
for($i = $total_pages; $i > 0; $i--) {
?>
<url>
<loc><? echo $basehttp; ?>/top-rated/page<? echo $i; ?>.html</loc>
<changefreq>hourly</changefreq>
<priority>0.70</priority>
</url>
<?
}
//most popular
$result_count = mysql_query("SELECT record_num FROM content, content_views WHERE content.approved = 2 AND content.scheduled_date <= NOW() AND content.record_num = content_views.content AND content.enabled = 1 ") or die(mysql_error());
$total_results = mysql_num_rows($result_count);
$total_pages = ceil($total_results / $results_per_page);
for($i = $total_pages; $i > 0; $i--) {
?>
<url>
<loc><? echo $basehttp; ?>/most-viewed/page<? echo $i; ?>.html</loc>
<changefreq>hourly</changefreq>
<priority>0.70</priority>
</url>
<?
}
//newest
$result_count = mysql_query("SELECT COUNT(record_num) as counter FROM content WHERE approved = 2 AND scheduled_date <= NOW() AND enabled = 1") or die(mysql_error());
$count = mysql_fetch_array($result_count);
$total_results = $count[counter];
$total_pages = ceil($total_results / $results_per_page);
for($i = $total_pages; $i > 0; $i--) {
?>
<url>
<loc><? echo $basehttp; ?>/page<? echo $i; ?>.html</loc>
<changefreq>hourly</changefreq>
<priority>0.70</priority>
</url>
<?
}
echo '</urlset>';
?>