<?php ob_start(); require_once 'includes/header.php'; require_once 'includes/view.php'; require_once 'includes/categories.php'; require_once 'includes/categoryManager.php'; require_once 'includes/topics.php'; $iCurrentCategoryID = 1; if (isset($_GET['CategoryID'])) { $iCurrentCategoryID = $_GET['CategoryID']; } $oCategory = new Category(); $oCategory->load($iCurrentCategoryID); echo View::renderCategory($oCategory); $aCategories = categoryManager::all(); echo View::renderCategories($aCategories); if (isset($_SESSION["MemberID"]) == false) { $sHTML = '<div class="newTopic"><a href="login.php">New Category</a></div>'; echo $sHTML; } else { $sHTML = '<div class="newTopic"><a href="newTopic.php?CategoryID=' . $iCurrentCategoryID . '">New Topic</a></div>'; echo $sHTML; } ?> <div> </div>