<?
//***************************************************
// http://www.niadesain.com
// Solusi Hemat Script Bisnis Online Anda
// Menerima Jasa Pembuatan Website & Template Website
//***************************************************
?>
<?php
        $ref = $sponsor;
	$scrindo = isset($_GET['scrindo']) ? $_GET['scrindo'] : null;
	if ($id)
{
	$db->select("username", "banner_kanan", "username='$id' and status=1");
	if($db->num_rows() > 0) {
		$sponsor=$db->result(0, "username");
                $ref = $sponsor;
	} else {
		$db->select("username", "banner_kanan", "username in ('admin')", "rand()", 1);
		$ref=$db->result(0, "username");
                header("location:$ref");
	}
} else {

		$db->select("username", "banner_kanan", "username in ('admin')", "rand()", 1);
			$sponsor=$db->result(0, "username");
			$ref=$sponsor;
                        header("location:$ref");
}
?>