| Server IP : 127.0.0.1 / Your IP : 216.73.216.48 Web Server : Apache/2.4.58 (Win64) OpenSSL/3.1.3 PHP/8.2.12 System : Windows NT DESKTOP-3H4FHQJ 10.0 build 19045 (Windows 10) AMD64 User : win 10 ( 0) PHP Version : 8.2.12 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : D:/khalafsite-backup/21-8-2019/New/htdocs/khalaf/ |
Upload File : |
<?php
include("db_con.php");
//include("function.php");
?>
<?php
if(isset($_GET['ad_detail_id'])){
$advert_main_id = $_GET['ad_detail_id'];
}
?>
<html>
<head>
<title>Khalaf sons</title>
<link rel="stylesheet" type="text/css" href="main_css/ad_detail.css" >
</head>
<body id="body">
<div id="more_advert_main_div" class="more_advert_main_div" >
<button onClick="go_previous_page();" class="back_btn" >x</button><!--This button above when clicked page gets back to previous page -->
<script>
function go_previous_page()
{
javascript:history.go(-1);
}
</script>
<?php
$get_advert ="select * from adverttb where id='$advert_main_id'";
$run_advert = mysqli_query($con,$get_advert);
while($row_advert = mysqli_fetch_array($run_advert))
{
$post_id = $row_advert['id'];
$building_name = $row_advert['building_name'];
$location = $row_advert['location'];
$bedroom = $row_advert['bedroom_no'];
$bathroom = $row_advert['bathroom_no'];
$furniture = $row_advert['furniture'];
$image_url = $row_advert['image_url'];
$description = $row_advert['description'];
$kitchen = $row_advert['kitchen'];
$swimming_pool = $row_advert['swimming_pool'];
$suana = $row_advert['suana'];
$squash = $row_advert['squash'];
$gym = $row_advert['gym'];
$steam = $row_advert['steam'];
$balicon = $row_advert['balicon'];
$building_no = $row_advert['building_no'];
$road_no = $row_advert['road_no'];
$curr_date = $row_advert['curr_date'];
$curr_time = $row_advert['curr_time'];
?>
<div id="preview_main_image" class="more_advert_sub_div" >
<img onClick="show_more_advert_images();" src="advert_images/<?php echo"$image_url"; ?>" class="image_main_detail" />
</div>
<div id="advert_detail_div" class="advert_detail_div" >
<div class="single_details_text">
<img src="kvt_con/building_icon.png" width="40px" height="35px;" style="float:left;margin-top:5px;" />
<?php echo"$building_name"; ?>
</div>
<div class="single_details_text">
<img src="kvt_con/location_icon2.png" width="40px" height="35px;" style="float:left;margin-top:5px;" />
<?php echo"$location"; ?>
</div>
<div class="single_details_text">
<img src="kvt_con/bedroom_icon.png" width="40px" height="35px;" style="float:left;margin-top:5px;" />
<?php echo"$bedroom"; ?>
</div>
<div class="single_details_text">
<img src="kvt_con/bathroom_icon.png" width="40px" height="35px;" style="float:left;margin-top:5px;" />
<?php echo"$bathroom"; ?>
</div>
<div class="single_details_text"><?php echo"$furniture"; ?></div>
<div class="single_details_text"><?php echo"kitchen: $kitchen"; ?></div>
<div class="single_details_text"><?php echo"$description"; ?></div>
<div class="single_details_text" style="color:blue;font-weight:bold;">Amenities</div>
<?php
if($swimming_pool =="Yes"){
echo"<div class='single_details_text'>Swimming Pool: $swimming_pool</div>";
}
?>
<?php
if($gym =="Yes"){
echo"<div class='single_details_text'>Gym room: $gym</div>";
}
?>
<?php
if($squash =="Yes"){
echo"<div class='single_details_text'>Tennis court: $squash</div>";
}
?>
<?php
if($suana =="Yes"){
echo"<div class='single_details_text'>Suana room: $suana</div>";
}
?>
<?php
if($steam =="Yes"){
echo"<div class='single_details_text'>Steam room: $steam</div>";
}
?>
<?php
if($balicon =="Yes"){
echo"<div class='single_details_text'>Balicon: $balicon</div>";
}
?>
<div class="single_details_text"><?php echo"Internet: Yes"; ?></div>
</div>
<!--div id="" class="single_main_image_advert" >
<img onClick="show_detail_image(this.id);" id="<?php echo"$image_url"; ?>" src="advert_images/<?php echo"$image_url"; ?>" class="advert_album_images" />
</div-->
<?php } ?>
<div id="more_advert_single_image_div" class="single_image_more_advert_div" >
<img onClick="show_detail_main_image(this.id);" id="<?php echo"$image_url"; ?>" src="advert_images/<?php echo"$image_url"; ?>" class="advert_album_images" /><!--This image from the main advert above -->
<?php
$get_advert_albumtb ="select * from advert_albumtb where post_id='$advert_main_id' ";
$run_advert_albumtb = mysqli_query($con,$get_advert_albumtb);
while($row_advert_albumtb = mysqli_fetch_array($run_advert_albumtb))
{
$image_id = $row_advert_albumtb['id'];
$image_url = $row_advert_albumtb['image_url'];
?>
<img onClick="show_detail_image(this.id);" id="<?php echo"$image_url"; ?>" src="advert_album_images/<?php echo"$image_url"; ?>" class="advert_album_images" />
<?php } ?>
</div>
<script>
function show_detail_main_image(sdmi)
{
document.getElementById('preview_main_image').innerHTML="";
var x = document.createElement("IMG");
x.style="width:100%;position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);";
x.setAttribute("src", "advert_images/"+sdmi);
document.getElementById('preview_main_image').appendChild(x);
}
function show_detail_image(sdi)
{
document.getElementById('preview_main_image').innerHTML="";
var x = document.createElement("IMG");
x.style="width:100%;position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);";
x.setAttribute("src", "advert_album_images/"+sdi);
document.getElementById('preview_main_image').appendChild(x);
}
</script>
</div>
</body>
</html>