示例#1
0
文件: room.php 项目: ekobudis/isias
<?php

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(-1);
include_once '/Applications/MAMP/htdocs/isias/classes/class.Rooms.php';
include_once '/Applications/MAMP/htdocs/isias/classes/class.Gedungs.php';
include_once '/Applications/MAMP/htdocs/isias/classes/paginator.class.php';
$build = new Gedungs();
$n = $build->ReadBuilding();
$data = new Rooms();
$stmt = $data->countAll();
$num_rows = $stmt->rowCount();
if ($num_rows > 0) {
    $pages = new Paginator($num_rows, 19);
    if (isset($_POST['cari'])) {
        $cari = $_POST['cari'];
        $stmt = $data->GetListRooms($pages->limit_start, $pages->limit_end);
    } else {
        $stmt = $data->GetListRooms($pages->limit_start, $pages->limit_end);
    }
}
?>
<div class="container">
    <div class="row">
        <a href="#myModal" role="button" class="btn btn-primary" data-toggle="modal" data-target="#add-Data">Ruangan Baru</a>
        <div class="input-prepend pull-right">
            <span class="add-on"><i class="icon-search"></i></span>
            <input class="span2" id="cari" type="text" name="cari" placeholder="Pencarian...">
        </div>
    </div>