<?php 
require_once("header.php");
require_once("session_check.php");

//FETCH DATA FROM DATABASE
$fetch_record = mysqli_fetch_array(mysqli_query($connection,"SELECT * FROM `pd_brokers` WHERE `user_id` = '".$_REQUEST['user_id']."'"));
?>

<?php require_once("left_panel.php");?>
<div class="content">
	<div class="workplace">
		<div class="row-fluid">
			<div class="span12">
				<div class="head clearfix">
					<div class="isw-documents"></div>					
					<h1>Broker Details</h1>					
				</div>
				<form action="" method="post" enctype="multipart/form-data">
				<div class="block-fluid">
					<div class="row-form clearfix">
						<div class="span3">Photo</div>
						<div class="span9"><img src="../uploads/broker/<?php echo $fetch_record['profile_photo'];?>" alt="" height="100" width="100"></div>
					</div>
					<div class="row-form clearfix">
						<div class="span3">Code</div>
						<div class="span9"><?php echo stripslashes($fetch_record['broker_code']);?></div>
					</div>
					<div class="row-form clearfix">
						<div class="span3">First Name</div>
						<div class="span9"><?php echo stripslashes($fetch_record['fname']);?></div>
					</div>
					<div class="row-form clearfix">
						<div class="span3">Last Name</div>
						<div class="span9"><?php echo stripslashes($fetch_record['lname']);?></div>
					</div>
					<div class="row-form clearfix">
						<div class="span3">Phone No.</div>
						<div class="span9"><?php echo stripslashes($fetch_record['phone']);?></div>
					</div>
					<div class="row-form clearfix">
						<div class="span3">Email Address</div>
						<div class="span9"><?php echo stripslashes($fetch_record['email']);?></div>
					</div>
					<div class="row-form clearfix">
						<div class="span3">Address</div>
						<div class="span9"><?php echo stripslashes($fetch_record['address']);?></div>
					</div>
					<div class="row-form clearfix">
						<div class="span3">Area/Location</div>
						<div class="span9"><?php echo stripslashes($fetch_record['area']);?></div>
					</div>
					<div class="row-form clearfix">
						<div class="span3">Pincode</div>
						<div class="span9"><?php echo stripslashes($fetch_record['zip']);?></div>
					</div>
					<div class="row-form clearfix">
						<div class="span3">Registration Date</div>
						<div class="span9"><?php echo date('d.m.Y h:i A',strtotime($fetch_record['registration_date']));?></div>                            
					</div>
				</div>
				<div>&nbsp;</div>
				<div class="head clearfix">
					<div class="isw-documents"></div>					
					<h1>KYC Details</h1>					
				</div>
				<div class="block-fluid">
				    <div class="row-form clearfix">
						<div class="span3">Aadhar Card Frontside</div>
						<div class="span9"><a href="../uploads/broker/<?php echo $fetch_record['aadhar_front'];?>" target="_blank">Click to open</a></div>
					</div>
					<div class="row-form clearfix">
						<div class="span3">Aadhar Card Backside</div>
						<div class="span9"><a href="../uploads/broker/<?php echo $fetch_record['aadhar_back'];?>" target="_blank">Click to open</a></div>
					</div>
					<div class="row-form clearfix">
						<div class="span3">&nbsp;</div>
						<div class="span9">						
							<button class="btn" type="button" name="back" onclick="window.location.href='user_list.php'">Back To Brokers List</button>
						</div>
					</div>
				</div>
				</form>
			</div>
		</div>
	</div>
</div> 

<?php require_once("footer.php"); ?>