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; }
$postDBRows = array(); $postDao = new \com\indigloo\sc\dao\Post(); $pageSize = Config::getInstance()->get_value("user.page.items"); $total = 0; if (empty($ft) && !empty($gtoken)) { $sphinx = new \com\indigloo\sc\search\SphinxQL(); $total = $sphinx->getPostsCount($gtoken); $paginator = new Pagination($qparams, $pageSize); $ids = $sphinx->getPagedPosts($gtoken, $paginator); $sphinx->close(); if (sizeof($ids) > 0) { $postDBRows = $postDao->getOnSearchIds($ids); } $ftname = $gtoken; } else { $total = $postDao->getTotalCount($filters); $paginator = new \com\indigloo\ui\Pagination($qparams, $pageSize); $postDBRows = $postDao->getPaged($paginator, $filters); } $baseURI = "/monitor/posts.php"; ?> <!DOCTYPE html> <html> <head> <title> 3mik.com - All posts </title> <?php include APP_WEB_DIR . '/inc/meta.inc'; ?>