das ist das von content/konto/refübersicht.php

PHP-Code:
<? userstatus(); 
$ebene_1 = false;
$ebene_2 = false;
$ebene_3 = false;
$ebene_4 = false;
$ebene1 = db_query("SELECT werber.*, u.nickname, k.last_active FROM 
                         ".$db_prefix."_werberdaten AS werber
                         LEFT JOIN ".$db_prefix."_userdaten AS u ON u.uid = werber.uid 
                         LEFT JOIN ".$db_prefix."_kontodaten AS k ON k.uid = werber.uid                          
                   WHERE werber.werber=".$_SESSION['uid']." ORDER BY u.nickname ASC");
                   
if (mysql_num_rows($ebene1)){
   while ($user1 = mysql_fetch_assoc($ebene1)){
   $ebene_1 = true;
   $count++;
   if ($count % 2 == 0){$row = 0;}else{$row = 1;}
   
    if ($user1['last_active'] >= (time()-(86400*7))) $refstatus = '<img src="./images/gruen.gif" width="15" height="15" border="0" alt="'.date("d.m.y - H:i",$user1['last_active']).'">';
    if ($user1['last_active'] < (time()-(86400*7))) $refstatus = '<img src="./images/gelb.gif" width="15" height="15" border="0" alt="'.date("d.m.y - H:i",$user1['last_active']).'">';
    if ($user1['last_active'] <= (time()-(86400*30))) $refstatus = '<img src="./images/rot.gif" width="15" height="15" border="0" alt="'.date("d.m.y - H:i",$user1['last_active']).'">';
    $anz .= '
    <tr class="tr_row'.$row.'">
        <td align="center"><a href="?content=/nickpage&amp;nick='.$user1['nickname'].'">'.$user1['nickname'].'</a></td>
        <td align="center">'.number_format($user1['umsatz']/100*$pageconfig['re1'],2,",",".").'</td>
        <td align="center">'.number_format($user1['gesamt'],2,",",".").'</td>
        <td align="center">'.$user1['refback'].'%</td>
        <td align="center"><a href="?content=/konto/refdetails&amp;ruid='.$user1['uid'].'" target="_self">Details</a></td>
        <td align="center">'.$refstatus.'</td>
    </tr>    
    ';
$ebene2 = db_query("SELECT werber.*, u.nickname, k.last_active FROM 
                         ".$db_prefix."_werberdaten AS werber
                         LEFT JOIN ".$db_prefix."_userdaten AS u ON u.uid = werber.uid 
                         LEFT JOIN ".$db_prefix."_kontodaten AS k ON k.uid = werber.uid                          
                   WHERE werber.werber=".$user1['uid']." ORDER BY u.nickname ASC");
                   
      while ($user2 = mysql_fetch_assoc($ebene2)){
      $ebene_2 = true;
      $count++;
      if ($count % 2 == 0){$row = 0;}else{$row = 1;}
      
      if ($user2['last_active'] >= (time()-(86400*7))) $refstatus = '<img src="./images/gruen.gif" width="15" height="15" border="0" alt="'.date("d.m.y - H:i",$user2['last_active']).'">';
      if ($user2['last_active'] < (time()-(86400*7))) $refstatus = '<img src="./images/gelb.gif" width="15" height="15" border="0" alt="'.date("d.m.y - H:i",$user2['last_active']).'">';
      if ($user2['last_active'] <= (time()-(86400*30))) $refstatus = '<img src="./images/rot.gif" width="15" height="15" border="0" alt="'.date("d.m.y - H:i",$user2['last_active']).'">';
      $anz2 .= '
      <tr class="tr_row'.$row.'">
        <td align="center"><a href="?content=/nickpage&amp;nick='.$user2['nickname'].'">'.$user2['nickname'].'</a></td>
        <td align="center">'.$user1['nickname'].'</td>
        <td align="center">'.number_format($user2['umsatz']/100*$pageconfig['re2'],2,",",".").'</td>
        <td align="center">'.number_format($user2['gesamt'],2,",",".").'</td>
        <td align="center">'.$refstatus.'</td>
      </tr>    
      ';
      
$ebene3 = db_query("SELECT werber.*, u.nickname, k.last_active FROM 
                         ".$db_prefix."_werberdaten AS werber
                         LEFT JOIN ".$db_prefix."_userdaten AS u ON u.uid = werber.uid 
                         LEFT JOIN ".$db_prefix."_kontodaten AS k ON k.uid = werber.uid                          
                   WHERE werber.werber=".$user2['uid']." ORDER BY u.nickname ASC");
                   
        while ($user3 = mysql_fetch_assoc($ebene3)){
        $ebene_3 = true;
        $count++;
        if ($count % 2 == 0){$row = 0;}else{$row = 1;}
        
         if ($user3['last_active'] >= (time()-(86400*7))) $refstatus = '<img src="./images/gruen.gif" width="15" height="15" border="0" alt="'.date("d.m.y - H:i",$user3['last_active']).'">';
         if ($user3['last_active'] < (time()-(86400*7))) $refstatus = '<img src="./images/gelb.gif" width="15" height="15" border="0" alt="'.date("d.m.y - H:i",$user3['last_active']).'">';
         if ($user3['last_active'] <= (time()-(86400*30))) $refstatus = '<img src="./images/rot.gif" width="15" height="15" border="0" alt="'.date("d.m.y - H:i",$user3['last_active']).'">';
         $anz3 .= '
         <tr class="tr_row'.$row.'">
            <td align="center"><a href="?content=/nickpage&amp;nick='.$user3['nickname'].'">'.$user3['nickname'].'</a></td>
            <td align="center">'.$user2['nickname'].'</td>
            <td align="center">'.number_format($user3['umsatz']/100*$pageconfig['re3'],2,",",".").'</td>
            <td align="center">'.number_format($user3['gesamt'],2,",",".").'</td>
            <td align="center">'.$refstatus.'</td>
         </tr>    
               ';
$ebene4 = db_query("SELECT werber.*, u.nickname, k.last_active FROM 
                         ".$db_prefix."_werberdaten AS werber
                         LEFT JOIN ".$db_prefix."_userdaten AS u ON u.uid = werber.uid 
                         LEFT JOIN ".$db_prefix."_kontodaten AS k ON k.uid = werber.uid                          
                   WHERE werber.werber=".$user3['uid']." ORDER BY u.nickname ASC");
                   
        while ($user4 = mysql_fetch_assoc($ebene4)){
        $ebene_4 = true;
        $count++;
        if ($count % 2 == 0){$row = 0;}else{$row = 1;}
        
         if ($user4['last_active'] >= (time()-(86400*7))) $refstatus = '<img src="./images/gruen.gif" width="15" height="15" border="0" alt="'.date("d.m.y - H:i",$user3['last_active']).'">';
         if ($user4['last_active'] < (time()-(86400*7))) $refstatus = '<img src="./images/gelb.gif" width="15" height="15" border="0" alt="'.date("d.m.y - H:i",$user3['last_active']).'">';
         if ($user4['last_active'] <= (time()-(86400*30))) $refstatus = '<img src="./images/rot.gif" width="15" height="15" border="0" alt="'.date("d.m.y - H:i",$user3['last_active']).'">';
         $anz4 .= '
         <tr class="tr_row'.$row.'">
            <td align="center"><a href="?content=/nickpage&amp;nick='.$user4['nickname'].'">'.$user4['nickname'].'</a></td>
            <td align="center">'.$user3['nickname'].'</td>
            <td align="center">'.number_format($user4['umsatz']/100*$pageconfig['re3'],2,",",".").'</td>
            <td align="center">'.number_format($user4['gesamt'],2,",",".").'</td>
            <td align="center">'.$refstatus.'</td>
         </tr>    
               ';
        
        }
      }
   }
}

?>
<? head("Refübersicht");?>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;<b><big>EBENE 1 </big><font color="green">&nbsp;&nbsp;( 3% )</font></b>
<br><br>
<?if($ebene_1 == true){?>
<table width="100%" cellpadding="0" cellspacing="1" bgcolor="#000000">
<tr class="tr_head">
<td align="center" width="20%"><b>User</b></td>
<td align="center" width="20%"><b>Heute</b></td>
<td align="center" width="20%"><b>Gesamt</b></td>
<td align="center" width="20%"><b>Refback</b></td>
<td align="center" width="10%"><b>Details</b></td>
<td align="center" width="10%"><b>Status</b></td>
</tr>
<?=$anz;?>
</table>
<? }else{
echo "<center>Noch keine Refs in Ebene 1</center>";
}
?>
<br><hr width="90%"><br>
&nbsp;&nbsp;&nbsp;&nbsp;<b><big>EBENE 2 </big><font color="green">&nbsp;&nbsp;( 2% )</font></b>
<br><br>
<?
if ($ebene_2 == true){ ?>
<table width="100%" cellpadding="0" cellspacing="1" bgcolor="#000000">
<tr class="tr_head">
<td align="center" width="20%"><b>User</b></td>
<td align="center" width="20%"><b>Werber</b></td>
<td align="center" width="25%"><b>Heute</b></td>
<td align="center" width="25%"><b>Gesamt</b></td>
<td align="center" width="10%"><b>Status</b></td>
</tr>
<?=$anz2;?>
</table>
<?}else{
echo "<center>Noch keine Refs in Ebene 2</center>";
} ?>

<br><hr width="90%"><br>
&nbsp;&nbsp;&nbsp;&nbsp;<b><big>EBENE 3 </big><font color="green">&nbsp;&nbsp;( 1% )</font></b>
<br><br>
<?
if ($ebene_3 == true){?>
<table width="100%" cellpadding="0" cellspacing="1" bgcolor="#000000">
<tr class="tr_head">
<td align="center" width="20%"><b>User</b></td>
<td align="center" width="20%"><b>Werber</b></td>
<td align="center" width="25%"><b>Heute</b></td>
<td align="center" width="25%"><b>Gesamt</b></td>
<td align="center" width="10%"><b>Status</b></td>
</tr>
<?=$anz3;?>
</table>
<?}else{
echo "<center>Noch keine Refs in Ebene 3</center>";
} ?>
<br><hr width="90%"><br>
&nbsp;&nbsp;&nbsp;&nbsp;<b><big>EBENE 4 </big><font color="green">&nbsp;&nbsp;( 0.5% )</font></b>
<br><br>
<?
if ($ebene_4 == true){?>
<table width="100%" cellpadding="0" cellspacing="1" bgcolor="#000000">
<tr class="tr_head">
<td align="center" width="20%"><b>User</b></td>
<td align="center" width="20%"><b>Werber</b></td>
<td align="center" width="25%"><b>Heute</b></td>
<td align="center" width="25%"><b>Gesamt</b></td>
<td align="center" width="10%"><b>Status</b></td>
</tr>
<?=$anz3;?>
</table>
<?}else{
echo "<center>Noch keine Refs in Ebene 4</center>";
} ?>
<br><hr width="90%"><br><center>
<table width="60%" cellpadding="3" cellspacing="1" border="0"><tr><td><center>
<b>Infos zur Refübersicht:</b><br><br>
<img src="images/rot.gif"> User war mind. 30 Tage nicht mehr aktiv.<br>
<img src="images/gelb.gif"> User war mind. 7 Tage nicht mehr aktiv.<br>
<img src="images/gruen.gif"> User war in den letzen 7 Tagen aktiv.<br></center>
</td></tr></table></center>
<?foot();?>