示例#1
0
文件: event.php 项目: bontiv/intrateb
function event_archive()
{
    global $tpl;
    $p = new SimplePager('events', 'WHERE `event_end` < NOW()');
    $p->run($tpl);
    $tpl->display('event_index.tpl');
    quit();
}
示例#2
0
文件: ecole.php 项目: bontiv/intrateb
/**
 * 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();
}
示例#3
0
文件: beers.php 项目: bontiv/intrateb
/**
 * 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();
}
示例#4
0
文件: user.php 项目: bontiv/intrateb
/**
 * 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();
}