本文整理汇总了PHP中Place::getListPlace方法的典型用法代码示例。如果您正苦于以下问题:PHP Place::getListPlace方法的具体用法?PHP Place::getListPlace怎么用?PHP Place::getListPlace使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Place
的用法示例。
在下文中一共展示了Place::getListPlace方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Tinh
$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">
示例2: array
$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'];