<?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($db->dataku("status",$user_session)==0||$db->dataku("blokir",$user_session)==1){echo "<div class='alert-message'><a href='' class='close'><img src='../images/crosss.gif' ></a><div class='errorx'>Your status is not active! You are not authorized to access the member area, please contact administrator!</a></span></div></div>";}else{;echo '';$user=$_GET['user'];if($user){$user_session=$user;}else{$user_session=$user_session;}$lv=20;for($i=0;$i<$lv;$i++){$j=$i+1;$ja=$db->jmlmember($user_session,"a.status=1 and b.upline$i='$user_session'");$jf=$db->jmlmember($user_session,"a.status=0 and blokir=0 and b.upline$i='$user_session'");$jb=$db->jmlmember($user_session,"a.blokir=1 and b.upline$i='$user_session'");if($ja>0 or $jf>0){;echo '<script type="text/javascript" src="../js/prototype.js"></script> 
		<script type="text/javascript" src="../js/effects.js"></script> 
		<script type="text/javascript" src="../js/newsbox.js"></script>	
            <div id="newsBox">
              <!-- NEWS ITEMS GO HERE - Repeat Sections as many times as you want -->
              <!--NEWS ITEM-->
              <div class="newsItem"><a class="newsTitle" style="font-size:10px; font-weight:bold; cursor:pointer">
			  <div class="page_collapsible collapse-close" id="body-section2">LEVEL ';echo $j;;echo ' DETAILS<span></span></div>
			  </a>
                  <div style="display:none;">
                    <div class="newsContent">
                      ';$db->select("a.username, a.nama, a.status, a.blokir, a.hp, a.email, a.tglaktif, a.upline, b.sponsor, b.posisi","member as a inner join upline as b on a.username=b.username","b.upline$i='$user_session'");;echo '  
  <table class="listx" width="100%" >
 
      <tr>
        <th><strong>#</strong></font></th>
        <th><strong>Username</strong></font></th>
        <th><strong>Name</strong></font></th>
        <th><strong>Sponsor</strong></font></th>
        <th><strong>Upline</strong></font></th>
        <th><strong>Position</strong></font></th>
        <th><strong>Mobile/Phone</strong></font></th>
        
        <th><strong>Status</strong></font></th>
      </tr>
    ';$ada=$db->num_rows();if($ada>0){$n=1;while($row=$db->fetch_row()){if($row[2]>0){$status="<span class='badge badge-success'>Active</span>";$cl_status="<span class='badge badge-success'>Active</span>";}else if($row[3]>0){$status="<span class='badge badge-important'>Blocked</span>";$cl_status="<span class='badge badge-important'>Blocked</span>";}else {$status="<span class='badge badge-important'>Inactive</span>";$cl_status="<span class='badge badge-important'>Inactive</span>";}if($row[9]=="L2"){$pose="RIGHT";}else {$pose="LEFT";}if(is_odd($n)==0){$class="even";}else {$class="odd";};echo '  
   
	  <tr class="';echo $class;;echo '"> 
        <td>';echo $n;;echo '</td>
        <td>';echo $row[0];;echo '</td>
        <td>';echo $row[1];;echo '</td>
        <td>';echo $row[8];;echo '</td>
        <td>';echo $row[7];;echo '</td>
        <td>';echo $pose;;echo '</td>
        <td>';echo $row[4];;echo '/';echo $row[5];;echo '</td>
       
        <td align="center">';echo $status;;echo '</td>
      </tr>
	 ';$n++;}}else {;echo ' 
	 <tr>
            <td colspan="6" align="center"><strong>No Data.</strong></td>
    </tr>
	';};echo '  </table>  <br /></div>
                  </div>
              </div>
              <!-- end news items -->
            </div>
</div>
	
	  ';}};echo '	 
	 <!-- 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 -->
<script type="text/javascript">newsBox = new newsBox({\'bg\':\'#ffffff\',\'fg\':\'#000000\',\'link\':\'#0000cc\',\'altbg\':\'#ffffff\',\'altfg\':\'#000000\',\'altlink\':\'#0000cc\'});</script>
<script language="javascript" type="text/javascript">
<!--
/****************************************************
     Author: Eric King
     Url: http://redrival.com/eak/index.shtml
     This script is free to use as long as this info is left in
     Featured on Dynamic Drive script library (http://www.dynamicdrive.com)
****************************************************/
var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings=\'width=\'+w+\',height=\'+h+\',top=\'+TopPosition+\',left=\'+LeftPosition+\',scrollbars=\'+scroll+\',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no\';
win=window.open(mypage,myname,settings);}
// -->
</script>

	  ';}?>