If you can see this message, there is likely a problem loading the Overviewer javascript components. Check the javascript console for error messages.
Infinite Infinity {time}
loadHTMLFile($html); $lastTime = strtotime($dom->getElementById('lastTime')->nodeValue); $votesFile = "phpVotes.txt"; $votes = file($votesFile)[0]; $ipsFile = "phpIps.txt"; $ips = file($ipsFile); foreach($ips as $key => $ip){ $ips[$key] = preg_replace( "/\r|\n/", "", $ip ); } function isRunning($pid){ try{ $result = shell_exec(sprintf("ps %d", $pid)); if( count(preg_split("/\n/", $result)) > 2){ return true; } }catch(Exception $e){} return false; } function pidHandler($pidfile){ $lines = file($pidfile); if ($lines){ $contents = ""; foreach($lines as $line){ if (isRunning($line)){ $contents = $contents . $line; } } file_put_contents($pidfile, $contents); return ($contents != ''); } return (false); } function antiSpam($ips){ $ipAdr = $_SERVER['REMOTE_ADDR']; if (in_array($ipAdr, $ips)){ return (true); } else{ return (false); } } function calcNeeded($min, $max, $time1, $time2, $steepness){ $now = time(); $progress = (($now - $time1) / ($now + $time2 - $time1)); $progress = 1 - $progress; $progress = pow($progress,$steepness); $trans = $progress * ($max - $min); return round($trans + $min); } //Check for running PIDs ... $running = pidHandler($pidfile); //Calculate needed Votes ... $neededVotes = calcNeeded($minVotes, $maxVotes, $lastTime, $time2Votes, $steepness); //Check if user allready voted ... $antiSpam = antiSpam($ips); if (isset($_POST['button']) && ! $running && ! $antiSpam) { //Add Vote $votes = $votes + 1; file_put_contents($votesFile, $votes); //Add Ip file_put_contents($ipsFile, $_SERVER['REMOTE_ADDR'] . "\r\n", FILE_APPEND); //Refresh Page header("Refresh:0"); } //Votes Reached! Executing and clearing if ($votes >= $neededVotes && ! $running){ exec(sprintf("%s > %s 2>&1 & echo $! >> %s", $cmd, $outputfile, $pidfile)); //Clear Votes $votes = 0; file_put_contents($votesFile, $votes); //Clear IPs file_put_contents($ipsFile, ""); //Refresh Page header("Refresh:0"); } //HTML $style = 'style="font-family: \'Roboto\', \'Helvetica Neue\', Helvetica, Arial, San Serif; color:black;opacity: 0.98; position:fixed;bottom:23px;right:40px;width:300px;width:100%;text-align:right;"'; $display = $votes . " of " . $neededVotes; //Deaktivate button if running if ($antiSpam){ echo '
'; } elseif ($running){ echo '
'; } else{ echo '
'; } ?>