while (DB_OK === $res->fetchInto($row)) { $row['icon'] = sotf_Blob::cacheIcon2($row); $hits[] = $row; } $smarty->assign("NEWS", $hits); } else { // get new programmes if (nodeConfig('payableMode')) { $mode = 'free'; } else { $mode = 'all'; } $smarty->assign('NEWS', sotf_Programme::getNewProgrammes($fromDay, $maxItemsIndexPage, $mode)); } if (nodeConfig('payableMode')) { $fromDayPremium = date('Y-m-d', time() - 60 * 60 * 24 * 90); $maxItemsPremium = 7; $smarty->assign('PREMIUM', sotf_Programme::getNewProgrammes($fromDayPremium, $maxItemsPremium, 'premium')); $smarty->assign('PROMOTED', sotf_Programme::getPromotedProgrammes()); } // get topics with most content $smarty->assign('TOPICS', $vocabularies->getTopTopics(5)); // online counter for statistics if ($config['counterMode']) { $chCounter_status = 'active'; $chCounter_visible = 0; $chCounter_page_title = 'Hauptseite - index.php'; include $config['counterURL']; } $db->commit(); $page->send();