function event_archive() { global $tpl; $p = new SimplePager('events', 'WHERE `event_end` < NOW()'); $p->run($tpl); $tpl->display('event_index.tpl'); quit(); }
/** * Affiche la liste des écoles * Permet d'afficher une page avec la liste des écoles (page par défaut du module). */ function ecole_index() { global $pdo, $tpl; $pager = new SimplePager('user_types'); $pager->run($tpl); $tpl->display('ecole_index.tpl'); quit(); }
/** * Permet d'afficher la liste des bières * @global type $pdo * @global type $tpl */ function beers_index() { global $pdo, $tpl; if (isset($_POST['search'])) { header('location: ' . urldup(array('search' => $_POST['search']))); quit(); } $where = ''; if (isset($_GET['search'])) { $where = 'WHERE beer_name LIKE ? '; } $pager = new SimplePager('beers', $where . 'ORDER BY beer_name ASC', 'p', 20); if (isset($_GET['search'])) { $pager->bindValue(1, "%{$_GET['search']}%"); } $pager->run($tpl); display(); }
/** * Permet d'afficher la liste des utilisateurs * @global type $pdo * @global type $tpl */ function user_index() { global $pdo, $tpl; if (isset($_POST['search'])) { header('location: ' . urldup(array('search' => $_POST['search']))); quit(); } $where = ''; if (isset($_GET['search'])) { $where = 'WHERE user_name LIKE ? ' . 'OR user_lastname LIKE ? ' . 'OR user_firstname LIKE ? ' . 'OR user_email LIKE ? '; } $pager = new SimplePager('users', $where . 'ORDER BY user_name ASC', 'p', 20); if (isset($_GET['search'])) { $pager->bindValue(1, "%{$_GET['search']}%"); $pager->bindValue(2, "%{$_GET['search']}%"); $pager->bindValue(3, "%{$_GET['search']}%"); $pager->bindValue(4, "%{$_GET['search']}%"); } $pager->run($tpl); $tpl->display('user_index.tpl'); quit(); }