caching = SMARTY_CACHEING_SMARTHELPDESK; $objSmartyEngine->cache_lifetime = SMARTY_CACHE_TIME_SMARTHELPDESK; //$nCategoryID = (int) $objRequest->getParameter("nCategoryID"); $nTopicID = (int) $objRequest->getParameter("nTopicID"); if($nTopicID > 0) { $objTopic = smartHelpDeskManager::_getTopic($nTopicID); } if(!is_null($objTopic)) { /* Cache */ $sCachedName = "smarthelpdesk|topic|" . $objTopic->getID(); if(!$objSmartyEngine->is_cached("lexikon/topic.tpl", $sCachedName)) { /* Lade Keywords */ $objTags = new smartHelpDeskTags(); $objTags->setTopicID($objTopic->getID()); $objTags->init(); /* lade relevante Topics */ $objRelatedTopics = new smartHelpDeskRelated(); $objRelatedTopics->setTopicID($objTopic->getID()); $objRelatedTopics->init(); /* Ausgabe */ $objSmartyEngine->assign("aRelatedTopics", $objRelatedTopics->getElements()); $objSmartyEngine->assign("aTags", $objTags->getKeywords()); $objSmartyEngine->assign("aCategoryFootPath", $objTopic->getCategory(0)->getCategoryFootPath()); $objSmartyEngine->assign("objTopic", $objTopic); $objSmartyEngine->assign("sMetaTitle", $objTopic->getHeadline() . " - Das Zahnlexikon - Zahnarzt Dr. Semmer nahe Cottbus"); } /* erhoehe Counter */ smartHelpDeskTopic::_increaseVisitCounter($objTopic->getID()); /* Ausgabe */ $objResponse->write($objSmartyEngine->fetch("lexikon/topic.tpl", $sCachedName)); } else { $objCategory = new smartHelpDeskCategory(1); $objCategory->init(); /* Cache */ $sCachedName = "smarthelpdesk|category|" . $objCategory->getCategoryID(); if(!$objSmartyEngine->is_cached("lexikon/index_category.tpl", $sCachedName)) { $objCategories = new containerSmartHelpDeskCategory(); $objCategories->setPreCategoryID($objCategory->getCategoryID()); $objCategories->init(); $aSubcategories = array(); if($objCategories->length() > 0) { $aCategoryTree = $objCategories->getCategoryTree(); foreach($aCategoryTree AS $aCategory) { if(count($aCategory["subcategories"]) > 0) { foreach($aCategory["subcategories"] AS $objCategoryTmp) { if($objCategoryTmp->hasTopics()) { $aSubcategories[] = $objCategoryTmp; } } #end-foreach } } #end-foreach } $objTopics = new containerSmartHelpDeskTopic(); $objTopics->setCategoryID($objCategory->getCategoryID()); $objTopics->init(); $objSmartyEngine->assign("aTopics", $objTopics->getElements()); $objSmartyEngine->assign("aSubcategories", $aSubcategories); $objSmartyEngine->assign("objCategory", $objCategory); $objSmartyEngine->assign("sMetaTitle", "Das Zahnlexikon - Zahnarzt Dr. Semmer nahe Cottbus"); $objSmartyEngine->assign("aCategoryFootPath", $objCategory->getCategoryFootPath()); } /* erhoehe Counter */ smartHelpDeskCategory::_increaseVisitCounter($objCategory->getCategoryID()); /* Ausgabe */ $objResponse->write($objSmartyEngine->fetch("lexikon/index_category.tpl", $sCachedName)); } /* Ausgabe */ $objResponse->flush(); } } $objPage = new page(); $objPage->execute($objRequest, $objResponse); ?>