function main() { $app = get_app(); $count = Production::count(); $pages = ceil($count / get_config('prods_per_page')); $app->render('default.php', array('count' => $count, 'pages' => $pages)); }