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; }
if ($loaitindichvu == 2 || $loaitindichvu == 4) { echo "<td width='200px'>Phường/Xã:</td>"; } else { ?> <td width="200px"><b>Phường/Xã:</b><span style="color:red;"> *</span></td> <?php } ?> <td> <div style="width:310px;float:left;" id="messLoadPhuong" name="messLoadPhuong" > <?php if (isset($_GET['update']) && $_GET['update'] != null && $capnhatDV['phuong'] != 23) { $PATH_BASE = str_replace('//', '/', dirname(__FILE__) . '/'); include_once $PATH_BASE . '../BUS/QuanBUS.php'; include_once $PATH_BASE . '../BUS/PhuongBUS.php'; $rs = PhuongBUS::GetAllPhuongById($capnhatDV['quan']); echo "<select id='cbbPhuongXa' name='cbbPhuongXa' style='width:220px;' onchange='clickPhuongXa();'>"; echo "<option value='-1' selected>-- Chọn Phường/Xã --</option>"; for ($i = 0; $i < count($rs); $i++) { if ($capnhatDV['phuong'] == $rs[$i][0]) { echo "<option value='" . $rs[$i][0] . "' selected>" . $rs[$i][1] . "</option>"; } else { echo "<option value='" . $rs[$i][0] . "'>" . $rs[$i][1] . "</option>"; } } echo "</select>"; } else { ?> <input name="txtPhuongXa" id="txtPhuongXa" type="text" style="width:300px;" value="" disabled="disabled"> <?php }
include_once "../BUS/DichVuBUS.php"; include_once "../BUS/LoaiDVBUS.php"; include_once "../BUS/TinhBUS.php"; include_once "../BUS/QuanBUS.php"; include_once "../BUS/PhuongBUS.php"; include_once "../BUS/DonViTienBUS.php"; include_once "../BUS/LoaiNhaBUS.php"; include_once "../module/Utils/Utils.php"; include_once "../BUS/HuongNhaBUS.php"; include_once "../BUS/PhapLyBUS.php"; include_once "../BUS/HinhAnhBUS.php"; $objCanHo = DichVuBUS::select($_REQUEST["aid"]); $loaidv = LoaiDVBUS::GetLoaiDVByID($objCanHo["loaidv"]); $tinh = TinhBUS::getTinhById($objCanHo["tinh"]); $quan = QuanBUS::getQuanById($objCanHo["quan"]); $phuong = PhuongBUS::getPhuongById($objCanHo["phuong"]); $donvitien = DonViTienBUS::selectId($objCanHo["donvitien"]); $loainha = LoaiNhaBUS::getById($objCanHo["loainha"]); $huongnha = HuongNhaBUS::GetHuongNhaById($objCanHo["huongnha"]); $phaply = PhapLyBUS::GetPhapLyById($objCanHo["phaply"]); $hinhanh = HinhAnhBUS::getAllHinhAnhByDichVuID($objCanHo['id']); ?> <div style="margin:10px"> <div class="tl"></div> <div class="tr"></div> <div class="tm"></div> <div class="mid"> <script src="js/common.js" language="javascript"></script> <form action="index.php?view=article" method="post" name="frmRegister" id="frmRegister" > <div style="float:left;width:60%;"> <table width="90%" align="center" border="0" cellpadding="0" cellspacing="0">
$id = $_REQUEST["cbbTinhTP"]; $rs = QuanBUS::GetAllQuanById($id); echo "<select id='cbbQuanHuyen' name='cbbQuanHuyen' style='width:220px;' onchange='clickQuanHuyen();'>"; echo "<option value='-1' selected>-- Chọn Quận/Huyện --</option>"; for ($i = 0; $i < count($rs); $i++) { echo "<option value='" . $rs[$i][0] . "'>" . $rs[$i][1] . "</option>"; } echo "</select>"; } else { if (isset($_REQUEST["cbbTinhTP"]) && $_REQUEST["cbbTinhTP"] == "-1") { echo "<input name='txtQuanHuyen' id='txtQuanHuyen' type='text' style='width:300px;' value='' disabled='disabled'>"; } } if (isset($_REQUEST["cbbPhuongXa"]) && $_REQUEST["cbbPhuongXa"] != "-1") { $id = $_REQUEST["cbbPhuongXa"]; //echo "id=".$id; $rs = PhuongBUS::GetAllPhuongById($id); echo "<select id='cbbPhuongXa' name='cbbPhuongXa' style='width:220px;' onchange='clickPhuongXa();'>"; echo "<option value='-1' selected>-- Chọn Phường/Xã --</option>"; for ($i = 0; $i < count($rs); $i++) { echo "<option value='" . $rs[$i][0] . "'>" . $rs[$i][1] . "</option>"; } echo "</select>"; } else { if (isset($_REQUEST["cbbPhuongXa"]) && $_REQUEST["cbbPhuongXa"] == "-1") { echo "<input name='txtPhuongXa' id='txtPhuongXa' type='text' style='width:300px;' value='' disabled='disabled'>"; } } if (isset($_REQUEST["txtTieuDeTin"]) && !empty($_REQUEST["txtTieuDeTin"])) { echo "<img src='../images/user/valid.png' alt='Hợp lệ' title='Hợp lệ' width=20 height=20>"; }
if (isset($_REQUEST['iddichvu'])) { include_once "../BUS/DichVuBUS.php"; include_once "../BUS/HinhAnhBUS.php"; include_once "../BUS/DonviDichVuBUS.php"; include_once "../BUS/DonViTienBUS.php"; include_once "../BUS/TinhBUS.php"; include_once "../BUS/QuanBUS.php"; include_once "../BUS/PhuongBUS.php"; include_once "Utils/Utils.php"; include_once "../BUS/LoaiDVBUS.php"; include_once "../BUS/LoaiNhaBUS.php"; include_once "../BUS/PhapLyBUS.php"; include_once "../BUS/HuongNhaBUS.php"; $business = DichVuBUS::select($_REQUEST['iddichvu']); $quan = QuanBUS::getQuanById($business['quan']); $phuong = PhuongBUS::getPhuongById($business['phuong']); $tinh = TinhBUS::getTinhById($business['tinh']); $loaidichvu = LoaiDVBUS::GetLoaiDVByID($business['loaidv']); $loainha = LoaiNhaBUS::getById($business['loainha']); $phaply = PhapLyBUS::GetPhapLyById($business['phaply']); $huongnha = HuongNhaBUS::GetHuongNhaById($business['huongnha']); $donvitien = DonViTienBUS::selectId($business['donvitien']); $hinhanh = HinhAnhBUS::getAllHinhAnhByDichVuID($business['id']); // echo count($hinhanh); // echo "<br>aaaaaaaaa=".$hinhanh[0]['path']; } ?> <div style="width: 686px; padding-top:20px;float:left;"> <div style="margin-left: 10px; margin-top: 10px; font-family: tahoma; font-size: 18px; font-weight: bold; color:#890C29;"> <?php
?> " onclick="Check_Click(this)"></td> <td class="m_name"><?php echo "<a href='index.php?view=article&do=edit&aid=" . $listTinDang[$i]["id"] . "'>" . $listTinDang[$i]["tieude"] . "</a>"; ?> </td> <?php $loaidv = LoaiDVBUS::GetLoaiDVByID($listTinDang[$i]["loaidv"]); echo "<td align='center'>" . $loaidv[1] . "</td>"; $loainha = LoaiNhaBUS::getById($listTinDang[$i]["loainha"]); echo "<td align='center'>" . $loainha[1]; if ($listTinDang[$i]["rank"] == 1) { echo " <img src='images/hot.gif' />"; } echo "</td>"; $phuong = PhuongBUS::getPhuongById($listTinDang[$i]["phuong"]); $quan = QuanBUS::getQuanById($listTinDang[$i]["quan"]); echo "<td>" . $listTinDang[$i]["sonha"] . " " . $listTinDang[$i]["duong"] . ", " . $phuong[1] . ", " . $quan[1] . ", "; $tinh = TinhBUS::getTinhById($listTinDang[$i]["tinh"]); echo $tinh[1] . "</td>"; $donviTien = DonViTienBUS::selectId($listTinDang[$i]["donvitien"]); echo "<td align='right'>" . number_format($listTinDang[$i]["giaban"]) . " {$donviTien['1']}</td>"; if ($listTinDang[$i]["ngaydang"] != null) { $date = Utils::convertTimeDMY($listTinDang[$i]["ngaydang"]); echo "<td align='center'>" . $date . "</td>"; } else { echo "<td></td>"; } $tinvip = DichVuVIPBUS::GetTinVipById($listTinDang[$i]["id"]); if (count($tinvip) > 0) { //echo "<td align='center'><img src='images/vip.gif' /></td>";