public static function getNews()
 {
     $pdo = Db_Data::getPDO();
     $sql = "SELECT * FROM novinky ORDER BY id_novinky DESC LIMIT 3";
     $q = $pdo->prepare($sql);
     $q->execute();
     $news = $q->fetchAll();
     foreach ($news as $key => $new) {
         if ($new['id_masaze'] > 0) {
             $news[$key]['url'] = IntroModel::returnURL($new['id_masaze']);
         }
     }
     return $news;
 }
 public static function frontPage()
 {
     $smarty = Utils::smartyInit();
     $uvodniOkno = false;
     //nastavim coikies
     if (!isset($_COOKIE['tmWelcomeDialog']) || time() > $_COOKIE['tmWelcomeDialog']) {
         $uvodniOkno = true;
         SetCookie("tmWelcomeDialog", time() + 15 * 60);
     }
     $smarty->assign('uvodniOkno', $uvodniOkno);
     $smarty->assign('kategorie', MassagesModel::getCategories());
     $smarty->assign('active_unas', true);
     $smarty->assign('style', 'frontPage_style');
     $smarty->assign('photoses', IntroModel::getIntro());
     $smarty->assign('news', IntroModel::getNews());
     $smarty->display('frontPage.html');
     exit;
 }