function process($params, $options) { $postDao = new \com\indigloo\sc\dao\Post(); $total = $postDao->getTotalCount(); $rows1 = $postDao->getRandom(25); $ids = array(); for ($i = 1; $i <= 25; $i++) { $ids[] = mt_rand(1, $total - 1); } $rows2 = $postDao->getOnSearchIds($ids); $postDBRows = array_merge($rows1, $rows2); $pageHeader = '<a href="/surprise/me">Try again?</a>'; $pageTitle = SeoData::getHomePageTitle(); $metaDescription = SeoData::getHomeMetaDescription(); $metaKeywords = SeoData::getHomeMetaKeywords(); $file = APP_WEB_DIR . '/view/tiles.php'; include $file; }
<?php include 'sc-app.inc'; include APP_CLASS_LOADER; //pull one random image $postDao = new \com\indigloo\sc\dao\Post(); $rows = $postDao->getRandom(5); $tileHtml = ''; if (sizeof($rows) > 0) { $tileHtml = \com\indigloo\sc\html\Post::getTile($rows[0]); } ?> <!DOCTYPE html> <html> <head> <title> Thanks for visiting 3mik </title> <?php echo \com\indigloo\sc\util\Asset::version("/css/bundle.css"); ?> </head> <body> <?php include APP_WEB_DIR . '/inc/toolbar.inc'; ?> <div class="container mh800"> <div class="row">