| 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/old/htdocs/khalafsons.com/ |
Upload File : |
<?php
include("db_con.php");
//include("function.php");
?>
<?php
$user_ip = getenv('REMOTE_ADDR');
$geo = unserialize(file_get_contents("http://www.geoplugin.net/php.gp?ip=$user_ip"));
$city = $geo["geoplugin_city"];
$region = $geo["geoplugin_regionName"];
$country = $geo["geoplugin_countryName"];
/*echo"$user_ip";
echo "City: ".$city."<br>";
echo "Region: ".$region."<br>";
echo "Country: ".$country."<br>";
/*
geoplugin_request
geoplugin_status
geoplugin_credit
geoplugin_city
geoplugin_region
geoplugin_areaCode
geoplugin_dmaCode
geoplugin_countryCode
geoplugin_countryName
geoplugin_continentCode
geoplugin_latitude
geoplugin_longitude
geoplugin_regionCode
geoplugin_regionName
geoplugin_currencyCode
geoplugin_currencySymbol
geoplugin_currencySymbol_UTF8
geoplugin_currencyConverter
*/
?>
<input type="text" id="country_user" class="helping_id" style="display:none;" value="<?php echo $country;?>">
<input type="text" id="region_user" class="helping_id" style="display:none;" value="<?php echo $region;?>">
<input type="text" id="city_user" class="helping_id" style="display:none;" value="<?php echo $city;?>">
<?php
if(isset($_GET['ad_detail_id'])){
$advert_main_id = $_GET['ad_detail_id'];
$get_ad_view ="select * from ad_viewstb where advert_id ='$advert_main_id' AND user_ip='$user_ip'";
$run_get_ad_view = mysqli_query($con,$get_ad_view);
$check_ad_view = mysqli_num_rows($run_get_ad_view);
if($check_ad_view < 1){
$insert_ad_view ="insert into ad_viewstb (advert_id,user_ip,country,city,curr_date,curr_time) values ('$advert_main_id','$user_ip','$country','$city',CURDATE(),CURTIME() )";
$run_insert_ad_view = mysqli_query($con,$insert_ad_view);
}
}
?>
<html>
<head>
<title>Khalaf sons</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<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="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>
<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'>Balcony: $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 } ?>
<script>
function show_detail_main_image(sdmi)
{
document.getElementById('preview_main_image').innerHTML="";
var x = document.createElement("IMG");
x.setAttribute("src", "advert_images/"+sdmi);
screen_size = screen.width;
if(screen_size <600){
x.style="width:100%;height:100%;position: none;top:0%;left:0%;transform: translate(0%, 0%);";
}else{x.style="width:100%;position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);";}
document.getElementById('preview_main_image').appendChild(x);
}
function show_detail_image(sdi)
{
document.getElementById('preview_main_image').innerHTML="";
var x = document.createElement("IMG");
screen_size = screen.width;
if(screen_size <600){
x.style="width:100%;height:100%;position:none;top:0%;left:0%;transform: translate(0%, 0%);";
}else{
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>