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

<?php
$getUser = mysqli_fetch_array(mysqli_query($connection,"SELECT * FROM `sc_users` WHERE `user_id` = '".$_SESSION['USER_ID']."'"));

$num_orders = mysqli_num_rows(mysqli_query($connection,"SELECT * FROM `sc_orders` WHERE `user_id` = '".$_SESSION['USER_ID']."' AND `consultation_charge_paid` = 'Yes'"));
?>

		<!-- content area start -->
		<section id="about">
			<div class="container mt-0 pb-0 pt-5">	
				<div class="row">
					<div class="col-lg-12">
					 <h1 class="title mt-0 mb-5" style="text-align:center;">My Account</h1>
						<div class="row">
							<div class="">
								<div class="col-md-2 col-xs-3">			    
								<img src="images/nophoto.png" alt="" width="85" height="70" style="border-radius: 50%; border:2px solid #d5daed;">
								</div>
								<div class="col-md-10 col-xs-9">
								    <div style="text-align:left; font-size:15px; margin-bottom:5px;">
										<b><?php echo stripslashes($getUser['full_name']);?></b></div>
										<div style="text-align:left;  margin-bottom:5px; font-size:15px;">
										<i class="fa fa-phone"></i> <?php echo stripslashes($getUser['phone']);?></div>
										<div style="text-align:left; font-size:13px;">
										<i class="fa fa-envelope"></i> <?php echo stripslashes($getUser['email']);?></div>
										<div style="text-align:left; font-size:13px;">
										Referral Code : <?php echo stripslashes($getUser['ref_code']);?></div>
								</div>
						    </div>
						</div>
					    <div>&nbsp;</div>
						<div class="row">
						    <div class="col-xs-2">&nbsp;</div>
						    <div class="col-md-4 col-xs-8">
						        <a href="my-orders.php" style="color:#ffffff;">
						        <div style="border:1px solid #7e57c2; background:#7e57c2; border-radius:5px; text-align:center;">
						            <h1 style="font-size:27px; margin-bottom:5px; color:#fff;">&#8377; <?php echo $getUser['wallet_balance'];?></h1>
						            <p style="text-align:center; margin-bottom:20px;">Wallet Balance</p></a>
						        </div>
						    </div>
						    <div class="col-xs-2">&nbsp;</div>
					    </div>
					    <div>&nbsp;</div>
					    <div class="row">
						    <div class="col-xs-6">
						        <a href="my-orders.php" style="color:#ffffff;">
						        <div style="border:1px solid #42a5f5; background:#42a5f5; border-radius:5px; text-align:center;">
						            <h1 style="font-size:27px; margin-bottom:5px; color:#fff;"><?php echo $num_orders;?></h1>
						            <p style="text-align:center; margin-bottom:20px;">Bookings</p></a>
						        </div>
						    </div>
						    <div class="col-xs-6">
						        <a href="edit-profile.php" style="color:#ffffff;">
						        <div style="border:1px solid #42a5f5; background:#42a5f5; border-radius:5px; text-align:center;">
						            <i class="fa fa-edit" style="margin-top:20px; margin-bottom:8px; font-size:34px;"></i>
						            <p style="text-align:center; margin-bottom:20px;">Edit Profile</p></a>
						        </div>
						    </div>
					    </div>
				    </div>
				</div>
			</div>	
		</section>
		<!-- content area end -->

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