require("../includes/config.inc.php");
$title = "Sitemap";
require("./template_header.php");
$content = "
| " . file_get_contents("./adsense_code2.php") ." |
";
$res1 = mysql_query("SELECT * FROM Categories WHERE Type = 'Main' ORDER BY CategoryID ASC");
$ant1 = mysql_num_rows($res1);
$tlr1 = 0;
while($tlr1 < $ant1) {
$tlr1++;
$rij1 = mysql_fetch_object($res1);
$main_id = $rij1->CategoryID;
$main_name = $rij1->Name;
$main_dirname = $rij1->DirName;
$content .= "$main_name
";
$res3 = mysql_query("SELECT * FROM Categories WHERE CategoryLink = '$main_id' AND Type = 'SubCat' ORDER BY Name ASC");
$ant3 = mysql_num_rows($res3);
$tlr3 = 0;
while($tlr3 < $ant3) {
$tlr3++;
$rij3 = mysql_fetch_object($res3);
$sub_name = $rij3->Name;
$sub_dirname = $rij3->DirName;
$subcat_id = $rij3->CategoryID;
$content .= "$sub_name
";
$res4 = mysql_query("SELECT * FROM Objects WHERE CategoryLink = '$subcat_id' ORDER BY Title ASC");
$ant4 = mysql_num_rows($res4);
$tlr4 = 0;
while($tlr4 < $ant4) {
$tlr4++;
$rij4 = mysql_fetch_object($res4);
$ttitle = $rij4->Title;
$filename = $rij4->FileName;
$content .= "- $ttitle
";
}
$content .= "
";
}
$content .= "
";
}
require("./template_content.php");
require("./template_footer.php");
exit;
?>