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 old/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : D:/khalafsite-backup/old/htdocs old/agent_page.php
<html>

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

<?php

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

?>



<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
*/
?>
<input type="text" id="ip_user" class="helping_id" style="display:none;" value="<?php echo $user_ip;?>">
<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;?>">
 


<head>
<title>Khalaf Sons Real Estate</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" href="kvt_con/khalaf_log.jpg" type="image/ico">
<link rel="stylesheet" type="text/css" href="main_css/agent_page.css" />

</head>


<script>
function show_create_agent_acc()
{

main_home_left_size = document.getElementById('main_home_left').offsetWidth;
if(main_home_left_size < 159){
	
document.getElementById('new_agent_acc_div').style.display="block";
document.getElementById('main_home_left_mob').style.display="none";
document.getElementById('show_mob_menu_btn').style.display="block";
document.getElementById('close_mob_menu_btn').style.display="none";
document.getElementById('main_home_left').style.display="none;";
document.getElementById('disp_agent_area').style.display="none";
//document.getElementById('agent_details_div').style.display="none";	

	
}else{
	
document.getElementById('new_agent_acc_div').style.display="block";
document.getElementById('main_home_left').style.display="block";
document.getElementById('disp_agent_area').style.display="none";
//document.getElementById('agent_details_div').style.display="none";	
}

//alert(main_home_left_size);

}

function disp_agent_area()
{

document.getElementById('disp_agent_area').style.display="block";
document.getElementById('new_agent_acc_div').style.display="none";
}


function show_agent_contact(sac)
{
	//alert(sac);
agent_contact_output='agent_contact_output'+sac;
document.getElementById(agent_contact_output).style.display="block";	
document.getElementById(sac).style.display="none";

my_ip = document.getElementById('ip_user').value;
user_id =sac;

	xmlhttp = new XMLHttpRequest();
	
	xmlhttp.onreadystatechange = function() {
    if (this.readyState == 4 && this.status == 200) {
       // Typical action to be performed when the document is ready:
      // document.getElementById("message_display_output").innerHTML = xmlhttp.responseText;
    }
};
	xmlhttp.open("GET","khalaf_auto.php?my_ip="+my_ip+"&user_id="+user_id+"&status=insert_user_call_agent",false);
	xmlhttp.send(null);

}


</script>


<body onLoad="star_auto_machine();" >

<div class="main_home">

<div class="main_log">

<img src="kvt_con/khalaf_log.jpg" width="100%" height="100%" style="border-radius:20px;" classk="main_home_icon" />

</div>

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

<div class="icon_div_right" >

<img onClick="show_search_area();" src="kvt_con/search_icon.png" class="top_right_icons" />
<a href="https://www.facebook.com/Khalaf-Sons-Real-Estate-WLL-899406336847138/" ><img src="kvt_con/fb_icon.png" class="top_right_icons" /></a>
<!--img src="kvt_con/instagram_icon.png" class="top_right_icons" /-->
<a href="https://www.linkedin.com/company/khalaf-sons-real-estate/?viewAsMember=true" ><img src="kvt_con/linkedin.png" class="top_right_icons" /></a>


</div>

<div class="icon_div_right_mob" >


<img id="show_mob_menu_btn" onClick="show_mob_menu();" src="kvt_con/menu.png" class="top_right_mob_menu_icon" />
<img id="close_mob_menu_btn" onClick="close_mob_menu();" src="kvt_con/close_mob_menu.png" class="top_right_mob_menu_icon" style="display:none;" />

<script>

function show_mob_menu()
{
document.getElementById('main_home_left_mob').style.display="block";
document.getElementById('show_mob_menu_btn').style.display="none";
document.getElementById('close_mob_menu_btn').style.display="block";

//alert('woop');
window.scrollTo(0,0);
}

function close_mob_menu()
{
document.getElementById('main_home_left_mob').style.display="none";
document.getElementById('show_mob_menu_btn').style.display="block";
document.getElementById('close_mob_menu_btn').style.display="none";

}



</script>

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



</div>

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



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

<a href="index.php"><button class="left_home_btn" >Home</button></a>
<a href="agent_page.php"><button class="left_home_btn">Our Agents</button></a>
<button onClick="show_create_agent_acc();" class="left_home_btn">New Agent</button>

<?php

if(isset($_SESSION['id'])){ ?>

<a href="log_out.php"><button class="left_home_btn">Log out</button></a>

<?php } ?>

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






<div id="main_home_left" class="main_home_left">


<a href="index.php"><button class="left_home_btn" >Home</button></a>
<a href="agent_page.php"><button class="left_home_btn">Our Agents</button></a>

<?php
if(isset($_SESSION['id'])){ 
	$disp_maint_emp ="select * from khalaf_admintb where user_cpr='$my_cpr' ";
	$run_disp_maint_emp = mysqli_query($con,$disp_maint_emp);
    $check_user = mysqli_num_rows($run_disp_maint_emp);
if($check_user >0){
	?>

<button onClick="show_create_agent_acc();" class="left_home_btn">New Agent</button>

<?php } } ?>

<?php

if(isset($_SESSION['id'])){ ?>

<a href="log_out.php"><button class="left_home_btn">Log out</button></a>

<?php } ?>


</div>



<div id="disp_agent_area" class="disp_agent_area" >

<?php

	$get_agent ="select * from khalaf_agenttb ";
	$run_get_agent = mysqli_query($con,$get_agent);
	while($row_get_agent = mysqli_fetch_array($run_get_agent))
	
	{
		$agent_id = $row_get_agent['user_id'];

	$get_user ="select * from khalaf_usertb where id='$agent_id'";
	$run_get_user = mysqli_query($con,$get_user);
	while($row_get_user = mysqli_fetch_array($run_get_user)){
	
	    $id_user = $row_get_user['id'];
		$agent_fname = $row_get_user['first_name'];
		$agent_lname = $row_get_user['last_name'];
		$agent_image = $row_get_user['image_url'];
		$agent_tel = $row_get_user['contact'];
        
?>

<div class="single_disp_agent_div">

<?php
if($agent_image =="avatar2.jpg"){
?>
<a href="singl_agent.php?my_agent_id=<?php echo"$agent_id"; ?>"><div class="single_agent_image"><img src="avatar_image/avatar2.jpg" width="100%" height="100%" style="cursor:pointer;" /></div></a>

<?php  }else{ ?>

<a href="singl_agent.php?my_agent_id=<?php echo"$agent_id"; ?>"><div  class="single_agent_image"><img src="user_profile_images/<?php echo"$agent_image"; ?>" width="100%" height="100%" style="cursor:pointer;" /></div></a>
 
<?php  } ?>

<div class="single_agent_name"><?php echo"$agent_fname";echo" "; echo"$agent_lname"; ?></div>

<a href="singl_agent.php?my_agent_id=<?php echo"$agent_id"; ?>"><div  class="more_about_agent">More About The Agent</div></a>
<div id="<?php echo $id_user ?>" onClick="show_agent_contact(this.id);" class="call_agent">Call Agent</div>

<div id="agent_contact_output<?php echo $id_user ?>" class="agent_contact_output"><?php echo"$agent_tel"; ?></div>


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

	<?php } } ?>


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





<div id="new_agent_acc_div" class="content_area">

<form method="post" >

<div class="log_in_title">Join Agent Department</div>

<input type="text" id="cpr_passport_no" name="cpr_passport_no" class="name_input" placeholder="Enter Cpr no." />

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

<button id="create_agent_ac_btn" onClick="create_agent_account();" name="create_agent_account" class="create_ac_btn"  style="display:none;" >Finish</button>

</form>
<button id="next_agent_acc_btn" onClick="next_agent_account();"  class="create_ac_btn" >Next</button>
<script>
function next_agent_account()
{
  var national_id = document.getElementById('cpr_passport_no').value;
  var cpr_pass_lenght = national_id.length;


 if(national_id =="" ){
	 
document.getElementById('create_agent_acc_output').style="display:block;color:red;"
document.getElementById('create_agent_acc_output').innerHTML="Fill All The Spaces";

}else if(cpr_pass_lenght < 6){

document.getElementById('create_agent_acc_output').style="display:block;color:red;"
document.getElementById('create_agent_acc_output').innerHTML="Invalid Cpr no.";	

}else{
	document.getElementById('next_agent_acc_btn').style.display="none";
	document.getElementById('create_agent_ac_btn').style.display="block";
	document.getElementById('create_agent_acc_output').style="display:block;color:green;"
	document.getElementById('create_agent_acc_output').innerHTML=" Check Your Details And Click Finish.";
	//alert(national_id);
	}
}



</script>

<?php
if(isset($_POST['create_agent_account']))
{
	
	$national_id = $_POST['cpr_passport_no'];
	
//Here am checking to see if the person is an Admin to add in agents	
if(isset($_SESSION['id']))
{
		$my_id = $_SESSION['id'];

	
	$get_user ="select * from khalaf_admintb where user_id_adm='$my_id' ";
	$run_get_user = mysqli_query($con,$get_user);
	$check_user = mysqli_num_rows($run_get_user);
	

	
	if($check_user <1){echo"<div style='float:left;width:100%;text-align:center;color:red;'>Contact Your Admin</div>";}else{

	
	
	
	//$get_user_info ="select * from khalaf_usertb where id='$my_id' AND contact='$national_id' ";
	$get_user_info ="select * from khalaf_usertb where user_cpr='$national_id' ";
	$run_user_info = mysqli_query($con,$get_user_info);
	$check_user_info = mysqli_num_rows($run_user_info);

if($check_user_info < 1){
	
	echo"<div style='float:left;width:100%;text-align:center;color:red;'>Check Your contact or Id no and Try Again</div>";
	?>
	
	<script>
	document.getElementById('new_agent_acc_div').style.display="block";
	document.getElementById('disp_agent_area').style.display="none";

	</script>
	
	<?php
	
    }else{
					
	$get_user ="select * from khalaf_agenttb where user_id='$national_id'";
	$run_get_user = mysqli_query($con,$get_user);
	$check_get_user = mysqli_num_rows($run_get_user);
					
	if($check_get_user >0){
		echo"<div style='float:left;width:100%;text-align:center;color:red;'>Your Information Is Incorrect Try Again</div>";
	}else{				
	
	$user_insert ="insert into khalaf_agenttb (user_id,cpr_no,country,city,curr_date,curr_time) values('$my_id','$national_id','Bahrain','Manama', CURDATE() ,CURTIME() )";
	$run_user_insert = mysqli_query($con,$user_insert);
	
	if(!$run_user_insert){echo"<div style='float:left;width:100%;text-align:center;color:red;'>Your Account Has Not Been Created</div>";}
}

}
}
}
}
?>

</div>








<div class="main_remmie">@Khalaf Sons Real Estate</div>

</body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit