コード例 #1
0
ファイル: server.php プロジェクト: grinco/cccaminfo
 foreach ($logtime as $log) {
     if (strstr($log, "-")) {
         $history_off = $history_off + substr($log, 1);
     } else {
         $history_on = $history_on + $log;
     }
 }
 $DIV_history_off = "";
 if ($history_off > 0) {
     $DIV_history_off = "<FONT color=red>" . formatted_timediff($history_off * 60) . "</FONT>";
 }
 $DIV_history_total = formatted_timediff(($history_off + $history_on) * 60);
 if ($history_off > 0) {
     format1("Uptime", procentColor(procentOnline($sh_host)) . " [ " . $DIV_history_off . " / " . $DIV_history_total . " ]");
 } else {
     format1("Uptime", procentColor(procentOnline($sh_host)) . " [ " . $DIV_history_total . " ]");
 }
 if ($country_whois == true && $tara_code["tara"] != "<>") {
     format1("ISP Info", $tara_code["info"]);
 }
 echo "<BR>";
 ob_flush();
 flush();
 $LastPingError = "Very slow";
 $pingCount = 5;
 $pingCountOK = 0;
 $pingLast = 0;
 $pingTimeTotal = 0;
 //echo "<table border=0 cellpadding=0 cellspacing=0>";
 $ping_text_try = "";
 $stringquerry = $_SERVER['QUERY_STRING'];
コード例 #2
0
ファイル: serverstats.php プロジェクト: grinco/cccaminfo
         }
     }
 }
 if ($nodes["Info"][1] != "CCcam-s2s") {
     $qualityServer = "-";
 } else {
     if (!isset($total_host_shares[$sh_host][2]) && !isset($total_host_shares[$sh_host][3])) {
         $qualityServer = "-";
     }
 }
 //------------- INDEX , RATING
 echo "<td class=\"Node_count\">" . $i . "</td>";
 if ($maxhop > 1) {
     echo "<td class=\"tabel_hop_total\">" . $qualityServer . "</td>";
 }
 $procent = procentOnline($sh_host);
 if ($procent == round($procent) && $procent != "100") {
     $procent = $procent . ".0";
 }
 if ($procent == "100") {
     echo "<td class=\"tabel_hop_total2\"><B>" . procentColor($procent) . "</B></td>";
 } else {
     echo "<td class=\"tabel_hop_total2\">" . procentColor($procent) . "</td>";
 }
 //------------- SERVER
 $tara_DNS = taraNameSaved($sh_host);
 if ($nodes["Info"][0] == "") {
     echo "<td class=\"Node_ID\"><A HREF=" . $pagina . "?nodeDns={$sh_host_afisat}><FONT COLOR=red>" . $sh_host_afisat . "</FONT></A></td>";
 } else {
     echo "<td class=\"Node_ID\"><A HREF=" . $pagina . "?nodeDns={$sh_host_afisat}>" . $sh_host_afisat . "</A></td>";
 }