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

			<!-- page template area start -->
			<section id="about">
				<div class="container mt-0 pb-0 pt-0">
					<div class="col-lg-12">
    					<div class="row ">
    					    <h1 class="title mt-5 mb-0" style="text-align:center;">My Referrals</h1>
    					    <p class="text-center mb-10" style="color:#888; font-size:14px;">People who registed by using my Referral Code</p>
    					    <?php
        					$sql_ref = "SELECT * FROM `sc_users` WHERE `ref_user_id` = '".$_SESSION['USER_ID']."' ORDER BY `user_id` ASC";
        					$exe_ref = mysqli_query($connection,$sql_ref);
        					$num_ref = mysqli_num_rows($exe_ref);
        					if($num_ref>0)
        					{
        					while($arr_ref = mysqli_fetch_array($exe_ref))
        					{
        					?>
    					    <div class="mb-15 p-10" style="border:1px solid #ccc; border-radius:5px; background:#f1f1f1;">
        						    <h4 class="mt-0 mb-0 text-left"><?php echo stripslashes($arr_ref['full_name']);?></h4>
        						    <p><i class="fa fa-phone"></i> <?php echo stripslashes($arr_ref['phone']);?></p>
    						</div>
    						<?php
        					}
        					}
        					else
        					{
        					?>
        					<div class="" style="color:#ff0000; text-align:center;">No member found!</div>
        					<?php
        					}
        					?>
    					</div>
					</div>
				</div>
			</section>
			
			
			<!-- page template area end -->
  
<?php require_once("footer.php");?>