Hallo wie muss ich die Online anzeige umbauen das nur noch die online angezeigt werden. Danke
verwendete ilchClan Version: 1.1
Hier kann eine Notiz zum Merk-Eintrag hinzugefügt werden (optional)
Geschlossen |
<?php if (!defined('main')) {die("no direct access");} $dif = date('Y-m-d H:i:s', time() - 1000); $abf = "SELECT uid FROM `prefix_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 prefix_user WHERE id='.$row->uid),0); $content.= '<tr><td><img src="include/images/icons/online.gif" border="0" alt="online"></td>'; $content.='<td><a href="index.php?user-details-'.$row->uid.'">'.$name.'</a></td></tr>'."\n"; $uid[] = $row->uid; } if ($row->uid == 0) { $guests++; } $brk=$row->uid; } if ($guests == 1) { $guestn = $lang['guest']; } if (empty($content)) { $content.='<tr><td><img src="include/images/icons/offline.gif" border="0" alt="offline"></td><td><font color="#003366">0 User </font></td></tr>'."\n"; } $content.='<tr><td colspan="2"><hr style="height: 0px; border: dashed #9AB1C8 0px; border-top-width: 1px;"></td></tr>'."\n"; $where = (count($uid)>0) ? 'WHERE id NOT IN ('.implode(', ', $uid).')' : ''; $abf2 = 'SELECT * FROM prefix_user '.$where.' ORDER BY llogin DESC LIMIT 0,7'; $erg2 = db_query($abf2); while ($row2 = db_fetch_object($erg2)) { $datum = date('H:i d.m.y',$row2->llogin); $user = $row2->name; $content.='<tr><td><img src="include/images/icons/offline.gif" border="0" alt="offline"></td><td><a href="index.php?user-details-'.$row2->id.'" title="'.$lang['lasttimeonline'].$datum.'">'.$user.'</a></td></tr>'."\n"; } if ($guests == 0) { $content.= '<tr><td colspan="2"><hr style="height: 0px; border: dashed #9AB1C8 0px; border-top-width: 1px";></td></tr>'."\n".' <tr><td><img src="include/images/icons/offline.gif" border="0" alt="offline"></td><td><font size="-1" color="#003366">0 '.$lang['guests'].'</td></tr>'."\n"; } else { $content.= '<tr><td colspan="2"><hr style="height: 0px; border: dashed #9AB1C8 0px; border-top-width: 1px;"></td></tr>'."\n".' <tr><td><img src="include/images/icons/online.gif" border="0" alt="online"></td><td><font size=-1>'.$guests.' '.$guestn.'</font></td></tr>'."\n"; } ?> <table align="center" border="0" cellpadding="0" cellspacing="0" > <?php echo $content; ?> </table>
<?php if (!defined('main')) {die("no direct access");} $dif = date('Y-m-d H:i:s', time() - 60); $abf = "SELECT uid FROM `prefix_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 prefix_user WHERE id='.$row->uid),0); $content.= '<tr><td><img src="include/images/icons/online.gif" border="0" alt="online"></td>'; $content.='<td><a href="index.php?user-details-'.$row->uid.'">'.$name.'</a></td></tr>'."\n"; $uid[] = $row->uid; } if ($row->uid == 0) { $guests++; } $brk=$row->uid; } if ($guests == 1) { $guestn = $lang['guest']; } if (empty($content)) { $content.='<tr><td><img src="include/images/icons/offline.gif" border="0" alt="offline"></td><td><font color="#003366">0 User </font></td></tr>'."\n"; } $content.='<tr><td colspan="2"><hr style="height: 0px; border: dashed #9AB1C8 0px; border-top-width: 1px;"></td></tr>'."\n"; $where = (count($uid)>0) ? 'WHERE id NOT IN ('.implode(', ', $uid).')' : ''; $abf2 = 'SELECT * FROM prefix_user '.$where.' ORDER BY llogin DESC LIMIT 0,0'; $erg2 = db_query($abf2); while ($row2 = db_fetch_object($erg2)) { $datum = date('H:i d.m.y',$row2->llogin); $user = $row2->name; $content.='<tr><td><img src="include/images/icons/offline.gif" border="0" alt="offline"></td><td><a href="index.php?user-details-'.$row2->id.'" title="'.$lang['lasttimeonline'].$datum.'">'.$user.'</a></td></tr>'."\n"; } if ($guests == 0) { $content.= '<tr><td colspan="2"><hr style="height: 0px; border: dashed #9AB1C8 0px; border-top-width: 1px";></td></tr>'."\n".' <tr><td><img src="include/images/icons/offline.gif" border="0" alt="offline"></td><td><font size="-1" color="#003366">0 '.$lang['guests'].'</td></tr>'."\n"; } else { $content.= '<tr><td colspan="2"><hr style="height: 0px; border: dashed #9AB1C8 0px; border-top-width: 1px;"></td></tr>'."\n".' <tr><td><img src="include/images/icons/online.gif" border="0" alt="online"></td><td><font size=-1>'.$guests.' '.$guestn.'</font></td></tr>'."\n"; } ?> <table align="center" border="0" cellpadding="0" cellspacing="0" > <?php echo $content; ?> </table>
<?php if (!defined('main')) {die("no direct access");} $dif = date('Y-m-d H:i:s', time() - 500); $dif2 = time()-500; $break = array(); $abf = db_query('SELECT * FROM prefix_online,prefix_user WHERE uptime > "'. $dif.'" AND prefix_user.llogin > "'.dif2.'" AND prefix_user.recht = "-9" ORDER BY prefix_user.llogin DESC LIMIT 0,4'); $content .= '<table align="center" border="0" cellpadding="2" cellspacing="2">'; $content .= '<tr><td>Admin Online</td></tr>'; while($erg = mysql_fetch_assoc($abf) ) { if(in_array($erg['id'],$break) ) { continue; } $test = mysql_fetch_assoc(db_query('SELECT llogin FROM prefix_user WHERE id = "'.$erg['id'].'" ')); if($test['llogin'] < $dif2) continue; $content .= '<tr><td><img src="include/images/icons/online.gif" border="0" alt="online"><a href="index.php?user-details-'.$erg['id'].'">STS_ '.$erg['name'].'</a></td></tr>'; $break[] = $erg['id']; } $content .= '<tr><td>Leader</td></tr>'; $abf = db_query('SELECT * FROM prefix_online,prefix_user WHERE uptime > "'. $dif.'" AND prefix_user.llogin > "'.dif2.'" AND prefix_user.id = prefix_online.uid AND prefix_user.recht = "-8" OR prefix_user.recht = "-7" ORDER BY prefix_user.llogin DESC '); while($erg = mysql_fetch_assoc($abf) ) { if(in_array($erg['id'],$break) ) { continue; } $test = mysql_fetch_assoc(db_query('SELECT llogin FROM prefix_user WHERE id = "'.$erg['id'].'" ')); if($test['llogin'] < $dif2) continue; $content .= '<tr><td><font color="#FF0000"><img src="include/images/icons/online.gif" border="0" alt="online"><a href="index.php?user-details-'.$erg['id'].'">STS_ '.$erg['name'].'</a></font></td></tr>'; $break[] = $erg['id']; } $content .= '<tr><td>Member Online</td></tr>'; $abf = db_query('SELECT * FROM prefix_online,prefix_user WHERE uptime > "'. $dif.'" AND prefix_user.llogin > "'.dif2.'" AND prefix_user.id = prefix_online.uid AND prefix_user.recht = "-6" OR prefix_user.recht = "-5" OR prefix_user.recht = "-4" ORDER BY prefix_user.llogin DESC '); while($erg = mysql_fetch_assoc($abf) ) { if(in_array($erg['id'],$break) ) { continue; } $test = mysql_fetch_assoc(db_query('SELECT llogin FROM prefix_user WHERE id = "'.$erg['id'].'" ')); if($test['llogin'] < $dif2) continue; $content .= '<tr><td><img src="include/images/icons/online.gif" border="0" alt="online"><a href="index.php?user-details-'.$erg['id'].'">STS_ '.$erg['name'].'</a></td></tr>'; $break[] = $erg['id']; } $content .= '<tr><td>User Online</td></tr>'; $abf = db_query('SELECT * FROM prefix_online,prefix_user WHERE uptime > "'. $dif.'" AND prefix_user.llogin > "'.dif2.'" AND prefix_user.id = prefix_online.uid AND prefix_user.recht = "-3" OR prefix_user.recht = "-2" OR prefix_user.recht = "-1" ORDER BY prefix_user.llogin DESC '); while($erg = mysql_fetch_assoc($abf) ) { if(in_array($erg['id'],$break) ) { continue; } $test = mysql_fetch_assoc(db_query('SELECT llogin FROM prefix_user WHERE id = "'.$erg['id'].'" ')); if($test['llogin'] < $dif2) continue; $content .= '<tr><td><img src="include/images/icons/online.gif" border="0" alt="online"><a href="index.php?user-details-'.$erg['id'].'"> '.$erg['name'].'</a></td></tr>'; $break[] = $erg['id']; } $content .= '<tr><td><hr style="border-style: dashed; border-color: rgb(154, 177, 200); border-width: 1px 0px 0px; height: 0px;"></td></tr>'; $erg = mysql_fetch_assoc(db_query('SELECT COUNT(uid) FROM prefix_online WHERE uptime > "'. $dif.'" AND uid = "0" GROUP BY uid')); $content .= '<tr><td>'; if($erg['COUNT(uid)'] == "0" OR empty($erg) ) { $content .= '<img src="include/images/icons/offline.gif" alt="offline" border="0"> Kein Gast '; } elseif($erg['COUNT(uid)'] == "1") { $content .= '<img src="include/images/icons/online.gif" alt="online" border="0"> 1 Gast'; } else { $content .= '<img src="include/images/icons/online.gif" alt="online" border="0"> '.$erg['COUNT(uid)'].' Gäste'; } $content .= '</td></tr>'; $content .= '</table>'; echo $content;
<?php if (!defined('main')) {die("no direct access");} $dif = date('Y-m-d H:i:s', time() - 500); $dif2 = time()-500; $break = array(); $abf = db_query('SELECT * FROM prefix_online,prefix_user WHERE uptime > "'. $dif.'" AND prefix_user.llogin > "'.dif2.'" AND prefix_user.recht = "-9" ORDER BY prefix_user.llogin DESC LIMIT 0,4'); $content .= '<table align="center" border="0" cellpadding="2" cellspacing="2">'; $content .= '<tr><td>Admin Online</td></tr>'; while($erg = mysql_fetch_assoc($abf) ) { if(in_array($erg['id'],$break) ) { continue; } $test = mysql_fetch_assoc(db_query('SELECT llogin FROM prefix_user WHERE id = "'.$erg['id'].'" ')); if($test['llogin'] < $dif2) continue; $content .= '<tr><td><img src="include/images/icons/online.gif" border="0" alt="online"><a href="index.php?user-details-'.$erg['id'].'">STS_ '.$erg['name'].'</a></td></tr>'; $break[] = $erg['id']; } $content .= '<tr><td>Leader</td></tr>'; $abf = db_query('SELECT * FROM prefix_online,prefix_user WHERE uptime > "'. $dif.'" AND prefix_user.llogin > "'.dif2.'" AND prefix_user.id = prefix_online.uid AND prefix_user.recht = "-8" OR prefix_user.recht = "-7" ORDER BY prefix_user.llogin DESC '); while($erg = mysql_fetch_assoc($abf) ) { if(in_array($erg['id'],$break) ) { continue; } $test = mysql_fetch_assoc(db_query('SELECT llogin FROM prefix_user WHERE id = "'.$erg['id'].'" ')); if($test['llogin'] < $dif2) continue; $content .= '<tr><td><font color="#FF0000"><img src="include/images/icons/online.gif" border="0" alt="online"><a href="index.php?user-details-'.$erg['id'].'">STS_ '.$erg['name'].'</a></font></td></tr>'; $break[] = $erg['id']; } $content .= '<tr><td>Member Online</td></tr>'; $abf = db_query('SELECT * FROM prefix_online,prefix_user WHERE uptime > "'. $dif.'" AND prefix_user.llogin > "'.dif2.'" AND prefix_user.id = prefix_online.uid AND prefix_user.recht = "-6" OR prefix_user.recht = "-5" OR prefix_user.recht = "-4" ORDER BY prefix_user.llogin DESC '); while($erg = mysql_fetch_assoc($abf) ) { if(in_array($erg['id'],$break) ) { continue; } $test = mysql_fetch_assoc(db_query('SELECT llogin FROM prefix_user WHERE id = "'.$erg['id'].'" ')); if($test['llogin'] < $dif2) continue; $content .= '<tr><td><img src="include/images/icons/online.gif" border="0" alt="online"><a href="index.php?user-details-'.$erg['id'].'">STS_ '.$erg['name'].'</a></td></tr>'; $break[] = $erg['id']; } $content .= '<tr><td>User Online</td></tr>'; $abf = db_query('SELECT * FROM prefix_online,prefix_user WHERE uptime > "'. $dif.'" AND prefix_user.llogin > "'.dif2.'" AND prefix_user.id = prefix_online.uid AND prefix_user.recht = "-3" OR prefix_user.recht = "-2" OR prefix_user.recht = "-1" ORDER BY prefix_user.llogin DESC '); while($erg = mysql_fetch_assoc($abf) ) { if(in_array($erg['id'],$break) ) { continue; } $test = mysql_fetch_assoc(db_query('SELECT llogin FROM prefix_user WHERE id = "'.$erg['id'].'" ')); if($test['llogin'] < $dif2) continue; $content .= '<tr><td><img src="include/images/icons/online.gif" border="0" alt="online"><a href="index.php?user-details-'.$erg['id'].'"> '.$erg['name'].'</a></td></tr>'; $break[] = $erg['id']; } $content .= '<tr><td><hr style="border-style: dashed; border-color: rgb(154, 177, 200); border-width: 1px 0px 0px; height: 0px;"></td></tr>'; $erg = mysql_fetch_assoc(db_query('SELECT COUNT(uid) FROM prefix_online WHERE uptime > "'. $dif.'" AND uid = "0" GROUP BY uid')); $content .= '<tr><td>'; if($erg['COUNT(uid)'] == "0" OR empty($erg) ) { $content .= '<img src="include/images/icons/offline.gif" alt="offline" border="0"> Kein Gast '; } elseif($erg['COUNT(uid)'] == "1") { $content .= '<img src="include/images/icons/online.gif" alt="online" border="0"> 1 Gast'; } else { $content .= '<img src="include/images/icons/online.gif" alt="online" border="0"> '.$erg['COUNT(uid)'].' Gäste'; } $content .= '</td></tr>'; $content .= '</table>'; echo $content;
<?php if (!defined('main')) {die("no direct access");} $dif = date('Y-m-d H:i:s', time() - 200); $dif2 = time()-200; $break = array(); $lastUID = -1; $headers = array(-9 => 'cleader', -7 => 'supporter', -6 => 'sleader', -5 => 'cmember', -2 =>'regist2'); $contents = array(-9 => array(), -7 => array(), -6 => array(), -5 => array(), -2 => array()); $content = '<table align="center" border="0" cellpadding="2" cellspacing="2">'; $abf = db_query('SELECT u.id, u.llogin, u.name, u.recht FROM prefix_online o INNER JOIN prefix_user u ON u.id = o.uid WHERE o.uptime > "'. $dif.'" AND u.llogin > "'.dif2.'" AND u.recht < 0 ORDER BY u.recht, o.uid, u.llogin DESC '); while($erg = mysql_fetch_assoc($abf)) { $id = $erg['id']; if ($lastUID == $id) { continue; } $key = null; switch($erg['recht']){ case -9: case -8: $key = -9; break; case -7: $key = -7; break; case -6: case -5: $key = -6; break; case -4: case -3: $key = -5; break; case -2: case -1: $key = -2; break; } $contents[$key][] = '<tr><td><center><a href="index.php?benutzercenter"><img src="include/images/icons/left.gif" border="0" alt="Benutzercenter"><a href="index.php?user-details-'.$id.'"> '.$erg['name'].' <a href="index.php?forum-privmsg-new=0&empfid='.$id.'"><img src="include/images/icons/right.gif" border="0" alt="PN senden!"></center></a></td></tr>'; $lastUID = $id; } foreach ($headers as $key => $head){ $content .= '<tr><td align="center"><img src="include/images/onlinebox/'.$head.'.jpg"></td></tr>'; foreach ($contents[$key] as $line){ $content .= $line; } } //$content .= '<tr><td><hr style="border-style: dashed; border-color: rgb(154, 177, 200); border-width: 1px 0px 0px; height: 0px;"></td></tr>'; $content .= '</table>'; echo $content; ?>
Geschlossen | ||
Zurück zu Module und Modifikationen |