<?php session_start();?>
<?php error_reporting(0);?>

<!--Connection start here-->
<?php include_once("../Header/Connection.php"); ?>
<!--Connect end here-->

<?php

$user_id=$_SESSION['id'];
$sponsor_code=$_SESSION['sponsor_code'];
$ref_code=$_SESSION['ref_code'];
$level = $_SESSION['level'];
$rank = $_SESSION['rank'];
$email=$_SESSION['email'];
$name=$_SESSION['name'];
$last_name = $row['last_name'];
$phone_number=$_SESSION['phone_number'];
$profile_image=$_SESSION['profile_image'];
$activation_status=$_SESSION['activation_status'];

if (!isset($_SESSION['ref_code'])) 
{
 echo "<script type='text/javascript'> document.location='https://mygoldsdnbhd.com/log-masuk/'; </script>";
} 
?>

<?php

$sql = "SELECT * FROM user
WHERE ref_code='$ref_code'
And status='1'";
$result = $mysqli->query($sql);
if ($result->num_rows > 0)
{
	$row = $result ->fetch_assoc();
	$sponsor_code = $row['sponsor_code'];
	$ref_code = $row['ref_code'];
	$name = $row['name'];
	$level = $row['level'];
    $facebook_link = $row['facebook_link'];
    $whatsapp_link = $row['whatsapp_link'];
    $instagram_link = $row['instagram_link'];
    $linkedin_link = $row['linkedin_link'];
    $twitter_link = $row['twitter_link'];
    $youtube_link = $row['youtube_link'];
    $tiktok_link = $row['tiktok_link'];
}
?>
<!DOCTYPE html>
<html lang="en">
<?php include ("../Header/head.php"); ?>
<body class="skin-default fixed-layout">

    <!-- Preloader Start -->
    <?php include ("../Header/loader.php"); ?>
    <!-- Preloader End -->
   
    <!-- Main wrapper - style you can find in pages.scss -->
    <div id="main-wrapper">    
        <?php include ("../Header/header.php"); ?>
        <?php include ("../Header/left_menu.php"); ?>
        <?php include ("../Header/right_sidebar.php"); ?>
        
        <!-- Page wrapper  -->
        <div class="page-wrapper">
            <!-- Container fluid  -->
            <div class="container-fluid">

                <!-- Bread crumb and right sidebar toggle -->
                <!--?php include ("../Header/breadcumb.php"); ?-->
                <br><br>
                <!-- End Bread crumb and right sidebar toggle -->
               <?php include ("admin_dashboard_design.php"); ?>
                
            </div>
            <!-- End Container fluid  -->
        </div>
        <!-- End Page wrapper  -->

        <!-- Footer Start-->
        <!--?php include ("../Footer/footer.php"); ?-->
        <!-- Footer End-->

    </div>
    <!-- End Wrapper -->
    <!-- All Jquery -->
    

     <!-- All Jquery Start-->
    <?php include ("../Header/all_jquery_and_dashboard.php"); ?>
    <!-- All Jquery End-->

</body>

</html>