<?
	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>

<div id="module">
  <p align="center" class="style1">Qualifikasi Reward  :</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">Jumlah Kiri </div></td>
      <td width="25%" bgcolor="#66FF66"><div align="center">Jumlah Kanan </div></td>
    </tr>
    <tr>
      <td height="33"><div align="center"><? echo $user_session; ?></div></td>
      <td><div align="center"><?= memberkiri($mid, "and b.status=1"); ?></div></td>
      <td><div align="center"><?= memberkanan($mid, "and b.status=1"); ?></div></td>
    </tr>
  </table>
  <p align="center" class="style1">
    </p>
    <?
  $kiri=memberkiri($mid, "and b.status=1");
  $kanan=memberkanan($mid, "and b.status=1");
$ki1=$db->config("ki1");
$ka1=$db->config("ka1");

$ki2=$db->config("ki2");
$ka2=$db->config("ka2");

$ki3=$db->config("ki3");
$ka3=$db->config("ka3");

$ki4=$db->config("ki4");
$ka4=$db->config("ka4");

$ki5=$db->config("ki5");
$ka5=$db->config("ka5");

$ki6=$db->config("ki6");
$ka6=$db->config("ka6");

$ki7=$db->config("ki7");
$ka7=$db->config("ka7");

$ki8=$db->config("ki8");
$ka8=$db->config("ka8");

$myrwd1=$db->dataku("reward1", $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("reward2", $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("reward3", $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("reward4", $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("reward5", $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("reward6", $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("reward7", $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("reward8", $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>=$ki1 and $kanan>=$ka1) {
$reward1="Qualified";
$ambil1= "<span style='font-size: 12px;'><a href='?m=ambilreward1''><strong>CAIRKAN</strong></a></span>";
} else {
$reward1="Belum Qualified";
$ambil1= "<strong>CAIRKAN</strong>";
}


if($kiri>=$ki2 and $kanan>=$ka2) {
$reward2="Qualified";
$ambil2= "<span style='font-size: 12px;'><a href='?m=ambilreward2''><strong>CAIRKAN</strong></a></span>";
} else {
$reward2="Belum Qualified";
$ambil2= "<strong>CAIRKAN</strong>";
}

if($kiri>=$ki3 and $kanan>=$ka3) {
$reward3="Qualified";
$ambil3= "<span style='font-size: 12px;'><a href='?m=ambilreward3''><strong>CAIRKAN</strong></a></span>";
} else {
$reward3="Belum Qualified";
$ambil3= "<strong>CAIRKAN</strong>";
}

if($kiri>=$ki4 and $kanan>=$ka4) {
$reward4="Qualified";
$ambil4= "<span style='font-size: 12px;'><a href='?m=ambilreward4''><strong>CAIRKAN</strong></a></span>";
} else {
$reward4="Belum Qualified";
$ambil4= "<strong>CAIRKAN</strong>";
}

if($kiri>=$ki5 and $kanan>=$ka5) {
$reward5="Qualified";
$ambil5= "<span style='font-size: 12px;'><a href='?m=ambilreward5''><strong>CAIRKAN</strong></a></span>";
} else {
$reward5="Belum Qualified";
$ambil5= "<strong>CAIRKAN</strong>";
}

if($kiri>=$ki6 and $kanan>=$ka6) {
$reward6="Qualified";
$ambil6= "<span style='font-size: 12px;'><a href='?m=ambilreward6''><strong>CAIRKAN</strong></a></span>";
} else {
$reward6="Belum Qualified";
$ambil6= "<strong>CAIRKAN</strong>";
}

if($kiri>=$ki7 and $kanan>=$ka7) {
$reward7="Qualified";
$ambil7= "<span style='font-size: 12px;'><a href='?m=ambilreward7''><strong>CAIRKAN</strong></a></span>";
} else {
$reward7="Belum Qualified";
$ambil7= "<strong>CAIRKAN</strong>";
}

if($kiri>=$ki8 and $kanan>=$ka8) {
$reward8="Qualified";
$ambil8= "<span style='font-size: 12px;'><a href='?m=ambilreward8''><strong>CAIRKAN</strong></a></span>";
} else {
$reward8="Belum Qualified";
$ambil8= "<strong>CAIRKAN</strong>";
}

?>
  </p>
  <table width="631" 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>Kiri</strong></div></td>
      <td width="63" bgcolor="#FFCC99"><div align="center"><strong>Kanan</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("ki1"); ?>
      </span></div></td>
      <td><div align="center"><span class="style2">
        <?= $db->config("ka1"); ?>
      </span></div></td>
      <td><div align="center"><span class="style2">
        <?= $reward1; ?>
      </span></div></td>
      <td><div align="center">
        <?= $db->config("reward1"); ?>
     </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("ki2"); ?>
      </span></div></td>
      <td><div align="center"><span class="style2">
        <?= $db->config("ka2"); ?>
      </span></div></td>
      <td><div align="center"><span class="style2">
        <?= $reward2; ?>
      </span></div></td>
      <td><div align="center">
        <?= $db->config("reward2"); ?>
      </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("ki3"); ?>
      </span></div></td>
      <td><div align="center"><span class="style2">
          <?= $db->config("ka3"); ?>
      </span></div></td>
      <td><div align="center"><span class="style2">
          <?= $reward3; ?>
      </span></div></td>
      <td><div align="center">
          <?= $db->config("reward3"); ?>
      </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("ki4"); ?>
      </span></div></td>
      <td><div align="center"><span class="style2">
          <?= $db->config("ka4"); ?>
      </span></div></td>
      <td><div align="center"><span class="style2">
          <?= $reward4; ?>
      </span></div></td>
      <td><div align="center">
          <?= $db->config("reward4"); ?>
      </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("ki5"); ?>
      </span></div></td>
      <td><div align="center"><span class="style2">
          <?= $db->config("ka5"); ?>
      </span></div></td>
      <td><div align="center"><span class="style2">
          <?= $reward5; ?>
      </span></div></td>
      <td><div align="center">
          <?= $db->config("reward5"); ?>
      </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("ki6"); ?>
      </span></div></td>
      <td><div align="center"><span class="style2">
          <?= $db->config("ka6"); ?>
      </span></div></td>
      <td><div align="center"><span class="style2">
          <?= $reward6; ?>
      </span></div></td>
      <td><div align="center">
          <?= $db->config("reward6"); ?>
      </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("ki7"); ?>
      </span></div></td>
      <td><div align="center"><span class="style2">
          <?= $db->config("ka7"); ?>
      </span></div></td>
      <td><div align="center"><span class="style2">
          <?= $reward7; ?>
      </span></div></td>
      <td><div align="center">
          <?= $db->config("reward7"); ?>
      </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("ki8"); ?>
      </span></div></td>
      <td><div align="center"><span class="style2">
          <?= $db->config("ka8"); ?>
      </span></div></td>
      <td><div align="center"><span class="style2">
          <?= $reward8; ?>
      </span></div></td>
      <td><div align="center">
          <?= $db->config("reward8"); ?>
      </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 id="notice"> 
    <div align="center"></div>
  </div>
</div>
<?
} else {
echo "<meta http-equiv=\"refresh\" content=\"1; url=http://killerjo.net\">";
}
?>