-
Notifications
You must be signed in to change notification settings - Fork 0
/
sitemap.php
executable file
·61 lines (46 loc) · 1.77 KB
/
sitemap.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php
#
# Copyright (c) 2007, Jassen Moran. All rights reserved.
# MongoTickets.com Confidential Proprietary.
#
require('../include/smarty_package.php');
// put full path to Smarty.class.php
require('../lib/php/Smarty/Smarty.class.php');
include('../include/host_info.inc.php');
include('../include/domain_info.inc.php');
require_once('../include/ticket_db.php');
require_once('../include/url_factory.inc.php');
require('DbUtils.php');
require('Utils.php');
include('../include/error.php');
$smarty = new Smarty;
$smarty->template_dir = '../smarty/templates';
$smarty->compile_dir = '../smarty/templates_c';
$smarty->cache_dir = '../smarty/cache';
$smarty->config_dir = '../smarty/configs';
$smarty->compile_check = true;
$smarty->assign("RootUrl", $root_url);
$smarty->display('main.tpl');
if($dbh=mysql_connect ($host_name, $db_username, $db_password)) {
mysql_select_db ($db_name);
echo "<div id=\"content\">";
$top_level_categoryid_list = array("Sports" => 3, "Concert" => 2, "Theater" => 4);
foreach( $top_level_categoryid_list as $categoryName=>$categoryID) {
echo "<div class=\"sitemapSection\">" .
"<div><a class=\"sitemapHeading\" href=\"$root_url/$categoryName/\">$categoryName</a>" .
"</div>";
$childCategoryIDList = GetAllSubordinatesOfCategory('ModifiedPreorderTreeTraversalCategories', $categoryID);
foreach ( $childCategoryIDList as $childCategoryIDArray) {
$url = make_category_url($childCategoryIDArray['name'], $childCategoryIDArray['id']);
echo "<div class=\"indent_" . $childCategoryIDArray['depth'] . "\">" .
"<a href=\"$url\">" .
$childCategoryIDArray['name'] . "</a>" .
"</div>";
#$indent++;
}
echo "</div>";
}
# content to be closed by footer, echo "</div>";
}
$smarty->display('footer.tpl');
?>