예제 #1
0
            if (isset($_GET['update']) && $_GET['update'] != null) {
                header("Location:" . $url . "&update=" . $_GET['update'] . "&newid=" . $rs);
            } else {
                header("Location:" . $url . "&newid=" . $rs);
            }
        } else {
            header("Location:" . $url . "&dangtin=success");
        }
    } else {
        header("Location:" . $url . "&dangtin=fail&newid=" . $rs);
    }
}
//upload file
if (isset($_GET["newid"])) {
    if (isset($_GET['update']) && $_GET['update'] != null) {
        $hinhanh = HinhAnhBUS::getAllHinhAnhByDichVuID($_GET['update']);
        echo "<br>so ha can delete=" . count($hinhanh);
        for ($i = 0; $i < count($hinhanh); $i++) {
            HinhAnhBUS::Delete($hinhanh[$i][0]);
        }
    }
    for ($i = 1; $i <= 5; $i++) {
        $flag = true;
        if ($_FILES["ffImage" . $i]["error"] > 0) {
            $flag = false;
        }
        if ($flag && $_FILES["ffImage" . $i]["size"] == 0 || $_FILES["ffImage" . $i]["size"] > 1024 * 1024) {
            $flag = false;
        }
        if ($flag) {
            $chusohuu = (int) $_GET['id'];
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">
				<tr style="background:#F1F1F1;">
					<td width="100px"><b>Loại dịch vụ:</b></td>
					<td><b><?php 
echo $loaidv[1];
?>
예제 #3
0
	<div style="margin-left: 10px; margin-top: 10px; font-family: tahoma; font-size: 18px;
		font-weight: bold; color:#890C29;">
		CĂN HỘ NỔI BẬT	
	</div>
	<hr width="680" size="1" style="color: rgb(211, 232, 248);">
	<?php 
include_once "../BUS/DichVuBUS.php";
include_once "../BUS/HinhAnhBUS.php";
$canho = DichVuBUS::getCanHoNoiBat();
?>
	<div class="mid_content">

		<?php 
for ($i = 0; $i < count($canho); $i++) {
    if ($i < 4) {
        $hinhanh = HinhAnhBUS::getAllHinhAnhByDichVuID($canho[$i]['id']);
        echo "<div style='width:170px;float:left;'>";
        echo "<a class='chnoibat' href='chitietdiaoc.php?iddichvu=" . $canho[$i]['id'] . "'>";
        echo "<img src='../" . $hinhanh[0]['path'] . "' style='height:100px; width:160px;'/><br>";
        echo "<b style='color: #006DB9;'>" . $canho[$i]['tieude'] . "</b>";
        echo "</a></div>";
    } else {
        break;
    }
}
?>
		
		
	</div>	
	<div style="clear:both;">
	</div>
    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 
echo $business['tieude'];
?>
 </div>
								<hr style="color: rgb(211, 232, 248);" width="680" size="1"/>
								<div class="mid_content">
									<p style="margin-top:0;">
										<b style="padding-right:10px;">Mã số tin: <?php