assign("itemText", $d->getSpecialItem($tpl->aSID, 'UVOD')); $tpl->TITLE = $tpl->TITLEbody = SolisShop::getStoreConfig("titleHP"); $tpl->assign("ModulesInstalation", Configuration::getInstance("ModulesInstalation")->config); $aList=new ArticleList(); $tpl->assign("aList", $aList); // MAIN ARTICLE $MA=SolisShop::getStoreConfig('ArticlesMAHP'); if ($tpl->ModulesInstalation->Articles->MA==1 && $MA>0) { if ($tpl->ModulesInstalation->Articles->Commentaries==1) $q="WebArticleListQueryComments"; else $q="WebArticleListQuery"; $set=array('limit'=>1); if ($MA==1) { $set['order']="a.datePublished DESC"; } elseif ($MA==2) { $set['where']="a.MA=1"; $set['order']="a.datePublished DESC"; } elseif ($MA==3) { $set['where']="a.MA=1"; $aList->config->selectOnlyOneOrder = " RAND() "; $q.="NoOrder"; } $aList->fetchDataList($q, null, null, $set); $tpl->assign("MainArticleHP", current($aList->dataList)); } // NOVINKY $N=SolisShop::getStoreConfig('ArticlesNHP'); if ($tpl->ModulesInstalation->Articles->N==1 && $N>0) { if ($tpl->ModulesInstalation->Articles->Commentaries==1) $q="WebArticleListQueryComments"; else $q="WebArticleListQuery"; $set=array('limit'=>DEFAULT_ROWS_HPN); if ($N==1) { $set['order']="a.datePublished DESC"; } elseif ($N==2) { $set['where']="a.N=1"; $set['order']="a.datePublished DESC"; } elseif ($N==3) { $set['where']="a.N=1"; $aList->config->selectOnlyOneOrder = " RAND() "; $q.="NoOrder"; } if (is_object($tpl->MainArticleHP)) { if (isset($set['where'])) $set['where']=$set['where']." AND a.IDarticle!='".$tpl->MainArticleHP->ID."'"; else $set['where']="a.IDarticle!='".$tpl->MainArticleHP->ID."'"; } $aList->fetchDataList($q, null, null, $set); $tpl->assign("dataArticlesNHPList", $aList->dataList); } // AKTUALITY if ($tpl->ModulesInstalation->Articles->NewsHP==1) { $dataNewsHPList = new NewsList(); $dataNewsHPList->fetchDataList("NewsQuery", null, null, array('limit'=>DEFAULT_ROWS_HPNews)); $tpl->assign("dataNewsHPList", $dataNewsHPList->dataList); } include $_SERVER['DOCUMENT_ROOT']."/header.php"; $tpl->display('/_'.$tpl->aSName.'/header.tpl'); $tpl->display('/_'.$tpl->aSName.'/index.tpl'); include $_SERVER['DOCUMENT_ROOT']."/footer.php"; ?>