getText($idText,$_SESSION['country']); if (isset($_POST['password'])){ if ($_POST['password']==$content['password']){ $_SESSION['showText'.$idText]=true; }else{ $content['form-error']=true; } } //print_r($content); $params = [ 'default' => $arrayDefault, 'pageBar' => $pageBar->getPageAdminBar('text',$content['id']), 'form' => ['month_select' => $text_functions->get_month('select')], 'user' => $_SESSION['userData'], 'microsite' => $microsite->getMicrosite($_GET['microsite']), 'menu' => $menu->getMenu($_SESSION['country']), 'olympic_in_menu' => $CachedOlympics, 'title' => 'Statická stránka', 'setting' => ['page_type' => 'article', 'global_url' => ($global_url), 'idtext' => $idText, 'page' => $websitePath, 'olympic_nav' => $olympicMenu], 'content' => $content, 'socialstream' => $socialstream->getSosialFeed('', '', 2, 0), 'next_articles' => $articles->nextArticles('',0,10,$content['tag_id'],'','','','',$_SESSION['country']), 'partners' => $partners->getPartners('',true), 'website' => $_SERVER['HTTP_HOST'], ]; if ($content['password_bool']==1 && !isset($_SESSION['showText'.$idText])){ $latte->render('app/layout/page/lock.latte', $params); }else{ if ($params['content']['layout']==1){ $latte->render('app/layout/page/layout_1.latte', $params); }elseif($params['content']['layout']==2){ $latte->render('app/layout/page/layout_2.latte', $params); }elseif($params['content']['layout']==3){ $latte->render('app/layout/page/layout_3.latte', $params); }else{ $micrositeData = $microsite->getMicrosite($idText); if ($micrositeData['id']){ $detailOlympic = $micrositeData['olympics_id'] ? $olympic->getDetailOlympic($micrositeData['olympics_id']) : null; $params = [ 'default' => $arrayDefault, 'form' => ['month_select' => $text_functions->get_month('select')], 'user' => $_SESSION['userData'], 'menu' => $menu->getMenu($_SESSION['country']), 'olympic_in_menu' => $CachedOlympics, 'title' => 'Microsite', 'setting' => ['page_type' => 'article', 'global_url' => ($global_url), 'idtext' => $idText, 'page' => $websitePath, 'olympic_nav' => $olympicMenu], 'microsite' => $micrositeData, 'partners' => $partners->getPartners('',true), 'website' => $_SERVER['HTTP_HOST'], 'socialstream' => $socialstream->getSosialFeed('', '', 5, 0, null, null, null, null, null, null, null, null, null, true), 'gallery' => $gallery->getGalleryODM(), 'homepage_block' => $homepage_block->getBannerBlock($_SESSION['country'],'website','ODM') ]; if ($micrositeData['id']==9){ require_once(__DIR__ . '/app/functions/import/kudyznudyapi.php'); $kudyznudyapi = new kudyznudyapi(); $params['kudyznudy'] = $kudyznudyapi->getEvents(); } if ($micrositeData['odmTemplatePrimary']==1){ $params += [ 'olympicsOdm' => $olympic->getNextOlympics(20, '', '', 0, 'DESC','', '',0,95,144, null, false, 'olympiada_deti_a_mladeze'), 'detailOlympic' => $detailOlympic, ]; if ($detailOlympic){ $params += [ 'regionResults' => $odm_olympic->getRegionResults($detailOlympic['olympic']['odm_olympiad_id'] ?? 0) ]; } $latte->render('app/layout/microsite/odm/default.latte', $params); }elseif($micrositeData['odmTemplate']==1){ $latte->render('app/layout/microsite/odm/detail.latte', $params); }else{ $latte->render('app/layout/microsite/default.latte', $params); } }else{ $domain = $_GET['from'] ?? $_SERVER['SERVER_NAME']; //echo $_GET['id']; $website->checkCustomUrl($domain, $_GET['id']); $latte->render('app/layout/page/404.latte', $params); } } }