ich glaube ich hab eine erweiterte online box, habe die zeile ersetzt nur leider sieht mich noch jeder, hier ma der code.
<?php
if (!defined('main')) {die("no direct access");}
$dif = date('Y-m-d H:i:s', time() - 60);
$abf = "SELECT a.uid FROM `prefix_online` a LEFT JOIN `prefix_user` b ON a.uid = b.id WHERE a.uptime > '". $dif."' AND b.recht >= ".(is_admin()?'-9':'-8');
$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,5';
$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>
das müsste doch auch mit der statistik box gehen oder?
<?php
# Copyright by Manuel
# Support www.ilch.de
defined ('main') or 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,9';
$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>
<hr>
<?php
if (empty($_GET['sum'])) {
$heute = date ('Y-m-d');
$ges_visits = db_result(db_query("SELECT SUM(count) FROM prefix_counter"),0);
$ges_heute = @db_result(db_query("SELECT count FROM prefix_counter WHERE date = '".$heute."'"),0);
$ges_gestern = @db_result(db_query('SELECT count FROM prefix_counter WHERE date < "'.$heute.'" ORDER BY date DESC LIMIT 1'),0);
$gbook = @db_result(db_query("SELECT count(ID) FROM prefix_gbook"),0);
$posts = @db_result(db_query("SELECT count(ID) FROM prefix_posts"),0);
$topic = @db_result(db_query("SELECT count(ID) FROM prefix_topics"),0);
$gesuser = @db_result(db_query("SELECT count(ID) FROM prefix_user"),0);
echo 'InsgesamteBesucher: '.$ges_visits.'<br />';
echo 'Heute: '.$ges_heute.'<br />';
echo 'Gestern: '.$ges_gestern.'<br />';
echo 'Gästebuch einträge: '.$gbook.'<br />';
echo 'Forum Posts: '.$posts.'<br />';
echo 'Forum Threads: '.$topic.'<br />';
echo 'UserZurzeit: '.$gesuser.'<br />';
echo 'OnlineZurzeit: '.ges_online().'<br />';
{
$gesOnBesucher = ges_online();
if ($gesOnBesucher > 1 ) {
$MOI = 'sind';
} else {
$MOI = 'ist';
}
echo '<br />Online '.$MOI.':<br />';
$erg = db_query('SELECT DISTINCT * FROM `prefix_online` WHERE uid > "0"');
while ($row = db_fetch_object($erg) ) {
echo ''.$row->name.' <wbr>';
}
}
echo '<a class="box" href="index.php?statistik"><b>... '.$lang['more'].'</b></a>';
} else {
$title = $allgAr['title'].' :: Statistik';
$hmenu = 'Statistik';
$design = new design ( $title , $hmenu , 0 );
$design->header();
$anzahlShownTage = 7;
echo '<br /><table width=90%" align="center" class="border" cellpadding="0" cellspacing="1" border="0"><tr><td>';
echo '<table width="100%" border="0" cellpadding="5" cellspacing="0">';
echo '<tr class="Chead"><td colspan="3" align="center"><b>Site Statistik</b></td></tr>';
$max_in = 0;
$ges = 0;
$dat = array();
$max_width = 200;
$maxErg = db_query('SELECT MAX(count) FROM `prefix_counter`');
$max_in = db_result($maxErg,0);
$erg = db_query ("SELECT count, DATE_FORMAT(date,'%a der %d. %b') as datum FROM `prefix_counter` ORDER BY date DESC LIMIT ".$anzahlShownTage);
while ($row = db_fetch_row($erg) ) {
$value = $row[0];
if ( empty($value) ) {
$bwidth = 0;
} else {
$bwidth = $value/$max_in * $max_width;
$bwidth = round($bwidth,0);
}
echo '<tr class="Cnorm">';
echo '<td>'.$row[1].'</td>';
echo '<td><table width="'.$bwidth.'" border="0" cellpadding="0" cellspacing="0">';
echo '<tr><td height="2" class="border"></td></tr></table>';
echo '</td><td align="right">'.$value.'</td></tr>';
$ges += $value;
}
$gesBesucher = db_query('SELECT SUM(count) FROM prefix_counter');
$gesBesucher = @db_result($gesBesucher,0);
echo '<tr class="Cmite"><td colspan="3"><div align="right">';
echo 'Wochen Summe: '.$ges.'</div>';
echo 'Besucher Gesamt '.$gesBesucher.' Maximal '.$max_in.'<br /><br />';
echo '</td></tr><tr class="Cdark">';
echo '<td colspan="3" align="center">[ <a href="javascript:window.close()">Fenster Schliesen</a> ]</td>';
echo '</tr></table></td></tr></table><br />';
$design->footer();
}
?>
Zuletzt modifiziert von Jameson-ngt am 18.10.2007 - 13:53:39
Phantasie ist wichtiger als Wissen, denn Wissen ist begrenzt