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

<?php include_once("../Header/Connection.php"); ?>

<?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 = $_SESSION['last_name'];
$nick_name = $_SESSION['nick_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">

    <?php include ("../Header/loader.php"); ?>
   
    <div id="main-wrapper">    
        <?php include ("../Header/header.php"); ?>
        <?php include ("../Header/left_menu.php"); ?>
        <?php include ("../Header/right_sidebar.php"); ?>
        
        <div class="page-wrapper">
            <div class="container-fluid">

                <?php include ("admin_dashboard_design.php"); ?>
                
            </div>
        </div>

    </div>
    
    <?php include ("../Header/all_jquery_and_dashboard.php"); ?>

</body>

</html>