<?php
include_once("elc/config.php");
include_once("maxknowledge.php");
header('Content-Type: application/xml; charset=utf-8');
print "
<urlset xmlns='http://www.sitemaps.org/schemas/sitemap/0.9'>
";

//lets get a list of courses

$q = "select * from mdl_course where (category='8' or category='10' or category='41' or category='13' or category='11' or category='12' or category='46') order by shortname";
$r = mysql_query($q);
while ($row = mysql_fetch_object($r))
{
$url = getnormallink($row->id);
$url = str_replace("&","&amp;",$url);
$url = "http://www.maxknowledge.com$url";
print "
	<url>
		<loc>$url</loc>
	</url>
";
}

$q = "select * from mdl_course where (category='1' or category='2' or category='3' or category='4' or category='5') order by shortname";
$r = mysql_query($q);
while ($row = mysql_fetch_object($r))
{
$url = getnormallink($row->id);
$url = str_replace("&","&amp;",$url);
$url = "http://www.maxknowledge.com$url";
print "
	<url>
		<loc>$url</loc>
	</url>
";
}

$q = "select * from mdl_course where (category='48') order by shortname";
$r = mysql_query($q);
while ($row = mysql_fetch_object($r))
{
$url = getnormallink($row->id);
$url = str_replace("&","&amp;",$url);
$url = "http://www.maxknowledge.com$url";
print "
	<url>
		<loc>$url</loc>
	</url>
";
}

//static urls go here using an array
$static_url = array(
"/trainingcourses.php",
"/admissions.php",
"/careerservices.php",
"/compliance.php",
"/financialaid.php",
"/instruction.php",
"/online-instruction.php",
"/management.php",
"/student-services.php",
"/excellenceprograms.php",
"/excellenceprograms-leadership.php",
"/excellenceprograms-managementandsupervision.php",
"/excellenceprograms-campusoperations.php",
"/excellenceprograms-admissions.php",
"/excellenceprograms-careerservices.php",
"/excellenceprograms-teaching.php",
"/excellenceprograms-onlineteaching.php",
"/tutorials.php",
"/hel.php",
"/freewebinars.php",
"/freeresources.php",
"/salesandsupport.php",
"/turnkeysolutions.php",
"/purchaseforms.php",
"/helpfaq.php",
"/newsletter.php",
"/termsofservice.php",
"/about.php",
"/company.php",
"/contact.php",
"/faculty.php",
"/clients.php",
"/news.php",
"/careers.php"

);


foreach ($static_url as $url)
{
$url = "http://www.maxknowledge.com$url";
print "
	<url>
		<loc>$url</loc>
	</url>
";
}

print "</urlset>";

