ich hab ma ne neue Frage. Wie kann ich einer Gruppe eine bestimmte Punktezahl zuweisen sodass sie unten bei online dann eine andere Farbe bekommen ???
<table width="900" height="40" border="0" cellspacing="2"> <tr> <td> <!--- ################################# #### © Shooter112 #### #### www.berlin-freiwild.de #### ################################# ---> <?php if (!defined('main')) {die("no direct access");} // Farben für Ränge definieren $farbeAdmin = '#0066ff'; $farbeModerator = '#CC00ff'; $farbePartner = '#FF0033'; $farbeMember = '#99FF00'; $farbeUser = '#33FF00'; $farbeGast = '#99FF00'; $dif = date('Y-m-d H:i:s', time() - 1200); $abf = "SELECT uid FROM `ic1_online` WHERE uptime > '". $dif."'"; $resultID = db_query($abf); $brk=''; $uid = array(); $guests = 0; $guestn = $lang['guests']; $content=''; while ($row = db_fetch_object($resultID)) { if ($row->uid != 0 AND $brk!=$row->uid) { $name=@db_result(db_query('SELECT name FROM ic1_user WHERE id='.$row->uid),0); $recht=@db_result(db_query('SELECT recht FROM ic1_user WHERE id='.$row->uid),0); if ($recht == -9) {$farbe = $farbeAdmin;} elseif ($recht == -8) {$farbe = $farbeModerator;} elseif ($recht == -6) {$farbe = $farbeMember;} elseif ($recht == -4) {$farbe = $farbePartner;} elseif ($recht == -1) {$farbe = $farbeUser;} else {$farbe = $farbeGast;} $content.= ''; $content.='<td><a href="index.php?user-details-'.$row->uid.'"><font style="color:'.$farbe.'">'.$name.',</font> </a></td>'.""; $uid[] = $row->uid; } if ($row->uid == 0) { $guests++; } $brk=$row->uid; } if ($guests == 1) { $guestn = $lang['guest']; } if (empty($content)) { $content.='<td><font color="#666666">0 User </font></td>'.""; } $where = (count($uid)>0) ? 'WHERE id NOT IN ('.implode(', ', $uid).')' : ''; $abf2 = 'SELECT * FROM ic1_user '.$where.' ORDER BY llogin DESC LIMIT 0,0'; $erg2 = db_query($abf2); while ($row2 = db_fetch_object($erg2)) { if ($row2->recht == -9) {$farbe = $farbeAdmin;} elseif ($row2->recht == -1) {$farbe = $farbeUser;} else {$farbe = $farbeGast;} $datum = date('H:i d.m.y',$row2->llogin); $user = $row2->name; $content.='<td><a href="index.php?user-details-'.$row2->id.'" title="'.$lang['lasttimeonline'].$datum.'">'.$user.'</a></td>'.""; } if ($guests == 0) { $content.= '<td colspan="0"><hr style="height: 0px; border: dashed #666666 0px; border-top-width: 0px";></td>'."".' <td><font size="-1" color="'.$farbeGast.'">0 '.$lang['guests'].'</td>'.""; } else { $content.= ' <td><font size="-1" color="'.$farbeGast.'">'.$guests.' '.$guestn.'</font></td>'.""; } ?> <table border="0" cellpadding="0" cellspacing="0" > <?php echo $content; ?> </table></td> </tr> </table>
betroffene Homepage: recordsextended.de