<?php /* 
	############################[  <about> ] #######################
		S Name   ::       MMM Primadesain
		Update   ::       2013 © Primadesain.Com
		Author   ::       Agus Susanto S.kom
		Website  ::		  http://primadesain.com
		Contact  ::		  <primapc57@gmail.com> // +62 85228657360
	
	Primadesain melayani pembuatan website MLM dan Investasi
	( dengan sistem binary, trinary atau matrix dan matahari )
	juga menerima pembuatan website Iklan Baris, Website Profile,
	Reseller, Hyip, dll.
	############################[ </about> ] #######################
	*/
if(basename($_SERVER['SCRIPT_FILENAME'])==basename(__FILE__)){echo "<p align=center><br><br><br><br><br><br><font size=\"6\" color=\"#FF0000\">ILLEGAL ACCESS !!";echo "<meta http-equiv=\"refresh\" content=\"2; url=../index.php\">";exit();};echo '';;echo '		<!-- end of stats article -->
<article class="module width_full">
		<header>
		  <h3 class="tabs_involved"><img src="../images/bullet_black.png" />&nbsp;&nbsp;Referal\'s Bonus </h3>
		</header>
';if($db->dataku("status",$user_session)==0||$db->dataku("blokir",$user_session)==1){echo "<div class='alert-box errors'><span>error : </span>Your membership is not active or being blocked! You do not have access to this feature!</div>";}else{;echo '		<div class="tab_container" style="padding:20px;">
			<div id="tab1" class="tab_content">
			<table width="99%" cellspacing="0" class="table"> 
                <thead> 
                    <tr> 
                        
                        <th width="18%" align="center">Date</th> 
                        <th width="17%" align="center">Code</th>
                        <th width="18%" align="center">From</th> 
                        <th width="30%" align="center">Name</th> 
                        <th width="17%" align="center">Amount</th>
                    </tr> 
                </thead> 
                <tbody> 
				
';$batas=25;if(isset($_GET['halaman'])){$halaman=anti_injection($_GET['halaman']);}if(empty($halaman)){$posisi=0;$halaman=1;}else{$posisi=($halaman-1)*$batas;}$db->select("id, username, bayar, tglbayar, status, total, jenis, dari, kode","komisi","jenis='komsponsor' and username='$user_session'","tglbayar desc LIMIT $posisi,$batas");$ada=$db->num_rows();if($ada>0){$nom=1;while($row=$db->fetch_row()){$user=$row[7];$namaspon="SELECT * FROM member WHERE username='$user'";$resultnamaspon=mysql_query($namaspon);$rownamaspon=mysql_fetch_array($resultnamaspon);$namaspone=$rownamaspon['nama'];$totnya=total_komspon_member($user_session);if($totnya>0){$totspon=rupiah($totnya);}else{$totspon="--";}$twdne=total_wdbonus_member($user_session);if($twdne>0){$totwdku=rupiah($twdne);}else{$totwdku="--";}$sdne=$totnya-$twdne;if($sdne>0){$totwdwr=rupiah($sdne);}else{$totwdwr="--";};echo '				
				
				
                             
                        <tr> 
                            
                            <td align="center">';echo $row[3];;echo '</td>
                            <td align="center">';echo $row[8];;echo '</td>
                            <td align="center">';echo $row[7];;echo '</td>
                            <td align="center">';echo $namaspone;;echo '</td>
                            <td align="center">';echo rupiah($row[2]);;echo '</td>
                        </tr>
                                                                    
             ';$nom++;}}else {;echo '    	<tr>
            <td colspan="8" align="center"><strong>No Bonus</strong></td>
    </tr>
	';};echo '	<tr>
              <td colspan="4" align="right"><div align="right"><strong>TOTAL BONUS</strong>&nbsp;&nbsp;</div></td>
              <td align="center"><strong>';echo $totspon;;echo ' </strong></td>
            </tr>
			
</tbody></table>
		   ';};echo ' 
		  ';$tampil2=mysql_query("SELECT * FROM komisi WHERE username='$user_session' and jenis='komsponsor'");$jmldata=mysql_num_rows($tampil2);$jmlhal=ceil($jmldata/$batas);if($jmldata>25){echo "<br><div class=paging>";if($halaman>1){$prev=$halaman-1;echo "<span class=prevnext><a href=index.php?go=sponsoring&halaman=$prev>Prev</a></span> ";}else{echo "<span class=disabled>Prev</span> ";}for($i=1;$i<=$jmlhal;$i++)if($i!=$halaman){echo " <a href=index.php?go=sponsoring&halaman=$i>$i</a> ";}else{echo " <span class=current>$i</span> ";}if($halaman<$jmlhal){$next=$halaman+1;echo "<span class=prevnext><a href=index.php?go=sponsoring&halaman=$next>Next</a></span>";}else{echo "<span class=disabled>Next</span>";}echo "</div>";echo "<br>";};echo '             
		  </div><!-- end of #tab1 -->
			<!-- end of #tab2 -->
        </div>
					
	 


</article><div class=\'clear\'></div>';?>