<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">

<link href="./assets/image/favicon.png" rel="icon">
<title>DigiX Associate Plus</title>

<?php
 $adm_sql = mysqli_query($con, "SELECT * FROM users WHERE uid = '$_SESSION[uid]' ");
 if($adm_row = mysqli_fetch_assoc($adm_sql)){
    $utype = $adm_row["utype"];
    if($utype == "Sub Associate"){
        $admin_ref = $adm_row["admin_ref"];
        $assSql = mysqli_query($con, "SELECT * FROM users WHERE uref_code = '$admin_ref' ");
        if($assRow = mysqli_fetch_assoc($assSql)){
            $associateUid = $assRow["uid"];
            $uadmin = $assRow["uadmin"];
            $admin_ref = $assRow["admin_ref"];
        }
    }
 }
?>