<?
	if($user_status > 0 and $user_blokir == 0) {
?>

<?
$mid=$user_session;
?>
<style type="text/css">
<!--
.style1 {
	font-size: 24px;
	font-weight: bold;
	font-family: Verdana, Arial, Helvetica, sans-serif;
}
.style2 {font-size: 12px}
-->
                      </style>
<h4 align="center"> <?
		$lv=1;
		for($i=0;$i<$lv;$i++) 
			$j = $i + 1;
			$ja = $db->jmlmember($mid, "a.status=1 and b.upline$i='$user_session'"); //jml mbr aktif per level
			$jf = $db->jmlmember($mid, "a.status=0 and blokir=0 and b.upline$i='$user_session'"); //jml mbr free per level
			$jb = $db->jmlmember($mid, "a.blokir=1 and b.upline$i='$user_session'"); //jml mbr blokir per level
			
 
			$db->select("a.username, a.nama, a.status, a.blokir, a.hp, a.phone, a.email, a.poin, a.tglaktif, a.upline, b.sponsor", "banner_kanan as a inner join upline as b on a.username=b.username", "b.upline$i='$user_session'");
	$sqlpengunjung="select sum(poin) kunjung from banner_kanan";
    $resultpengunjung = mysql_query($sqlpengunjung);
    $pengunjung=mysql_fetch_object($resultpengunjung);
    $totalpengunjung=$pengunjung->kunjung;
	$poinpri = $db->dataku("poin", $user_session);
?>
</h4>
<div style="width: 98%; padding: 2px; margin: 0;">
              <div class="newsItem"><strong>
         <span style="color:#006600">
              </span></strong>
                <div style="display:yes;">
 
                      
 
  <p align="center" class="style1">Qualifikasi Reward  Poin Pribadi :</p>
  <table width="82%" border="1" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td width="41%" height="35" bgcolor="#66FF66"><div align="center">Username</div></td>
      <td width="25%" bgcolor="#66FF66"><div align="center">Total Poin Pribadi </div></td>
    </tr>
    <tr>
      <td height="33"><div align="center"><? echo $user_session; ?></div></td>
      <td><div align="center"> <?= $poinpri ?>
      </div></td>
    </tr>
  </table>
  <p align="center" class="style1">
  </p>
    <?
$kiri=$poinpri;
$kpp1=$db->config("kpp1");

$kpp2=$db->config("kpp2");

$kpp3=$db->config("kpp3");

$kpp4=$db->config("kpp4");

$kpp5=$db->config("kpp5");

$kpp6=$db->config("kpp6");

$kpp7=$db->config("kpp7");

$kpp8=$db->config("kpp8");


$myrwd1=$db->dataku("rpoinp1", $user_session);
if($myrwd1<1) {
$status1="<img src='images/publish_x.png' width='16' height='16' />";
} else {
$status1="<img src='images/tick.png' width='16' height='16' />";
}

$myrwd2=$db->dataku("rpoinp2", $user_session);
if($myrwd2<1) {
$status2="<img src='images/publish_x.png' width='16' height='16' />";
} else {
$status2="<img src='images/tick.png' width='16' height='16' />";
}

$myrwd3=$db->dataku("rpoinp3", $user_session);
if($myrwd3<1) {
$status3="<img src='images/publish_x.png' width='16' height='16' />";
} else {
$status3="<img src='images/tick.png' width='16' height='16' />";
}

$myrwd4=$db->dataku("rpoinp4", $user_session);
if($myrwd4<1) {
$status4="<img src='images/publish_x.png' width='16' height='16' />";
} else {
$status4="<img src='images/tick.png' width='16' height='16' />";
}

$myrwd5=$db->dataku("rpoinp5", $user_session);
if($myrwd5<1) {
$status5="<img src='images/publish_x.png' width='16' height='16' />";
} else {
$status5="<img src='images/tick.png' width='16' height='16' />";
}

$myrwd6=$db->dataku("rpoinp6", $user_session);
if($myrwd6<1) {
$status6="<img src='images/publish_x.png' width='16' height='16' />";
} else {
$status6="<img src='images/tick.png' width='16' height='16' />";
}

$myrwd7=$db->dataku("rpoinp7", $user_session);
if($myrwd7<1) {
$status7="<img src='images/publish_x.png' width='16' height='16' />";
} else {
$status7="<img src='images/tick.png' width='16' height='16' />";
}

$myrwd8=$db->dataku("rpoinp8", $user_session);
if($myrwd8<1) {
$status8="<img src='images/publish_x.png' width='16' height='16' />";
} else {
$status8="<img src='images/tick.png' width='16' height='16' />";
}

if($kiri>=$kpp1) {
$rpoinp1="Qualified";
$ambil1= "<span style='font-size: 12px;'><a href='?m=ambilrpoinp1''><strong>CAIRKAN</strong></a></span>";
} else {
$rpoinp1="Belum Qualified";
$ambil1= "<strong>CAIRKAN</strong>";
}


if($kiri>=$kpp2) {
$rpoinp2="Qualified";
$ambil2= "<span style='font-size: 12px;'><a href='?m=ambilrpoinp2''><strong>CAIRKAN</strong></a></span>";
} else {
$rpoinp2="Belum Qualified";
$ambil2= "<strong>CAIRKAN</strong>";
}

if($kiri>=$kpp3) {
$rpoinp3="Qualified";
$ambil3= "<span style='font-size: 12px;'><a href='?m=ambilrpoinp3''><strong>CAIRKAN</strong></a></span>";
} else {
$rpoinp3="Belum Qualified";
$ambil3= "<strong>CAIRKAN</strong>";
}

if($kiri>=$kpp4) {

$rpoinp4="Qualified";
$ambil4= "<span style='font-size: 12px;'><a href='?m=ambilrpoinp4''><strong>CAIRKAN</strong></a></span>";
} else {
$rpoinp4="Belum Qualified";
$ambil4= "<strong>CAIRKAN</strong>";
}

if($kiri>=$kpp5) {
$rpoinp5="Qualified";
$ambil5= "<span style='font-size: 12px;'><a href='?m=ambilrpoinp5''><strong>CAIRKAN</strong></a></span>";
} else {
$rpoinp5="Belum Qualified";
$ambil5= "<strong>CAIRKAN</strong>";
}

if($kiri>=$kpp6) {
$rpoinp6="Qualified";
$ambil6= "<span style='font-size: 12px;'><a href='?m=ambilrpoinp6''><strong>CAIRKAN</strong></a></span>";
} else {
$rpoinp6="Belum Qualified";
$ambil6= "<strong>CAIRKAN</strong>";
}

if($kiri>=$kpp7) {
$rpoinp7="Qualified";
$ambil7= "<span style='font-size: 12px;'><a href='?m=ambilrpoinp7''><strong>CAIRKAN</strong></a></span>";
} else {
$rpoinp7="Belum Qualified";
$ambil7= "<strong>CAIRKAN</strong>";
}

if($kiri>=$kpp8) {
$rpoinp8="Qualified";
$ambil8= "<span style='font-size: 12px;'><a href='?m=ambilrpoinp8''><strong>CAIRKAN</strong></a></span>";
} else {
$rpoinp8="Belum Qualified";
$ambil8= "<strong>CAIRKAN</strong>";
}

?>
  </p>
  <table width="566" border="1" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td width="88" height="37" bgcolor="#FFCC99"><div align="center"><strong>Reward</strong></div></td>
      <td width="55" bgcolor="#FFCC99"><div align="center"><strong>Poin</strong></div></td>
      <td width="112" bgcolor="#FFCC99"><div align="center"><strong>Pencapaian</strong></div></td>
      <td width="125" bgcolor="#FFCC99"><div align="center"><strong>Bonus Reward </strong></div></td>
      <td width="84" bgcolor="#FFCC99"><div align="center"><strong>Ambil Reward </strong></div></td>
      <td width="88" bgcolor="#FFCC99"><div align="center"><strong>Status Withdrawl </strong></div></td>
    </tr>
    <tr>
      <td height="35"><div align="center">Reward-1</div></td>
      <td><div align="center"><span class="style2">
        <?= $db->config("kpp1"); ?>
      </span></div></td>
      <td><div align="center"><span class="style2">
        <?= $rpoinp1; ?>
      </span></div></td>
      <td><div align="center">
        <?= $db->config("rpoinp1"); ?>
     </div></td>
      <td><div align="center">
        <?= $ambil1; ?>
      </div></td>
      <td><div align="center">
        <?= $status1; ?>
      </div></td>
    </tr>
    <tr>
      <td height="35"><div align="center">Reward-2</div></td>
      <td><div align="center"><span class="style2">
        <?= $db->config("kpp2"); ?>
      </span></div></td>
      <td><div align="center"><span class="style2">
        <?= $rpoinp2; ?>
      </span></div></td>
      <td><div align="center">
        <?= $db->config("rpoinp2"); ?>
      </div></td>
      <td><div align="center">
        <?= $ambil2; ?>
      </div></td>
      <td><div align="center">
        <?= $status2; ?>
      </div></td>
    </tr>
    <tr>
      <td height="35"><div align="center">Reward-3</div></td>
      <td><div align="center"><span class="style2">
          <?= $db->config("kpp3"); ?>
      </span></div></td>
      <td><div align="center"><span class="style2">
          <?= $rpoinp3; ?>
      </span></div></td>
      <td><div align="center">
          <?= $db->config("rpoinp3"); ?>
      </div></td>
      <td><div align="center">
          <?= $ambil3; ?>
      </div></td>
      <td><div align="center">
        <?= $status3; ?>
      </div></td>
    </tr>
    <tr>
      <td height="35"><div align="center">Reward-4</div></td>
      <td><div align="center"><span class="style2">
          <?= $db->config("kpp4"); ?>
      </span></div></td>
      <td><div align="center"><span class="style2">
          <?= $rpoinp4; ?>
      </span></div></td>
      <td><div align="center">
          <?= $db->config("rpoinp4"); ?>
      </div></td>
      <td><div align="center">
          <?= $ambil4; ?>
      </div></td>
      <td><div align="center">
        <?= $status4; ?>
      </div></td>
    </tr>
    <tr>
      <td height="35"><div align="center">Reward-5</div></td>
      <td><div align="center"><span class="style2">
          <?= $db->config("kpp5"); ?>
      </span></div></td>
      <td><div align="center"><span class="style2">
          <?= $rpoinp5; ?>
      </span></div></td>
      <td><div align="center">
          <?= $db->config("rpoinp5"); ?>
      </div></td>
      <td><div align="center">
          <?= $ambil5; ?>
      </div></td>
      <td><div align="center">
          <?= $status5; ?>
      </div></td>
    </tr>
    <tr>
      <td height="35"><div align="center">Reward-6</div></td>
      <td><div align="center"><span class="style2">
          <?= $db->config("kpp6"); ?>
      </span></div></td>
      <td><div align="center"><span class="style2">
          <?= $rpoinp6; ?>
      </span></div></td>
      <td><div align="center">
          <?= $db->config("rpoinp6"); ?>
      </div></td>
      <td><div align="center">
          <?= $ambil6; ?>
      </div></td>
      <td><div align="center">
          <?= $status6; ?>
      </div></td>
    </tr>
    <tr>
      <td height="35"><div align="center">Reward-7</div></td>
      <td><div align="center"><span class="style2">
          <?= $db->config("kpp7"); ?>
      </span></div></td>
      <td><div align="center"><span class="style2">
          <?= $rpoinp7; ?>
      </span></div></td>
      <td><div align="center">
          <?= $db->config("rpoinp7"); ?>
      </div></td>
      <td><div align="center">
          <?= $ambil7; ?>
      </div></td>
      <td><div align="center">
          <?= $status7; ?>
      </div></td>
    </tr>
    <tr>
      <td height="35"><div align="center">Reward-8</div></td>
      <td><div align="center"><span class="style2">
          <?= $db->config("kpp8"); ?>
      </span></div></td>
      <td><div align="center"><span class="style2">
          <?= $rpoinp8; ?>
      </span></div></td>
      <td><div align="center">
          <?= $db->config("rpoinp8"); ?>
      </div></td>
      <td><div align="center">
          <?= $ambil8; ?>
      </div></td>
      <td><div align="center">
          <?= $status8; ?>
      </div></td>
    </tr>
  </table>
  <p align="center" class="style1">&nbsp;</p>
</div>
<?

 
} else {
echo "<meta http-equiv=\"refresh\" content=\"1; url=http://killerjo.net\">";
}
?>