<?
//*********************************************************************************
// Original Website By : Niadesain.com Di Jual melalui http://niadesain.com
// Please Call / SMS : 081384745483 (support@niadesain.com)
// Niadesain.com - Jasa Pembuatan Website Paling Murah dan Paling Lengkap
//*********************************************************************************
?>
<?
switch($page) {
	default :
?>

<h4 align="center">DATA DOWNLINE 
  <?
		$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
			
			if($ja > 0 or $jf > 0) {
?>
</h4>
<div style="width: 98%; padding: 2px; margin: 0;">
              <div class="newsItem"><strong> Level 
              <?= $j; ?>
              : <span style="color:#006600">Aktif 
              <?= $ja; ?>
                </span> Orang</strong>
                <div style="display:yes;">
                      <?
$db->select("a.username, a.nama, a.status, a.blokir, a.hp, a.phone, a.email, 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 count(*), sum(poin) kunjung from banner_kanan as a inner join upline as b on a.username=b.username and b.upline$i='$user_session'"; 
    $resultpengunjung = mysql_query($sqlpengunjung);
    $pengunjung=mysql_fetch_object($resultpengunjung);
    $totalpengunjung1=$pengunjung->kunjung;
		?>
                  <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
      <tr>
        <td width="7%" align="center" bgcolor="#FFCCCC"><strong>#</strong></td>
        <td width="15%" align="center" bgcolor="#FFFFCC"><strong>Username </strong></td>
        <td width="23%" align="center" bgcolor="#66FFFF"><strong>Nama </strong></td>
        <td width="15%" align="center" bgcolor="#0066FF"><strong>Sponsor</strong></td>
        <td width="15%" align="center" bgcolor="#99CCCC"><strong>Upline</strong></td>
        
        <td width="14%" align="center" bgcolor="#FFFF99"><strong>No HP </strong></td>
		<td width="11%" align="center" bgcolor="#CCCCCC"><strong>Status</strong></td>
      </tr>
   <?
   		$n=1;
		while($row = $db->fetch_row()) {
			if($row[2] > 0) {
				$status = "AKTIF";
				$cl_status = "status_active";
			} else if($row[3] > 0) {
				$status = "BLOKIR";
				$cl_status = "status_blokir";	
			} else {
				$status = "FREE";
				$cl_status = "status_free";
			}			
   ?>  
	  <tr>
        <td bgcolor="#FFCCCC"><div align="center">
          <?= $n; ?>
        </div></td>
        <td bgcolor="#FFFFCC"><div align="center">
          <?= $row[0]; ?>
        </div></td>
        <td bgcolor="#66FFFF"><div align="center">
          <?= $row[1]; ?>
        </div></td>
        <td bgcolor="#0066FF"><div align="center">
          <?= $row[10]; ?>
        </div></td>
        <td bgcolor="#99CCCC"><div align="center">
          <?= $row[9]; ?>
        </div></td>
       
        <td bgcolor="#FFFF99"><div align="center">
          <?= $row[4]; ?>
		  
        <td bgcolor="#CCCCCC" class="<?= $cl_status; ?>" align="center"><div align="center">
          <?= $status; ?>
        </div></td>
      </tr>
	 <?
	 	$n++;
		 }
	 ?> 
    </table>
                  
                    <?= $totalpengunjung1; ?>
<br />
<?
		$lv=2;
		for($i=1;$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
			
			if($ja > 0 or $jf > 0) {
?>
      </div>
  </div>
  </div>
</div>
	
	  <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem"><strong> Level
              <?= $j; ?>
    : <span style="color:#006600">Aktif
    <?= $ja; ?>
    </span> Orang</strong>
            <div style="display:yes;">
              <?
$db->select("a.username, a.nama, a.status, a.blokir, a.hp, a.phone, a.email, 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 count(*), sum(poin) kunjung from banner_kanan as a inner join upline as b on a.username=b.username and b.upline$i='$user_session'"; 
    $resultpengunjung = mysql_query($sqlpengunjung);
    $pengunjung=mysql_fetch_object($resultpengunjung);
    $totalpengunjung2=$pengunjung->kunjung;
		?>
              <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
                <tr>
                  <td width="7%" align="center" bgcolor="#FFCCCC"><strong>#</strong></td>
                  <td width="15%" align="center" bgcolor="#FFFFCC"><strong>Username </strong></td>
                  <td width="23%" align="center" bgcolor="#66FFFF"><strong>Nama </strong></td>
                  <td width="15%" align="center" bgcolor="#0066FF"><strong>Sponsor</strong></td>
                  <td width="15%" align="center" bgcolor="#99CCCC"><strong>Upline</strong></td>
                  <td width="14%" align="center" bgcolor="#FFFF99"><strong>No HP </strong></td>
                  <td width="11%" align="center" bgcolor="#CCCCCC"><strong>Status</strong></td>
                </tr>
                <?
   		$n=1;
		while($row = $db->fetch_row()) {
			if($row[2] > 0) {
				$status = "AKTIF";
				$cl_status = "status_active";
			} else if($row[3] > 0) {
				$status = "BLOKIR";
				$cl_status = "status_blokir";	
			} else {
				$status = "FREE";
				$cl_status = "status_free";
			}			
   ?>
                <tr>
                  <td bgcolor="#FFCCCC"><div align="center">
                      <?= $n; ?>
                  </div></td>
                  <td bgcolor="#FFFFCC"><div align="center">
                      <?= $row[0]; ?>
                  </div></td>
                  <td bgcolor="#66FFFF"><div align="center">
                      <?= $row[1]; ?>
                  </div></td>
                  <td bgcolor="#0066FF"><div align="center">
                      <?= $row[10]; ?>
                  </div></td>
                  <td bgcolor="#99CCCC"><div align="center">
                      <?= $row[9]; ?>
                  </div></td>
                  <td bgcolor="#FFFF99"><div align="center">
                      <?= $row[4]; ?>
                    </div>
                  
                  <td bgcolor="#CCCCCC" class="<?= $cl_status; ?>" align="center"><div align="center">
                      <?= $status; ?>
                  </div></td>
                </tr>
                <?
	 	$n++;
		 }
	 ?>
              </table>
              
                  <?= $totalpengunjung2; ?>
                  <br />
          </div>
        </div>
        </div>
</div>
	  <?
		}
		}
	?>
	  <div style="width: 98%; padding: 2px; margin: 0;">
	    <div class="newsItem">
	      <div style="display:yes;">
	        <div align="center">
	          <?
		$lv=3;
		for($i=2;$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
			
			if($ja > 0 or $jf > 0) {
?>
            </div>
          </div>
        </div>
</div>
	  <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem"><strong> Level
              <?= $j; ?>
    : <span style="color:#006600">Aktif
    <?= $ja; ?>
    </span> Orang</strong>
            <div style="display:yes;">
              <?
$db->select("a.username, a.nama, a.status, a.blokir, a.hp, a.phone, a.email, 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 count(*), sum(poin) kunjung from banner_kanan as a inner join upline as b on a.username=b.username and b.upline$i='$user_session'"; 
    $resultpengunjung = mysql_query($sqlpengunjung);
    $pengunjung=mysql_fetch_object($resultpengunjung);
    $totalpengunjung3=$pengunjung->kunjung;
		?>
              <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
                <tr>
                  <td width="7%" align="center" bgcolor="#FFCCCC"><strong>#</strong></td>
                  <td width="15%" align="center" bgcolor="#FFFFCC"><strong>Username </strong></td>
                  <td width="23%" align="center" bgcolor="#66FFFF"><strong>Nama </strong></td>
                  <td width="15%" align="center" bgcolor="#0066FF"><strong>Sponsor</strong></td>
                  <td width="15%" align="center" bgcolor="#99CCCC"><strong>Upline</strong></td>
                  <td width="14%" align="center" bgcolor="#FFFF99"><strong>No HP </strong></td>
                  <td width="11%" align="center" bgcolor="#CCCCCC"><strong>Status</strong></td>
                </tr>
                <?
   		$n=1;
		while($row = $db->fetch_row()) {
			if($row[2] > 0) {
				$status = "AKTIF";
				$cl_status = "status_active";
			} else if($row[3] > 0) {
				$status = "BLOKIR";
				$cl_status = "status_blokir";	
			} else {
				$status = "FREE";
				$cl_status = "status_free";
			}			
   ?>
                <tr>
                  <td bgcolor="#FFCCCC"><div align="center">
                      <?= $n; ?>
                  </div></td>
                  <td bgcolor="#FFFFCC"><div align="center">
                      <?= $row[0]; ?>
                  </div></td>
                  <td bgcolor="#66FFFF"><div align="center">
                      <?= $row[1]; ?>
                  </div></td>
                  <td bgcolor="#0066FF"><div align="center">
                      <?= $row[10]; ?>
                  </div></td>
                  <td bgcolor="#99CCCC"><div align="center">
                      <?= $row[9]; ?>
                  </div></td>
                  <td bgcolor="#FFFF99"><div align="center">
                      <?= $row[4]; ?>
                    </div>
                  
                  <td bgcolor="#CCCCCC" class="<?= $cl_status; ?>" align="center"><div align="center">
                      <?= $status; ?>
                  </div></td>
                </tr>
                <?
	 	$n++;
		 }
	 ?>
              </table>
              <div align="center"><strong> </strong><br />
              </div>
            </div>
        </div>
</div>
	  <?
		}
		}
	?>
<?
		}
		}
	?>
	  <!-- this script is required for your newsbox to work; also, modify the variables defined below to customize the look of the newbox contents. -->
	  <!-- bg = background color; fg = text color for your article; link = the color for your links -->
	  <!-- altbg = background color of alternating row ; altfg = text color for your article on an alternating row; altlink = the color for your links on an alernating row -->
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem">
          <div style="display:yes;">
            <div align="center">
              <?
		$lv=4;
		for($i=3;$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
			
			if($ja > 0 or $jf > 0) {
?>
            </div>
          </div>
        </div>
      </div>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem"><strong> Level
              <?= $j; ?>
    : <span style="color:#006600">Aktif
    <?= $ja; ?>
    </span> Orang</strong>
            <div style="display:yes;">
              <?
$db->select("a.username, a.nama, a.status, a.blokir, a.hp, a.phone, a.email, 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 count(*), sum(poin) kunjung from banner_kanan as a inner join upline as b on a.username=b.username and b.upline$i='$user_session'"; 
    $resultpengunjung = mysql_query($sqlpengunjung);
    $pengunjung=mysql_fetch_object($resultpengunjung);
    $totalpengunjung4=$pengunjung->kunjung;
		?>
              <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
                <tr>
                  <td width="7%" align="center" bgcolor="#FFCCCC"><strong>#</strong></td>
                  <td width="15%" align="center" bgcolor="#FFFFCC"><strong>Username </strong></td>
                  <td width="23%" align="center" bgcolor="#66FFFF"><strong>Nama </strong></td>
                  <td width="15%" align="center" bgcolor="#0066FF"><strong>Sponsor</strong></td>
                  <td width="15%" align="center" bgcolor="#99CCCC"><strong>Upline</strong></td>
                  <td width="14%" align="center" bgcolor="#FFFF99"><strong>No HP </strong></td>
                  <td width="11%" align="center" bgcolor="#CCCCCC"><strong>Status</strong></td>
                </tr>
                <?
   		$n=1;
		while($row = $db->fetch_row()) {
			if($row[2] > 0) {
				$status = "AKTIF";
				$cl_status = "status_active";
			} else if($row[3] > 0) {
				$status = "BLOKIR";
				$cl_status = "status_blokir";	
			} else {
				$status = "FREE";
				$cl_status = "status_free";
			}			
   ?>
                <tr>
                  <td bgcolor="#FFCCCC"><div align="center">
                      <?= $n; ?>
                  </div></td>
                  <td bgcolor="#FFFFCC"><div align="center">
                      <?= $row[0]; ?>
                  </div></td>
                  <td bgcolor="#66FFFF"><div align="center">
                      <?= $row[1]; ?>
                  </div></td>
                  <td bgcolor="#0066FF"><div align="center">
                      <?= $row[10]; ?>
                  </div></td>
                  <td bgcolor="#99CCCC"><div align="center">
                      <?= $row[9]; ?>
                  </div></td>
                  <td bgcolor="#FFFF99"><div align="center">
                      <?= $row[4]; ?>
                    </div>
                  
                  <td bgcolor="#CCCCCC" class="<?= $cl_status; ?>" align="center"><div align="center">
                      <?= $status; ?>
                  </div></td>
                </tr>
                <?
	 	$n++;
		 }
	 ?>
              </table>
              <div align="center"><strong> </strong><br />
              </div>
            </div>
        </div>
      </div>
      <?
		}
		}
	?>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem">
          <div style="display:yes;">
            <div align="center">
              <?
		$lv=5;
		for($i=4;$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
			
			if($ja > 0 or $jf > 0) {
?>
            </div>
          </div>
        </div>
      </div>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem"><strong> Level
              <?= $j; ?>
    : <span style="color:#006600">Aktif
    <?= $ja; ?>
    </span> Orang</strong>
            <div style="display:yes;">
              <?
$db->select("a.username, a.nama, a.status, a.blokir, a.hp, a.phone, a.email, 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 count(*), sum(poin) kunjung from banner_kanan as a inner join upline as b on a.username=b.username and b.upline$i='$user_session'"; 
    $resultpengunjung = mysql_query($sqlpengunjung);
    $pengunjung=mysql_fetch_object($resultpengunjung);
    $totalpengunjung5=$pengunjung->kunjung;
		?>
              <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
                <tr>
                  <td width="7%" align="center" bgcolor="#FFCCCC"><strong>#</strong></td>
                  <td width="15%" align="center" bgcolor="#FFFFCC"><strong>Username </strong></td>
                  <td width="23%" align="center" bgcolor="#66FFFF"><strong>Nama </strong></td>
                  <td width="15%" align="center" bgcolor="#0066FF"><strong>Sponsor</strong></td>
                  <td width="15%" align="center" bgcolor="#99CCCC"><strong>Upline</strong></td>
                  <td width="14%" align="center" bgcolor="#FFFF99"><strong>No HP </strong></td>
                  <td width="11%" align="center" bgcolor="#CCCCCC"><strong>Status</strong></td>
                </tr>
                <?
   		$n=1;
		while($row = $db->fetch_row()) {
			if($row[2] > 0) {
				$status = "AKTIF";
				$cl_status = "status_active";
			} else if($row[3] > 0) {
				$status = "BLOKIR";
				$cl_status = "status_blokir";	
			} else {
				$status = "FREE";
				$cl_status = "status_free";
			}			
   ?>
                <tr>
                  <td bgcolor="#FFCCCC"><div align="center">
                      <?= $n; ?>
                  </div></td>
                  <td bgcolor="#FFFFCC"><div align="center">
                      <?= $row[0]; ?>
                  </div></td>
                  <td bgcolor="#66FFFF"><div align="center">
                      <?= $row[1]; ?>
                  </div></td>
                  <td bgcolor="#0066FF"><div align="center">
                      <?= $row[10]; ?>
                  </div></td>
                  <td bgcolor="#99CCCC"><div align="center">
                      <?= $row[9]; ?>
                  </div></td>
                  <td bgcolor="#FFFF99"><div align="center">
                      <?= $row[4]; ?>
                    </div>
                  
                  <td bgcolor="#CCCCCC" class="<?= $cl_status; ?>" align="center"><div align="center">
                      <?= $status; ?>
                  </div></td>


                </tr>
                <?
	 	$n++;
		 }
	 ?>
              </table>
              <div align="center"><strong> </strong><br />
              </div>
            </div>
        </div>
      </div>
      <?
		}
		}
	?>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem">
          <div style="display:yes;">
            <div align="center">
              <?
		$lv=6;
		for($i=5;$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
			
			if($ja > 0 or $jf > 0) {
?>
            </div>
          </div>
        </div>
      </div>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem"><strong> Level
              <?= $j; ?>
    : <span style="color:#006600">Aktif
    <?= $ja; ?>
    </span> Orang</strong>
            <div style="display:yes;">
              <?
$db->select("a.username, a.nama, a.status, a.blokir, a.hp, a.phone, a.email, 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 count(*), sum(poin) kunjung from banner_kanan as a inner join upline as b on a.username=b.username and b.upline$i='$user_session'"; 
    $resultpengunjung = mysql_query($sqlpengunjung);
    $pengunjung=mysql_fetch_object($resultpengunjung);
    $totalpengunjung6=$pengunjung->kunjung;
		?>
              <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
                <tr>
                  <td width="7%" align="center" bgcolor="#FFCCCC"><strong>#</strong></td>
                  <td width="15%" align="center" bgcolor="#FFFFCC"><strong>Username </strong></td>
                  <td width="23%" align="center" bgcolor="#66FFFF"><strong>Nama </strong></td>
                  <td width="15%" align="center" bgcolor="#0066FF"><strong>Sponsor</strong></td>
                  <td width="15%" align="center" bgcolor="#99CCCC"><strong>Upline</strong></td>
                  <td width="14%" align="center" bgcolor="#FFFF99"><strong>No HP </strong></td>
                  <td width="11%" align="center" bgcolor="#CCCCCC"><strong>Status</strong></td>
                </tr>
                <?
   		$n=1;
		while($row = $db->fetch_row()) {
			if($row[2] > 0) {
				$status = "AKTIF";
				$cl_status = "status_active";
			} else if($row[3] > 0) {
				$status = "BLOKIR";
				$cl_status = "status_blokir";	
			} else {
				$status = "FREE";
				$cl_status = "status_free";
			}			
   ?>
                <tr>
                  <td bgcolor="#FFCCCC"><div align="center">
                      <?= $n; ?>
                  </div></td>
                  <td bgcolor="#FFFFCC"><div align="center">
                      <?= $row[0]; ?>
                  </div></td>
                  <td bgcolor="#66FFFF"><div align="center">
                      <?= $row[1]; ?>
                  </div></td>
                  <td bgcolor="#0066FF"><div align="center">
                      <?= $row[10]; ?>
                  </div></td>
                  <td bgcolor="#99CCCC"><div align="center">
                      <?= $row[9]; ?>
                  </div></td>
                  <td bgcolor="#FFFF99"><div align="center">
                      <?= $row[4]; ?>
                    </div>
                  
                  <td bgcolor="#CCCCCC" class="<?= $cl_status; ?>" align="center"><div align="center">


                      <?= $status; ?>
                  </div></td>
                </tr>
                <?
	 	$n++;
		 }
	 ?>
              </table>
              <div align="center"><strong> </strong><br />
              </div>
            </div>
        </div>
      </div>
      <?
		}
		}
	?>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem">
          <div style="display:yes;">
            <div align="center">
              <?
		$lv=7;
		for($i=6;$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
			
			if($ja > 0 or $jf > 0) {
?>
            </div>
          </div>
        </div>
      </div>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem"><strong> Level
              <?= $j; ?>
    : <span style="color:#006600">Aktif
    <?= $ja; ?>
    </span> Orang</strong>
            <div style="display:yes;">
              <?
$db->select("a.username, a.nama, a.status, a.blokir, a.hp, a.phone, a.email, 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 count(*), sum(poin) kunjung from banner_kanan as a inner join upline as b on a.username=b.username and b.upline$i='$user_session'"; 
    $resultpengunjung = mysql_query($sqlpengunjung);
    $pengunjung=mysql_fetch_object($resultpengunjung);
    $totalpengunjung7=$pengunjung->kunjung;
		?>
              <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
                <tr>
                  <td width="7%" align="center" bgcolor="#FFCCCC"><strong>#</strong></td>
                  <td width="15%" align="center" bgcolor="#FFFFCC"><strong>Username </strong></td>
                  <td width="23%" align="center" bgcolor="#66FFFF"><strong>Nama </strong></td>
                  <td width="15%" align="center" bgcolor="#0066FF"><strong>Sponsor</strong></td>
                  <td width="15%" align="center" bgcolor="#99CCCC"><strong>Upline</strong></td>
                  <td width="14%" align="center" bgcolor="#FFFF99"><strong>No HP </strong></td>
                  <td width="11%" align="center" bgcolor="#CCCCCC"><strong>Status</strong></td>
                </tr>
                <?
   		$n=1;
		while($row = $db->fetch_row()) {
			if($row[2] > 0) {
				$status = "AKTIF";
				$cl_status = "status_active";
			} else if($row[3] > 0) {
				$status = "BLOKIR";
				$cl_status = "status_blokir";	
			} else {
				$status = "FREE";
				$cl_status = "status_free";
			}			
   ?>
                <tr>
                  <td bgcolor="#FFCCCC"><div align="center">
                      <?= $n; ?>
                  </div></td>
                  <td bgcolor="#FFFFCC"><div align="center">
                      <?= $row[0]; ?>
                  </div></td>
                  <td bgcolor="#66FFFF"><div align="center">
                      <?= $row[1]; ?>
                  </div></td>
                  <td bgcolor="#0066FF"><div align="center">
                      <?= $row[10]; ?>
                  </div></td>
                  <td bgcolor="#99CCCC"><div align="center">
                      <?= $row[9]; ?>
                  </div></td>
                  <td bgcolor="#FFFF99"><div align="center">
                      <?= $row[4]; ?>
                    </div>
                  
                  <td bgcolor="#CCCCCC" class="<?= $cl_status; ?>" align="center"><div align="center">
                      <?= $status; ?>
                  </div></td>
                </tr>
                <?
	 	$n++;
		 }
	 ?>
              </table>
              <div align="center"><strong> </strong><br />
              </div>
            </div>
        </div>
      </div>
      <?
		}
		}
	?>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem">
          <div style="display:yes;">
            <div align="center">
              <?
		$lv=8;
		for($i=7;$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
			
			if($ja > 0 or $jf > 0) {
?>
            </div>
          </div>
        </div>
      </div>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem"><strong> Level
              <?= $j; ?>
    : <span style="color:#006600">Aktif
    <?= $ja; ?>
    </span> Orang</strong>
            <div style="display:yes;">
              <?
$db->select("a.username, a.nama, a.status, a.blokir, a.hp, a.phone, a.email, 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 count(*), sum(poin) kunjung from banner_kanan as a inner join upline as b on a.username=b.username and b.upline$i='$user_session'"; 
    $resultpengunjung = mysql_query($sqlpengunjung);
    $pengunjung=mysql_fetch_object($resultpengunjung);
    $totalpengunjung8=$pengunjung->kunjung;
		?>
              <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
                <tr>
                  <td width="7%" align="center" bgcolor="#FFCCCC"><strong>#</strong></td>
                  <td width="15%" align="center" bgcolor="#FFFFCC"><strong>Username </strong></td>
                  <td width="23%" align="center" bgcolor="#66FFFF"><strong>Nama </strong></td>
                  <td width="15%" align="center" bgcolor="#0066FF"><strong>Sponsor</strong></td>
                  <td width="15%" align="center" bgcolor="#99CCCC"><strong>Upline</strong></td>
                  <td width="14%" align="center" bgcolor="#FFFF99"><strong>No HP </strong></td>
                  <td width="11%" align="center" bgcolor="#CCCCCC"><strong>Status</strong></td>
                </tr>
                <?
   		$n=1;
		while($row = $db->fetch_row()) {
			if($row[2] > 0) {
				$status = "AKTIF";
				$cl_status = "status_active";
			} else if($row[3] > 0) {
				$status = "BLOKIR";
				$cl_status = "status_blokir";	
			} else {
				$status = "FREE";
				$cl_status = "status_free";
			}			
   ?>
                <tr>
                  <td bgcolor="#FFCCCC"><div align="center">
                      <?= $n; ?>
                  </div></td>
                  <td bgcolor="#FFFFCC"><div align="center">
                      <?= $row[0]; ?>
                  </div></td>
                  <td bgcolor="#66FFFF"><div align="center">
                      <?= $row[1]; ?>
                  </div></td>
                  <td bgcolor="#0066FF"><div align="center">
                      <?= $row[10]; ?>
                  </div></td>
                  <td bgcolor="#99CCCC"><div align="center">
                      <?= $row[9]; ?>
                  </div></td>
                  <td bgcolor="#FFFF99"><div align="center">
                      <?= $row[4]; ?>
                    </div>
                  
                  <td bgcolor="#CCCCCC" class="<?= $cl_status; ?>" align="center"><div align="center">
                      <?= $status; ?>
                  </div></td>
                </tr>
                <?
	 	$n++;
		 }
	 ?>
              </table>
              <div align="center"><strong> </strong><br />
              </div>
            </div>
        </div>
      </div>
      <?
		}
		}
	?>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem">
          <div style="display:yes;">
            <div align="center">
              <?
		$lv=9;
		for($i=8;$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
			
			if($ja > 0 or $jf > 0) {
?>
            </div>
          </div>
        </div>
      </div>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem"><strong> Level
              <?= $j; ?>
    : <span style="color:#006600">Aktif
    <?= $ja; ?>
    </span> Orang</strong>
            <div style="display:yes;">
              <?
$db->select("a.username, a.nama, a.status, a.blokir, a.hp, a.phone, a.email, 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 count(*), sum(poin) kunjung from banner_kanan as a inner join upline as b on a.username=b.username and b.upline$i='$user_session'"; 
    $resultpengunjung = mysql_query($sqlpengunjung);
    $pengunjung=mysql_fetch_object($resultpengunjung);
    $totalpengunjung9=$pengunjung->kunjung;
		?>
              <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
                <tr>
                  <td width="7%" align="center" bgcolor="#FFCCCC"><strong>#</strong></td>
                  <td width="15%" align="center" bgcolor="#FFFFCC"><strong>Username </strong></td>
                  <td width="23%" align="center" bgcolor="#66FFFF"><strong>Nama </strong></td>
                  <td width="15%" align="center" bgcolor="#0066FF"><strong>Sponsor</strong></td>
                  <td width="15%" align="center" bgcolor="#99CCCC"><strong>Upline</strong></td>
                  <td width="14%" align="center" bgcolor="#FFFF99"><strong>No HP </strong></td>
                  <td width="11%" align="center" bgcolor="#CCCCCC"><strong>Status</strong></td>
                </tr>
                <?
   		$n=1;
		while($row = $db->fetch_row()) {
			if($row[2] > 0) {
				$status = "AKTIF";
				$cl_status = "status_active";
			} else if($row[3] > 0) {
				$status = "BLOKIR";
				$cl_status = "status_blokir";	
			} else {
				$status = "FREE";
				$cl_status = "status_free";
			}			
   ?>
                <tr>
                  <td bgcolor="#FFCCCC"><div align="center">
                      <?= $n; ?>
                  </div></td>
                  <td bgcolor="#FFFFCC"><div align="center">
                      <?= $row[0]; ?>
                  </div></td>
                  <td bgcolor="#66FFFF"><div align="center">
                      <?= $row[1]; ?>
                  </div></td>
                  <td bgcolor="#0066FF"><div align="center">
                      <?= $row[10]; ?>
                  </div></td>
                  <td bgcolor="#99CCCC"><div align="center">
                      <?= $row[9]; ?>
                  </div></td>
                  <td bgcolor="#FFFF99"><div align="center">
                      <?= $row[4]; ?>
                    </div>
                  
                  <td bgcolor="#CCCCCC" class="<?= $cl_status; ?>" align="center"><div align="center">
                      <?= $status; ?>
                  </div></td>
                </tr>
                <?
	 	$n++;
		 }
	 ?>
              </table>
              <div align="center"><strong> </strong><br />
              </div>
            </div>
        </div>
      </div>
      <?
		}
		}
	?>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem">
          <div style="display:yes;">
            <div align="center">
              <?
		$lv=10;
		for($i=9;$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
			
			if($ja > 0 or $jf > 0) {
?>
            </div>
          </div>
        </div>
      </div>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem"><strong> Level
              <?= $j; ?>
    : <span style="color:#006600">Aktif
    <?= $ja; ?>
    </span> Orang</strong>
            <div style="display:yes;">
              <?
$db->select("a.username, a.nama, a.status, a.blokir, a.hp, a.phone, a.email, 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 count(*), sum(poin) kunjung from banner_kanan as a inner join upline as b on a.username=b.username and b.upline$i='$user_session'"; 
    $resultpengunjung = mysql_query($sqlpengunjung);
    $pengunjung=mysql_fetch_object($resultpengunjung);
    $totalpengunjung10=$pengunjung->kunjung;
		?>
              <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
                <tr>
                  <td width="7%" align="center" bgcolor="#FFCCCC"><strong>#</strong></td>
                  <td width="15%" align="center" bgcolor="#FFFFCC"><strong>Username </strong></td>
                  <td width="23%" align="center" bgcolor="#66FFFF"><strong>Nama </strong></td>
                  <td width="15%" align="center" bgcolor="#0066FF"><strong>Sponsor</strong></td>
                  <td width="15%" align="center" bgcolor="#99CCCC"><strong>Upline</strong></td>
                  <td width="14%" align="center" bgcolor="#FFFF99"><strong>No HP </strong></td>
                  <td width="11%" align="center" bgcolor="#CCCCCC"><strong>Status</strong></td>
                </tr>
                <?
   		$n=1;
		while($row = $db->fetch_row()) {
			if($row[2] > 0) {
				$status = "AKTIF";
				$cl_status = "status_active";
			} else if($row[3] > 0) {
				$status = "BLOKIR";
				$cl_status = "status_blokir";	
			} else {
				$status = "FREE";
				$cl_status = "status_free";
			}			
   ?>
                <tr>
                  <td bgcolor="#FFCCCC"><div align="center">
                      <?= $n; ?>
                  </div></td>
                  <td bgcolor="#FFFFCC"><div align="center">
                      <?= $row[0]; ?>
                  </div></td>
                  <td bgcolor="#66FFFF"><div align="center">
                      <?= $row[1]; ?>
                  </div></td>
                  <td bgcolor="#0066FF"><div align="center">
                      <?= $row[10]; ?>
                  </div></td>
                  <td bgcolor="#99CCCC"><div align="center">
                      <?= $row[9]; ?>
                  </div></td>
                  <td bgcolor="#FFFF99"><div align="center">
                      <?= $row[4]; ?>
                    </div>
                  
                  <td bgcolor="#CCCCCC" class="<?= $cl_status; ?>" align="center"><div align="center">
                      <?= $status; ?>
                  </div></td>
                </tr>
                <?
	 	$n++;
		 }
	 ?>
              </table>
              <div align="center"><strong> </strong><br />
              </div>
            </div>
        </div>
      </div>
      <?
		}
		}
	?>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem">
          <div style="display:yes;">
            <div align="center">
              <?
		$lv=11;
		for($i=10;$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
			
			if($ja > 0 or $jf > 0) {
?>
            </div>
          </div>
        </div>
      </div>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem"><strong> Level
              <?= $j; ?>
    : <span style="color:#006600">Aktif
    <?= $ja; ?>
    </span> Orang</strong>
            <div style="display:yes;">
              <?
$db->select("a.username, a.nama, a.status, a.blokir, a.hp, a.phone, a.email, 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 count(*), sum(poin) kunjung from banner_kanan as a inner join upline as b on a.username=b.username and b.upline$i='$user_session'"; 
    $resultpengunjung = mysql_query($sqlpengunjung);
    $pengunjung=mysql_fetch_object($resultpengunjung);
    $totalpengunjung11=$pengunjung->kunjung;
		?>
              <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
                <tr>
                  <td width="7%" align="center" bgcolor="#FFCCCC"><strong>#</strong></td>
                  <td width="15%" align="center" bgcolor="#FFFFCC"><strong>Username </strong></td>
                  <td width="23%" align="center" bgcolor="#66FFFF"><strong>Nama </strong></td>
                  <td width="15%" align="center" bgcolor="#0066FF"><strong>Sponsor</strong></td>
                  <td width="15%" align="center" bgcolor="#99CCCC"><strong>Upline</strong></td>
                  <td width="14%" align="center" bgcolor="#FFFF99"><strong>No HP </strong></td>
                  <td width="11%" align="center" bgcolor="#CCCCCC"><strong>Status</strong></td>
                </tr>
                <?
   		$n=1;
		while($row = $db->fetch_row()) {
			if($row[2] > 0) {
				$status = "AKTIF";
				$cl_status = "status_active";
			} else if($row[3] > 0) {
				$status = "BLOKIR";
				$cl_status = "status_blokir";	
			} else {
				$status = "FREE";
				$cl_status = "status_free";
			}			
   ?>
                <tr>
                  <td bgcolor="#FFCCCC"><div align="center">
                      <?= $n; ?>
                  </div></td>
                  <td bgcolor="#FFFFCC"><div align="center">
                      <?= $row[0]; ?>
                  </div></td>
                  <td bgcolor="#66FFFF"><div align="center">
                      <?= $row[1]; ?>
                  </div></td>
                  <td bgcolor="#0066FF"><div align="center">
                      <?= $row[10]; ?>
                  </div></td>
                  <td bgcolor="#99CCCC"><div align="center">
                      <?= $row[9]; ?>
                  </div></td>
                  <td bgcolor="#FFFF99"><div align="center">
                      <?= $row[4]; ?>
                    </div>
                  
                  <td bgcolor="#CCCCCC" class="<?= $cl_status; ?>" align="center"><div align="center">
                      <?= $status; ?>
                  </div></td>
                </tr>
                <?
	 	$n++;
		 }
	 ?>
              </table>
              <div align="center"><strong> </strong><br />
              </div>
            </div>
        </div>
      </div>
      <?
		}
		}
	?>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem">
          <div style="display:yes;">
            <div align="center">
              <?
		$lv=12;
		for($i=11;$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
			
			if($ja > 0 or $jf > 0) {
?>
            </div>
          </div>
        </div>
      </div>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem"><strong> Level
              <?= $j; ?>
    : <span style="color:#006600">Aktif
    <?= $ja; ?>
    </span> Orang</strong>
            <div style="display:yes;">
              <?
$db->select("a.username, a.nama, a.status, a.blokir, a.hp, a.phone, a.email, 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 count(*), sum(poin) kunjung from banner_kanan as a inner join upline as b on a.username=b.username and b.upline$i='$user_session'"; 
    $resultpengunjung = mysql_query($sqlpengunjung);
    $pengunjung=mysql_fetch_object($resultpengunjung);
    $totalpengunjung12=$pengunjung->kunjung;
		?>
              <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
                <tr>
                  <td width="7%" align="center" bgcolor="#FFCCCC"><strong>#</strong></td>
                  <td width="15%" align="center" bgcolor="#FFFFCC"><strong>Username </strong></td>
                  <td width="23%" align="center" bgcolor="#66FFFF"><strong>Nama </strong></td>
                  <td width="15%" align="center" bgcolor="#0066FF"><strong>Sponsor</strong></td>
                  <td width="15%" align="center" bgcolor="#99CCCC"><strong>Upline</strong></td>
                  <td width="14%" align="center" bgcolor="#FFFF99"><strong>No HP </strong></td>
                  <td width="11%" align="center" bgcolor="#CCCCCC"><strong>Status</strong></td>
                </tr>
                <?
   		$n=1;
		while($row = $db->fetch_row()) {
			if($row[2] > 0) {
				$status = "AKTIF";
				$cl_status = "status_active";
			} else if($row[3] > 0) {
				$status = "BLOKIR";
				$cl_status = "status_blokir";	
			} else {
				$status = "FREE";
				$cl_status = "status_free";
			}			
   ?>
                <tr>
                  <td bgcolor="#FFCCCC"><div align="center">
                      <?= $n; ?>
                  </div></td>
                  <td bgcolor="#FFFFCC"><div align="center">
                      <?= $row[0]; ?>
                  </div></td>
                  <td bgcolor="#66FFFF"><div align="center">
                      <?= $row[1]; ?>
                  </div></td>
                  <td bgcolor="#0066FF"><div align="center">
                      <?= $row[10]; ?>
                  </div></td>
                  <td bgcolor="#99CCCC"><div align="center">
                      <?= $row[9]; ?>
                  </div></td>
                  <td bgcolor="#FFFF99"><div align="center">
                      <?= $row[4]; ?>
                    </div>
                  
                  <td bgcolor="#CCCCCC" class="<?= $cl_status; ?>" align="center"><div align="center">
                      <?= $status; ?>
                  </div></td>
                </tr>
                <?
	 	$n++;
		 }
	 ?>
              </table>
              <div align="center"><strong> </strong><br />
              </div>
            </div>
        </div>
      </div>
      <?
		}
		}
	?>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem">
          <div style="display:yes;">
            <div align="center">
              <?
		$lv=13;
		for($i=12;$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
			
			if($ja > 0 or $jf > 0) {
?>
            </div>
          </div>
        </div>
      </div>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem"><strong> Level
              <?= $j; ?>
    : <span style="color:#006600">Aktif
    <?= $ja; ?>
    </span> Orang</strong>
            <div style="display:yes;">
              <?
$db->select("a.username, a.nama, a.status, a.blokir, a.hp, a.phone, a.email, 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 count(*), sum(poin) kunjung from banner_kanan as a inner join upline as b on a.username=b.username and b.upline$i='$user_session'"; 
    $resultpengunjung = mysql_query($sqlpengunjung);
    $pengunjung=mysql_fetch_object($resultpengunjung);
    $totalpengunjung13=$pengunjung->kunjung;
		?>
              <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
                <tr>
                  <td width="7%" align="center" bgcolor="#FFCCCC"><strong>#</strong></td>
                  <td width="15%" align="center" bgcolor="#FFFFCC"><strong>Username </strong></td>
                  <td width="23%" align="center" bgcolor="#66FFFF"><strong>Nama </strong></td>
                  <td width="15%" align="center" bgcolor="#0066FF"><strong>Sponsor</strong></td>
                  <td width="15%" align="center" bgcolor="#99CCCC"><strong>Upline</strong></td>
                  <td width="14%" align="center" bgcolor="#FFFF99"><strong>No HP </strong></td>
                  <td width="11%" align="center" bgcolor="#CCCCCC"><strong>Status</strong></td>
                </tr>
                <?
   		$n=1;
		while($row = $db->fetch_row()) {
			if($row[2] > 0) {
				$status = "AKTIF";
				$cl_status = "status_active";
			} else if($row[3] > 0) {
				$status = "BLOKIR";
				$cl_status = "status_blokir";	
			} else {
				$status = "FREE";
				$cl_status = "status_free";
			}			
   ?>
                <tr>
                  <td bgcolor="#FFCCCC"><div align="center">
                      <?= $n; ?>
                  </div></td>
                  <td bgcolor="#FFFFCC"><div align="center">
                      <?= $row[0]; ?>
                  </div></td>
                  <td bgcolor="#66FFFF"><div align="center">
                      <?= $row[1]; ?>
                  </div></td>
                  <td bgcolor="#0066FF"><div align="center">
                      <?= $row[10]; ?>
                  </div></td>
                  <td bgcolor="#99CCCC"><div align="center">
                      <?= $row[9]; ?>
                  </div></td>
                  <td bgcolor="#FFFF99"><div align="center">
                      <?= $row[4]; ?>
                    </div>
                  
                  <td bgcolor="#CCCCCC" class="<?= $cl_status; ?>" align="center"><div align="center">
                      <?= $status; ?>
                  </div></td>
                </tr>
                <?
	 	$n++;
		 }
	 ?>
              </table>
              <div align="center"><strong> </strong><br />
              </div>
            </div>
        </div>
      </div>
      <?
		}
		}
	?>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem">
          <div style="display:yes;">
            <div align="center">
              <?
		$lv=14;
		for($i=13;$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
			
			if($ja > 0 or $jf > 0) {
?>
            </div>
          </div>
        </div>
      </div>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem"><strong> Level
              <?= $j; ?>
    : <span style="color:#006600">Aktif
    <?= $ja; ?>
    </span> Orang</strong>
            <div style="display:yes;">
              <?
$db->select("a.username, a.nama, a.status, a.blokir, a.hp, a.phone, a.email, 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 count(*), sum(poin) kunjung from banner_kanan as a inner join upline as b on a.username=b.username and b.upline$i='$user_session'"; 
    $resultpengunjung = mysql_query($sqlpengunjung);
    $pengunjung=mysql_fetch_object($resultpengunjung);
    $totalpengunjung14=$pengunjung->kunjung;
		?>
              <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
                <tr>
                  <td width="7%" align="center" bgcolor="#FFCCCC"><strong>#</strong></td>
                  <td width="15%" align="center" bgcolor="#FFFFCC"><strong>Username </strong></td>
                  <td width="23%" align="center" bgcolor="#66FFFF"><strong>Nama </strong></td>
                  <td width="15%" align="center" bgcolor="#0066FF"><strong>Sponsor</strong></td>
                  <td width="15%" align="center" bgcolor="#99CCCC"><strong>Upline</strong></td>
                  <td width="14%" align="center" bgcolor="#FFFF99"><strong>No HP </strong></td>
                  <td width="11%" align="center" bgcolor="#CCCCCC"><strong>Status</strong></td>
                </tr>
                <?
   		$n=1;
		while($row = $db->fetch_row()) {
			if($row[2] > 0) {
				$status = "AKTIF";
				$cl_status = "status_active";
			} else if($row[3] > 0) {
				$status = "BLOKIR";
				$cl_status = "status_blokir";	
			} else {
				$status = "FREE";
				$cl_status = "status_free";
			}			
   ?>
                <tr>
                  <td bgcolor="#FFCCCC"><div align="center">
                      <?= $n; ?>
                  </div></td>
                  <td bgcolor="#FFFFCC"><div align="center">
                      <?= $row[0]; ?>
                  </div></td>
                  <td bgcolor="#66FFFF"><div align="center">
                      <?= $row[1]; ?>
                  </div></td>
                  <td bgcolor="#0066FF"><div align="center">
                      <?= $row[10]; ?>
                  </div></td>
                  <td bgcolor="#99CCCC"><div align="center">
                      <?= $row[9]; ?>
                  </div></td>
                  <td bgcolor="#FFFF99"><div align="center">
                      <?= $row[4]; ?>
                    </div>
                  
                  <td bgcolor="#CCCCCC" class="<?= $cl_status; ?>" align="center"><div align="center">
                      <?= $status; ?>
                  </div></td>
                </tr>
                <?
	 	$n++;
		 }
	 ?>
              </table>
              <div align="center"><strong> </strong><br />
              </div>
            </div>
        </div>
      </div>
      <?
		}
		}
	?>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem">
          <div style="display:yes;">
            <div align="center">
              <?
		$lv=15;
		for($i=14;$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
			
			if($ja > 0 or $jf > 0) {
?>
            </div>
          </div>
        </div>
      </div>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem"><strong> Level
              <?= $j; ?>
    : <span style="color:#006600">Aktif
    <?= $ja; ?>
    </span> Orang</strong>
            <div style="display:yes;">
              <?
$db->select("a.username, a.nama, a.status, a.blokir, a.hp, a.phone, a.email, 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 count(*), sum(poin) kunjung from banner_kanan as a inner join upline as b on a.username=b.username and b.upline$i='$user_session'"; 
    $resultpengunjung = mysql_query($sqlpengunjung);
    $pengunjung=mysql_fetch_object($resultpengunjung);
    $totalpengunjung15=$pengunjung->kunjung;
		?>
              <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
                <tr>
                  <td width="7%" align="center" bgcolor="#FFCCCC"><strong>#</strong></td>
                  <td width="15%" align="center" bgcolor="#FFFFCC"><strong>Username </strong></td>
                  <td width="23%" align="center" bgcolor="#66FFFF"><strong>Nama </strong></td>
                  <td width="15%" align="center" bgcolor="#0066FF"><strong>Sponsor</strong></td>
                  <td width="15%" align="center" bgcolor="#99CCCC"><strong>Upline</strong></td>
                  <td width="14%" align="center" bgcolor="#FFFF99"><strong>No HP </strong></td>
                  <td width="11%" align="center" bgcolor="#CCCCCC"><strong>Status</strong></td>
                </tr>
                <?
   		$n=1;
		while($row = $db->fetch_row()) {
			if($row[2] > 0) {
				$status = "AKTIF";
				$cl_status = "status_active";
			} else if($row[3] > 0) {
				$status = "BLOKIR";
				$cl_status = "status_blokir";	
			} else {
				$status = "FREE";
				$cl_status = "status_free";
			}			
   ?>
                <tr>
                  <td bgcolor="#FFCCCC"><div align="center">
                      <?= $n; ?>
                  </div></td>
                  <td bgcolor="#FFFFCC"><div align="center">
                      <?= $row[0]; ?>
                  </div></td>
                  <td bgcolor="#66FFFF"><div align="center">
                      <?= $row[1]; ?>
                  </div></td>
                  <td bgcolor="#0066FF"><div align="center">
                      <?= $row[10]; ?>
                  </div></td>
                  <td bgcolor="#99CCCC"><div align="center">
                      <?= $row[9]; ?>
                  </div></td>
                  <td bgcolor="#FFFF99"><div align="center">
                      <?= $row[4]; ?>
                    </div>
                  
                  <td bgcolor="#CCCCCC" class="<?= $cl_status; ?>" align="center"><div align="center">
                      <?= $status; ?>
                  </div></td>
                </tr>
                <?
	 	$n++;
		 }
	 ?>
              </table>
              <div align="center"><strong> </strong><br />
              </div>
            </div>
        </div>
      </div>
      <?
		}
		}
	?>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem">
          <div style="display:yes;">
            <div align="center">
              <?
		$lv=16;
		for($i=15;$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
			
			if($ja > 0 or $jf > 0) {
?>
            </div>
          </div>
        </div>
      </div>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem"><strong> Level
              <?= $j; ?>
    : <span style="color:#006600">Aktif
    <?= $ja; ?>
    </span> Orang</strong>
            <div style="display:yes;">
              <?
$db->select("a.username, a.nama, a.status, a.blokir, a.hp, a.phone, a.email, 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 count(*), sum(poin) kunjung from banner_kanan as a inner join upline as b on a.username=b.username and b.upline$i='$user_session'"; 
    $resultpengunjung = mysql_query($sqlpengunjung);
    $pengunjung=mysql_fetch_object($resultpengunjung);
    $totalpengunjung16=$pengunjung->kunjung;
		?>
              <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
                <tr>
                  <td width="7%" align="center" bgcolor="#FFCCCC"><strong>#</strong></td>
                  <td width="15%" align="center" bgcolor="#FFFFCC"><strong>Username </strong></td>
                  <td width="23%" align="center" bgcolor="#66FFFF"><strong>Nama </strong></td>
                  <td width="15%" align="center" bgcolor="#0066FF"><strong>Sponsor</strong></td>
                  <td width="15%" align="center" bgcolor="#99CCCC"><strong>Upline</strong></td>
                  <td width="14%" align="center" bgcolor="#FFFF99"><strong>No HP </strong></td>
                  <td width="11%" align="center" bgcolor="#CCCCCC"><strong>Status</strong></td>
                </tr>
                <?
   		$n=1;
		while($row = $db->fetch_row()) {
			if($row[2] > 0) {
				$status = "AKTIF";
				$cl_status = "status_active";
			} else if($row[3] > 0) {
				$status = "BLOKIR";
				$cl_status = "status_blokir";	
			} else {
				$status = "FREE";
				$cl_status = "status_free";
			}			
   ?>
                <tr>
                  <td bgcolor="#FFCCCC"><div align="center">
                      <?= $n; ?>
                  </div></td>
                  <td bgcolor="#FFFFCC"><div align="center">
                      <?= $row[0]; ?>
                  </div></td>
                  <td bgcolor="#66FFFF"><div align="center">
                      <?= $row[1]; ?>
                  </div></td>
                  <td bgcolor="#0066FF"><div align="center">
                      <?= $row[10]; ?>
                  </div></td>
                  <td bgcolor="#99CCCC"><div align="center">
                      <?= $row[9]; ?>
                  </div></td>
                  <td bgcolor="#FFFF99"><div align="center">
                      <?= $row[4]; ?>
                    </div>
                  
                  <td bgcolor="#CCCCCC" class="<?= $cl_status; ?>" align="center"><div align="center">
                      <?= $status; ?>
                  </div></td>
                </tr>
                <?
	 	$n++;
		 }
	 ?>
              </table>
              <div align="center"><strong> </strong><br />
              </div>
            </div>
        </div>
      </div>
      <?
		}
		}
	?>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem">
          <div style="display:yes;">
            <div align="center">
              <?
		$lv=17;
		for($i=16;$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
			
			if($ja > 0 or $jf > 0) {
?>
            </div>
          </div>
        </div>
      </div>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem"><strong> Level
              <?= $j; ?>
    : <span style="color:#006600">Aktif
    <?= $ja; ?>
    </span> Orang</strong>
            <div style="display:yes;">
              <?
$db->select("a.username, a.nama, a.status, a.blokir, a.hp, a.phone, a.email, 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 count(*), sum(poin) kunjung from banner_kanan as a inner join upline as b on a.username=b.username and b.upline$i='$user_session'"; 
    $resultpengunjung = mysql_query($sqlpengunjung);
    $pengunjung=mysql_fetch_object($resultpengunjung);
    $totalpengunjung17=$pengunjung->kunjung;
		?>
              <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
                <tr>
                  <td width="7%" align="center" bgcolor="#FFCCCC"><strong>#</strong></td>
                  <td width="15%" align="center" bgcolor="#FFFFCC"><strong>Username </strong></td>
                  <td width="23%" align="center" bgcolor="#66FFFF"><strong>Nama </strong></td>
                  <td width="15%" align="center" bgcolor="#0066FF"><strong>Sponsor</strong></td>
                  <td width="15%" align="center" bgcolor="#99CCCC"><strong>Upline</strong></td>
                  <td width="14%" align="center" bgcolor="#FFFF99"><strong>No HP </strong></td>
                  <td width="11%" align="center" bgcolor="#CCCCCC"><strong>Status</strong></td>
                </tr>
                <?
   		$n=1;
		while($row = $db->fetch_row()) {
			if($row[2] > 0) {
				$status = "AKTIF";
				$cl_status = "status_active";
			} else if($row[3] > 0) {
				$status = "BLOKIR";
				$cl_status = "status_blokir";	
			} else {
				$status = "FREE";
				$cl_status = "status_free";
			}			
   ?>
                <tr>
                  <td bgcolor="#FFCCCC"><div align="center">
                      <?= $n; ?>
                  </div></td>
                  <td bgcolor="#FFFFCC"><div align="center">
                      <?= $row[0]; ?>
                  </div></td>
                  <td bgcolor="#66FFFF"><div align="center">
                      <?= $row[1]; ?>
                  </div></td>
                  <td bgcolor="#0066FF"><div align="center">
                      <?= $row[10]; ?>
                  </div></td>
                  <td bgcolor="#99CCCC"><div align="center">
                      <?= $row[9]; ?>
                  </div></td>
                  <td bgcolor="#FFFF99"><div align="center">
                      <?= $row[4]; ?>
                    </div>
                  
                  <td bgcolor="#CCCCCC" class="<?= $cl_status; ?>" align="center"><div align="center">
                      <?= $status; ?>
                  </div></td>
                </tr>
                <?
	 	$n++;
		 }
	 ?>
              </table>
              <div align="center"><strong> </strong><br />
              </div>
            </div>
        </div>
      </div>
      <?
		}
		}
	?>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem">
          <div style="display:yes;">
            <div align="center">
              <?
		$lv=18;
		for($i=17;$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
			
			if($ja > 0 or $jf > 0) {
?>
            </div>
          </div>
        </div>
      </div>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem"><strong> Level
              <?= $j; ?>
    : <span style="color:#006600">Aktif
    <?= $ja; ?>
    </span> Orang</strong>
            <div style="display:yes;">
              <?
$db->select("a.username, a.nama, a.status, a.blokir, a.hp, a.phone, a.email, 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 count(*), sum(poin) kunjung from banner_kanan as a inner join upline as b on a.username=b.username and b.upline$i='$user_session'"; 
    $resultpengunjung = mysql_query($sqlpengunjung);
    $pengunjung=mysql_fetch_object($resultpengunjung);
    $totalpengunjung18=$pengunjung->kunjung;
		?>
              <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
                <tr>
                  <td width="7%" align="center" bgcolor="#FFCCCC"><strong>#</strong></td>
                  <td width="15%" align="center" bgcolor="#FFFFCC"><strong>Username </strong></td>
                  <td width="23%" align="center" bgcolor="#66FFFF"><strong>Nama </strong></td>
                  <td width="15%" align="center" bgcolor="#0066FF"><strong>Sponsor</strong></td>
                  <td width="15%" align="center" bgcolor="#99CCCC"><strong>Upline</strong></td>
                  <td width="14%" align="center" bgcolor="#FFFF99"><strong>No HP </strong></td>
                  <td width="11%" align="center" bgcolor="#CCCCCC"><strong>Status</strong></td>
                </tr>
                <?
   		$n=1;
		while($row = $db->fetch_row()) {
			if($row[2] > 0) {
				$status = "AKTIF";
				$cl_status = "status_active";
			} else if($row[3] > 0) {
				$status = "BLOKIR";
				$cl_status = "status_blokir";	
			} else {
				$status = "FREE";
				$cl_status = "status_free";
			}			
   ?>
                <tr>
                  <td bgcolor="#FFCCCC"><div align="center">
                      <?= $n; ?>
                  </div></td>
                  <td bgcolor="#FFFFCC"><div align="center">
                      <?= $row[0]; ?>
                  </div></td>
                  <td bgcolor="#66FFFF"><div align="center">
                      <?= $row[1]; ?>
                  </div></td>
                  <td bgcolor="#0066FF"><div align="center">
                      <?= $row[10]; ?>
                  </div></td>
                  <td bgcolor="#99CCCC"><div align="center">
                      <?= $row[9]; ?>
                  </div></td>
                  <td bgcolor="#FFFF99"><div align="center">
                      <?= $row[4]; ?>
                    </div>
                  
                  <td bgcolor="#CCCCCC" class="<?= $cl_status; ?>" align="center"><div align="center">
                      <?= $status; ?>
                  </div></td>
                </tr>
                <?
	 	$n++;
		 }
	 ?>
              </table>
              <div align="center"><strong> </strong><br />
              </div>
            </div>
        </div>
      </div>
      <?
		}
		}
	?>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem">
          <div style="display:yes;">
            <div align="center">
              <?
		$lv=19;
		for($i=18;$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
			
			if($ja > 0 or $jf > 0) {
?>
            </div>
          </div>
        </div>
      </div>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem"><strong> Level
              <?= $j; ?>
    : <span style="color:#006600">Aktif
    <?= $ja; ?>
    </span> Orang</strong>
            <div style="display:yes;">
              <?
$db->select("a.username, a.nama, a.status, a.blokir, a.hp, a.phone, a.email, 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 count(*), sum(poin) kunjung from banner_kanan as a inner join upline as b on a.username=b.username and b.upline$i='$user_session'"; 
    $resultpengunjung = mysql_query($sqlpengunjung);
    $pengunjung=mysql_fetch_object($resultpengunjung);
    $totalpengunjung19=$pengunjung->kunjung;
		?>
              <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
                <tr>
                  <td width="7%" align="center" bgcolor="#FFCCCC"><strong>#</strong></td>
                  <td width="15%" align="center" bgcolor="#FFFFCC"><strong>Username </strong></td>
                  <td width="23%" align="center" bgcolor="#66FFFF"><strong>Nama </strong></td>
                  <td width="15%" align="center" bgcolor="#0066FF"><strong>Sponsor</strong></td>
                  <td width="15%" align="center" bgcolor="#99CCCC"><strong>Upline</strong></td>
                  <td width="14%" align="center" bgcolor="#FFFF99"><strong>No HP </strong></td>
                  <td width="11%" align="center" bgcolor="#CCCCCC"><strong>Status</strong></td>
                </tr>
                <?
   		$n=1;
		while($row = $db->fetch_row()) {
			if($row[2] > 0) {
				$status = "AKTIF";
				$cl_status = "status_active";
			} else if($row[3] > 0) {
				$status = "BLOKIR";
				$cl_status = "status_blokir";	
			} else {
				$status = "FREE";
				$cl_status = "status_free";
			}			
   ?>
                <tr>
                  <td bgcolor="#FFCCCC"><div align="center">
                      <?= $n; ?>
                  </div></td>
                  <td bgcolor="#FFFFCC"><div align="center">
                      <?= $row[0]; ?>
                  </div></td>
                  <td bgcolor="#66FFFF"><div align="center">
                      <?= $row[1]; ?>
                  </div></td>
                  <td bgcolor="#0066FF"><div align="center">
                      <?= $row[10]; ?>
                  </div></td>
                  <td bgcolor="#99CCCC"><div align="center">
                      <?= $row[9]; ?>
                  </div></td>
                  <td bgcolor="#FFFF99"><div align="center">
                      <?= $row[4]; ?>
                    </div>
                  
                  <td bgcolor="#CCCCCC" class="<?= $cl_status; ?>" align="center"><div align="center">
                      <?= $status; ?>
                  </div></td>
                </tr>
                <?
	 	$n++;
		 }
	 ?>
              </table>
              <div align="center"><strong> </strong><br />
              </div>
            </div>
        </div>
      </div>
      <?
		}
		}
	?>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem">
          <div style="display:yes;">
            <div align="center">
              <?
		$lv=20;
		for($i=19;$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
			
			if($ja > 0 or $jf > 0) {
?>
            </div>
          </div>
        </div>
      </div>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem"><strong> Level
              <?= $j; ?>
    : <span style="color:#006600">Aktif
    <?= $ja; ?>
    </span> Orang</strong>
            <div style="display:yes;">
              <?
$db->select("a.username, a.nama, a.status, a.blokir, a.hp, a.phone, a.email, 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 count(*), sum(poin) kunjung from banner_kanan as a inner join upline as b on a.username=b.username and b.upline$i='$user_session'"; 
    $resultpengunjung = mysql_query($sqlpengunjung);
    $pengunjung=mysql_fetch_object($resultpengunjung);
    $totalpengunjung20=$pengunjung->kunjung;
		?>
              <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
                <tr>
                  <td width="7%" align="center" bgcolor="#FFCCCC"><strong>#</strong></td>
                  <td width="15%" align="center" bgcolor="#FFFFCC"><strong>Username </strong></td>
                  <td width="23%" align="center" bgcolor="#66FFFF"><strong>Nama </strong></td>
                  <td width="15%" align="center" bgcolor="#0066FF"><strong>Sponsor</strong></td>
                  <td width="15%" align="center" bgcolor="#99CCCC"><strong>Upline</strong></td>
                  <td width="14%" align="center" bgcolor="#FFFF99"><strong>No HP </strong></td>
                  <td width="11%" align="center" bgcolor="#CCCCCC"><strong>Status</strong></td>
                </tr>
                <?
   		$n=1;
		while($row = $db->fetch_row()) {
			if($row[2] > 0) {
				$status = "AKTIF";
				$cl_status = "status_active";
			} else if($row[3] > 0) {
				$status = "BLOKIR";
				$cl_status = "status_blokir";	

			} else {
				$status = "FREE";
				$cl_status = "status_free";
			}			
   ?>
                <tr>
                  <td bgcolor="#FFCCCC"><div align="center">
                      <?= $n; ?>
                  </div></td>
                  <td bgcolor="#FFFFCC"><div align="center">
                      <?= $row[0]; ?>
                  </div></td>
                  <td bgcolor="#66FFFF"><div align="center">
                      <?= $row[1]; ?>
                  </div></td>
                  <td bgcolor="#0066FF"><div align="center">
                      <?= $row[10]; ?>
                  </div></td>
                  <td bgcolor="#99CCCC"><div align="center">
                      <?= $row[9]; ?>
                  </div></td>
                  <td bgcolor="#FFFF99"><div align="center">
                      <?= $row[4]; ?>
                    </div>
                  
                  <td bgcolor="#CCCCCC" class="<?= $cl_status; ?>" align="center"><div align="center">
                      <?= $status; ?>
                  </div></td>
                </tr>
                <?
	 	$n++;
		 }
	 ?>
              </table>
              <div align="center"><strong> </strong><br />
              </div>
            </div>
        </div>
      </div>
      <?
		}
		}
	?>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem">
          <div style="display:yes;">
            <div align="center">
              <?
		$lv=21;
		for($i=20;$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
			
			if($ja > 0 or $jf > 0) {
?>
            </div>
          </div>
        </div>
      </div>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem"><strong> Level
              <?= $j; ?>
    : <span style="color:#006600">Aktif
    <?= $ja; ?>
    </span> Orang</strong>
            <div style="display:yes;">
              <?
$db->select("a.username, a.nama, a.status, a.blokir, a.hp, a.phone, a.email, 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 count(*), sum(poin) kunjung from banner_kanan as a inner join upline as b on a.username=b.username and b.upline$i='$user_session'"; 
    $resultpengunjung = mysql_query($sqlpengunjung);
    $pengunjung=mysql_fetch_object($resultpengunjung);
    $totalpengunjung21=$pengunjung->kunjung;
		?>
              <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
                <tr>
                  <td width="7%" align="center" bgcolor="#FFCCCC"><strong>#</strong></td>
                  <td width="15%" align="center" bgcolor="#FFFFCC"><strong>Username </strong></td>
                  <td width="23%" align="center" bgcolor="#66FFFF"><strong>Nama </strong></td>
                  <td width="15%" align="center" bgcolor="#0066FF"><strong>Sponsor</strong></td>
                  <td width="15%" align="center" bgcolor="#99CCCC"><strong>Upline</strong></td>
                  <td width="14%" align="center" bgcolor="#FFFF99"><strong>No HP </strong></td>
                  <td width="11%" align="center" bgcolor="#CCCCCC"><strong>Status</strong></td>
                </tr>
                <?
   		$n=1;
		while($row = $db->fetch_row()) {
			if($row[2] > 0) {
				$status = "AKTIF";
				$cl_status = "status_active";
			} else if($row[3] > 0) {
				$status = "BLOKIR";
				$cl_status = "status_blokir";	
			} else {
				$status = "FREE";
				$cl_status = "status_free";
			}			
   ?>
                <tr>
                  <td bgcolor="#FFCCCC"><div align="center">
                      <?= $n; ?>
                  </div></td>
                  <td bgcolor="#FFFFCC"><div align="center">
                      <?= $row[0]; ?>
                  </div></td>
                  <td bgcolor="#66FFFF"><div align="center">
                      <?= $row[1]; ?>
                  </div></td>
                  <td bgcolor="#0066FF"><div align="center">
                      <?= $row[10]; ?>
                  </div></td>
                  <td bgcolor="#99CCCC"><div align="center">
                      <?= $row[9]; ?>
                  </div></td>
                  <td bgcolor="#FFFF99"><div align="center">
                      <?= $row[4]; ?>
                    </div>
                  
                  <td bgcolor="#CCCCCC" class="<?= $cl_status; ?>" align="center"><div align="center">
                      <?= $status; ?>
                  </div></td>
                </tr>
                <?
	 	$n++;
		 }
	 ?>
              </table>
              <div align="center"><strong> </strong><br />
              </div>
            </div>
        </div>
      </div>
      <?
		}
		}
	?>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem">
          <div style="display:yes;">
            <div align="center">
              <?
		$lv=22;
		for($i=21;$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
			
			if($ja > 0 or $jf > 0) {
?>
            </div>
          </div>
        </div>
      </div>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem"><strong> Level
              <?= $j; ?>
    : <span style="color:#006600">Aktif
    <?= $ja; ?>
    </span> Orang</strong>
            <div style="display:yes;">
              <?
$db->select("a.username, a.nama, a.status, a.blokir, a.hp, a.phone, a.email, 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 count(*), sum(poin) kunjung from banner_kanan as a inner join upline as b on a.username=b.username and b.upline$i='$user_session'"; 
    $resultpengunjung = mysql_query($sqlpengunjung);
    $pengunjung=mysql_fetch_object($resultpengunjung);
    $totalpengunjung22=$pengunjung->kunjung;
		?>
              <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
                <tr>
                  <td width="7%" align="center" bgcolor="#FFCCCC"><strong>#</strong></td>
                  <td width="15%" align="center" bgcolor="#FFFFCC"><strong>Username </strong></td>
                  <td width="23%" align="center" bgcolor="#66FFFF"><strong>Nama </strong></td>
                  <td width="15%" align="center" bgcolor="#0066FF"><strong>Sponsor</strong></td>
                  <td width="15%" align="center" bgcolor="#99CCCC"><strong>Upline</strong></td>
                  <td width="14%" align="center" bgcolor="#FFFF99"><strong>No HP </strong></td>
                  <td width="11%" align="center" bgcolor="#CCCCCC"><strong>Status</strong></td>
                </tr>
                <?
   		$n=1;
		while($row = $db->fetch_row()) {
			if($row[2] > 0) {
				$status = "AKTIF";
				$cl_status = "status_active";
			} else if($row[3] > 0) {
				$status = "BLOKIR";
				$cl_status = "status_blokir";	
			} else {
				$status = "FREE";
				$cl_status = "status_free";
			}			
   ?>
                <tr>
                  <td bgcolor="#FFCCCC"><div align="center">
                      <?= $n; ?>
                  </div></td>
                  <td bgcolor="#FFFFCC"><div align="center">
                      <?= $row[0]; ?>
                  </div></td>
                  <td bgcolor="#66FFFF"><div align="center">
                      <?= $row[1]; ?>
                  </div></td>
                  <td bgcolor="#0066FF"><div align="center">
                      <?= $row[10]; ?>
                  </div></td>
                  <td bgcolor="#99CCCC"><div align="center">
                      <?= $row[9]; ?>
                  </div></td>
                  <td bgcolor="#FFFF99"><div align="center">
                      <?= $row[4]; ?>
                    </div>
                  
                  <td bgcolor="#CCCCCC" class="<?= $cl_status; ?>" align="center"><div align="center">
                      <?= $status; ?>
                  </div></td>
                </tr>
                <?
	 	$n++;
		 }
	 ?>
              </table>
              <div align="center"><strong> </strong><br />
              </div>
            </div>
        </div>
      </div>
      <?
		}
		}
	?>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem">
          <div style="display:yes;">
            <div align="center">
              <?
		$lv=23;
		for($i=22;$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
			
			if($ja > 0 or $jf > 0) {
?>
            </div>
          </div>
        </div>
      </div>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem"><strong> Level
              <?= $j; ?>
    : <span style="color:#006600">Aktif
    <?= $ja; ?>
    </span> Orang</strong>
            <div style="display:yes;">
              <?
$db->select("a.username, a.nama, a.status, a.blokir, a.hp, a.phone, a.email, 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 count(*), sum(poin) kunjung from banner_kanan as a inner join upline as b on a.username=b.username and b.upline$i='$user_session'"; 
    $resultpengunjung = mysql_query($sqlpengunjung);
    $pengunjung=mysql_fetch_object($resultpengunjung);
    $totalpengunjung23=$pengunjung->kunjung;
		?>
              <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
                <tr>
                  <td width="7%" align="center" bgcolor="#FFCCCC"><strong>#</strong></td>
                  <td width="15%" align="center" bgcolor="#FFFFCC"><strong>Username </strong></td>
                  <td width="23%" align="center" bgcolor="#66FFFF"><strong>Nama </strong></td>
                  <td width="15%" align="center" bgcolor="#0066FF"><strong>Sponsor</strong></td>
                  <td width="15%" align="center" bgcolor="#99CCCC"><strong>Upline</strong></td>
                  <td width="14%" align="center" bgcolor="#FFFF99"><strong>No HP </strong></td>
                  <td width="11%" align="center" bgcolor="#CCCCCC"><strong>Status</strong></td>
                </tr>
                <?
   		$n=1;
		while($row = $db->fetch_row()) {
			if($row[2] > 0) {
				$status = "AKTIF";
				$cl_status = "status_active";
			} else if($row[3] > 0) {
				$status = "BLOKIR";
				$cl_status = "status_blokir";	
			} else {
				$status = "FREE";
				$cl_status = "status_free";
			}			
   ?>
                <tr>
                  <td bgcolor="#FFCCCC"><div align="center">
                      <?= $n; ?>
                  </div></td>
                  <td bgcolor="#FFFFCC"><div align="center">
                      <?= $row[0]; ?>
                  </div></td>
                  <td bgcolor="#66FFFF"><div align="center">
                      <?= $row[1]; ?>
                  </div></td>
                  <td bgcolor="#0066FF"><div align="center">
                      <?= $row[10]; ?>
                  </div></td>
                  <td bgcolor="#99CCCC"><div align="center">
                      <?= $row[9]; ?>
                  </div></td>
                  <td bgcolor="#FFFF99"><div align="center">
                      <?= $row[4]; ?>
                    </div>
                  
                  <td bgcolor="#CCCCCC" class="<?= $cl_status; ?>" align="center"><div align="center">
                      <?= $status; ?>
                  </div></td>
                </tr>
                <?
	 	$n++;
		 }
	 ?>
              </table>
              <div align="center"><strong> </strong><br />
              </div>
            </div>
        </div>
      </div>
      <?
		}
		}
	?>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem">
          <div style="display:yes;">
            <div align="center">
              <?
		$lv=24;
		for($i=23;$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
			
			if($ja > 0 or $jf > 0) {
?>
            </div>
          </div>
        </div>
      </div>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem"><strong> Level
              <?= $j; ?>
    : <span style="color:#006600">Aktif
    <?= $ja; ?>
    </span> Orang</strong>
            <div style="display:yes;">
              <?
$db->select("a.username, a.nama, a.status, a.blokir, a.hp, a.phone, a.email, 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 count(*), sum(poin) kunjung from banner_kanan as a inner join upline as b on a.username=b.username and b.upline$i='$user_session'"; 
    $resultpengunjung = mysql_query($sqlpengunjung);
    $pengunjung=mysql_fetch_object($resultpengunjung);
    $totalpengunjung24=$pengunjung->kunjung;
		?>
              <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
                <tr>
                  <td width="7%" align="center" bgcolor="#FFCCCC"><strong>#</strong></td>
                  <td width="15%" align="center" bgcolor="#FFFFCC"><strong>Username </strong></td>
                  <td width="23%" align="center" bgcolor="#66FFFF"><strong>Nama </strong></td>
                  <td width="15%" align="center" bgcolor="#0066FF"><strong>Sponsor</strong></td>
                  <td width="15%" align="center" bgcolor="#99CCCC"><strong>Upline</strong></td>
                  <td width="14%" align="center" bgcolor="#FFFF99"><strong>No HP </strong></td>
                  <td width="11%" align="center" bgcolor="#CCCCCC"><strong>Status</strong></td>
                </tr>
                <?
   		$n=1;
		while($row = $db->fetch_row()) {
			if($row[2] > 0) {
				$status = "AKTIF";
				$cl_status = "status_active";
			} else if($row[3] > 0) {
				$status = "BLOKIR";
				$cl_status = "status_blokir";	
			} else {
				$status = "FREE";
				$cl_status = "status_free";
			}			
   ?>
                <tr>
                  <td bgcolor="#FFCCCC"><div align="center">
                      <?= $n; ?>
                  </div></td>
                  <td bgcolor="#FFFFCC"><div align="center">
                      <?= $row[0]; ?>
                  </div></td>
                  <td bgcolor="#66FFFF"><div align="center">
                      <?= $row[1]; ?>
                  </div></td>
                  <td bgcolor="#0066FF"><div align="center">
                      <?= $row[10]; ?>
                  </div></td>
                  <td bgcolor="#99CCCC"><div align="center">
                      <?= $row[9]; ?>
                  </div></td>
                  <td bgcolor="#FFFF99"><div align="center">
                      <?= $row[4]; ?>
                    </div>
                  
                  <td bgcolor="#CCCCCC" class="<?= $cl_status; ?>" align="center"><div align="center">
                      <?= $status; ?>
                  </div></td>
                </tr>
                <?
	 	$n++;
		 }
	 ?>
              </table>
              <div align="center"><strong> </strong><br />
              </div>
            </div>
        </div>
      </div>
      <?
		}
		}
	?>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem">
          <div style="display:yes;">
            <div align="center">
              <?
		$lv=25;
		for($i=24;$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
			
			if($ja > 0 or $jf > 0) {
?>
            </div>
          </div>
        </div>
      </div>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem"><strong> Level
              <?= $j; ?>
    : <span style="color:#006600">Aktif
    <?= $ja; ?>
    </span> Orang</strong>
            <div style="display:yes;">
              <?
$db->select("a.username, a.nama, a.status, a.blokir, a.hp, a.phone, a.email, 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 count(*), sum(poin) kunjung from banner_kanan as a inner join upline as b on a.username=b.username and b.upline$i='$user_session'"; 
    $resultpengunjung = mysql_query($sqlpengunjung);
    $pengunjung=mysql_fetch_object($resultpengunjung);
    $totalpengunjung25=$pengunjung->kunjung;
		?>
              <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
                <tr>
                  <td width="7%" align="center" bgcolor="#FFCCCC"><strong>#</strong></td>
                  <td width="15%" align="center" bgcolor="#FFFFCC"><strong>Username </strong></td>
                  <td width="23%" align="center" bgcolor="#66FFFF"><strong>Nama </strong></td>
                  <td width="15%" align="center" bgcolor="#0066FF"><strong>Sponsor</strong></td>
                  <td width="15%" align="center" bgcolor="#99CCCC"><strong>Upline</strong></td>
                  <td width="14%" align="center" bgcolor="#FFFF99"><strong>No HP </strong></td>
                  <td width="11%" align="center" bgcolor="#CCCCCC"><strong>Status</strong></td>
                </tr>
                <?
   		$n=1;
		while($row = $db->fetch_row()) {
			if($row[2] > 0) {
				$status = "AKTIF";
				$cl_status = "status_active";
			} else if($row[3] > 0) {
				$status = "BLOKIR";
				$cl_status = "status_blokir";	
			} else {
				$status = "FREE";
				$cl_status = "status_free";
			}			
   ?>
                <tr>
                  <td bgcolor="#FFCCCC"><div align="center">
                      <?= $n; ?>
                  </div></td>
                  <td bgcolor="#FFFFCC"><div align="center">
                      <?= $row[0]; ?>
                  </div></td>
                  <td bgcolor="#66FFFF"><div align="center">
                      <?= $row[1]; ?>
                  </div></td>
                  <td bgcolor="#0066FF"><div align="center">
                      <?= $row[10]; ?>
                  </div></td>
                  <td bgcolor="#99CCCC"><div align="center">
                      <?= $row[9]; ?>
                  </div></td>
                  <td bgcolor="#FFFF99"><div align="center">
                      <?= $row[4]; ?>
                    </div>
                  
                  <td bgcolor="#CCCCCC" class="<?= $cl_status; ?>" align="center"><div align="center">
                      <?= $status; ?>
                  </div></td>
                </tr>
                <?
	 	$n++;
		 }
	 ?>
              </table>
              <div align="center"><strong> </strong><br />
              </div>
            </div>
        </div>
      </div>
      <?
		}
		}
	?>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem">
          <div style="display:yes;">
            <div align="center">
              <?
		$lv=26;
		for($i=25;$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
			
			if($ja > 0 or $jf > 0) {
?>
            </div>
          </div>
        </div>
      </div>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem"><strong> Level
              <?= $j; ?>
    : <span style="color:#006600">Aktif
    <?= $ja; ?>
    </span> Orang</strong>
            <div style="display:yes;">
              <?
$db->select("a.username, a.nama, a.status, a.blokir, a.hp, a.phone, a.email, 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 count(*), sum(poin) kunjung from banner_kanan as a inner join upline as b on a.username=b.username and b.upline$i='$user_session'"; 
    $resultpengunjung = mysql_query($sqlpengunjung);
    $pengunjung=mysql_fetch_object($resultpengunjung);
    $totalpengunjung26=$pengunjung->kunjung;
		?>
              <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
                <tr>
                  <td width="7%" align="center" bgcolor="#FFCCCC"><strong>#</strong></td>
                  <td width="15%" align="center" bgcolor="#FFFFCC"><strong>Username </strong></td>
                  <td width="23%" align="center" bgcolor="#66FFFF"><strong>Nama </strong></td>
                  <td width="15%" align="center" bgcolor="#0066FF"><strong>Sponsor</strong></td>
                  <td width="15%" align="center" bgcolor="#99CCCC"><strong>Upline</strong></td>
                  <td width="14%" align="center" bgcolor="#FFFF99"><strong>No HP </strong></td>
                  <td width="11%" align="center" bgcolor="#CCCCCC"><strong>Status</strong></td>
                </tr>
                <?
   		$n=1;
		while($row = $db->fetch_row()) {
			if($row[2] > 0) {
				$status = "AKTIF";
				$cl_status = "status_active";
			} else if($row[3] > 0) {
				$status = "BLOKIR";
				$cl_status = "status_blokir";	
			} else {
				$status = "FREE";
				$cl_status = "status_free";
			}			
   ?>
                <tr>
                  <td bgcolor="#FFCCCC"><div align="center">
                      <?= $n; ?>
                  </div></td>
                  <td bgcolor="#FFFFCC"><div align="center">
                      <?= $row[0]; ?>
                  </div></td>
                  <td bgcolor="#66FFFF"><div align="center">
                      <?= $row[1]; ?>
                  </div></td>
                  <td bgcolor="#0066FF"><div align="center">
                      <?= $row[10]; ?>
                  </div></td>
                  <td bgcolor="#99CCCC"><div align="center">
                      <?= $row[9]; ?>
                  </div></td>
                  <td bgcolor="#FFFF99"><div align="center">
                      <?= $row[4]; ?>
                    </div>
                  
                  <td bgcolor="#CCCCCC" class="<?= $cl_status; ?>" align="center"><div align="center">
                      <?= $status; ?>
                  </div></td>
                </tr>
                <?
	 	$n++;
		 }
	 ?>
              </table>
              <div align="center"><strong> </strong><br />
              </div>
            </div>
        </div>
      </div>
      <?
		}
		}
	?>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem">
          <div style="display:yes;">
            <div align="center">
              <?
		$lv=27;
		for($i=26;$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
			
			if($ja > 0 or $jf > 0) {
?>
            </div>
          </div>
        </div>
      </div>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem"><strong> Level
              <?= $j; ?>
    : <span style="color:#006600">Aktif
    <?= $ja; ?>
    </span> Orang</strong>
            <div style="display:yes;">
              <?
$db->select("a.username, a.nama, a.status, a.blokir, a.hp, a.phone, a.email, 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 count(*), sum(poin) kunjung from banner_kanan as a inner join upline as b on a.username=b.username and b.upline$i='$user_session'"; 
    $resultpengunjung = mysql_query($sqlpengunjung);
    $pengunjung=mysql_fetch_object($resultpengunjung);
    $totalpengunjung27=$pengunjung->kunjung;
		?>
              <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
                <tr>
                  <td width="7%" align="center" bgcolor="#FFCCCC"><strong>#</strong></td>
                  <td width="15%" align="center" bgcolor="#FFFFCC"><strong>Username </strong></td>
                  <td width="23%" align="center" bgcolor="#66FFFF"><strong>Nama </strong></td>
                  <td width="15%" align="center" bgcolor="#0066FF"><strong>Sponsor</strong></td>
                  <td width="15%" align="center" bgcolor="#99CCCC"><strong>Upline</strong></td>
                  <td width="14%" align="center" bgcolor="#FFFF99"><strong>No HP </strong></td>
                  <td width="11%" align="center" bgcolor="#CCCCCC"><strong>Status</strong></td>
                </tr>
                <?
   		$n=1;
		while($row = $db->fetch_row()) {
			if($row[2] > 0) {
				$status = "AKTIF";
				$cl_status = "status_active";
			} else if($row[3] > 0) {
				$status = "BLOKIR";
				$cl_status = "status_blokir";	
			} else {
				$status = "FREE";
				$cl_status = "status_free";
			}			
   ?>
                <tr>
                  <td bgcolor="#FFCCCC"><div align="center">
                      <?= $n; ?>
                  </div></td>
                  <td bgcolor="#FFFFCC"><div align="center">
                      <?= $row[0]; ?>
                  </div></td>
                  <td bgcolor="#66FFFF"><div align="center">
                      <?= $row[1]; ?>
                  </div></td>
                  <td bgcolor="#0066FF"><div align="center">
                      <?= $row[10]; ?>
                  </div></td>
                  <td bgcolor="#99CCCC"><div align="center">
                      <?= $row[9]; ?>
                  </div></td>
                  <td bgcolor="#FFFF99"><div align="center">
                      <?= $row[4]; ?>
                    </div>
                  
                  <td bgcolor="#CCCCCC" class="<?= $cl_status; ?>" align="center"><div align="center">
                      <?= $status; ?>
                  </div></td>
                </tr>
                <?
	 	$n++;
		 }
	 ?>
              </table>
              <div align="center"><strong> </strong><br />
              </div>
            </div>
        </div>
      </div>
      <?
		}
		}
	?>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem">
          <div style="display:yes;">
            <div align="center">
              <?
		$lv=28;
		for($i=27;$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
			
			if($ja > 0 or $jf > 0) {
?>
            </div>
          </div>
        </div>
      </div>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem"><strong> Level
              <?= $j; ?>
    : <span style="color:#006600">Aktif
    <?= $ja; ?>
    </span> Orang</strong>
            <div style="display:yes;">
              <?
$db->select("a.username, a.nama, a.status, a.blokir, a.hp, a.phone, a.email, 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 count(*), sum(poin) kunjung from banner_kanan as a inner join upline as b on a.username=b.username and b.upline$i='$user_session'"; 
    $resultpengunjung = mysql_query($sqlpengunjung);
    $pengunjung=mysql_fetch_object($resultpengunjung);
    $totalpengunjung28=$pengunjung->kunjung;
		?>
              <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
                <tr>
                  <td width="7%" align="center" bgcolor="#FFCCCC"><strong>#</strong></td>
                  <td width="15%" align="center" bgcolor="#FFFFCC"><strong>Username </strong></td>
                  <td width="23%" align="center" bgcolor="#66FFFF"><strong>Nama </strong></td>
                  <td width="15%" align="center" bgcolor="#0066FF"><strong>Sponsor</strong></td>
                  <td width="15%" align="center" bgcolor="#99CCCC"><strong>Upline</strong></td>
                  <td width="14%" align="center" bgcolor="#FFFF99"><strong>No HP </strong></td>
                  <td width="11%" align="center" bgcolor="#CCCCCC"><strong>Status</strong></td>
                </tr>
                <?
   		$n=1;
		while($row = $db->fetch_row()) {
			if($row[2] > 0) {
				$status = "AKTIF";
				$cl_status = "status_active";
			} else if($row[3] > 0) {
				$status = "BLOKIR";
				$cl_status = "status_blokir";	
			} else {
				$status = "FREE";
				$cl_status = "status_free";
			}			
   ?>
                <tr>
                  <td bgcolor="#FFCCCC"><div align="center">
                      <?= $n; ?>
                  </div></td>
                  <td bgcolor="#FFFFCC"><div align="center">
                      <?= $row[0]; ?>
                  </div></td>
                  <td bgcolor="#66FFFF"><div align="center">
                      <?= $row[1]; ?>
                  </div></td>
                  <td bgcolor="#0066FF"><div align="center">
                      <?= $row[10]; ?>
                  </div></td>
                  <td bgcolor="#99CCCC"><div align="center">
                      <?= $row[9]; ?>
                  </div></td>
                  <td bgcolor="#FFFF99"><div align="center">
                      <?= $row[4]; ?>
                    </div>
                  
                  <td bgcolor="#CCCCCC" class="<?= $cl_status; ?>" align="center"><div align="center">
                      <?= $status; ?>
                  </div></td>
                </tr>
                <?
	 	$n++;
		 }
	 ?>
              </table>
              <div align="center"><strong> </strong><br />
              </div>
            </div>
        </div>
      </div>
      <?
		}
		}
	?>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem">
          <div style="display:yes;">
            <div align="center">
              <?
		$lv=29;
		for($i=28;$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
			
			if($ja > 0 or $jf > 0) {
?>
            </div>
          </div>
        </div>
      </div>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem"><strong> Level
              <?= $j; ?>
    : <span style="color:#006600">Aktif
    <?= $ja; ?>
    </span> Orang</strong>
            <div style="display:yes;">
              <?
$db->select("a.username, a.nama, a.status, a.blokir, a.hp, a.phone, a.email, 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 count(*), sum(poin) kunjung from banner_kanan as a inner join upline as b on a.username=b.username and b.upline$i='$user_session'"; 
    $resultpengunjung = mysql_query($sqlpengunjung);
    $pengunjung=mysql_fetch_object($resultpengunjung);
    $totalpengunjung29=$pengunjung->kunjung;
		?>
              <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
                <tr>
                  <td width="7%" align="center" bgcolor="#FFCCCC"><strong>#</strong></td>
                  <td width="15%" align="center" bgcolor="#FFFFCC"><strong>Username </strong></td>
                  <td width="23%" align="center" bgcolor="#66FFFF"><strong>Nama </strong></td>
                  <td width="15%" align="center" bgcolor="#0066FF"><strong>Sponsor</strong></td>
                  <td width="15%" align="center" bgcolor="#99CCCC"><strong>Upline</strong></td>
                  <td width="14%" align="center" bgcolor="#FFFF99"><strong>No HP </strong></td>
                  <td width="11%" align="center" bgcolor="#CCCCCC"><strong>Status</strong></td>
                </tr>
                <?
   		$n=1;
		while($row = $db->fetch_row()) {
			if($row[2] > 0) {
				$status = "AKTIF";
				$cl_status = "status_active";
			} else if($row[3] > 0) {
				$status = "BLOKIR";
				$cl_status = "status_blokir";	
			} else {
				$status = "FREE";
				$cl_status = "status_free";
			}			
   ?>
                <tr>
                  <td bgcolor="#FFCCCC"><div align="center">
                      <?= $n; ?>
                  </div></td>
                  <td bgcolor="#FFFFCC"><div align="center">
                      <?= $row[0]; ?>
                  </div></td>
                  <td bgcolor="#66FFFF"><div align="center">
                      <?= $row[1]; ?>
                  </div></td>
                  <td bgcolor="#0066FF"><div align="center">
                      <?= $row[10]; ?>
                  </div></td>
                  <td bgcolor="#99CCCC"><div align="center">
                      <?= $row[9]; ?>
                  </div></td>
                  <td bgcolor="#FFFF99"><div align="center">
                      <?= $row[4]; ?>
                    </div>
                  
                  <td bgcolor="#CCCCCC" class="<?= $cl_status; ?>" align="center"><div align="center">
                      <?= $status; ?>
                  </div></td>
                </tr>
                <?
	 	$n++;
		 }
	 ?>
              </table>
              <div align="center"><strong> </strong><br />
              </div>
            </div>
        </div>
      </div>
      <?
		}
		}
	?>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem">
          <div style="display:yes;">
            <div align="center">
              <?
		$lv=30;
		for($i=29;$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
			
			if($ja > 0 or $jf > 0) {
?>
            </div>
          </div>
        </div>
      </div>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem"><strong> Level
              <?= $j; ?>
    : <span style="color:#006600">Aktif
    <?= $ja; ?>
    </span> Orang</strong>
            <div style="display:yes;">
              <?
$db->select("a.username, a.nama, a.status, a.blokir, a.hp, a.phone, a.email, 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 count(*), sum(poin) kunjung from banner_kanan as a inner join upline as b on a.username=b.username and b.upline$i='$user_session'"; 
    $resultpengunjung = mysql_query($sqlpengunjung);
    $pengunjung=mysql_fetch_object($resultpengunjung);
    $totalpengunjung30=$pengunjung->kunjung;
		?>
              <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
                <tr>
                  <td width="7%" align="center" bgcolor="#FFCCCC"><strong>#</strong></td>
                  <td width="15%" align="center" bgcolor="#FFFFCC"><strong>Username </strong></td>
                  <td width="23%" align="center" bgcolor="#66FFFF"><strong>Nama </strong></td>
                  <td width="15%" align="center" bgcolor="#0066FF"><strong>Sponsor</strong></td>
                  <td width="15%" align="center" bgcolor="#99CCCC"><strong>Upline</strong></td>
                  <td width="14%" align="center" bgcolor="#FFFF99"><strong>No HP </strong></td>
                  <td width="11%" align="center" bgcolor="#CCCCCC"><strong>Status</strong></td>
                </tr>
                <?
   		$n=1;
		while($row = $db->fetch_row()) {
			if($row[2] > 0) {
				$status = "AKTIF";
				$cl_status = "status_active";
			} else if($row[3] > 0) {
				$status = "BLOKIR";
				$cl_status = "status_blokir";	
			} else {
				$status = "FREE";
				$cl_status = "status_free";
			}			
   ?>
                <tr>
                  <td bgcolor="#FFCCCC"><div align="center">
                      <?= $n; ?>
                  </div></td>
                  <td bgcolor="#FFFFCC"><div align="center">
                      <?= $row[0]; ?>
                  </div></td>
                  <td bgcolor="#66FFFF"><div align="center">
                      <?= $row[1]; ?>
                  </div></td>
                  <td bgcolor="#0066FF"><div align="center">
                      <?= $row[10]; ?>
                  </div></td>
                  <td bgcolor="#99CCCC"><div align="center">
                      <?= $row[9]; ?>
                  </div></td>
                  <td bgcolor="#FFFF99"><div align="center">
                      <?= $row[4]; ?>
                    </div>
                  
                  <td bgcolor="#CCCCCC" class="<?= $cl_status; ?>" align="center"><div align="center">
                      <?= $status; ?>
                  </div></td>
                </tr>
                <?
	 	$n++;
		 }
	 ?>
              </table>
              <div align="center"><strong> </strong><br />
              </div>
            </div>
        </div>
      </div>
      <?
		}
		}
	?>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem">
          <div style="display:yes;">
            <div align="center">
              <?
		$lv=31;
		for($i=30;$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
			
			if($ja > 0 or $jf > 0) {
?>
            </div>
          </div>
        </div>
      </div>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem"><strong> Level
              <?= $j; ?>
    : <span style="color:#006600">Aktif
    <?= $ja; ?>
    </span> Orang</strong>
            <div style="display:yes;">
              <?
$db->select("a.username, a.nama, a.status, a.blokir, a.hp, a.phone, a.email, 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 count(*), sum(poin) kunjung from banner_kanan as a inner join upline as b on a.username=b.username and b.upline$i='$user_session'"; 
    $resultpengunjung = mysql_query($sqlpengunjung);
    $pengunjung=mysql_fetch_object($resultpengunjung);
    $totalpengunjung31=$pengunjung->kunjung;
		?>
              <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
                <tr>
                  <td width="7%" align="center" bgcolor="#FFCCCC"><strong>#</strong></td>
                  <td width="15%" align="center" bgcolor="#FFFFCC"><strong>Username </strong></td>
                  <td width="23%" align="center" bgcolor="#66FFFF"><strong>Nama </strong></td>
                  <td width="15%" align="center" bgcolor="#0066FF"><strong>Sponsor</strong></td>
                  <td width="15%" align="center" bgcolor="#99CCCC"><strong>Upline</strong></td>
                  <td width="14%" align="center" bgcolor="#FFFF99"><strong>No HP </strong></td>
                  <td width="11%" align="center" bgcolor="#CCCCCC"><strong>Status</strong></td>
                </tr>
                <?
   		$n=1;
		while($row = $db->fetch_row()) {
			if($row[2] > 0) {
				$status = "AKTIF";
				$cl_status = "status_active";
			} else if($row[3] > 0) {
				$status = "BLOKIR";
				$cl_status = "status_blokir";	
			} else {
				$status = "FREE";
				$cl_status = "status_free";
			}			
   ?>
                <tr>
                  <td bgcolor="#FFCCCC"><div align="center">
                      <?= $n; ?>
                  </div></td>
                  <td bgcolor="#FFFFCC"><div align="center">
                      <?= $row[0]; ?>
                  </div></td>
                  <td bgcolor="#66FFFF"><div align="center">
                      <?= $row[1]; ?>
                  </div></td>
                  <td bgcolor="#0066FF"><div align="center">
                      <?= $row[10]; ?>
                  </div></td>
                  <td bgcolor="#99CCCC"><div align="center">
                      <?= $row[9]; ?>
                  </div></td>
                  <td bgcolor="#FFFF99"><div align="center">
                      <?= $row[4]; ?>
                    </div>
                  
                  <td bgcolor="#CCCCCC" class="<?= $cl_status; ?>" align="center"><div align="center">
                      <?= $status; ?>
                  </div></td>
                </tr>
                <?
	 	$n++;
		 }
	 ?>
              </table>
              <div align="center"><strong> </strong><br />
              </div>
            </div>
        </div>
      </div>
      <?
		}
		}
	?>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem">
          <div style="display:yes;">
            <div align="center">
              <?
		$lv=32;
		for($i=31;$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
			
			if($ja > 0 or $jf > 0) {
?>
            </div>
          </div>
        </div>
      </div>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem"><strong> Level
              <?= $j; ?>
    : <span style="color:#006600">Aktif
    <?= $ja; ?>
    </span> Orang</strong>
            <div style="display:yes;">
              <?
$db->select("a.username, a.nama, a.status, a.blokir, a.hp, a.phone, a.email, 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 count(*), sum(poin) kunjung from banner_kanan as a inner join upline as b on a.username=b.username and b.upline$i='$user_session'"; 
    $resultpengunjung = mysql_query($sqlpengunjung);
    $pengunjung=mysql_fetch_object($resultpengunjung);
    $totalpengunjung32=$pengunjung->kunjung;
		?>
              <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
                <tr>
                  <td width="7%" align="center" bgcolor="#FFCCCC"><strong>#</strong></td>
                  <td width="15%" align="center" bgcolor="#FFFFCC"><strong>Username </strong></td>
                  <td width="23%" align="center" bgcolor="#66FFFF"><strong>Nama </strong></td>
                  <td width="15%" align="center" bgcolor="#0066FF"><strong>Sponsor</strong></td>
                  <td width="15%" align="center" bgcolor="#99CCCC"><strong>Upline</strong></td>
                  <td width="14%" align="center" bgcolor="#FFFF99"><strong>No HP </strong></td>
                  <td width="11%" align="center" bgcolor="#CCCCCC"><strong>Status</strong></td>
                </tr>
                <?
   		$n=1;
		while($row = $db->fetch_row()) {
			if($row[2] > 0) {
				$status = "AKTIF";
				$cl_status = "status_active";
			} else if($row[3] > 0) {
				$status = "BLOKIR";
				$cl_status = "status_blokir";	
			} else {
				$status = "FREE";
				$cl_status = "status_free";
			}			
   ?>
                <tr>
                  <td bgcolor="#FFCCCC"><div align="center">
                      <?= $n; ?>
                  </div></td>
                  <td bgcolor="#FFFFCC"><div align="center">
                      <?= $row[0]; ?>
                  </div></td>
                  <td bgcolor="#66FFFF"><div align="center">
                      <?= $row[1]; ?>
                  </div></td>
                  <td bgcolor="#0066FF"><div align="center">
                      <?= $row[10]; ?>
                  </div></td>
                  <td bgcolor="#99CCCC"><div align="center">
                      <?= $row[9]; ?>
                  </div></td>
                  <td bgcolor="#FFFF99"><div align="center">
                      <?= $row[4]; ?>
                    </div>
                  
                  <td bgcolor="#CCCCCC" class="<?= $cl_status; ?>" align="center"><div align="center">
                      <?= $status; ?>
                  </div></td>
                </tr>
                <?
	 	$n++;
		 }
	 ?>
              </table>
              <div align="center"><strong> </strong><br />
              </div>
            </div>
        </div>
      </div>
      <?
		}
		}
	?>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem">
          <div style="display:yes;">
            <div align="center">
              <?
		$lv=33;
		for($i=32;$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
			
			if($ja > 0 or $jf > 0) {
?>
            </div>
          </div>
        </div>
      </div>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem"><strong> Level
              <?= $j; ?>
    : <span style="color:#006600">Aktif
    <?= $ja; ?>
    </span> Orang</strong>
            <div style="display:yes;">
              <?
$db->select("a.username, a.nama, a.status, a.blokir, a.hp, a.phone, a.email, 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 count(*), sum(poin) kunjung from banner_kanan as a inner join upline as b on a.username=b.username and b.upline$i='$user_session'"; 
    $resultpengunjung = mysql_query($sqlpengunjung);
    $pengunjung=mysql_fetch_object($resultpengunjung);
    $totalpengunjung33=$pengunjung->kunjung;
		?>
              <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
                <tr>
                  <td width="7%" align="center" bgcolor="#FFCCCC"><strong>#</strong></td>
                  <td width="15%" align="center" bgcolor="#FFFFCC"><strong>Username </strong></td>
                  <td width="23%" align="center" bgcolor="#66FFFF"><strong>Nama </strong></td>
                  <td width="15%" align="center" bgcolor="#0066FF"><strong>Sponsor</strong></td>
                  <td width="15%" align="center" bgcolor="#99CCCC"><strong>Upline</strong></td>
                  <td width="14%" align="center" bgcolor="#FFFF99"><strong>No HP </strong></td>
                  <td width="11%" align="center" bgcolor="#CCCCCC"><strong>Status</strong></td>
                </tr>
                <?
   		$n=1;
		while($row = $db->fetch_row()) {
			if($row[2] > 0) {
				$status = "AKTIF";
				$cl_status = "status_active";
			} else if($row[3] > 0) {
				$status = "BLOKIR";
				$cl_status = "status_blokir";	
			} else {
				$status = "FREE";
				$cl_status = "status_free";
			}			
   ?>
                <tr>
                  <td bgcolor="#FFCCCC"><div align="center">
                      <?= $n; ?>
                  </div></td>
                  <td bgcolor="#FFFFCC"><div align="center">
                      <?= $row[0]; ?>
                  </div></td>
                  <td bgcolor="#66FFFF"><div align="center">
                      <?= $row[1]; ?>
                  </div></td>
                  <td bgcolor="#0066FF"><div align="center">
                      <?= $row[10]; ?>
                  </div></td>
                  <td bgcolor="#99CCCC"><div align="center">
                      <?= $row[9]; ?>
                  </div></td>
                  <td bgcolor="#FFFF99"><div align="center">
                      <?= $row[4]; ?>
                    </div>
                  
                  <td bgcolor="#CCCCCC" class="<?= $cl_status; ?>" align="center"><div align="center">
                      <?= $status; ?>
                  </div></td>
                </tr>
                <?
	 	$n++;
		 }
	 ?>
              </table>
              <div align="center"><strong> </strong><br />
              </div>
            </div>
        </div>
      </div>
      <?
		}
		}
	?>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem">
          <div style="display:yes;">
            <div align="center">
              <?
		$lv=34;
		for($i=33;$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
			
			if($ja > 0 or $jf > 0) {
?>
            </div>
          </div>
        </div>
      </div>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem"><strong> Level
              <?= $j; ?>
    : <span style="color:#006600">Aktif
    <?= $ja; ?>
    </span> Orang</strong>
            <div style="display:yes;">
              <?
$db->select("a.username, a.nama, a.status, a.blokir, a.hp, a.phone, a.email, 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 count(*), sum(poin) kunjung from banner_kanan as a inner join upline as b on a.username=b.username and b.upline$i='$user_session'"; 
    $resultpengunjung = mysql_query($sqlpengunjung);
    $pengunjung=mysql_fetch_object($resultpengunjung);
    $totalpengunjung34=$pengunjung->kunjung;
		?>
              <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
                <tr>
                  <td width="7%" align="center" bgcolor="#FFCCCC"><strong>#</strong></td>
                  <td width="15%" align="center" bgcolor="#FFFFCC"><strong>Username </strong></td>
                  <td width="23%" align="center" bgcolor="#66FFFF"><strong>Nama </strong></td>
                  <td width="15%" align="center" bgcolor="#0066FF"><strong>Sponsor</strong></td>
                  <td width="15%" align="center" bgcolor="#99CCCC"><strong>Upline</strong></td>
                  <td width="14%" align="center" bgcolor="#FFFF99"><strong>No HP </strong></td>
                  <td width="11%" align="center" bgcolor="#CCCCCC"><strong>Status</strong></td>
                </tr>
                <?
   		$n=1;
		while($row = $db->fetch_row()) {
			if($row[2] > 0) {
				$status = "AKTIF";
				$cl_status = "status_active";
			} else if($row[3] > 0) {
				$status = "BLOKIR";
				$cl_status = "status_blokir";	
			} else {
				$status = "FREE";
				$cl_status = "status_free";
			}			
   ?>
                <tr>
                  <td bgcolor="#FFCCCC"><div align="center">
                      <?= $n; ?>
                  </div></td>
                  <td bgcolor="#FFFFCC"><div align="center">
                      <?= $row[0]; ?>
                  </div></td>
                  <td bgcolor="#66FFFF"><div align="center">
                      <?= $row[1]; ?>
                  </div></td>
                  <td bgcolor="#0066FF"><div align="center">
                      <?= $row[10]; ?>
                  </div></td>
                  <td bgcolor="#99CCCC"><div align="center">
                      <?= $row[9]; ?>
                  </div></td>
                  <td bgcolor="#FFFF99"><div align="center">
                      <?= $row[4]; ?>
                    </div>
                  
                  <td bgcolor="#CCCCCC" class="<?= $cl_status; ?>" align="center"><div align="center">
                      <?= $status; ?>
                  </div></td>
                </tr>
                <?
	 	$n++;
		 }
	 ?>
              </table>
              <div align="center"><strong> </strong><br />
              </div>
            </div>
        </div>
      </div>
      <?
		}
		}
	?>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem">
          <div style="display:yes;">
            <div align="center">
              <?
		$lv=35;
		for($i=34;$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
			
			if($ja > 0 or $jf > 0) {
?>
            </div>
          </div>
        </div>
      </div>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem"><strong> Level
              <?= $j; ?>
    : <span style="color:#006600">Aktif
    <?= $ja; ?>
    </span> Orang</strong>
            <div style="display:yes;">
              <?
$db->select("a.username, a.nama, a.status, a.blokir, a.hp, a.phone, a.email, 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 count(*), sum(poin) kunjung from banner_kanan as a inner join upline as b on a.username=b.username and b.upline$i='$user_session'"; 
    $resultpengunjung = mysql_query($sqlpengunjung);
    $pengunjung=mysql_fetch_object($resultpengunjung);
    $totalpengunjung35=$pengunjung->kunjung;
		?>
              <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
                <tr>
                  <td width="7%" align="center" bgcolor="#FFCCCC"><strong>#</strong></td>
                  <td width="15%" align="center" bgcolor="#FFFFCC"><strong>Username </strong></td>
                  <td width="23%" align="center" bgcolor="#66FFFF"><strong>Nama </strong></td>
                  <td width="15%" align="center" bgcolor="#0066FF"><strong>Sponsor</strong></td>
                  <td width="15%" align="center" bgcolor="#99CCCC"><strong>Upline</strong></td>
                  <td width="14%" align="center" bgcolor="#FFFF99"><strong>No HP </strong></td>
                  <td width="11%" align="center" bgcolor="#CCCCCC"><strong>Status</strong></td>
                </tr>
                <?
   		$n=1;
		while($row = $db->fetch_row()) {
			if($row[2] > 0) {
				$status = "AKTIF";
				$cl_status = "status_active";
			} else if($row[3] > 0) {
				$status = "BLOKIR";
				$cl_status = "status_blokir";	
			} else {
				$status = "FREE";
				$cl_status = "status_free";
			}			
   ?>
                <tr>
                  <td bgcolor="#FFCCCC"><div align="center">
                      <?= $n; ?>
                  </div></td>
                  <td bgcolor="#FFFFCC"><div align="center">
                      <?= $row[0]; ?>
                  </div></td>
                  <td bgcolor="#66FFFF"><div align="center">
                      <?= $row[1]; ?>
                  </div></td>
                  <td bgcolor="#0066FF"><div align="center">
                      <?= $row[10]; ?>
                  </div></td>
                  <td bgcolor="#99CCCC"><div align="center">
                      <?= $row[9]; ?>
                  </div></td>
                  <td bgcolor="#FFFF99"><div align="center">
                      <?= $row[4]; ?>
                    </div>
                  
                  <td bgcolor="#CCCCCC" class="<?= $cl_status; ?>" align="center"><div align="center">
                      <?= $status; ?>
                  </div></td>
                </tr>
                <?
	 	$n++;
		 }
	 ?>
              </table>
              <div align="center"><strong> </strong><br />
              </div>
            </div>
        </div>
      </div>
      <?
		}
		}
	?>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem">
          <div style="display:yes;">
            <div align="center">
              <?
		$lv=36;
		for($i=35;$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
			
			if($ja > 0 or $jf > 0) {
?>
            </div>
          </div>
        </div>
      </div>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem"><strong> Level
              <?= $j; ?>
    : <span style="color:#006600">Aktif
    <?= $ja; ?>
    </span> Orang</strong>
            <div style="display:yes;">
              <?
$db->select("a.username, a.nama, a.status, a.blokir, a.hp, a.phone, a.email, 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 count(*), sum(poin) kunjung from banner_kanan as a inner join upline as b on a.username=b.username and b.upline$i='$user_session'"; 
    $resultpengunjung = mysql_query($sqlpengunjung);
    $pengunjung=mysql_fetch_object($resultpengunjung);
    $totalpengunjung36=$pengunjung->kunjung;
		?>
              <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
                <tr>
                  <td width="7%" align="center" bgcolor="#FFCCCC"><strong>#</strong></td>
                  <td width="15%" align="center" bgcolor="#FFFFCC"><strong>Username </strong></td>
                  <td width="23%" align="center" bgcolor="#66FFFF"><strong>Nama </strong></td>
                  <td width="15%" align="center" bgcolor="#0066FF"><strong>Sponsor</strong></td>
                  <td width="15%" align="center" bgcolor="#99CCCC"><strong>Upline</strong></td>
                  <td width="14%" align="center" bgcolor="#FFFF99"><strong>No HP </strong></td>
                  <td width="11%" align="center" bgcolor="#CCCCCC"><strong>Status</strong></td>
                </tr>
                <?
   		$n=1;
		while($row = $db->fetch_row()) {
			if($row[2] > 0) {
				$status = "AKTIF";
				$cl_status = "status_active";
			} else if($row[3] > 0) {
				$status = "BLOKIR";
				$cl_status = "status_blokir";	
			} else {
				$status = "FREE";
				$cl_status = "status_free";
			}			
   ?>
                <tr>
                  <td bgcolor="#FFCCCC"><div align="center">
                      <?= $n; ?>
                  </div></td>
                  <td bgcolor="#FFFFCC"><div align="center">
                      <?= $row[0]; ?>
                  </div></td>
                  <td bgcolor="#66FFFF"><div align="center">
                      <?= $row[1]; ?>
                  </div></td>
                  <td bgcolor="#0066FF"><div align="center">
                      <?= $row[10]; ?>
                  </div></td>
                  <td bgcolor="#99CCCC"><div align="center">
                      <?= $row[9]; ?>
                  </div></td>
                  <td bgcolor="#FFFF99"><div align="center">
                      <?= $row[4]; ?>
                    </div>
                  
                  <td bgcolor="#CCCCCC" class="<?= $cl_status; ?>" align="center"><div align="center">
                      <?= $status; ?>
                  </div></td>
                </tr>
                <?
	 	$n++;
		 }
	 ?>
              </table>
              <div align="center"><strong> </strong><br />
              </div>
            </div>
        </div>
      </div>
      <?
		}
		}
	?>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem">
          <div style="display:yes;">
            <div align="center">
              <?
		$lv=37;
		for($i=36;$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
			
			if($ja > 0 or $jf > 0) {
?>
            </div>
          </div>
        </div>
      </div>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem"><strong> Level
              <?= $j; ?>
    : <span style="color:#006600">Aktif
    <?= $ja; ?>
    </span> Orang</strong>
            <div style="display:yes;">
              <?
$db->select("a.username, a.nama, a.status, a.blokir, a.hp, a.phone, a.email, 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 count(*), sum(poin) kunjung from banner_kanan as a inner join upline as b on a.username=b.username and b.upline$i='$user_session'"; 
    $resultpengunjung = mysql_query($sqlpengunjung);
    $pengunjung=mysql_fetch_object($resultpengunjung);
    $totalpengunjung37=$pengunjung->kunjung;
		?>
              <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
                <tr>
                  <td width="7%" align="center" bgcolor="#FFCCCC"><strong>#</strong></td>
                  <td width="15%" align="center" bgcolor="#FFFFCC"><strong>Username </strong></td>
                  <td width="23%" align="center" bgcolor="#66FFFF"><strong>Nama </strong></td>
                  <td width="15%" align="center" bgcolor="#0066FF"><strong>Sponsor</strong></td>
                  <td width="15%" align="center" bgcolor="#99CCCC"><strong>Upline</strong></td>
                  <td width="14%" align="center" bgcolor="#FFFF99"><strong>No HP </strong></td>
                  <td width="11%" align="center" bgcolor="#CCCCCC"><strong>Status</strong></td>
                </tr>
                <?
   		$n=1;
		while($row = $db->fetch_row()) {
			if($row[2] > 0) {
				$status = "AKTIF";
				$cl_status = "status_active";
			} else if($row[3] > 0) {
				$status = "BLOKIR";
				$cl_status = "status_blokir";	
			} else {
				$status = "FREE";
				$cl_status = "status_free";
			}			
   ?>
                <tr>
                  <td bgcolor="#FFCCCC"><div align="center">
                      <?= $n; ?>
                  </div></td>
                  <td bgcolor="#FFFFCC"><div align="center">
                      <?= $row[0]; ?>
                  </div></td>
                  <td bgcolor="#66FFFF"><div align="center">
                      <?= $row[1]; ?>
                  </div></td>
                  <td bgcolor="#0066FF"><div align="center">
                      <?= $row[10]; ?>
                  </div></td>
                  <td bgcolor="#99CCCC"><div align="center">
                      <?= $row[9]; ?>
                  </div></td>
                  <td bgcolor="#FFFF99"><div align="center">
                      <?= $row[4]; ?>
                    </div>
                  
                  <td bgcolor="#CCCCCC" class="<?= $cl_status; ?>" align="center"><div align="center">
                      <?= $status; ?>
                  </div></td>
                </tr>
                <?
	 	$n++;
		 }
	 ?>
              </table>
              <div align="center"><strong> </strong><br />
              </div>
            </div>
        </div>
      </div>
      <?
		}
		}
	?>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem">
          <div style="display:yes;">
            <div align="center">
              <?
		$lv=38;
		for($i=37;$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
			
			if($ja > 0 or $jf > 0) {
?>
            </div>
          </div>
        </div>
      </div>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem"><strong> Level
              <?= $j; ?>
    : <span style="color:#006600">Aktif
    <?= $ja; ?>
    </span> Orang</strong>
            <div style="display:yes;">
              <?
$db->select("a.username, a.nama, a.status, a.blokir, a.hp, a.phone, a.email, 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 count(*), sum(poin) kunjung from banner_kanan as a inner join upline as b on a.username=b.username and b.upline$i='$user_session'"; 
    $resultpengunjung = mysql_query($sqlpengunjung);
    $pengunjung=mysql_fetch_object($resultpengunjung);
    $totalpengunjung38=$pengunjung->kunjung;
		?>
              <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
                <tr>
                  <td width="7%" align="center" bgcolor="#FFCCCC"><strong>#</strong></td>
                  <td width="15%" align="center" bgcolor="#FFFFCC"><strong>Username </strong></td>
                  <td width="23%" align="center" bgcolor="#66FFFF"><strong>Nama </strong></td>
                  <td width="15%" align="center" bgcolor="#0066FF"><strong>Sponsor</strong></td>
                  <td width="15%" align="center" bgcolor="#99CCCC"><strong>Upline</strong></td>
                  <td width="14%" align="center" bgcolor="#FFFF99"><strong>No HP </strong></td>
                  <td width="11%" align="center" bgcolor="#CCCCCC"><strong>Status</strong></td>
                </tr>
                <?
   		$n=1;
		while($row = $db->fetch_row()) {
			if($row[2] > 0) {
				$status = "AKTIF";
				$cl_status = "status_active";
			} else if($row[3] > 0) {
				$status = "BLOKIR";
				$cl_status = "status_blokir";	
			} else {
				$status = "FREE";
				$cl_status = "status_free";
			}			
   ?>
                <tr>
                  <td bgcolor="#FFCCCC"><div align="center">
                      <?= $n; ?>
                  </div></td>
                  <td bgcolor="#FFFFCC"><div align="center">
                      <?= $row[0]; ?>
                  </div></td>
                  <td bgcolor="#66FFFF"><div align="center">
                      <?= $row[1]; ?>
                  </div></td>
                  <td bgcolor="#0066FF"><div align="center">
                      <?= $row[10]; ?>
                  </div></td>
                  <td bgcolor="#99CCCC"><div align="center">
                      <?= $row[9]; ?>
                  </div></td>
                  <td bgcolor="#FFFF99"><div align="center">
                      <?= $row[4]; ?>
                    </div>
                  
                  <td bgcolor="#CCCCCC" class="<?= $cl_status; ?>" align="center"><div align="center">
                      <?= $status; ?>
                  </div></td>
                </tr>
                <?
	 	$n++;
		 }
	 ?>
              </table>
              <div align="center"><strong> </strong><br />
              </div>
            </div>
        </div>
      </div>
      <?
		}
		}
	?>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem">
          <div style="display:yes;">
            <div align="center">
              <?
		$lv=39;
		for($i=38;$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
			
			if($ja > 0 or $jf > 0) {
?>
            </div>
          </div>
        </div>
      </div>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem"><strong> Level
              <?= $j; ?>
    : <span style="color:#006600">Aktif
    <?= $ja; ?>
    </span> Orang</strong>
            <div style="display:yes;">
              <?
$db->select("a.username, a.nama, a.status, a.blokir, a.hp, a.phone, a.email, 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 count(*), sum(poin) kunjung from banner_kanan as a inner join upline as b on a.username=b.username and b.upline$i='$user_session'"; 
    $resultpengunjung = mysql_query($sqlpengunjung);
    $pengunjung=mysql_fetch_object($resultpengunjung);
    $totalpengunjung39=$pengunjung->kunjung;
		?>
              <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
                <tr>
                  <td width="7%" align="center" bgcolor="#FFCCCC"><strong>#</strong></td>
                  <td width="15%" align="center" bgcolor="#FFFFCC"><strong>Username </strong></td>
                  <td width="23%" align="center" bgcolor="#66FFFF"><strong>Nama </strong></td>
                  <td width="15%" align="center" bgcolor="#0066FF"><strong>Sponsor</strong></td>
                  <td width="15%" align="center" bgcolor="#99CCCC"><strong>Upline</strong></td>
                  <td width="14%" align="center" bgcolor="#FFFF99"><strong>No HP </strong></td>
                  <td width="11%" align="center" bgcolor="#CCCCCC"><strong>Status</strong></td>
                </tr>
                <?
   		$n=1;
		while($row = $db->fetch_row()) {
			if($row[2] > 0) {
				$status = "AKTIF";
				$cl_status = "status_active";
			} else if($row[3] > 0) {
				$status = "BLOKIR";
				$cl_status = "status_blokir";	
			} else {
				$status = "FREE";
				$cl_status = "status_free";
			}			
   ?>
                <tr>
                  <td bgcolor="#FFCCCC"><div align="center">
                      <?= $n; ?>
                  </div></td>
                  <td bgcolor="#FFFFCC"><div align="center">
                      <?= $row[0]; ?>
                  </div></td>
                  <td bgcolor="#66FFFF"><div align="center">
                      <?= $row[1]; ?>
                  </div></td>
                  <td bgcolor="#0066FF"><div align="center">
                      <?= $row[10]; ?>
                  </div></td>
                  <td bgcolor="#99CCCC"><div align="center">
                      <?= $row[9]; ?>
                  </div></td>
                  <td bgcolor="#FFFF99"><div align="center">
                      <?= $row[4]; ?>
                    </div>
                  
                  <td bgcolor="#CCCCCC" class="<?= $cl_status; ?>" align="center"><div align="center">
                      <?= $status; ?>
                  </div></td>
                </tr>
                <?
	 	$n++;
		 }
	 ?>
              </table>
              <div align="center"><strong> </strong><br />
              </div>
            </div>
        </div>
      </div>
      <?
		}
		}
	?>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem">
          <div style="display:yes;">
            <div align="center">
              <?
		$lv=40;
		for($i=39;$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
			
			if($ja > 0 or $jf > 0) {
?>
            </div>
          </div>
        </div>
      </div>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem"><strong> Level
              <?= $j; ?>
    : <span style="color:#006600">Aktif
    <?= $ja; ?>
    </span> Orang</strong>
            <div style="display:yes;">
              <?
$db->select("a.username, a.nama, a.status, a.blokir, a.hp, a.phone, a.email, 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 count(*), sum(poin) kunjung from banner_kanan as a inner join upline as b on a.username=b.username and b.upline$i='$user_session'"; 
    $resultpengunjung = mysql_query($sqlpengunjung);
    $pengunjung=mysql_fetch_object($resultpengunjung);
    $totalpengunjung40=$pengunjung->kunjung;
		?>
              <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
                <tr>
                  <td width="7%" align="center" bgcolor="#FFCCCC"><strong>#</strong></td>
                  <td width="15%" align="center" bgcolor="#FFFFCC"><strong>Username </strong></td>
                  <td width="23%" align="center" bgcolor="#66FFFF"><strong>Nama </strong></td>
                  <td width="15%" align="center" bgcolor="#0066FF"><strong>Sponsor</strong></td>
                  <td width="15%" align="center" bgcolor="#99CCCC"><strong>Upline</strong></td>
                  <td width="14%" align="center" bgcolor="#FFFF99"><strong>No HP </strong></td>
                  <td width="11%" align="center" bgcolor="#CCCCCC"><strong>Status</strong></td>
                </tr>
                <?
   		$n=1;
		while($row = $db->fetch_row()) {
			if($row[2] > 0) {
				$status = "AKTIF";
				$cl_status = "status_active";
			} else if($row[3] > 0) {
				$status = "BLOKIR";
				$cl_status = "status_blokir";	
			} else {
				$status = "FREE";
				$cl_status = "status_free";
			}			
   ?>
                <tr>
                  <td bgcolor="#FFCCCC"><div align="center">
                      <?= $n; ?>
                  </div></td>
                  <td bgcolor="#FFFFCC"><div align="center">
                      <?= $row[0]; ?>
                  </div></td>
                  <td bgcolor="#66FFFF"><div align="center">
                      <?= $row[1]; ?>
                  </div></td>
                  <td bgcolor="#0066FF"><div align="center">
                      <?= $row[10]; ?>
                  </div></td>
                  <td bgcolor="#99CCCC"><div align="center">
                      <?= $row[9]; ?>
                  </div></td>
                  <td bgcolor="#FFFF99"><div align="center">
                      <?= $row[4]; ?>
                    </div>
                  
                  <td bgcolor="#CCCCCC" class="<?= $cl_status; ?>" align="center"><div align="center">
                      <?= $status; ?>
                  </div></td>
                </tr>
                <?
	 	$n++;
		 }
	 ?>
              </table>
              <div align="center"><strong> </strong><br />
              </div>
            </div>
        </div>
      </div>
      <?
		}
		}
	?>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem">
          <div style="display:yes;">
            <div align="center">
              <?
		$lv=41;
		for($i=40;$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
			
			if($ja > 0 or $jf > 0) {
?>
            </div>
          </div>
        </div>
      </div>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem"><strong> Level
              <?= $j; ?>
    : <span style="color:#006600">Aktif
    <?= $ja; ?>
    </span> Orang</strong>
            <div style="display:yes;">
              <?
$db->select("a.username, a.nama, a.status, a.blokir, a.hp, a.phone, a.email, 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 count(*), sum(poin) kunjung from banner_kanan as a inner join upline as b on a.username=b.username and b.upline$i='$user_session'"; 
    $resultpengunjung = mysql_query($sqlpengunjung);
    $pengunjung=mysql_fetch_object($resultpengunjung);
    $totalpengunjung41=$pengunjung->kunjung;
		?>
              <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
                <tr>
                  <td width="7%" align="center" bgcolor="#FFCCCC"><strong>#</strong></td>
                  <td width="15%" align="center" bgcolor="#FFFFCC"><strong>Username </strong></td>
                  <td width="23%" align="center" bgcolor="#66FFFF"><strong>Nama </strong></td>
                  <td width="15%" align="center" bgcolor="#0066FF"><strong>Sponsor</strong></td>
                  <td width="15%" align="center" bgcolor="#99CCCC"><strong>Upline</strong></td>
                  <td width="14%" align="center" bgcolor="#FFFF99"><strong>No HP </strong></td>
                  <td width="11%" align="center" bgcolor="#CCCCCC"><strong>Status</strong></td>
                </tr>
                <?
   		$n=1;
		while($row = $db->fetch_row()) {
			if($row[2] > 0) {
				$status = "AKTIF";
				$cl_status = "status_active";
			} else if($row[3] > 0) {
				$status = "BLOKIR";
				$cl_status = "status_blokir";	
			} else {
				$status = "FREE";
				$cl_status = "status_free";
			}			
   ?>
                <tr>
                  <td bgcolor="#FFCCCC"><div align="center">
                      <?= $n; ?>
                  </div></td>
                  <td bgcolor="#FFFFCC"><div align="center">
                      <?= $row[0]; ?>
                  </div></td>
                  <td bgcolor="#66FFFF"><div align="center">
                      <?= $row[1]; ?>
                  </div></td>
                  <td bgcolor="#0066FF"><div align="center">
                      <?= $row[10]; ?>
                  </div></td>
                  <td bgcolor="#99CCCC"><div align="center">
                      <?= $row[9]; ?>
                  </div></td>
                  <td bgcolor="#FFFF99"><div align="center">
                      <?= $row[4]; ?>
                    </div>
                  
                  <td bgcolor="#CCCCCC" class="<?= $cl_status; ?>" align="center"><div align="center">
                      <?= $status; ?>
                  </div></td>
                </tr>
                <?
	 	$n++;
		 }
	 ?>
              </table>
              <div align="center"><strong> </strong><br />
              </div>
            </div>
        </div>
      </div>
      <?
		}
		}
	?>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem">
          <div style="display:yes;">
            <div align="center">
              <?
		$lv=42;
		for($i=41;$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
			
			if($ja > 0 or $jf > 0) {
?>
            </div>
          </div>
        </div>
      </div>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem"><strong> Level
              <?= $j; ?>
    : <span style="color:#006600">Aktif
    <?= $ja; ?>

    </span> Orang</strong>
            <div style="display:yes;">
              <?
$db->select("a.username, a.nama, a.status, a.blokir, a.hp, a.phone, a.email, 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 count(*), sum(poin) kunjung from banner_kanan as a inner join upline as b on a.username=b.username and b.upline$i='$user_session'"; 
    $resultpengunjung = mysql_query($sqlpengunjung);
    $pengunjung=mysql_fetch_object($resultpengunjung);
    $totalpengunjung42=$pengunjung->kunjung;
		?>
              <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
                <tr>
                  <td width="7%" align="center" bgcolor="#FFCCCC"><strong>#</strong></td>
                  <td width="15%" align="center" bgcolor="#FFFFCC"><strong>Username </strong></td>
                  <td width="23%" align="center" bgcolor="#66FFFF"><strong>Nama </strong></td>
                  <td width="15%" align="center" bgcolor="#0066FF"><strong>Sponsor</strong></td>
                  <td width="15%" align="center" bgcolor="#99CCCC"><strong>Upline</strong></td>
                  <td width="14%" align="center" bgcolor="#FFFF99"><strong>No HP </strong></td>
                  <td width="11%" align="center" bgcolor="#CCCCCC"><strong>Status</strong></td>
                </tr>
                <?
   		$n=1;
		while($row = $db->fetch_row()) {
			if($row[2] > 0) {
				$status = "AKTIF";
				$cl_status = "status_active";
			} else if($row[3] > 0) {
				$status = "BLOKIR";
				$cl_status = "status_blokir";	
			} else {
				$status = "FREE";
				$cl_status = "status_free";
			}			
   ?>
                <tr>
                  <td bgcolor="#FFCCCC"><div align="center">
                      <?= $n; ?>
                  </div></td>
                  <td bgcolor="#FFFFCC"><div align="center">
                      <?= $row[0]; ?>
                  </div></td>
                  <td bgcolor="#66FFFF"><div align="center">
                      <?= $row[1]; ?>
                  </div></td>
                  <td bgcolor="#0066FF"><div align="center">
                      <?= $row[10]; ?>
                  </div></td>
                  <td bgcolor="#99CCCC"><div align="center">
                      <?= $row[9]; ?>
                  </div></td>
                  <td bgcolor="#FFFF99"><div align="center">
                      <?= $row[4]; ?>
                    </div>
                  
                  <td bgcolor="#CCCCCC" class="<?= $cl_status; ?>" align="center"><div align="center">
                      <?= $status; ?>
                  </div></td>
                </tr>
                <?
	 	$n++;
		 }
	 ?>
              </table>
              <div align="center"><strong> </strong><br />
              </div>
            </div>
        </div>
      </div>
      <?
		}
		}
	?>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem">
          <div style="display:yes;">
            <div align="center">
              <?
		$lv=43;
		for($i=42;$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
			
			if($ja > 0 or $jf > 0) {
?>
            </div>
          </div>
        </div>
      </div>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem"><strong> Level
              <?= $j; ?>
    : <span style="color:#006600">Aktif
    <?= $ja; ?>
    </span> Orang</strong>
            <div style="display:yes;">
              <?
$db->select("a.username, a.nama, a.status, a.blokir, a.hp, a.phone, a.email, 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 count(*), sum(poin) kunjung from banner_kanan as a inner join upline as b on a.username=b.username and b.upline$i='$user_session'"; 
    $resultpengunjung = mysql_query($sqlpengunjung);
    $pengunjung=mysql_fetch_object($resultpengunjung);
    $totalpengunjung43=$pengunjung->kunjung;
		?>
              <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
                <tr>
                  <td width="7%" align="center" bgcolor="#FFCCCC"><strong>#</strong></td>
                  <td width="15%" align="center" bgcolor="#FFFFCC"><strong>Username </strong></td>
                  <td width="23%" align="center" bgcolor="#66FFFF"><strong>Nama </strong></td>
                  <td width="15%" align="center" bgcolor="#0066FF"><strong>Sponsor</strong></td>
                  <td width="15%" align="center" bgcolor="#99CCCC"><strong>Upline</strong></td>
                  <td width="14%" align="center" bgcolor="#FFFF99"><strong>No HP </strong></td>
                  <td width="11%" align="center" bgcolor="#CCCCCC"><strong>Status</strong></td>
                </tr>
                <?
   		$n=1;
		while($row = $db->fetch_row()) {
			if($row[2] > 0) {
				$status = "AKTIF";
				$cl_status = "status_active";
			} else if($row[3] > 0) {
				$status = "BLOKIR";
				$cl_status = "status_blokir";	
			} else {
				$status = "FREE";
				$cl_status = "status_free";
			}			
   ?>
                <tr>
                  <td bgcolor="#FFCCCC"><div align="center">
                      <?= $n; ?>
                  </div></td>
                  <td bgcolor="#FFFFCC"><div align="center">
                      <?= $row[0]; ?>
                  </div></td>
                  <td bgcolor="#66FFFF"><div align="center">
                      <?= $row[1]; ?>
                  </div></td>
                  <td bgcolor="#0066FF"><div align="center">
                      <?= $row[10]; ?>
                  </div></td>
                  <td bgcolor="#99CCCC"><div align="center">
                      <?= $row[9]; ?>
                  </div></td>
                  <td bgcolor="#FFFF99"><div align="center">
                      <?= $row[4]; ?>
                    </div>
                  
                  <td bgcolor="#CCCCCC" class="<?= $cl_status; ?>" align="center"><div align="center">
                      <?= $status; ?>
                  </div></td>
                </tr>
                <?
	 	$n++;
		 }
	 ?>
              </table>
              <div align="center"><strong> </strong><br />
              </div>
            </div>
        </div>
      </div>
      <?
		}
		}
	?>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem">
          <div style="display:yes;">
            <div align="center">
              <?
		$lv=44;
		for($i=43;$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
			
			if($ja > 0 or $jf > 0) {
?>
            </div>
          </div>
        </div>
      </div>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem"><strong> Level
              <?= $j; ?>
    : <span style="color:#006600">Aktif
    <?= $ja; ?>
    </span> Orang</strong>
            <div style="display:yes;">
              <?
$db->select("a.username, a.nama, a.status, a.blokir, a.hp, a.phone, a.email, 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 count(*), sum(poin) kunjung from banner_kanan as a inner join upline as b on a.username=b.username and b.upline$i='$user_session'"; 
    $resultpengunjung = mysql_query($sqlpengunjung);
    $pengunjung=mysql_fetch_object($resultpengunjung);
    $totalpengunjung44=$pengunjung->kunjung;
		?>
              <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
                <tr>
                  <td width="7%" align="center" bgcolor="#FFCCCC"><strong>#</strong></td>
                  <td width="15%" align="center" bgcolor="#FFFFCC"><strong>Username </strong></td>
                  <td width="23%" align="center" bgcolor="#66FFFF"><strong>Nama </strong></td>
                  <td width="15%" align="center" bgcolor="#0066FF"><strong>Sponsor</strong></td>
                  <td width="15%" align="center" bgcolor="#99CCCC"><strong>Upline</strong></td>
                  <td width="14%" align="center" bgcolor="#FFFF99"><strong>No HP </strong></td>
                  <td width="11%" align="center" bgcolor="#CCCCCC"><strong>Status</strong></td>
                </tr>
                <?
   		$n=1;
		while($row = $db->fetch_row()) {
			if($row[2] > 0) {
				$status = "AKTIF";
				$cl_status = "status_active";
			} else if($row[3] > 0) {
				$status = "BLOKIR";
				$cl_status = "status_blokir";	
			} else {
				$status = "FREE";
				$cl_status = "status_free";
			}			
   ?>
                <tr>
                  <td bgcolor="#FFCCCC"><div align="center">
                      <?= $n; ?>
                  </div></td>
                  <td bgcolor="#FFFFCC"><div align="center">
                      <?= $row[0]; ?>
                  </div></td>
                  <td bgcolor="#66FFFF"><div align="center">
                      <?= $row[1]; ?>
                  </div></td>
                  <td bgcolor="#0066FF"><div align="center">
                      <?= $row[10]; ?>
                  </div></td>
                  <td bgcolor="#99CCCC"><div align="center">
                      <?= $row[9]; ?>
                  </div></td>
                  <td bgcolor="#FFFF99"><div align="center">
                      <?= $row[4]; ?>
                    </div>
                  
                  <td bgcolor="#CCCCCC" class="<?= $cl_status; ?>" align="center"><div align="center">
                      <?= $status; ?>
                  </div></td>
                </tr>
                <?
	 	$n++;
		 }
	 ?>
              </table>
              <div align="center"><strong> </strong><br />
              </div>
            </div>
        </div>
      </div>
      <?
		}
		}
	?>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem">
          <div style="display:yes;">
            <div align="center">
              <?
		$lv=45;
		for($i=44;$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
			
			if($ja > 0 or $jf > 0) {
?>
            </div>
          </div>
        </div>
      </div>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem"><strong> Level
              <?= $j; ?>
    : <span style="color:#006600">Aktif
    <?= $ja; ?>
    </span> Orang</strong>
            <div style="display:yes;">
              <?
$db->select("a.username, a.nama, a.status, a.blokir, a.hp, a.phone, a.email, 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 count(*), sum(poin) kunjung from banner_kanan as a inner join upline as b on a.username=b.username and b.upline$i='$user_session'"; 
    $resultpengunjung = mysql_query($sqlpengunjung);
    $pengunjung=mysql_fetch_object($resultpengunjung);
    $totalpengunjung45=$pengunjung->kunjung;
		?>
              <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
                <tr>
                  <td width="7%" align="center" bgcolor="#FFCCCC"><strong>#</strong></td>
                  <td width="15%" align="center" bgcolor="#FFFFCC"><strong>Username </strong></td>
                  <td width="23%" align="center" bgcolor="#66FFFF"><strong>Nama </strong></td>
                  <td width="15%" align="center" bgcolor="#0066FF"><strong>Sponsor</strong></td>
                  <td width="15%" align="center" bgcolor="#99CCCC"><strong>Upline</strong></td>
                  <td width="14%" align="center" bgcolor="#FFFF99"><strong>No HP </strong></td>
                  <td width="11%" align="center" bgcolor="#CCCCCC"><strong>Status</strong></td>
                </tr>
                <?
   		$n=1;
		while($row = $db->fetch_row()) {
			if($row[2] > 0) {
				$status = "AKTIF";
				$cl_status = "status_active";
			} else if($row[3] > 0) {
				$status = "BLOKIR";
				$cl_status = "status_blokir";	
			} else {
				$status = "FREE";
				$cl_status = "status_free";
			}			
   ?>
                <tr>
                  <td bgcolor="#FFCCCC"><div align="center">
                      <?= $n; ?>
                  </div></td>
                  <td bgcolor="#FFFFCC"><div align="center">
                      <?= $row[0]; ?>
                  </div></td>
                  <td bgcolor="#66FFFF"><div align="center">
                      <?= $row[1]; ?>
                  </div></td>
                  <td bgcolor="#0066FF"><div align="center">
                      <?= $row[10]; ?>
                  </div></td>
                  <td bgcolor="#99CCCC"><div align="center">
                      <?= $row[9]; ?>
                  </div></td>
                  <td bgcolor="#FFFF99"><div align="center">
                      <?= $row[4]; ?>
                    </div>
                  
                  <td bgcolor="#CCCCCC" class="<?= $cl_status; ?>" align="center"><div align="center">
                      <?= $status; ?>
                  </div></td>
                </tr>
                <?
	 	$n++;
		 }
	 ?>
              </table>
              <div align="center"><strong> </strong><br />
              </div>
            </div>
        </div>
      </div>
      <?
		}
		}
	?>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem">
          <div style="display:yes;">
            <div align="center">
              <?
		$lv=46;
		for($i=45;$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
			
			if($ja > 0 or $jf > 0) {
?>
            </div>
          </div>
        </div>
      </div>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem"><strong> Level
              <?= $j; ?>
    : <span style="color:#006600">Aktif
    <?= $ja; ?>
    </span> Orang</strong>
            <div style="display:yes;">
              <?
$db->select("a.username, a.nama, a.status, a.blokir, a.hp, a.phone, a.email, 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 count(*), sum(poin) kunjung from banner_kanan as a inner join upline as b on a.username=b.username and b.upline$i='$user_session'"; 
    $resultpengunjung = mysql_query($sqlpengunjung);
    $pengunjung=mysql_fetch_object($resultpengunjung);
    $totalpengunjung46=$pengunjung->kunjung;
		?>
              <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
                <tr>
                  <td width="7%" align="center" bgcolor="#FFCCCC"><strong>#</strong></td>
                  <td width="15%" align="center" bgcolor="#FFFFCC"><strong>Username </strong></td>
                  <td width="23%" align="center" bgcolor="#66FFFF"><strong>Nama </strong></td>
                  <td width="15%" align="center" bgcolor="#0066FF"><strong>Sponsor</strong></td>
                  <td width="15%" align="center" bgcolor="#99CCCC"><strong>Upline</strong></td>
                  <td width="14%" align="center" bgcolor="#FFFF99"><strong>No HP </strong></td>
                  <td width="11%" align="center" bgcolor="#CCCCCC"><strong>Status</strong></td>
                </tr>
                <?
   		$n=1;
		while($row = $db->fetch_row()) {
			if($row[2] > 0) {
				$status = "AKTIF";
				$cl_status = "status_active";
			} else if($row[3] > 0) {
				$status = "BLOKIR";
				$cl_status = "status_blokir";	
			} else {
				$status = "FREE";
				$cl_status = "status_free";
			}			
   ?>
                <tr>
                  <td bgcolor="#FFCCCC"><div align="center">
                      <?= $n; ?>
                  </div></td>
                  <td bgcolor="#FFFFCC"><div align="center">
                      <?= $row[0]; ?>
                  </div></td>
                  <td bgcolor="#66FFFF"><div align="center">
                      <?= $row[1]; ?>
                  </div></td>
                  <td bgcolor="#0066FF"><div align="center">
                      <?= $row[10]; ?>
                  </div></td>
                  <td bgcolor="#99CCCC"><div align="center">
                      <?= $row[9]; ?>
                  </div></td>
                  <td bgcolor="#FFFF99"><div align="center">
                      <?= $row[4]; ?>
                    </div>
                  
                  <td bgcolor="#CCCCCC" class="<?= $cl_status; ?>" align="center"><div align="center">
                      <?= $status; ?>
                  </div></td>
                </tr>
                <?
	 	$n++;
		 }
	 ?>
              </table>
              <div align="center"><strong> </strong><br />
              </div>
            </div>
        </div>
      </div>
      <?
		}
		}
	?>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem">
          <div style="display:yes;">
            <div align="center">
              <?
		$lv=47;
		for($i=46;$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
			
			if($ja > 0 or $jf > 0) {
?>
            </div>
          </div>
        </div>
      </div>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem"><strong> Level
              <?= $j; ?>
    : <span style="color:#006600">Aktif
    <?= $ja; ?>
    </span> Orang</strong>
            <div style="display:yes;">
              <?
$db->select("a.username, a.nama, a.status, a.blokir, a.hp, a.phone, a.email, 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 count(*), sum(poin) kunjung from banner_kanan as a inner join upline as b on a.username=b.username and b.upline$i='$user_session'"; 
    $resultpengunjung = mysql_query($sqlpengunjung);
    $pengunjung=mysql_fetch_object($resultpengunjung);
    $totalpengunjung47=$pengunjung->kunjung;
		?>
              <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
                <tr>
                  <td width="7%" align="center" bgcolor="#FFCCCC"><strong>#</strong></td>
                  <td width="15%" align="center" bgcolor="#FFFFCC"><strong>Username </strong></td>
                  <td width="23%" align="center" bgcolor="#66FFFF"><strong>Nama </strong></td>
                  <td width="15%" align="center" bgcolor="#0066FF"><strong>Sponsor</strong></td>
                  <td width="15%" align="center" bgcolor="#99CCCC"><strong>Upline</strong></td>
                  <td width="14%" align="center" bgcolor="#FFFF99"><strong>No HP </strong></td>
                  <td width="11%" align="center" bgcolor="#CCCCCC"><strong>Status</strong></td>
                </tr>
                <?
   		$n=1;
		while($row = $db->fetch_row()) {
			if($row[2] > 0) {
				$status = "AKTIF";
				$cl_status = "status_active";
			} else if($row[3] > 0) {
				$status = "BLOKIR";
				$cl_status = "status_blokir";	
			} else {
				$status = "FREE";
				$cl_status = "status_free";
			}			
   ?>
                <tr>
                  <td bgcolor="#FFCCCC"><div align="center">
                      <?= $n; ?>
                  </div></td>
                  <td bgcolor="#FFFFCC"><div align="center">
                      <?= $row[0]; ?>
                  </div></td>
                  <td bgcolor="#66FFFF"><div align="center">
                      <?= $row[1]; ?>
                  </div></td>
                  <td bgcolor="#0066FF"><div align="center">
                      <?= $row[10]; ?>
                  </div></td>
                  <td bgcolor="#99CCCC"><div align="center">
                      <?= $row[9]; ?>
                  </div></td>
                  <td bgcolor="#FFFF99"><div align="center">
                      <?= $row[4]; ?>
                    </div>
                  
                  <td bgcolor="#CCCCCC" class="<?= $cl_status; ?>" align="center"><div align="center">
                      <?= $status; ?>
                  </div></td>
                </tr>
                <?
	 	$n++;
		 }
	 ?>
              </table>
              <div align="center"><strong> </strong><br />
              </div>
            </div>
        </div>
      </div>
      <?
		}
		}
	?>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem">
          <div style="display:yes;">
            <div align="center">
              <?
		$lv=48;
		for($i=47;$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
			
			if($ja > 0 or $jf > 0) {
?>
            </div>
          </div>
        </div>
      </div>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem"><strong> Level
              <?= $j; ?>
    : <span style="color:#006600">Aktif
    <?= $ja; ?>
    </span> Orang</strong>
            <div style="display:yes;">
              <?
$db->select("a.username, a.nama, a.status, a.blokir, a.hp, a.phone, a.email, 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 count(*), sum(poin) kunjung from banner_kanan as a inner join upline as b on a.username=b.username and b.upline$i='$user_session'"; 
    $resultpengunjung = mysql_query($sqlpengunjung);
    $pengunjung=mysql_fetch_object($resultpengunjung);
    $totalpengunjung48=$pengunjung->kunjung;
		?>
              <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
                <tr>
                  <td width="7%" align="center" bgcolor="#FFCCCC"><strong>#</strong></td>
                  <td width="15%" align="center" bgcolor="#FFFFCC"><strong>Username </strong></td>
                  <td width="23%" align="center" bgcolor="#66FFFF"><strong>Nama </strong></td>
                  <td width="15%" align="center" bgcolor="#0066FF"><strong>Sponsor</strong></td>
                  <td width="15%" align="center" bgcolor="#99CCCC"><strong>Upline</strong></td>
                  <td width="14%" align="center" bgcolor="#FFFF99"><strong>No HP </strong></td>
                  <td width="11%" align="center" bgcolor="#CCCCCC"><strong>Status</strong></td>
                </tr>
                <?
   		$n=1;
		while($row = $db->fetch_row()) {
			if($row[2] > 0) {
				$status = "AKTIF";
				$cl_status = "status_active";
			} else if($row[3] > 0) {
				$status = "BLOKIR";
				$cl_status = "status_blokir";	
			} else {
				$status = "FREE";
				$cl_status = "status_free";
			}			
   ?>
                <tr>
                  <td bgcolor="#FFCCCC"><div align="center">
                      <?= $n; ?>
                  </div></td>
                  <td bgcolor="#FFFFCC"><div align="center">
                      <?= $row[0]; ?>
                  </div></td>
                  <td bgcolor="#66FFFF"><div align="center">
                      <?= $row[1]; ?>
                  </div></td>
                  <td bgcolor="#0066FF"><div align="center">
                      <?= $row[10]; ?>
                  </div></td>
                  <td bgcolor="#99CCCC"><div align="center">
                      <?= $row[9]; ?>
                  </div></td>
                  <td bgcolor="#FFFF99"><div align="center">
                      <?= $row[4]; ?>
                    </div>
                  
                  <td bgcolor="#CCCCCC" class="<?= $cl_status; ?>" align="center"><div align="center">
                      <?= $status; ?>
                  </div></td>
                </tr>
                <?
	 	$n++;
		 }
	 ?>
              </table>
              <div align="center"><strong> </strong><br />
              </div>
            </div>
        </div>
      </div>
      <?
		}
		}
	?>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem">
          <div style="display:yes;">
            <div align="center">
              <?
		$lv=49;
		for($i=48;$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
			
			if($ja > 0 or $jf > 0) {
?>
            </div>
          </div>
        </div>
      </div>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem"><strong> Level
              <?= $j; ?>
    : <span style="color:#006600">Aktif
    <?= $ja; ?>
    </span> Orang</strong>
            <div style="display:yes;">
              <?
$db->select("a.username, a.nama, a.status, a.blokir, a.hp, a.phone, a.email, 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 count(*), sum(poin) kunjung from banner_kanan as a inner join upline as b on a.username=b.username and b.upline$i='$user_session'"; 
    $resultpengunjung = mysql_query($sqlpengunjung);
    $pengunjung=mysql_fetch_object($resultpengunjung);
    $totalpengunjung49=$pengunjung->kunjung;
		?>
              <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
                <tr>
                  <td width="7%" align="center" bgcolor="#FFCCCC"><strong>#</strong></td>
                  <td width="15%" align="center" bgcolor="#FFFFCC"><strong>Username </strong></td>
                  <td width="23%" align="center" bgcolor="#66FFFF"><strong>Nama </strong></td>
                  <td width="15%" align="center" bgcolor="#0066FF"><strong>Sponsor</strong></td>
                  <td width="15%" align="center" bgcolor="#99CCCC"><strong>Upline</strong></td>
                  <td width="14%" align="center" bgcolor="#FFFF99"><strong>No HP </strong></td>
                  <td width="11%" align="center" bgcolor="#CCCCCC"><strong>Status</strong></td>
                </tr>
                <?
   		$n=1;
		while($row = $db->fetch_row()) {
			if($row[2] > 0) {
				$status = "AKTIF";
				$cl_status = "status_active";
			} else if($row[3] > 0) {
				$status = "BLOKIR";
				$cl_status = "status_blokir";	
			} else {
				$status = "FREE";
				$cl_status = "status_free";
			}			
   ?>
                <tr>
                  <td bgcolor="#FFCCCC"><div align="center">
                      <?= $n; ?>
                  </div></td>
                  <td bgcolor="#FFFFCC"><div align="center">
                      <?= $row[0]; ?>
                  </div></td>
                  <td bgcolor="#66FFFF"><div align="center">
                      <?= $row[1]; ?>
                  </div></td>
                  <td bgcolor="#0066FF"><div align="center">
                      <?= $row[10]; ?>
                  </div></td>
                  <td bgcolor="#99CCCC"><div align="center">
                      <?= $row[9]; ?>
                  </div></td>
                  <td bgcolor="#FFFF99"><div align="center">
                      <?= $row[4]; ?>
                    </div>
                  
                  <td bgcolor="#CCCCCC" class="<?= $cl_status; ?>" align="center"><div align="center">
                      <?= $status; ?>
                  </div></td>
                </tr>
                <?
	 	$n++;
		 }
	 ?>
              </table>
              <div align="center"><strong> </strong><br />
              </div>
            </div>
        </div>
      </div>
      <?
		}
		}
	?>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem">
          <div style="display:yes;">
            <div align="center">
              <?
		$lv=50;
		for($i=49;$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
			
			if($ja > 0 or $jf > 0) {
?>
            </div>
          </div>
        </div>
      </div>
      <div style="width: 98%; padding: 2px; margin: 0;">
        <div class="newsItem"><strong> Level
              <?= $j; ?>
    : <span style="color:#006600">Aktif
    <?= $ja; ?>
    </span> Orang</strong>
            <div style="display:yes;">
              <?
$db->select("a.username, a.nama, a.status, a.blokir, a.hp, a.phone, a.email, 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 count(*), sum(poin) kunjung from banner_kanan as a inner join upline as b on a.username=b.username and b.upline$i='$user_session'"; 
    $resultpengunjung = mysql_query($sqlpengunjung);
    $pengunjung=mysql_fetch_object($resultpengunjung);
    $totalpengunjung50=$pengunjung->kunjung;
		?>
              <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
                <tr>
                  <td width="7%" align="center" bgcolor="#FFCCCC"><strong>#</strong></td>
                  <td width="15%" align="center" bgcolor="#FFFFCC"><strong>Username </strong></td>
                  <td width="23%" align="center" bgcolor="#66FFFF"><strong>Nama </strong></td>
                  <td width="15%" align="center" bgcolor="#0066FF"><strong>Sponsor</strong></td>
                  <td width="15%" align="center" bgcolor="#99CCCC"><strong>Upline</strong></td>
                  <td width="14%" align="center" bgcolor="#FFFF99"><strong>No HP </strong></td>
                  <td width="11%" align="center" bgcolor="#CCCCCC"><strong>Status</strong></td>
                </tr>
                <?
   		$n=1;
		while($row = $db->fetch_row()) {
			if($row[2] > 0) {
				$status = "AKTIF";
				$cl_status = "status_active";
			} else if($row[3] > 0) {
				$status = "BLOKIR";
				$cl_status = "status_blokir";	
			} else {
				$status = "FREE";
				$cl_status = "status_free";
			}			
   ?>
                <tr>
                  <td bgcolor="#FFCCCC"><div align="center">
                      <?= $n; ?>
                  </div></td>
                  <td bgcolor="#FFFFCC"><div align="center">
                      <?= $row[0]; ?>
                  </div></td>
                  <td bgcolor="#66FFFF"><div align="center">
                      <?= $row[1]; ?>
                  </div></td>
                  <td bgcolor="#0066FF"><div align="center">
                      <?= $row[10]; ?>
                  </div></td>
                  <td bgcolor="#99CCCC"><div align="center">
                      <?= $row[9]; ?>
                  </div></td>
                  <td bgcolor="#FFFF99"><div align="center">
                      <?= $row[4]; ?>
                    </div>
                  
                  <td bgcolor="#CCCCCC" class="<?= $cl_status; ?>" align="center"><div align="center">
                      <?= $status; ?>
                  </div></td>
                </tr>
                <?
	 	$n++;
		 }
	 ?>
              </table>
              <div align="center"><strong> </strong><br />
              </div>
            </div>
        </div>
      </div>
      <?
		}
		}
	?>
      <p>&nbsp;</p>
	</div>
	  

</p>
<?
	break;
	
	case tree :
		echo "<div id='module'><h3><center>NETWORK TREE & DATA DOWNLINE</center></h3><p>&nbsp;</p>";
		?>

        
         <P><strong><a href="?m=tree">Data Downline</a> | </strong></P>
        
         <?
		include ("tree2.php");
		echo "</div>";
		break;
	}	
?>

<p align="center"><strong>TOTAL POIN RO JARINGAN = </strong>
  <?
$totpoin = $totalpengunjung1 + $totalpengunjung2 + $totalpengunjung3 + $totalpengunjung4 + $totalpengunjung5 + $totalpengunjung6 + $totalpengunjung7 + $totalpengunjung8 + $totalpengunjung9 + $totalpengunjung10 + $totalpengunjung11 + $totalpengunjung12 + $totalpengunjung13 + $totalpengunjung14 + $totalpengunjung15 + $totalpengunjung16 + $totalpengunjung17 + $totalpengunjung18 + $totalpengunjung19 + $totalpengunjung20 + $totalpengunjung21 + $totalpengunjung22 + $totalpengunjung23 + $totalpengunjung24 + $totalpengunjung25 + $totalpengunjung26 + $totalpengunjung27 + $totalpengunjung28 + $totalpengunjung29 + $totalpengunjung30 + $totalpengunjung31 + $totalpengunjung32 + $totalpengunjung33 + $totalpengunjung34 + $totalpengunjung35 + $totalpengunjung36 + $totalpengunjung37 + $totalpengunjung38 + $totalpengunjung39 + $totalpengunjung40 + $totalpengunjung41 + $totalpengunjung42 + $totalpengunjung43 + $totalpengunjung44 + $totalpengunjung45 + $totalpengunjung46 + $totalpengunjung47 + $totalpengunjung48 + $totalpengunjung49 + $totalpengunjung50;
?>
  <?= $totpoin; ?>
</p>
         <p align="center">&nbsp;         </p>
