soo
switchbox1.php
<script type="text/javascript">
var boxes = 7;
var chosenBox = 1;
function toggleBoxes (toShow) {
toShow = isNaN(toShow) ? 0 : toShow;
if (toShow < 1 || toShow > boxes) {
toShow = (chosenBox < boxes) ? chosenBox + 1 : 1;
}
document.getElementById('box_'+chosenBox).style.display = 'none';
document.getElementById('box_'+toShow).style.display = '';
chosenBox = toShow;
}
</script>
<div align="center">
<a href="javascript:void(0);" onclick="toggleBoxes(1);"> User</a>
<a href="javascript:void(0);" onclick="toggleBoxes(2);"> Statistik</a>
</div>
<br />
<div id="box_1">{_boxes_online}</div>
<div id="box_2" style="display:none">{_boxes_statistik}</div>
online.php
<center><?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);
$ip = $_SERVER['REMOTE_ADDR'];
echo '<b><a style="font-size:0.8em;"> Heute: </a></b><a style="font-size:0.9em;"><font color="#696969">'.$ges_heute.'</font></a><br />';
echo '<b><a style="font-size:0.8em;"> Gestern: </a></b><a style="font-size:0.9em;"><font color="#696969">'.$ges_gestern.'</font></a><br />';
echo '<b><a style="font-size:0.8em;"> Besucherzähler: </a></b><a style="font-size:0.9em;"><font color="#696969">'.$ges_visits.'</font></a><br />';
{
$gesOnBesucher = ges_online();
if ($gesOnBesucher > 1 ) {
$MOI = '<b>sind</b>';
} else {
$MOI = '<b>ist</b>';
}
$erg = db_query('SELECT DISTINCT * FROM `prefix_online` WHERE uid > "0"');
while ($row = db_fetch_object($erg) ) {
echo ''.$row->name.' <wbr>';
}
}
} else {
$title = $allgAr['title'].' |<em> Statistik</em>';
$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 'Besucher pro Woche: '.$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();
}
?></center>
<script language="JavaScript" type="text/javascript">
<!--
function einblenden(div) {
with(document.getElementById(div).style){
if(display=="none"){
display="inline";
}
else{
display="none";
}
}
}
//-->
</script>
<?php
# Copyright by Manuel Staechele
# Support www.ilch.de
# Modifiziert by: Puni
# Support: www.fhag-gaming.de
if (!defined('main')) {die("no direct access");}
$dif = date('Y-m-d H:i:s', time() - 60);
$abf = "SELECT a.uid, b.avatar FROM `prefix_online` a LEFT JOIN prefix_user b ON a.uid = b.id WHERE uptime > '". $dif."'";
$resultID = db_query($abf);
$brk='';
$uid = array();
$guests = 0;
$guestn = $lang['guests'];
$content='';
while ($row = db_fetch_object($resultID)) {
if ( file_exists($row->avatar)) {
$avatar = '<a href="index.php?user-details-'.$row->uid.'"><img width="40" height="53" src="'.$row->avatar.'" border="0">';
} else {
$avatar = '<a href="index.php?user-details-'.$row->uid.'"><img width="40" height="53" src="include/images/avatars/noavatar.jpg" border="0">';
}
if ($row->uid != 0 AND $brk!=$row->uid) {
$name=@db_result(db_query('SELECT name FROM prefix_user WHERE id='.$row->uid),0);
$content.='<table width="75%" align="center" cellpadding="2" cellspacing="0" border="0">
<tr><td class="left"><img src="include/images/icons/online.gif" border="0" alt="online"></td>
<td><a class="box" onmouseover="javascript:einblenden('.$row->uid.')" onmouseout="javascript:einblenden('.$row->uid.')" href="index.php?user-details-'.$row->uid.'">'.$name.'</a></td>
</tr></table>
<div id="'.$row->uid.'" style="display : none;">
<table align="center" border="0" width="75%" cellspacing="2" cellpadding="0" style="border: 1px solid #000000">
<tr><td>'.$avatar.'</td><td><font color="#00ff00"><b>Online!</b></font></td>
</tr></table></div>'."\n";
$uid[] = $row->uid;
}
if ($row->uid == 0) { $guests++; }
$brk=$row->uid;
}
if ($guests == 1) { $guestn = $lang['guest']; }
if (empty($content)) { $content.='<table width="75%" align="center" cellpadding="2" cellspacing="0" border="0"><tr><td><img src="include/images/icons/offline.gif" border="0" alt="offline"></td><td><font color="#003366">0 User </font></td></tr></table>'."\n"; }
$content.='<table width="75%" align="center" cellpadding="2" cellspacing="0" border="0"><tr><td colspan="2"><hr style="height: 0px; border: dashed #9AB1C8 0px; border-top-width: 1px;"></td></tr></table>'."\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)) {
if ( file_exists($row2->avatar)) {
$avatar = '<a href="index.php?user-details-'.$row2->id.'"><img width="40" height="53" src="'.$row2->avatar.'" border="0">';
} else {
$avatar = '<a href="index.php?user-details-'.$row2->id.'"><img witdh="40" height="53" src="include/images/avatars/noavatar.jpg" border="0">';
}
$datum = date('H:i \U\h\r - d.m.y',$row2->llogin);
$user = $row2->name;
$content.='<table width="75%" align="center" cellpadding="2" cellspacing="0" border="0"><tr>
<td class="left"><img src="include/images/icons/offline.gif" border="0" alt="offline"></td>
<td><a class="box" onmouseover="javascript:einblenden('.$row2->id.')" onmouseout="javascript:einblenden('.$row2->id.')" href="index.php?user-details-'.$row2->id.'">'.$user.'</a></td>
</tr></table>
<div id="'.$row2->id.'" style="display : none;">
<table align="center" border="0" width="75%" cellspacing="2" cellpadding="0" style="border: 1px solid #000000">
<tr><td>'.$avatar.'</td><td> Letztes mal Online:<br /> '.$datum.'</td>
</tr></table></div>'."\n";
}
if ($guests == 0) {
$content.= '<table width="75%" align="center" cellpadding="2" cellspacing="0" border="0"><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></table>'."\n";
} else {
$content.= '<table width="75%" align="center" cellpadding="2" cellspacing="0" border="0"><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></table>'."\n";
}
?>
<?php echo $content; ?>
online:
offline:
musst mir sagen obs geht wenn nicht hab ich was vergessen bin mir jetze nit sicher..
und die Switchbox als Box einbinden auf deiner Hp
hier zusehn auf der rechten seite
beta.warriorofheaven.de/
und das mit dem grauenfeldern sind nur bilder bei Puni(
externer Link auf seiner seite.. kann man einfach mit einfügen
Zuletzt modifiziert von Sunshine Live am 10.09.2010 - 16:18:05