本文整理汇总了PHP中Utils::paging方法的典型用法代码示例。如果您正苦于以下问题:PHP Utils::paging方法的具体用法?PHP Utils::paging怎么用?PHP Utils::paging使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Utils
的用法示例。
在下文中一共展示了Utils::paging方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
public static function display($strLink, $business, $totalItems, $curPage, $maxPages, $maxItems)
{
$strResult = "<br>";
$strResult .= "<table id='tblist' width='100%' border='0' style='border:solid 1px #D3D3D3;' cellpadding='0' cellspacing='0'>";
//$strResult.= "<tr style='height:20px; font-weight:bold; font-size:10px; background:#8BC5F4;'>Name</tr>";
//$strResult.= "<tr style='height:36px; font-weight:bold; font-size:13px; background:#8BC5F4;'>NoiDung</tr>";
//$strResult.= "<td style='border-right:solid 1px #D3D3D3; padding:4px;'>idconnect</td>";
//$strResult.= "<td style='border-right:solid 1px #D3D3D3; padding:4px;'>NoiDung</td></tr>";
//$strResult.= "<td style='border-right:solid 1px #D3D3D3; padding:4px;'>Name</td>";
for ($i = 0; $i < count($business); $i++) {
$images = "select* from phongthuy";
//div style="margin-left: 10px; margin-top: 10px; font-family: tahoma; font-size: 18px;
// font-weight: bold; color:#890C29; text-transform:uppercase;">
$strResult .= "<table>";
$strResult .= "<tr><div><a href='chitietphongthuy.php?idphongthuy=" . $business[$i]['id'] . "'><b style='font-size:14px;font-weight:bold;color: #006DB9;'>" . $business[$i]['Name'] . " </b></a></div></tr>";
$strResult .= "<tr>";
$strResult .= "</br>";
//$strResult.="<tr>";
//$strResult.="<img src='../images/phongthuy/".$business[$i]['HinhAnh']."'>";
$strResult .= "<td style='border-right:solid 1px #D3D3D3; padding:4px;'> <img width='70px' heigh='70px' src='../images/phongthuy/" . $business[$i]['HinhAnh1'] . "' style='vertical-align: middle;'/></td>";
//$strResult.= echo $business[$i]['HinhAnh'] ;
//$strResult.="<a href='chitietphongthuy.php?id=".$business[$i]['id']."'><img src='../".$images[0]['path']."' width='150px' /></a></td>";
$strResult .= "<td style='padding:4px;' width='450px'>" . $business[$i]['NoiDung'] . " </td>";
$strResult .= "</tr>";
$strResult .= "</table>";
$strResult .= "</br>";
$strResult .= "</br>";
}
$strPaging = Utils::paging($strLink, $totalItems, $curPage, $maxPages, $maxItems);
$strResult .= $strPaging;
$strResult .= "</table>";
return $strResult;
//echo $strPaging;
}
示例2: load
public static function load($curPage, $status)
{
$totalItems = null;
$advertisement = null;
$maxItems = 5;
$maxPages = 25;
$offset = ($curPage - 1) * $maxItems;
if ($status == -1) {
$advertisement = QuangCaoBUS::getBySQL("select * from quangcao limit {$offset},{$maxItems}");
$totalItems = QuangCaoBUS::countBySQL("select count(*) from quangcao");
} else {
$advertisement = QuangCaoBUS::getBySQL("select * from quangcao where status={$status} limit {$offset},{$maxItems}");
$totalItems = QuangCaoBUS::countBySQL("select count(*) from quangcao where status={$status}");
}
$display = AdvertisementProcessor::displayHeader($totalItems);
$display .= AdvertisementProcessor::display($advertisement);
$display .= AdvertisementProcessor::displayFooter();
$strPaging = Utils::paging('', $totalItems, $curPage, $maxPages, $maxItems);
return $display . $strPaging;
}
示例3: loadByType
public static function loadByType($curPage, $type)
{
$totalItems = null;
$business = null;
$maxItems = 5;
$maxPages = 25;
$offset = ($curPage - 1) * $maxItems;
if ($type > 0) {
$business = DichVuBUS::getAllBySQL("select * from dichvu where loaidv={$type} limit {$offset},{$maxItems}");
$totalItems = DichVuBUS::countAllBySQL("select count(*) from dichvu where loaidv={$type}");
} else {
$business = DichVuBUS::getAllBySQL("select * from dichvu limit {$offset},{$maxItems}");
$totalItems = DichVuBUS::countAllBySQL("select count(*) from dichvu");
}
$display = HouseProcessor::displayHeader($totalItems);
$display .= HouseProcessor::display($business);
$display .= HouseProcessor::displayFooter();
$strPaging = Utils::paging('', $totalItems, $curPage, $maxPages, $maxItems);
return $display . $strPaging;
}
示例4: display
public static function display($strLink, $business, $totalItems, $curPage, $maxPages, $maxItems)
{
$strResult = "<br>";
$strResult .= "<table id='tblist' width='100%' border='0' style='border:solid 1px #D3D3D3;' cellpadding='0' cellspacing='0'>";
for ($i = 0; $i < count($business); $i++) {
$images = "select* from kientruc";
$strResult .= "<table>";
$strResult .= "<br><tr><div><a href='chitietkientruc.php?idkientruc=" . $business[$i]['id'] . "'><b style='font-size:14px;font-weight:bold;color: #006DB9;'>" . $business[$i]['name'] . " </b></a></div></tr>";
$strResult .= "<tr>";
$strResult .= "</br>";
$strResult .= "<td style=' padding:4px;' > <img width='70px'; heigh='70px'; src='../images/kientruc/" . $business[$i]['hinhanh1'] . "' style='vertical-align: middle;'/></td>";
$strResult .= "<td style=' padding:4px;' width='450px'>" . $business[$i]['noidung'] . " </td>";
$strResult .= "</tr>";
$strResult .= "</table>";
$strResult .= "</br>";
$strResult .= "</br>";
}
$strPaging = Utils::paging($strLink, $totalItems, $curPage, $maxPages, $maxItems);
$strResult .= $strPaging;
$strResult .= "</table>";
return $strResult;
}
示例5: load
public static function load($curPage, $level, $nam, $thangfrom, $thangto)
{
$totalItems = null;
$business = null;
$constMaxItem = 5;
$maxItems = $constMaxItem;
$maxPages = 25;
$offset = ($curPage - 1) * $maxItems;
$condition = EvaluateProcessor::getkhenthuongCondition($level, $nam, $thangfrom, $thangto);
$strSQL = "select * from khenthuong,user where khenthuong.iduser=user.id " . $condition . " limit {$offset},{$maxItems}";
$evaluate = KhenThuongBUS::selectByIdSQL($strSQL);
$strSQL = "select count(*) from khenthuong,user where khenthuong.iduser=user.id " . $condition;
$totalEvaluate = KhenThuongBUS::countBySQL($strSQL);
$display = "";
$display .= EvaluateProcessor::displayHeader($totalEvaluate[0]);
for ($i = 0; $i < count($evaluate); $i++) {
$user = UsersBUS::GetUserByID($evaluate[$i]['iduser']);
$display .= EvaluateProcessor::display($i + 1, $evaluate[$i]['iduser'], $user['hoten'], $user['email'], $user['gioitinh'], $user['level'], $evaluate[$i]['loai'], $evaluate[$i]['thuong'], $evaluate[$i]['ngay']);
}
$display .= EvaluateProcessor::displayFooter("", -1, "", "", -1, "", "", "", "");
$strPaging = Utils::paging('', $totalEvaluate[0], $curPage, $maxPages, $constMaxItem);
return $display . $strPaging;
}
示例6:
echo $user["ID"];
?>
);"><img src="img/icons/user_delete.png" title="Delete" width="16" height="16" /></a></td>
</tr>
<?php
}
}
?>
</tbody>
</table>
<?php
$strLink = "user_index.php?view=user&";
$strPaging = Utils::paging($strLink, $totalItems, $curPage, $maxPages, $maxItems);
echo $strPaging;
?>
<!--
Page <a href="#"><img src="img/icons/arrow_left.gif" width="16" height="16" /></a>
<input size="1" value="1" type="text" name="page" id="page" />
<a href="#"><img src="img/icons/arrow_right.gif" width="16" height="16" /></a>of 42
pages | View
<select name="view">
<option>10</option>
<option>20</option>
<option>50</option>
<option>100</option>
</select>
per page | Total <strong>420</strong> records found-->
示例7: loadByType
public static function loadByType($curPage, $loaidv, $ngayfrom, $ngayto)
{
$totalItems = null;
$business = null;
$maxItems = 5;
$maxPages = 25;
$offset = ($curPage - 1) * $maxItems;
$condition = VipProcessor::getCondition($loaidv, $ngayfrom, $ngayto);
$business = DichVuBUS::getAllBySQL("select * from dichvu where status=2 " . $condition . " limit {$offset},{$maxItems}");
$totalItems = DichVuBUS::countAllBySQL("select count(*) from dichvu where status=2 " . $condition);
$display = VipProcessor::displayHeader($totalItems);
$display .= VipProcessor::display($business);
$display .= VipProcessor::displayFooter();
$strPaging = Utils::paging('', $totalItems, $curPage, $maxPages, $maxItems);
return $display . $strPaging;
}
示例8: loadBusinessByMonth
function loadBusinessByMonth($loai, $monthFrom, $monthTo, $year)
{
$strLink = "";
$curPage = 1;
$totalItems = null;
$business = null;
if (isset($_REQUEST['page'])) {
$curPage = $_REQUEST['page'];
}
$maxItems = 3;
$maxPages = 25;
$offset = ($curPage - 1) * $maxItems;
$totalItems = ThuChiBUS::countByMonth($loai, $monthFrom, $monthTo, $year);
$business = ThuChiBUS::getAllByMonth($offset, $maxItems, $loai, $monthFrom, $monthTo, $year);
$display = displayWithSumRow($business, $loai, $monthFrom, $monthTo, $year);
$strPaging = Utils::paging($strLink, $totalItems[0], $curPage, $maxPages, $maxItems);
return $display . $strPaging;
}
示例9: display
public static function display($strLink, $business, $totalItems, $curPage, $maxPages, $maxItems)
{
$strResult = "";
$strResult .= "<table id='tblist' width='100%' border='0' style='border:solid 1px #D3D3D3;' cellpadding='0' cellspacing='0'>";
$strResult .= "<tr style='height:36px; font-weight:bold; font-size:13px; background:#8BC5F4;'>";
$strResult .= "<td style='border-right:solid 1px #D3D3D3; padding:4px;' align='center'>Hình Ảnh</td>";
$strResult .= "<td style='border-right:solid 1px #D3D3D3; padding:4px;'>Mô Tả</td>";
$strResult .= "<td style='border-right:solid 1px #D3D3D3; padding:4px;width:65px;'>Loại Hình</td>";
$strResult .= "<td style='border-right:solid 1px #D3D3D3; padding:4px;width:65px;'>Cập Nhật</td>";
$strResult .= "<td style='padding:4px;' align='center'>Giá</td>";
$strResult .= "</tr>";
if (count($business) > 0) {
for ($i = 0; $i < count($business); $i++) {
$images = HinhAnhBUS::getAllHinhAnhByDichVu($business[$i]['id']);
$donviDV = DonviDichVuBUS::selectId($business[$i]['donvidv']);
$donviTien = DonviTienBUS::selectId($business[$i]['donvitien']);
$loaidv = LoaiDichVuBUS::getById($business[$i]['loaidv']);
$tinh = TinhBUS::getTinhById($business[$i]['tinh']);
$quan = QuanBUS::getQuanById($business[$i]['quan']);
$phuong = PhuongBUS::getPhuongById($business[$i]['phuong']);
$strResult .= "<tr>";
$strResult .= "<td style='border-right:solid 1px #D3D3D3; padding:4px;' width='150px'>";
if ($images[0]['path'] != null) {
$strResult .= "<a href='chitietdiaoc.php?iddichvu=" . $business[$i]['id'] . "'><img src='../" . $images[0]['path'] . "' width='150px' /></a></td>";
} else {
$strResult .= "<a href='chitietdiaoc.php?iddichvu=" . $business[$i]['id'] . "'><img src='../images/upload/minhhoa/minhhoa.png' width='150px' /></a></td>";
}
$strResult .= "<td style='border-right:solid 1px #D3D3D3; padding:4px;'>";
$strResult .= "<a href='chitietdiaoc.php?iddichvu=" . $business[$i]['id'] . "'><b style='color:blue;'>" . $business[$i]['tieude'] . "</b></a><br>";
$strResult .= "Vị trí: " . $business[$i]['duong'] . ", " . $phuong['ten'] . ", " . $quan['ten'] . ", " . $tinh['ten'] . "<br>";
$strResult .= "Diện tích: " . $business[$i]['dai'] . " X " . $business[$i]['rong'] . "<br>";
$strResult .= "Số phòng ngủ:" . $business[$i]['sophongngu'] . "<br>";
$strResult .= "Tầng: " . $business[$i]['tang'] . "<br><br>";
if ($business[$i]['khuyenmai'] != null) {
$strResult .= "<img src='../images/icon_promotion.gif' /> <span style='position:relative; top:-6px;'>" . $business[$i]['khuyenmai'] . "</span>";
}
$strResult .= "</td>";
$strResult .= "<td style='border-right:solid 1px #D3D3D3; padding:4px;'>" . $loaidv['ten'] . "</td>";
if ($business[$i]['ngaydang'] != null) {
$ngaycapnhat = Utils::convertTimeDMY($business[$i]['ngaydang']);
} else {
$ngaycapnhat = date('Y-m-d');
}
$strResult .= "<td align='center' style='border-right:solid 1px #D3D3D3; padding:4px;'>";
if ($business[$i]['status'] == 2) {
$strResult .= "<img src='../images/vip.gif'/>";
}
$strResult .= $ngaycapnhat . "</br></td>";
if ($business[$i]['giaban'] != null) {
$money = Utils::convert_Money($business[$i]['giaban']);
} else {
$money = "0,00";
}
$strResult .= "<td style='padding:4px;'>" . $money . "<br>" . $donviTien['ten'] . "/" . $donviDV['ten'] . "</td>";
$strResult .= "</tr>";
}
} else {
echo "<tr><td align='center' colspan='3'><h3 style='color: #336699; font-size: 14px;margin: 0;padding: 0;'>Chưa có tin đăng !</h3></td></tr>";
echo "<tr><td></td></tr>";
}
$strResult .= "</table>";
$strResult .= "<script>\$(\"table[id='tblist'] tr:odd\").css('background-color', '#EFEFEF');</script>";
$strPaging = Utils::paging($strLink, $totalItems, $curPage, $maxPages, $maxItems);
//echo $strPaging;
$strResult .= $strPaging;
return $strResult;
}
示例10: setNoiBat
style="color:#B20751;">Tin đăng VIP</option>
<option value="3" <?php
echo $listTinDang[$i]["status"] == 3 ? "selected" : "";
?>
style="color:red;">Tin hết hạn</option>
</select>
</td>
<!--<td align="center">
<img id="imgNoiBat" style="cursor:pointer;" src="images/icon_<?php
echo $listTinDang[$i]["rank"] ? "yes" : "no";
?>
.png" onclick="return setNoiBat(<?php
echo $listTinDang[$i]["id"];
?>
);">
</td>-->
</tr>
<?php
}
?>
</table>
<?php
echo Utils::paging($strLink, count($listTinDang), $curPage, $maxPages, $maxItems);
?>
</div>
</form>
</div>
<div class="bl"></div>
<div class="br"></div>
<div class="bm"></div>
</div>
示例11: display
public static function display($strLink, $business, $totalItems, $curPage, $maxPages, $maxItems)
{
$strResult = "";
if (count($business) > 0) {
for ($i = 0; $i < count($business); $i++) {
$strResult .= "<tr bgcolor='#ffffff'>";
$strResult .= "<td width='60' valign='middle' align='center' style='border-bottom:solid 1px #CCCCCC;'>";
$strResult .= "<b>" . $business[$i][0] . "</b></td>";
//id
$strResult .= "<td valign='top' align='left' style='border-left: 1px solid rgb(204, 204, 204); border-bottom: 1px solid rgb(204, 204, 204);'>";
if ($business[$i]['status'] == 0) {
$strResult .= "<div style='float:right;'><b style='color:#FF0000;'>Chờ duyệt</b></div><br>";
//loai tin
$strResult .= "<b>" . $business[$i][1] . "</b><br>";
//tên tiêu đề
} else {
if ($business[$i]['status'] == 1) {
$strResult .= "<span style='color: rgb(255, 0, 0);'>Tin đã duyệt</span><div style='float:right;'><b style='color:#FF0000;'>Miễn Phí</b></div><br>";
//loai tin
$strResult .= "<b>" . $business[$i][1] . "</b><br>";
//tên tiêu đề
} else {
if ($business[$i]['status'] == 2) {
$strResult .= "<div style='float:right;'><b style='color:#FF0000;'>Tin VIP</b></div><br>";
//loai tin
$strResult .= "<b>" . $business[$i][1] . "</b><br>";
//tên tiêu đề
} else {
$strResult .= "<div style='float:right;'><b style='color:#FF0000;'>Hết hạn</b></div><br>";
//loai tin
$strResult .= "<b>" . $business[$i][1] . "</b><br>";
//tên tiêu đề
}
}
}
//load data
$loaidv = LoaiDichVuBUS::getById($business[$i][19]);
$huongnha = HuongNhaBUS::GetHuongNhaById($business[$i]['huongnha']);
$donvitien = DonViTienBUS::selectId($business[$i]['donvitien']);
$donvidv = DonViDichVuBUS::selectId($business[$i]['donvidv']);
$loainha = LoaiNhaBUS::getById($business[$i]['loainha']);
if ($business[$i]['ngaydang'] != null) {
$date = Utils::convertTimeDMY($business[$i]['ngaydang']);
$declinetime = Utils::convertDecline_Time($business[$i]['ngaydang']);
} else {
$date = "00:00:00";
$declinetime = "00:00:00";
}
//endload
$strResult .= "- <b style='color: #0D5DA8;font-weight:bold;font-size:11px;text-decoration: none;'\t>Loại nhà:" . $loainha['ten'] . " </b><br> - <a target='_blank' href='#'>" . $loaidv[1] . "</a>";
//tên loại dv
$strResult .= "- Hướng nhà:" . $huongnha[1] . "<br>";
//Hướng nhà
$strResult .= "- Giá: <b>" . number_format($business[$i]['giaban']) . "</b> " . $donvitien['ten'] . "/" . $donvidv['ten'] . " - Kích thước: " . $business[$i]['dai'] . "x" . $business[$i]['rong'] . " m<sup>2</sup> </b><br>";
//giá nhà và kt
if ($business[$i]['status'] == 1) {
$strResult .= "<div style='float:left; padding:3px; font-weight: bold;'><a style='color:red;' href='nangcaptinvip.php?iddv=" . $business[$i]['id'] . "'><img align='left' src='../images/uprade.png'>Nâng cấp lên VIP 275.000 /tháng</a></div></td>";
//giá nhà và kt
}
$strResult .= "<td width='260' valign='top' style='border-left: 1px solid rgb(204, 204, 204); border-bottom: 1px solid rgb(204, 204, 204);'>";
//column 3
$strResult .= "<div style='margin-bottom: 5px; font-weight: normal; color: rgb(51, 51, 51);'>";
//$strResult.="- 1 lượt xem tin <br>"; //so nguoi xem tin
$strResult .= "- Ngày đăng: " . $date . "<br>";
//ngay dang
$strResult .= "- Ngày hết hạn: " . $declinetime . "<br>";
//ngay het han
$strResult .= "</div>";
$strResult .= "<div style='padding: 3px; background-color: rgb(242, 245, 249); border: 1px solid rgb(204, 204, 204);font-weight: bold;'>";
$strResult .= "<b title='23-06-2011' style='color: green;'>";
$strResult .= "<img align='center' style='margin: 0px;position:relative;top:-4px;' src='../images/action_check2.png'>Đã cập nhật</b> ";
//update
$strResult .= "<a href='dangtindichvu.php?update=" . $business[$i][0] . "&loaidvcandang=" . $business[$i]['loaidv'] . "&step=" . '1' . "' style='color: #0D5DA8;font-weight:bold;font-size:11px;text-decoration: none;'>";
$strResult .= "<img align='center' style='margin: 0px;position:relative;top:-4px;' src='../images/edit.png'>Sửa tin</a> ";
//repare
$strResult .= "<a onclick='return xoatindang(" . $business[$i][0] . ");' href='' style='color: #0D5DA8;font-weight:bold;font-size:11px;text-decoration: none;'>";
$strResult .= "<img align='center' style='margin: 0px;position:relative;top:-4px;' src='../images/action_delete2.png' >Xóa tin</a></div>";
//delete
$strResult .= "</td></tr>";
}
} else {
echo "<tr><td align='center' colspan='3'><h3 style='color: #336699; font-size: 14px;margin: 0;padding: 0;'>Chưa có tin đăng !</h3></td></tr>";
echo "<tr><td></td></tr>";
}
$strResult .= "</table>";
$strPaging = Utils::paging($strLink, $totalItems, $curPage, $maxPages, $maxItems);
$strResult .= "<center>" . $strPaging;
return $strResult;
}