assign("ModulesInstalation", Configuration::getInstance("ModulesInstalation")->config); if (isset($_GET['search'])) { $tpl->assign("listType", "search"); $s=urldecode($_GET['search']); if (!empty($_GET['search']) && (mb_strlen($s)>2)) { $tpl->assign("search", $s); $w[] = " ( a.name LIKE '%".$tpl->search."%' OR a.descriptionShort LIKE '%".$tpl->search."%' OR a.description LIKE '%".$tpl->search."%') "; // commentary if ($tpl->ModulesInstalation->Articles->Commentaries==1) $q="WebArticleListQueryComments"; else $q="WebArticleListQuery"; $aList->fetchDataList($q, $_GET['page'], 12, array('where'=>implode(" AND ", $w))); $tpl->assign("dataList", $aList->dataList); $tpl->assign_by_ref("strankovani", $aList->strankovani); } $tpl->TITLEbody = "Vyhledávání"; } elseif ($_GET['id']>0 || isset($_GET['seourl'])) { $i = new DropDownItem(array("ID"=>$_GET['id'], "seourl"=>$_GET['seourl'])); $tpl->assign("item", $i->fetchItemObject()); if ($i->special=='UVOD') Common::my_header("/"); $tpl->assign("dropdownPath", $i->getPath()); $tpl->assign("dropdownActualList", $i->getChildrens("shortSelect")); // commentary if ($tpl->ModulesInstalation->Articles->Commentaries==1) $q="WebArticleListQueryComments"; else $q="WebArticleListQuery"; $aList->fetchDataList($q, $_GET['page'], 12, array("from"=>" JOIN ".TB_ARTICLES_DROPDOWN." as d2 ON (d2.IDarticle=a.IDarticle AND d2.IDdropdown='".$i->ID."')")); $tpl->assign("dataList", $aList->dataList); $tpl->assign_by_ref("strankovani", $aList->strankovani); $tpl->TITLEbody = $tpl->item->name; } else { $tpl->TITLEbody = "Článek nenalezen"; } $tpl->TITLE = $tpl->TITLE." - ".$tpl->TITLEbody; include $_SERVER['DOCUMENT_ROOT']."/header.php"; // *******START********** breadCrumbsPath $bp=array(); if (count($tpl->dropdownPath)) { foreach($tpl->dropdownPath as $i) { if ($i->isRoot()) continue; $bp[]=$i->getWebATag(); } } elseif ($tpl->listType=="search") { $bp[]='Vyhledávání výrazu '.$tpl->search.''; } $tpl->assign("breadCrumbsPath", $bp); // *******END********** breadCrumbsPath $tpl->display('/_'.$tpl->aSName.'/header.tpl'); $tpl->display('/_'.$tpl->aSName.'/DropDown.tpl'); include $_SERVER['DOCUMENT_ROOT']."/footer.php"; ?>