Commit 013b5360 authored by Ryan Wade's avatar Ryan Wade

Implemented working Sitemap generator.

TODO: stylize
parent 1c67b1ef
#sitemap
{
padding: 20px 20px;
min-height: 500px;
text-align: left;
}
#sitemap ul {
list-style-type: none;
}
/*
#sitemapBox
{
padding: 20px 20px;
......@@ -20,4 +27,4 @@
color:gold;
font:15px Georgia,serif;
font-style: italic;
}
\ No newline at end of file
}*/
\ No newline at end of file
<div id="sitemap">
<div id="sitemapBox" class="sitemapText">
This is where the sitemap would be defined
</div>
<?php
function createSitemap($level,$t_SQL,$t_select)
{
if(!isset($level))
return "";
$sitemap = "\r\n<ul>\r\n";
foreach($level as $page)
{
$id=$page[0];
$title=$page[2];
$sitemap .= "<li><a href='viewpage.php?id=".$id."'>".$title."</a>";
if($page[0]!=0)
$sitemap .= createLevel(SQL_QUERY_PARENT_ID($page[0],$t_SQL),$t_SQL,$t_select);
$sitemap .= "</li>\r\n";
}
$sitemap .= "</ul>\r\n";
return $sitemap;
}
$sitemap_SQL = $_GLOBAL["SQL"];
$sitemap_id = $_GLOBAL["pageId"];
$level = createSitemap(SQL_QUERY_PARENT_ID(0,$nav_SQL),$nav_SQL,$nav_id);
echo $level;
?>
</div>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment