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; }
<div><a style="visibility: hidden;" id="linkShowBigMap" onclick="showBigMap()" href="javascript:void(0)">Xem bản đồ lớn</a></div> <div class="clearBoth"> </div> </div> <div class="mapDescription"> <div class="totalView"> Số lần xem: 12</div> <div class="address"> Địa chỉ : <strong><?php echo $business['duong'] . "," . $phuong['ten'] . "," . $quan['ten'] . "," . $tinh['ten']; ?> </strong></div> <div class="price"> Giá : <?php $donviDV = DonviDichVuBUS::selectId($business['donvidv']); $donviTien = DonviTienBUS::selectId($business['donvitien']); if ($business['giaban'] != null) { $money = Utils::convert_Money($business['giaban']); } else { $money = "0,00"; } echo $money . " " . $donviTien['ten'] . "/" . $donviDV['ten']; ?> </div> <div class="contact"> <div class="registerBuy"> Thông tin liên hệ</div> <?php require_once "../BUS/UsersBUS.php"; $user = UsersBUS::GetUserByID($business['chusohuu']); ?>