$top_event_names[] = "{$top_event_name}";
            }
        }
        $breadcrumb_str = Breadcrumbs($categoryID, 0);
        $smarty->assign("Breadcrumbs", $breadcrumb_str);
        $text_content = BuildTextContent($categoryID, $top_event_names);
        $smarty->assign("TextContent", $text_content);
        $smarty->assign("SubCategories", $categories);
        $smarty->assign("NumSubCategories", count($categories));
        $smarty->display('hot_category_events.tpl');
        if (count($topCategories) > 3) {
            $numRelatedCategories = count($topCategories) - 3;
            for ($j = 3; $j < $numRelatedCategories; $j++) {
                $category_id = $topCategories[$j]['id'];
                # $url_category = make_category_url($topCategories[$j]['name'], $category_id);
                $url_category = GetCategoryUrl($category_id);
                $relatedCategories[] = array("catname" => $topCategories[$j]['name'], "caturl" => "{$url_category}");
            }
            $smarty->assign("RelatedCategories", $relatedCategories);
            $smarty->assign("NumRelatedCategories", $numRelatedCategories);
            $smarty->display('related_events.tpl');
        }
        $smarty->display('right_bar.tpl');
        $smarty->display('left_column.tpl');
    }
    mysql_close($dbh);
} else {
    header('HTTP/1.0 500 Internal Server Error');
    handle_error_no_exit('top_level_categories.code: database connect failure: category id= ' . $categoryID . ' category name= ' . $categoryName . ' ' . mysql_error());
    $error_message = get_error_message();
    $smarty->assign("ErrorMessage", $error_message);
Exemplo n.º 2
0
$smarty->template_dir = '../../smarty/templates/new_urls/';
$smarty->compile_dir = '../../smarty/templates_c/new_urls/';
$smarty->cache_dir = '../../smarty/cache/new_urls/';
$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">';
    echo '<div class="left_bar">';
    $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}/" . strtolower($categoryName) . "/\">{$categoryName}</a>" . "</div>";
        $childCategoryIDList = GetAllSubordinatesOfCategory('ModifiedPreorderTreeTraversalCategories', $categoryID);
        foreach ($childCategoryIDList as $childCategoryIDArray) {
            $url = GetCategoryUrl($childCategoryIDArray['id']);
            echo "<div class=\"indent_" . $childCategoryIDArray['depth'] . "\">" . "<a href=\"{$url}\">" . $childCategoryIDArray['name'] . "</a>" . "</div>";
            #$indent++;
        }
        echo "</div>";
    }
    echo '</div> <!-- end left_bar -->';
    $smarty->display('right_bar.tpl');
    $smarty->display('left_column.tpl');
    # content to be closed by footer, echo "</div>";
}
$smarty->display('footer.tpl');
?>