Example #1
0
<?php

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
require_once "__inc__.php";
$pagTitle = "Guide";
require_once ROOT_PATH . "header.php";
$navlist = GuideManager::getPublishedNavList();
if ($navlist == null) {
    AlertMessage::Show('Errore: nessuna guida trovata', AlertMessage::WARN);
} else {
    echo $navlist;
}
require_once ROOT_PATH . "footer.php";
 public function getGuideCategoryRelatedEntries($category_id)
 {
     $entries = array();
     $sql = "SELECT related_id, related_type\n        FROM guide_category_relations gcr\n        WHERE gcr.category_id = :category_id";
     $stmt = $this->app['db']->prepare($sql);
     $stmt->bindValue(":category_id", $category_id);
     $stmt->execute();
     $results = $stmt->fetchAll();
     foreach ($results as $result) {
         if ($result['related_type'] == 'category') {
             $category = GuideManager::getGuideCategory($result['related_id']);
             $entries[] = $category;
         }
         if ($result['related_type'] == 'guide') {
             $category = GuideManager::getGuideCategoryItem($result['related_id']);
             if ($category->guide_enabled == 1) {
                 $entries[] = $category;
             }
         }
     }
     return $entries;
 }
Example #3
0
					<?php 
    $currentUser->isMember();
}
?>
	
				</li>
			</ul>
		</div> <!-- /container -->
    </div><!-- /nav panel -->

    <div id="menu-panel" class="side-panel toggle-panel left">
		<ul class="nav-list">
			<li><a href="/">Home</a></li>
			<li><a href="/p/forum/">Forum</a></li>
            <?php 
echo GuideManager::getPublishedNavList();
?>
			<li class="has-children">Guide</li>
			<!--
			<ul class="nav-list">
				<ul class="nav-list">
					<li>Programmi</li>
					<li>Articoli</li>
					<li>Canale forum</li>
					<li>Progetti</li>
				</ul>
				<li>C++</li>
				<li>Java</li>
				<li>Visual Basic .NET</li>
				<li>Ruby</li>
			</ul>