Exemple #1
0
$model = new Nhaxe();
$link = "index.php?mod=nhaxe&act=list";
if (isset($_GET['hot']) && $_GET['hot'] > -1) {
    $hot = (int) $_GET['hot'];
    $link .= "&hot={$hot}";
} else {
    $hot = -1;
}
if (isset($_GET['keyword'])) {
    $keyword = $model->processData($_GET['keyword']);
    $link .= '&keyword=' . $keyword;
} else {
    $keyword = '';
}
$limit = 100;
$arrTotal = $model->getListNhaxe($keyword, $hot, -1, -1);
$total_page = ceil($arrTotal['total'] / $limit);
$page = isset($_GET['page']) ? (int) $_GET['page'] : 1;
$offset = $limit * ($page - 1);
$arrList = $model->getListNhaxe($keyword, $hot, $offset, $limit);
?>

<div class="row">
    <div class="col-md-12">
    <button class="btn btn-primary btn-sm right" onclick="location.href='index.php?mod=nhaxe&act=form'">Tạo mới</button>        
    <button class="btn btn-primary btn-sm right" id="capnhat_thutu">Cập nhật thứ tự</button> 
         <div class="box-header">
                <h3 class="box-title">Danh sách nhà xe</h3>
            </div><!-- /.box-header -->
        <div class="box">
            <div class="box_search">
Exemple #2
0
<?php

if (isset($_GET['place_id'])) {
    $place_id = (int) $_GET['place_id'];
    require_once "model/Place.php";
    $model = new Place();
    $detail = $model->getDetailPlace($place_id);
}
require_once "model/Tinh.php";
$modelTinh = new Tinh();
// list nha xe
require_once "model/Nhaxe.php";
$modelNhaxe = new Nhaxe();
$arrListNhaxe = $modelNhaxe->getListNhaxe('', -1, -1, -1);
?>

<div class="row">

    <div class="col-md-8">

        <form method="post" action="controller/Place.php">            

        <!-- Custom Tabs -->

        <button class="btn btn-primary btn-sm">Danh sách</button>

        <div style="clear:both;margin-bottom:10px"></div>

         <div class="box-header">

                <h3 class="box-title"><?php