$link = "index.php?mod=place&act=list"; require_once "model/Tinh.php"; $modelTinh = new Tinh(); if (isset($_GET['nhaxe_id']) && $_GET['nhaxe_id'] > 0) { $nhaxe_id = (int) $_GET['nhaxe_id']; $link .= "&nhaxe_id={$nhaxe_id}"; } else { $nhaxe_id = -1; } if (isset($_GET['keyword']) && trim($_GET['keyword']) != '') { $keyword = $_GET['keyword']; $link .= "&keyword={$keyword}"; } else { $keyword = ''; } $arrTotal = $model->getListPlace($nhaxe_id, $keyword, -1, -1); $total_page = ceil($arrTotal['total'] / LIMIT); $page = isset($_GET['page']) ? (int) $_GET['page'] : 1; $offset = LIMIT * ($page - 1); $arrList = $model->getListPlace($nhaxe_id, $keyword, $offset, LIMIT); // list nha xe require_once "model/Nhaxe.php"; $modelNhaxe = new Nhaxe(); $arrListNhaxe = $modelNhaxe->getListNhaxe('', -1, -1, -1); ?> <div class="row">
$page_show = 20; /* get ds nha xe */ $arrNhaxe = $modelNhaxe->getListNhaxe('', -1, -1, -1); /* end get ds nha xe */ /* get ds noi di */ $arrListTinhKey = array(); $arrListTinh = $modelTinh->getListTinh(-1, '', -1, -1, -1); if (!empty($arrListTinh)) { foreach ($arrListTinh['data'] as $value) { $arrListTinhKey[$value['tinh_id']] = $value; } } /* end get ds place */ /* get ds place */ $arrListPlaceKey = array(); $arrListPlace = $modelPlace->getListPlace(-1, '', -1, -1); if (!empty($arrListPlace)) { foreach ($arrListPlace['data'] as $value) { $arrListPlaceKey[$value['place_id']] = $value; } } /* end get ds place */ if (isset($_GET['nhaxe_id']) && $_GET['nhaxe_id'] > 0) { $nhaxe_id = (int) $_GET['nhaxe_id']; $link .= "&nhaxe_id={$nhaxe_id}"; } else { $nhaxe_id = -1; } if (isset($_GET['ngaydi']) && trim($_GET['ngaydi']) != '') { $ngaydi = strtotime($_GET['ngaydi']); $link .= "&ngaydi=" . $_GET['ngaydi'];