$parsed_host = parse_url($host, PHP_URL_HOST); shortstat($bestand, $parsed_host); break; case 'historystat': echo "<table>"; savefile($host, $bestand); $parsed_host = parse_url($host, PHP_URL_HOST); historystat($bestand, $parsed_host); echo "</table>"; break; } } } if ($_GET["action"] == "save" && $_GET["key"] == "{$historykey}") { foreach ($hostlist as $key => $value) { savehistory($key); echo "History for: " . $key . " saved. <br />\n"; } die("History done.<br /> \n"); } ?> <html> <head> <title>Stats</title> <!-- bar via http://www.joshuawinn.com/quick-and-simple-css-percentage-bar-using-php/ --> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script> <!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]--> <script type="text/javascript" src="inc/js/prettify.js"></script> <!-- PRETTIFY --> <script type="text/javascript" src="inc/js/kickstart.js"></script> <!-- KICKSTART --> <link rel="stylesheet" type="text/css" href="inc/css/kickstart.css" media="all" /> <!-- KICKSTART --> <link rel="stylesheet" type="text/css" href="inc/css/style.css" media="all" /> <!-- CUSTOM STYLES -->
//Get Statistics $statistics = $blog->getsinglevalue("{$db_prefix}counter"); //Who's online if (!defined('noCounter')) { //trackback, rss, sitemap are not regarded as normal visits $afilename = "data/online.php"; $onlineusers = $nowonline = array(); //2006-11-22 Security fix, 2006-11-25 modified $online_all = @file($afilename); for ($i = 0; $i < count($online_all); $i++) { $oldip = explode("|", $online_all[$i]); if (trim($oldip[2]) == '') { continue; } if (gmdate("Ymd", $oldip[2] + $config['timezone'] * 3600 + 86400) == $nowtime['Ymd']) { savehistory(gmdate("Ymd", $oldip[2] + $config['timezone'] * 3600), $statistics['today']); $statistics['today'] = 0; break; //This will clear all visitors since yesterday, but will save visitors from today } $onlinetime = $nowtime['timestamp'] - $oldip[2]; if ($oldip[1] != $userdetail['ip'] && $onlinetime <= $config['onlinetime']) { $nowonline[] = $online_all[$i]; $onlineusers[] = array('userid' => $oldip[3], 'username' => $oldip[4], 'activetime' => $oldip[2], 'ip' => $oldip[1]); } elseif ($oldip[1] == $userdetail['ip']) { $nowonline[] = "<?PHP exit;?>|{$userdetail['ip']}|{$nowtime['timestamp']}|{$userdetail['userid']}|{$userdetail['username']}|\n"; $onlineusers[] = array('userid' => $oldip[3], 'username' => $oldip[4], 'activetime' => $nowtime['timestamp'], 'ip' => $oldip[1]); $tmp_checked_current = 1; } } if ($tmp_checked_current != 1) {