403Webshell
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 :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : D:/khalafsite-backup/old/htdocs/khalafsons.com/extraction.php
<html>

<?php 
session_start();
include('db_con.php'); 
include('function.php');
?>

<head>
<title>Khala Sons Real Estate</title>
<link rel="icon" href="kvt_con/khalaf_log.jpg" type="image/ico">
<link rel="stylesheet" type="text/css" href="main_css/extraction.css" />

</head>


<?php

if(isset($_SESSION['id']))
{
	$my_id = $_SESSION['id'];
	//$user_email = $_SESSION['email'];
	//echo"$my_id";
}

?>
<div id="my_id" style="display:none;"><?php echo"$my_id";?></div>


 <?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
*/
?>
<?php
$cur_day = date('d');
$cur_month = date('m');
$cur_year = date('Y');


?>

<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;?>">
 
 <input type="text" id="cur_day" class="helping_id" style="display:none;" value="<?php echo $cur_day;?>"> 
<input type="text" id="cur_month" class="helping_id" style="display:none;" value="<?php echo $cur_month;?>">
<input type="text" id="cur_year" class="helping_id" style="display:none;" value="<?php echo $cur_year;?>">
 

<script>

function add_new_location()
{
	document.getElementById('add_location_div').style.display="block";
}

function close_add_location_div()
{
	document.getElementById('add_location_div').style.display="none";
}

function show_add_building_type_div()
{
	document.getElementById('add_building_type_div').style.display="block";
}

function close_close_aadd_building_type_div()
{
	document.getElementById('add_building_type_div').style.display="none";
}

function show_add_new_building()
{
	document.getElementById('add_new_building').style.display="block";
}

function close_add_new_building()
{
	document.getElementById('add_new_building').style.display="none";
}


function show_add_new_add_div()
{
	document.getElementById('add_new_add_div').style.display="block";
}

function close_add_new_add_div()
{
	document.getElementById('add_new_add_div').style.display="none";
}


function show_add_new_property()
{
	document.getElementById('add_new_property').style.display="block";
}

function close_add_new_property()
{
	document.getElementById('add_new_property').style.display="none";
}

function show_add_new_graph_data()
{
	document.getElementById('add_graph_data_div').style.display="block";
}

function close_add_new_graph_data()
{
	document.getElementById('add_graph_data_div').style.display="none";
}


function show_add_new_project()
{
	document.getElementById('add_new_project').style.display="block";
}

function close_add_new_project()
{
	document.getElementById('add_new_project').style.display="none";
}


</script>

<body>

<div class="main_home">

<div class="main_home_title">Khala Sons Real Estate</div>

</div>

<div class="postion_main_home"></div>

<div class="main_home_left">

<a href="index.php"><button class="left_home_btn" >Home</button></a>
<button class="left_home_btn">Project</button>
<a href="property.php"><button class="left_home_btn">Property</button></a>
<a href="contact.php"><button class="left_home_btn">Contacts</button></a>

<button class="left_home_btn">About</button>

</div>

<?php

	$get_adm_user ="select * from khalaf_admintb where user_id_adm='$my_id' ";
	$run_adm_user = mysqli_query($con,$get_adm_user);
	$check_adm_user = mysqli_fetch_array($run_adm_user);
	if($check_adm_user <1){
		
		echo"<div style='float:left;width:80%;height:50px;font-size:1.3em;margin-left:17%;margin-top:20%;text-align:center;font-weight:bold;color:red;'>OOPS THIS PAGE HAS BEEN DELETED GO BACK TO The MAIN PAGE</div>";
	
	}else{
		
?>

<div class="more_action_btn_right">

<button onClick="add_new_location();" class="left_home_btn" >Add Location</button>
<button onClick="show_add_building_type_div();" class="left_home_btn">Add Building Type</button>
<button onClick="show_add_new_building();" class="left_home_btn">Add New Building</button>
<button onClick="show_add_new_add_div();" class="left_home_btn">Add Advert</button>
<button onClick="show_add_new_property();" class="left_home_btn">Add Property</button>
<button onClick="show_add_new_graph_data();" class="left_home_btn">Graph Data</button>
<button onClick="show_add_new_project();" class="left_home_btn">New Projects</button>
<button class="left_home_btn">About</button>

</div>


<div id="add_location_div" class="add_location_div">

<div class="add_location_title">Add Location Window</div>
<button onClick="close_add_location_div();" class="close_add_location_div">x</button>

<form method="post" >

<input type="text" name="add_location_input" class="add_location_input" placeholder="Write New Location..." />
<button name="add_location_btn" class="add_location_btn" >OK</button>

<?php
if(isset($_POST['add_location_btn']))
{
	$add_location = $_POST['add_location_input'];
$add_location = mysqli_real_escape_string($con,$add_location);	

    if($add_location==""){
		echo"<div style='float:left;width:100%;color:red;text-align:center;'>Fill All The Spaces</div>";
		
	}else{
		
		
		
		
	$get_location ="select * from bd_locationtb where location_name='$add_location'";
	$run_get_location = mysqli_query($con,$get_location);
	$check_location = mysqli_num_rows($run_get_location);
					
	if($check_location >0){
		echo"<div style='float:left;width:100%;text-align:center;color:red;'>This Location Already Exists</div>";
	}else{	
		
		
		
		
    $nlocation_insert ="insert into bd_locationtb(user_id,location_name,curr_date,curr_time) values('$my_id','$add_location',CURDATE(),CURTIME() )";
	
	$run_location_insert = mysqli_query($con,$nlocation_insert);
	
	if($run_location_insert){
	echo"<div style='float:left;width:100%;text-align:center;font-size:1.1em;margin-top:5px;color:purple;' >Your New Location Has Been Added</div>";
}else{
	echo"<div style='float:left;width:100%;color:red;text-align:center;'>Something Went Wrong Information Not Saved</div>";
}
	}
}
}

?>

</form>


</div>


<div id="add_building_type_div" class="add_building_type_div">
<div class="add_location_title">Add Building Type Window</div>
<button onClick="close_close_aadd_building_type_div();" class="close_add_location_div">x</button>

<form method="post" >

<input type="text" name="bd_name_input" class="add_building_type_input" placeholder="Building Name" />
<input type="text" name="bd_location_input" class="add_building_type_input" placeholder="Building Location" />
<input type="text" name="bd_description_input" class="add_building_type_input" placeholder="Building Description" />
<button name="add_building_type_btn" class="add_building_type_btn" >OK</button>

<?php
if(isset($_POST['add_building_type_btn']))
{
	$bd_name = $_POST['bd_name_input'];
	$bd_name = mysqli_real_escape_string($con,$bd_name);
	$bd_location = $_POST['bd_location_input'];
	$bd_location = mysqli_real_escape_string($con,$bd_location);
   $bd_description = $_POST['bd_description_input'];
   
    if($bd_name=="" || $bd_location=="" || $bd_description==""){
		
		echo"<div style='float:left;width:100%;color:red;text-align:center;'>Fill All The Spaces</div>";
		
	}else{
		
		
	$get_bd_type ="select * from buliding_type where buliding_name='$bd_name' AND location='$bd_location' AND description='$bd_description' ";
	$run_get_bd_type = mysqli_query($con,$get_bd_type);
	$check_get_bd_type = mysqli_num_rows($run_get_bd_type);
					
	if($check_get_bd_type >0){
		
		echo"<div style='float:left;width:100%;text-align:center;color:red;'>Building Type And Description Already Exists</div>";
		
	}else{	
		
		

    $bd_type_insert ="insert into buliding_type(user_id,buliding_name,location,description,curr_date,curr_time) values('$my_id','$bd_name','$bd_location','$bd_description',CURDATE(),CURTIME() )";
	
	$run_bd_type = mysqli_query($con,$bd_type_insert);
	
	if($run_bd_type){
	echo"<div style='float:left;width:100%;text-align:center;font-size:1.1em;margin-top:5px;color:purple;' >Your New Building Type Has Been Added</div>";
}else{
	echo"<div style='float:left;width:100%;color:red;text-align:center;'>Something Went Wrong Information Not Saved</div>";
}
	}
}
}

?>

</form>


</div>




<div id="add_new_building" class="add_new_building">

<form method="post" enctype="multipart/form-data" >

<div class="add_building_tile" >Add New Building Window</div>
<button onClick="close_add_new_building();" class="close_add_location_div">x</button>

<div class="add_building_lebal" >Building Name</div>
<input id="bd_name_input" name="bd_name_input" type="text" class="add_building_input" />

<div class="add_building_lebal" >Location</div>
<input id="bd_location_input" name="bd_location_input" type="text" class="add_building_input" />

<div class="add_building_lebal" >Description</div>
<select id="bd_description_input" name="bd_description_input" type="text" class="add_building_input" >

<option selected disabled>Select</option>
<option>Residential</option>
<option>Medical Shop</option>
<option>Show Room</option>
<option>Shop</option>
<option>Office</option>

</select>

<div class="add_building_lebal" >Building No</div>
<input id="bd_no_input" name="bd_no_input" type="text" class="add_building_input" />

<div class="add_building_lebal" >Road No</div>
<input id="bd_roadno_input" name="bd_roadno_input" type="text" class="add_building_input" />

<div class="add_building_lebal" >Manager Name</div>
<input id="bd_manager_name_input" name="bd_manager_name_input" type="text" class="add_building_input" />

<div class="add_building_lebal" >Manager Tel</div>
<input id="bd_manager_tel_input" name="bd_manager_tel_input" type="text" class="add_building_input" />

<div class="add_building_lebal" >Image</div>
<input id="bd_image_input" name="bd_image_input" type="file" class="add_building_input" />

<div id="add_building_output" type="text" class="add_building_input" ></div>

<button class="add_building_btn_clear">Clear</button>
<button id="add_building_btn_next" name="add_building_btn_next" class="add_building_btn_save">Next</button>
<button id="add_building_btn_save" name="add_building_btn_save" class="add_building_btn_save" style="display:none;" >Sava Data</button>

</form>

<script>

document.getElementById("add_building_btn_next").addEventListener("click", function(event){
  event.preventDefault();
  
  var bd_name = document.getElementById('bd_name_input').value;
  var bd_location = document.getElementById('bd_location_input').value;
  var bd_description = document.getElementById('bd_description_input').value;
  var bd_no = document.getElementById('bd_no_input').value;
  var bd_road_no = document.getElementById('bd_roadno_input').value;
  var bd_manager_name = document.getElementById('bd_manager_name_input').value;
  var bd_manager_tel = document.getElementById('bd_manager_tel_input').value;

  var bd_image =document.getElementById('bd_image_input').files[0];
  
  
  if(bd_name=="" || bd_location=="" || bd_description=="" || bd_no=="" || bd_road_no=="" || bd_image==""){

  document.getElementById('add_building_output').innerHTML="<div style='color:red;'>Fill All The Spaces</div>";

}else{
	
	var file_type = bd_image.type;
	
	if(file_type !=='image/jpeg' && file_type !=='image/JPEG' && file_type !=='image/png' && file_type !=='image/PNG')
	{
		alert(file_type);
	document.getElementById('add_building_output').innerHTML="<div style='color:red;'>File Formate Not Supported</div>";

	}else{
		document.getElementById('add_building_btn_next').style.display="none";
		document.getElementById('add_building_btn_save').style.display="block";
	}


}

});




</script>

<?php

if(isset($_POST['add_building_btn_save']))
{
	
	
	
		
	$bd_name = $_POST['bd_name_input'];
	$bd_location = $_POST['bd_location_input'];
	$bd_description = $_POST['bd_description_input'];
	$bd_description = mysqli_real_escape_string($con,$bd_description);
	$bd_no = $_POST['bd_no_input'];
	$bd_roadno = $_POST['bd_roadno_input'];	
	$bd_manager_name = $_POST['bd_manager_name_input'];
	$bd_manager_tel = $_POST['bd_manager_tel_input'];

	$image_url = $_FILES['bd_image_input']['name'];
	$type = explode('.',$image_url);
	$type =end($type);
	
	$random_name =rand();
	
	$image_tmp = $_FILES['bd_image_input']['tmp_name'];
	


    $new_building_insert ="insert into main_buildingtb(user_id,building_name,building_location,bd_description,building_no,road_no,manager_name,manager_tel,image_url,curr_date,curr_time) 
	values('$my_id','$bd_name','$bd_location','$bd_description','$bd_no','$bd_roadno','$bd_manager_name','$bd_manager_tel','$random_name.$type',CURDATE(),CURTIME() )";
	
	$run_building_insert = mysqli_query($con,$new_building_insert);
	
	if($run_building_insert){
		
		move_uploaded_file($image_tmp,'main_building_images/'.$random_name.'.'.$type);
		
		echo"<div style='float:left;width:100%;text-align:center;'>Your Building Information Has Been Saved.</div>";
		
		}else{echo"<div style='float:left;width:100%;color:red;text-align:center;'>Something Went Wrong Information Not Saved</div>";}
	
	
	}
	
?>



</div>



<div id="add_new_add_div" class="add_new_add_div">

<div class="add_building_tile" >Adding New Ad Window</div>
<button onClick="close_add_new_add_div();" class="close_add_location_div">x</button>
<form method="post" enctype="multipart/form-data" >

<div class="new_ad_lebal" >Building Name</div>
<select id="new_ad_bd_name_input" name="new_ad_bd_name_input" type="text" class="new_ad_input" >
<option disabled selected>Select</option>
<?php option_building_name(); ?>

</select>

<div class="new_ad_lebal" >Building No.</div>
<input id="new_ad_bd_no_input" name="new_ad_bd_no_input" type="text" class="new_ad_input" />


<div class="new_ad_lebal" >Location</div>
<input id="new_ad_bd_location_input" name="new_ad_bd_location_input" type="text" class="new_ad_input" />

<div class="new_ad_lebal" >Road No.</div>
<input id="new_ad_bd_roadno_input" name="new_ad_bd_roadno_input" type="text" class="new_ad_input" />

<div class="new_ad_lebal" >Bedroom No.</div>
<select id="new_ad_bedroom_input" name="new_ad_bedroom_input" type="text" class="new_ad_input" >
<option disabled selected>Select</option>
<option>Studio</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>

</select>

<div class="new_ad_lebal" >Bathroom No.</div>
<select id="new_ad_bathroom_input" name="new_ad_bathroom_input" type="text" class="new_ad_input" >

<option disabled selected>Select</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>

</select>

<div class="new_ad_lebal" >Price</div>
<input id="new_ad_price_input" name="new_ad_price_input" type="text" class="new_ad_input" />

<div class="new_ad_lebal" >Description</div>
<select id="new_ad_descrip_input" name="new_ad_descrip_input" type="text" class="new_ad_input" >
<option selected disabled>Select</option>
<option>Residential</option>
<option>Medical Shop</option>
<option>Show Room</option>
<option>Shop</option>
<option>Office</option>
</select>

<div class="new_ad_lebal" >Kitchen</div>
<select id="new_ad_kitchen_input" name="new_ad_kitchen_input" type="text" class="new_ad_input" >

<option disabled selected>Select</option>
<option>Open</option>
<option>Closed</option>
<option>Semi</option>

</select>

<div class="new_ad_lebal" >Swimming Pool</div>
<select id="new_ad_swimming_pool_input" name="new_ad_swimming_pool_input" type="text" class="new_ad_input" >

<option disabled selected>Select</option>
<option>Yes</option>
<option>No</option>

</select>

<div class="new_ad_lebal" >Sauna Room</div>
<select id="new_ad_sauna_input" name="new_ad_sauna_input" type="text" class="new_ad_input" >

<option disabled selected>Select</option>
<option>Yes</option>
<option>No</option>

</select>

<div class="new_ad_lebal" >Squash Room</div>
<select id="new_ad_squash_input" name="new_ad_squash_input" type="text" class="new_ad_input" >

<option disabled selected>Select</option>
<option>Yes</option>
<option>No</option>

</select>

<div class="new_ad_lebal" >Furnished</div>
<select id="new_ad_furniture_input" name="new_ad_furniture_input" type="text" class="new_ad_input" >

<option disabled selected>Select</option>
<option>Fully Furnished</option>
<option>Semi Furnished</option>
<option>Un Furnished</option>


</select>

<div class="new_ad_lebal" >Gym Room</div>
<select id="new_ad_gym_input" name="new_ad_gym_input" type="text" class="new_ad_input" >

<option disabled selected>Select</option>
<option>Yes</option>
<option>No</option>

</select>

<div class="new_ad_lebal" >Steam Room</div>
<select id="new_ad_steam_input" name="new_ad_steam_input" type="text" class="new_ad_input" >

<option disabled selected>Select</option>
<option>Yes</option>
<option>No</option>

</select>

<div class="new_ad_lebal" >Balicon</div>
<select id="new_ad_balicon_input" name="new_ad_balicon_input" type="text" class="new_ad_input" >

<option disabled selected>Select</option>
<option>Yes</option>
<option>No</option>

</select>

<div class="new_ad_lebal" >Building Image</div>
<input id="new_ad_image_input" name="new_ad_image_input" type="file" class="new_ad_input" />


<div id="new_ad_output" class="new_ad_output" ></div>

<button id="clear_new_building_ad_btn" name="clear_new_building_ad_btn" class="new_ad_btn_clear">Clear</button>
<button id="new_building_ad_next" class="new_ad_btn_save">Next</button>
<button id="new_building_ad_save" name="new_building_ad_save" class="new_ad_btn_save" style="display:none;">Save Data</button>

</form>



<script>

document.getElementById("new_building_ad_next").addEventListener("click", function(event){
  event.preventDefault();
  
  var bd_name = document.getElementById('new_ad_bd_name_input').value;
  var bd_location = document.getElementById('new_ad_bd_location_input').value;
  var bedroom_no = document.getElementById('new_ad_bedroom_input').value;
  var ad_bathroom = document.getElementById('new_ad_bathroom_input').value;
  var new_ad_descrip = document.getElementById('new_ad_descrip_input').value;
  var new_ad_kitchen = document.getElementById('new_ad_kitchen_input').value;
  
  var new_ad_swimming_pool= document.getElementById('new_ad_swimming_pool_input').value;
  var new_ad_sauna= document.getElementById('new_ad_sauna_input').value;
  var new_ad_squash = document.getElementById('new_ad_squash_input').value;
  var new_ad_furniture = document.getElementById('new_ad_furniture_input').value;
  var new_ad_gym = document.getElementById('new_ad_gym_input').value;
  var new_ad_steam = document.getElementById('new_ad_steam_input').value;
  var new_ad_balicon = document.getElementById('new_ad_balicon_input').value;

  var bd_image =document.getElementById('new_ad_image_input').files[0];
 
 
  if(bd_name=="Select" || bd_location=="" || new_ad_descrip=="" || bedroom_no=="Select" || ad_bathroom=="Select" || new_ad_kitchen=="Select" || new_ad_swimming_pool=="Select" || new_ad_sauna=="Select" || new_ad_squash=="Select" || new_ad_furniture=="Select" || new_ad_gym=="Select" || new_ad_steam=="Select" || new_ad_balicon=="Select" ){

  document.getElementById('new_ad_output').innerHTML="<div style='color:red;'>Fill All The Spaces</div>";
 
}else{

	var file_type = bd_image.type;
	
	if(file_type !=='image/jpeg' && file_type !=='image/JPEG' && file_type !=='image/png' && file_type !=='image/PNG')
	{ alert(new_ad_descrip);
		
	document.getElementById('new_ad_output').innerHTML="<div style='color:red;'>File Formate Not Supported</div>";

	}else{
		document.getElementById('new_building_ad_next').style.display="none";
		document.getElementById('new_building_ad_save').style.display="block";
		alert(file_type);
	}


}

});




</script>

<?php

if(isset($_POST['new_building_ad_save']))
{
	
	
	
		
	$bd_name_ad = $_POST['new_ad_bd_name_input'];
	$location_ad = $_POST['new_ad_bd_location_input'];
	$bedroom_ad = $_POST['new_ad_bedroom_input'];
	$bathroom_ad = $_POST['new_ad_bathroom_input'];
	$description_ad = $_POST['new_ad_descrip_input'];	
	$kitchen_ad = $_POST['new_ad_kitchen_input'];
	$swimming_pool_ad = $_POST['new_ad_swimming_pool_input'];
			
	$sauna_ad = $_POST['new_ad_sauna_input'];
	$squash_ad = $_POST['new_ad_squash_input'];
	$furniture_ad= $_POST['new_ad_furniture_input'];
	$gym_ad = $_POST['new_ad_gym_input'];
	$steam_ad = $_POST['new_ad_steam_input'];	
				
	$price_ad = $_POST['new_ad_price_input'];
	$roadno_ad = $_POST['new_ad_bd_roadno_input'];
	$bd_no_ad = $_POST['new_ad_bd_no_input'];
	$balicon_ad = $_POST['new_ad_balicon_input'];





	$image_url = $_FILES['new_ad_image_input']['name'];
	$type = explode('.',$image_url);
	$type =end($type);
	
	$random_name =rand();
	
	$image_tmp = $_FILES['new_ad_image_input']['tmp_name'];
	


    $ninsert_adert ="insert into adverttb(user_id,building_name,location,building_no,road_no,bedroom_no,bathroom_no,price,description,kitchen,swimming_pool,suana,squash,furniture,gym,steam,balicon,image_url,curr_date,curr_time) 
	values('$my_id','$bd_name_ad','$location_ad','$bd_no_ad','$roadno_ad','$bedroom_ad','$bathroom_ad','$price_ad','$description_ad','$kitchen_ad','$swimming_pool_ad','$sauna_ad','$squash_ad','$furniture_ad','$gym_ad','$steam_ad','$balicon_ad','$random_name.$type',CURDATE(),CURTIME() )";
	
	$run_advert_insert = mysqli_query($con,$ninsert_adert);
	
	if($run_advert_insert){
		
		move_uploaded_file($image_tmp,'advert_images/'.$random_name.'.'.$type);
		
		echo"<div style='float:left;width:100%;text-align:center;'>Your Advert Information Has Been Saved.</div>";
		
		}else{echo"<div style='float:left;width:100%;color:red;text-align:center;'>Something Went Wrong Information Not Saved</div>";}
	
	
	}
	
?>




</div>





<?php

  if(isset($_GET['ad_id'])){
	 
	 $new_post_id = $_GET['ad_id'];

  
  $get_advert ="select * from adverttb where id='$new_post_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']; 
	$building_no = $row_advert['building_no'];

	$image_url = $row_advert['image_url']; 


?>


<div style="float:left;width:60%;height:150px;margin-left:20%;margin-top:20px;background:#1FADDA;border-radius:10px;border:5px solid #ccc;">

<div style="float:left;width:100%;height:30px;font-size:1.3em;font-weight:bold;text-align:center;margin-top:10px;color:white;">From Here Add More Advert Images</div>

<form method="post" enctype="multipart/form-data">

<input type="file" name="more_advert_images" style="float:left;width:60%;height:40px;background:white;font-size:1.1em;margin-left:10%;margin-top:20px;" />
<button name="add_more_advert_images" style="float:left;width:20%;height:40px;margin-left:5px;margin-top:20px;">Add Image</button>



<?php

if(isset($_POST['add_more_advert_images']))
{
		 $more_advert_img = $_FILES['more_advert_images']['name'];
	   	$type = explode('.',$more_advert_img);
	    $type =end($type);
		
		$random_name =rand();
	    $image_tmp = $_FILES['more_advert_images']['tmp_name'];
		
		if($more_advert_img==""){echo"<div style='float:left;width:100%;text-align:center;font-size:1.1em;color:red;'>Fill All The Spaces</div>";}
		
		else{
			if($type !=='jpg' && $type !=='png' && $type !=='JPG' && $type !=="PNG"){
				echo"<div style='float:left;width:100%;text-align:center;font-size:1.1em;color:red;'>File Format Not Supported</div>";
			}else{
				
		$insert_more_ad_image = "insert into advert_albumtb (user_id,post_id,building_name,building_no,location,image_url,curr_date,curr_time)
	   values('$my_id','$post_id','$building_name','$building_no','$location','$random_name.$type',CURDATE(),CURTIME() )";
	   $run_more_ad_image = mysqli_query($con,$insert_more_ad_image);
	   if($run_more_ad_image){
		   
		  move_uploaded_file($image_tmp,'advert_album_images/'.$random_name.'.'.$type);
		  echo"<div style='float:left;width:100%;text-align:center;font-size:1.1em;color:green;'>New Image Added To Your Album</div>";
	   
	   }else{echo"<div style='float:left;width:100%;text-align:center;font-size:1.1em;color:red;'>Something Went Wrong,Data Not Saved</div>";}
			}
			
			
		}
		
		
}



?>


</form>



</div>
  
<?php  } } ?> 









<div id="add_new_property" class="add_new_property" style="display:none;">


<div class="add_new_property_title">Khalaf Sons Real Estate Properties</div>
<button onClick="close_add_new_property();" class="close_add_location_div">x</button>

<form method="post" enctype="multipart/form-data" >


<div class="propert_bd_name_lebal">Property Name</div>
<input type="text" id="propert_bd_name_input" name="propert_bd_name_input" class="propert_bd_name_input"  />

<div class="propert_bd_name_lebal">Property Details</div>
<textarea type="text" id="property_detail" name="property_detail" class="propert_bd_textarea"  ></textarea>

<div class="propert_bd_name_lebal">Property Location</div>
<input type="text" id="propert_location_input" name="propert_location_input" class="propert_bd_name_input"  />

<div class="propert_bd_name_lebal">Property Road No.</div>
<input type="text" id="propert_road_no_input" name="propert_road_no_input" class="propert_bd_name_input"  />

<div class="propert_bd_name_lebal">Property Building No.</div>
<input type="text" id="propert_building_no_input" name="propert_building_no_input" class="propert_bd_name_input"  />


<div class="propert_bd_name_lebal">Property Image</div>
<input type="file" id="propert_image" name="propert_image" class="propert_bd_name_input"  />


<div id="new_property_output" class="propert_bd_name_input" >Kato</div>

<button class="add_new_property_clear_btn">Clear</button>
<button type="submit" id="continue_add_new_property_btn"  class="continue_add_new_property_btn">Continue</button>
<button id="property_save_btn" name="property_save_btn" class="continue_add_new_property_btn" style="display:none;">Finish</button>
</form>

<script>

document.getElementById("continue_add_new_property_btn").addEventListener("click", function(event){
  event.preventDefault();
  
  var propert_bd_name_input = document.getElementById('propert_bd_name_input').value;
  var property_detail = document.getElementById('property_detail').value;
  var property_propert_location = document.getElementById('propert_location_input').value
  var property_propert_road_no = document.getElementById('propert_road_no_input').value
  var propert_building_no = document.getElementById('propert_building_no_input').value
  var propert_image = document.getElementById('propert_image').value;
  
if(propert_bd_name_input=="" || property_detail=="" || propert_image=="" || property_propert_location =="" ||  property_propert_road_no=="" || propert_building_no==""){
	
	document.getElementById('new_property_output').innerHTML="Fill All The Spaces ";  
	
}else{
	
		  
		   var my_file =document.getElementById('propert_image').files[0]; 
 //var file_type =document.getElementById('sms_chat_file_mob').files[0].type; 
  
  var file_type = my_file.type;
   //var file_name = my_file.name;

	 if(file_type !=='image/jpeg' && file_type !=='image/png' && file_type !=='image/JPEG' && file_type !=="image/PNG"){
		 
		 document.getElementById('new_property_output').innerHTML="Image Format Not Supported"; 
		 
	
}else{
	
	document.getElementById('new_property_output').innerHTML="Supported"; 
	document.getElementById('continue_add_new_property_btn').style.display="none";
	document.getElementById('property_save_btn').style.display="block";
	
}

}

});

</script>




<?php

if(isset($_POST['property_save_btn']))
{

	  $propert_bd_name= $_POST['propert_bd_name_input'];
	  $property_detail= $_POST['property_detail'];
	  $property_detail = mysqli_real_escape_string($con,$property_detail);
	  $propert_location= $_POST['propert_location_input'];
	  $property_road_no= $_POST['propert_road_no_input'];
	  $propert_building_no= $_POST['propert_building_no_input'];

  
	   $property_image = $_FILES['propert_image']['name'];
	   
	   
	   	$type = explode('.',$property_image);
	    $type =end($type);
		
		$random_name =rand();
	    $image_tmp = $_FILES['propert_image']['tmp_name'];
	   
	   $insert_new_ad = "insert into khalaf_propertytbb (user_id,property_name,property_details,property_location,property_road_no,property_build_no,property_image,curr_date,curr_time)
	   values('$my_id';'$propert_bd_name','$property_detail','$propert_location','$property_road_no','$propert_building_no','$random_name.$type',CURDATE(),CURTIME() )";
	  
  

	  $run_new_ad = mysqli_query($con,$insert_new_ad);
	   if($run_new_ad){
		   
		  move_uploaded_file($image_tmp,'property_images/'.$random_name.'.'.$type);
	   
	   }else{echo"Something Went Wrong,Data Not Saved";}


	
}

?>


</div><!-- end of add_new_property-->


<?php 

if(isset($_GET['proper_id'])){
	
	$property_id = $_GET['proper_id'];

   ?>

<div class="more_propery_images" style="float:left;width:50%;height:auto;background:#A92600;margin-left:25%;border:5px solid #ccc;margin-top:20px;">

<form method="post" enctype="multipart/form-data" >

<div style="float:left;width:100%;height:40px;line-height:40px;text-align:center;font-size:1.3em;color:white;">Upload New Property Images</div>
<input name="property_file" type="file" style="float:left;width:80%;height:40px;margin-left:10%;margin-bottom:20px;font-size:1.1em;color:#1FADDA;" />
<button name="update_more_property_images" style="float:left;width:50%;height:40px;margin-left:25%;margin-bottom:20px;font-size:1.1em;border:transparent;background:white;color:#1FADDA;border-radius:5px;cursor:pointer;">Upload New Image</button>

</form>

<?php
if(isset($_POST['update_more_property_images'])){
	
	 
	   $property_image = $_FILES['property_file']['name'];
	   
	   
	   	$type = explode('.',$property_image);
	    $type =end($type);
		
		if($property_image==""){
			
			echo"<div style='float:left;width:100%;text-align:center;font-size:1.1em;color:red;'>Fill All The Spaces</div>";
			
			}else{
				
		if($type !=='jpg' && $type !=='png' && $type !=='JPG' && $type !=="PNG"){
			
			echo"<div style='float:left;width:100%;text-align:center;font-size:1.1em;color:red;'>Image Format Not Supported</div>"; 
		}else{
		
		$random_name =rand();
	    $image_tmp = $_FILES['property_file']['tmp_name'];
	   
	   $insert_more_property_image = "insert into property_albumtb (user_id,property_id,image_url,curr_date,curr_time) values('$my_id','$property_id','$random_name.$type',CURDATE(),CURTIME() )";
	  
	  $run_more_property_image = mysqli_query($con,$insert_more_property_image);
	   if($run_more_property_image){
		   
		  move_uploaded_file($image_tmp,'property_album_images/'.$random_name.'.'.$type);
		  
		 echo"<div style='float:left;width:100%;text-align:center;font-size:1.1em;color:green;'>New Property Image Added</div>"; 
	   
	   }else{
		   
		   echo"<div style='float:left;width:100%;text-align:center;font-size:1.1em;color:red;'>Something Went Wrong,Data Not Saved</div>";
		   }
			
			}
			}
}

?>



</div>



<?php } ?>



<?php 

if(isset($_GET['pedit'])){
	
	$property_id = $_GET['pedit'];

   ?>


<div id="edit_property_div" class="add_new_property" style="displayk:none;">

<?php
$get_property = "select * from khalaf_propertytbb where id='$property_id'";
$run_get_property = mysqli_query($con,$get_property);
while($row_get_property = mysqli_fetch_array($run_get_property))
{
	$property_id = $row_get_property['id'];
	$property_name = $row_get_property['property_name'];
	$property_details = $row_get_property['property_details'];
	$property_image = $row_get_property['property_image'];
	$property_location= $row_get_property['property_location'];
	$property_road_no = $row_get_property['property_road_no'];
	$property_build_no= $row_get_property['property_build_no'];	


?>

<form method="post" enctype="multipart/form-data" >

<div class="add_new_property_title"> Edit Khalaf Sons Real Estate Properties</div>

<div class="propert_bd_name_lebal">Property Name</div>
<input type="text" id="propert_bd_name_input" name="propert_bd_name_input" value="<?php echo"$property_name";  ?>" class="propert_bd_name_input"  />

<div class="propert_bd_name_lebal">Property Details</div>
<textarea type="text" id="property_detail" name="property_detail"  class="propert_bd_textarea"  >

<?php echo"$property_details";  ?>

</textarea>

<div class="propert_bd_name_lebal">Property Location</div>
<input type="text" id="propert_location_input" name="propert_location_input" value="<?php echo"$property_location";  ?>" class="propert_bd_name_input"  />

<div class="propert_bd_name_lebal">Property Road No.</div>
<input type="text" id="propert_road_no_input" name="propert_road_no_input" value="<?php echo"$property_road_no";  ?>" class="propert_bd_name_input"  />

<div class="propert_bd_name_lebal">Property Building No.</div>
<input type="text" id="propert_building_no_input" name="propert_building_no_input" value="<?php echo"$property_build_no";  ?>" class="propert_bd_name_input"  />


<!--div class="propert_bd_name_lebal">Property Image</div>
<input type="file" id="propert_image" name="propert_image" class="propert_bd_name_input"  />


<div id="new_property_output" class="propert_bd_name_input" >Kato</div>

<button class="add_new_property_clear_btn">Clear</button>
<button type="submit" id="continue_add_new_property_btn"  class="continue_add_new_property_btn">Continue</button-->
<button id="property_update_btn" name="property_update_btn" class="continue_add_new_property_btn" style="margin-left:40%;displayk:none;">Update Data</button>
</form>




<?php

if(isset($_POST['property_update_btn']))
{

	  $propert_bd_name= $_POST['propert_bd_name_input'];
	  $property_detail= $_POST['property_detail'];
	  $property_detail = mysqli_real_escape_string($con,$property_detail);
	  $propert_location= $_POST['propert_location_input'];
	  $property_road_no= $_POST['propert_road_no_input'];
	  $propert_building_no= $_POST['propert_building_no_input'];

  if($propert_bd_name=="" || $property_detail=="" || $propert_location=="" || $property_road_no=="" || $propert_building_no=="" ){
	  
	  echo"<div style='float:left;width:100%;height:30px;text-align:center;color:red;font-size:1.1em;'>Fill All The Spaces</div>";
	  
  }else{

	   $update_property = "update khalaf_propertytbb set property_name='$propert_bd_name',property_details='$property_detail',property_location='$propert_location',property_road_no='$property_road_no',property_build_no='$propert_building_no' where id='$property_id'";

	  $run_update_property = mysqli_query($con,$update_property);
	   if($run_update_property){
		   
		   echo"<div style='float:left;width:100%;height:30px;text-align:center;color:green;font-size:1.1em;'>Your Information Has Been Updated</div>";
	   
	   }else{echo"<div style='float:left;width:100%;height:30px;text-align:center;color:red;font-size:1.1em;'>Something Went Wrong,Data Not Saved</div>";}
}
?>
<script>window.scrollTo(0,70);</script>
<?php
	
}

?>




<?php } ?>

</div>
<script>document.getElementById('edit_property_div').style.display="block";</script>
<?php } ?>




<div idk="add_building_type_div" class="post_new_job_div">

<div class="post_job_title">Post New Job Window</div>
<button onClick="close_close_aadd_building_type_div();" class="close_post_new_job_div">x</button>

<form method="post" >

<input type="text" name="job_title_input" class="post_job_input" placeholder="Job title" />
<input type="text" name="job_description_input" class="post_job_input" placeholder="Job Description" />
<input type="text" name="job_location" class="post_job_input" placeholder="Job location" />
<button name="insrt_new_job_btn" class="post_job_btn" >Post</button>

<?php
if(isset($_POST['insrt_new_job_btn']))
{
	$job_title = $_POST['job_title_input'];
	$job_title = mysqli_real_escape_string($con,$job_title);
	$job_description = $_POST['job_description_input'];
	$job_description = mysqli_real_escape_string($con,$job_description);
    $job_location = $_POST['job_location'];
   
    if($job_title=="" || $job_description=="" || $job_location==""){
		
		echo"<div style='float:left;width:100%;color:red;text-align:center;'>Fill All The Spaces</div>";
		
	}else{
		
		
	$get_job_post ="select * from jobstb where job_title='$job_title' AND job_description='$job_description' AND job_location='$job_location' ";
	$run_get_job_post = mysqli_query($con,$get_job_post);
	$check_get_job_post = mysqli_num_rows($run_get_job_post);
					
	if($check_get_job_post >0){
		
		echo"<div style='float:left;width:100%;text-align:center;color:red;'>Job Type And Description Already Exists</div>";
		
	}else{	
		
		

    $job_post_insert ="insert into jobstb(user_id,job_title,job_description,job_location,curr_date,curr_time) values('$my_id','$job_title','$job_description','$job_location',CURDATE(),CURTIME() )";
	
	$run_job_post = mysqli_query($con,$job_post_insert);
	
	if($run_job_post){
	echo"<div style='float:left;width:100%;text-align:center;font-size:1.1em;margin-top:5px;color:purple;' >Your New Job Has Been Published</div>";
}else{
	echo"<div style='float:left;width:100%;color:red;text-align:center;'>Something Went Wrong Information Not Saved</div>";
}
	}
}
}

?>
</form>

</div>


<?php
if(isset($_GET['calender_id'])){
	
	$calender_id = $_GET['calender_id'];
	echo"$calender_id";

   ?>
   <input type="text" id="id_calender" value="<?php echo"$calender_id"; ?>" style="display:none;" />
   <div class="preview_add_graph_data" >
   <div id="graph_data_previwe_output"></div>
   
   <script>
   disp_preview_graph_data();
   function disp_preview_graph_data()
   {
	 id_calender = document.getElementById('id_calender').value;
	
	
	xmlhttp = new XMLHttpRequest();
	
	xmlhttp.open("GET","transaction_auto.php?id_calender="+id_calender+"&status=disp_preview_graph_data",false);
	xmlhttp.send(null);
	document.getElementById('graph_data_previwe_output').innerHTML=xmlhttp.responseText;
	
   }
   
   
   </script>
   

  
</div>


<div id="add_graph_data_div" class="add_graph_data_div" >
<div id="" class="add_graph_data_title" >Add Graph Info</div>
<button onClick="close_add_new_graph_data();" class="close_graph_info_input_div"  >X</button>

<select id="property_name" class="graph_info_input" >
<option disabled selected>Select</option>
<?php option_building_name(); ?>
</select>

<input id="property_amount" class="graph_info_input" placeholder="Amount" />
<input id="percentage" class="graph_info_input" placeholder="Percentage" />
<input id="tran_start_date" class="graph_info_input" placeholder="Start Date" />
<input id="tran_end_date" class="graph_info_input" placeholder="End Date" />

<div id="graph_output_div"></div>

<button onClick="graph_info_save();" class="graph_info_save_btn"  >Enter</button>


<script>
document.getElementById('add_graph_data_div').style.display="block";
function graph_info_save()
{
	my_id = document.getElementById("my_id").innerHTML;
	propert_name = document.getElementById("property_name").value;
	property_amount = document.getElementById("property_amount").value;
	percentage = document.getElementById("percentage").value;
	tran_start_date = document.getElementById("tran_start_date").value;
	tran_end_date = document.getElementById("tran_end_date").value;
	//alert(my_id);
	
	xmlhttp = new XMLHttpRequest();
	xmlhttp.open("GET","transaction_auto.php?my_id="+my_id+"&&propert_name="+propert_name+"&&property_amount="+property_amount+"&&percentage="+percentage+"&&tran_start_date="+tran_start_date+"&&tran_end_date="+tran_end_date+"&&status=insert_graph_data",false);
	xmlhttp.send(null);
	document.getElementById('graph_output_div').innerHTML=xmlhttp.responseText;
	//alert('you');
}



</script>

</div>
<?php } ?>


<div id="add_new_project" class="add_new_project">

<div class="add_new_project_title" >Add New Project</div>

<form method="post" enctype="multipart/form-data" >

<input id="project_description_input" name="project_description_input" class="project_description_input" placeholder="Description" />
<input type="file" id="project_file_input" name="project_file_input" onChange="show_file_name();" style="display:none;" />
<input type="submit" id="upload_project_btn" name="upload_project_btn" style="display:none;" />
</form>
<button id="select_project_file_btn" onClick="document.getElementById('project_file_input').click();" class="select_project_file" >Select File</button>

<button id="project_help_btn" class="upload_project_btn" >Upload Project</button>

<button id="upload_project_btn_final_btn" onClick="document.getElementById('upload_project_btn').click();" class="upload_project_btn" style="display:none;" >Upload Project</button>

<script>

function show_file_name()
{

project_description = document.getElementById('project_description_input').value;
file_type = document.getElementById('project_file_input').files[0].type;

if(file_type == "image/jpeg" || file_type == "video/mp4" && project_description !=="" )
{
document.getElementById('select_project_file_btn').innerHTML ="File Selected";
document.getElementById('select_project_file_btn').style="color:green;";
document.getElementById('project_help_btn').style.display="none";
document.getElementById('upload_project_btn_final_btn').style="color:green;display:block;";
//alert(file_type);	
}else{
document.getElementById('project_help_btn').style.display="block";
document.getElementById('upload_project_btn_final_btn').style="color:green;display:none;";	
	alert('First Filds Empty Or Your File Format Not Supported ');
}

}

</script>

<?php
if(isset($_POST['upload_project_btn']))
{
	$project_description = $_POST['project_description_input'];
	$project_file = $_FILES['project_file_input']['name'];
	//$project_image = $_FILES['propert_image']['name'];
	   	$type = explode('.',$project_file);
	    $type =end($type);
		
		$random_name =rand();
	    $image_tmp = $_FILES['propert_image']['tmp_name'];
		
		//if($property_image==""){}
	
	echo"$type";
	echo"$cur_day -";  echo"$cur_month -";  echo"$cur_year";
}


?>

</div><!-- end of add_new_project-->









<?php } ?>
</body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit