<?php 
if (empty($_GET['id'])) {
	header("Location: " . Wo_SeoLink('index.php?link1=welcome'));
    exit();
}
if (!is_numeric($_GET['id'])) {
	header("Location: " . Wo_SeoLink('index.php?link1=welcome'));
    exit();
}
$user_data = Wo_UserData($_GET['id']);
if (empty($user_data)) {
	header("Location: " . Wo_SeoLink('index.php?link1=welcome'));
    exit();
}
?>
<div class="container-fluid">
    <div>
        <h3>Referrals</h3>
        <nav aria-label="breadcrumb">
            <ol class="breadcrumb">
                <li class="breadcrumb-item">
                    <a href="#">Home</a>
                </li>
                <li class="breadcrumb-item">
                    <a href="#">Users</a>
                </li>
                <li class="breadcrumb-item">
                    <a href="#">Affiliates System</a>
                </li>
                <li class="breadcrumb-item active" aria-current="page">Referrals</li>
            </ol>
        </nav>
    </div>
    <div class="row">
        <div class="col-lg-12 col-md-12">
            <div class="card">
                <div class="card-body">
                  <h6 class="card-title">Referrals From The User: <?php echo $user_data['name']?></h6>
                   <div class="table-responsive1">
                        <table class="table table-bordered table-striped table-hover">
                            <thead>
                                <tr>
                                      <th>ID</th>
					                  <th>Username</th>
					                  <th>Source</th>
					                  <th>E-mail</th>
					                  <th>IP Address</th>
					                  <th>Status</th>
                                </tr>
                            </thead>
                            <tbody>
                              <?php 
                              foreach (Wo_GetReferrers($_GET['id']) as $wo['userlist']) {
                                  echo Wo_LoadAdminPage('referrals-list/list');
                              }
                              ?>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
        <div class="clearfix"></div>
    </div>
    </div>
    <!-- #END# Vertical Layout -->