コード例 #1
0
ファイル: server.php プロジェクト: grinco/cccaminfo
 $info_total = 0;
 if (isset($total_host_shares[$sh_host]["total"])) {
     $info_total = $total_host_shares[$sh_host]["total"];
 }
 $info_total_unic = count($nodes) - 1;
 $info_uniqueIndex = 0;
 if ($info_total != 0) {
     $info_uniqueIndex = (int) ($info_total_unic / $info_total * 100);
 }
 //$info_total_reshare = $total_reshare[$sh_host]["total"];
 //$info_reshareIndex = (int)($info_total_reshare/$info_total_unic *100);
 list($host_DNS, $host_PORT) = explode(":", $sh_host);
 $host_IP = trim(getHostIP($host_DNS));
 $tara_host = taraNameSaved($sh_host);
 $IPServer = trim($tara_host[1]);
 $tara_code = tara($host_IP, $sh_host);
 if ($host_IP != "" && $IPServer != "" && $host_IP != $IPServer) {
     loadGlobalServers();
     $globalServers[$sh_host][1] = $IPServer;
     saveGlobalServers();
 }
 if ($country_whois == true) {
     $tara_nume = taraName($tara_code["tara"]);
 }
 echo "<table border=0 cellpadding=0 cellspacing=0>";
 echo "<tr>";
 echo "<td VALIGN = \"top\">";
 format1("Server", $sh_host);
 if ($host_IP == "unknown") {
     format1("IP/Clients", $host_IP);
 } else {
コード例 #2
0
ファイル: common.php プロジェクト: grinco/cccaminfo
function UpdateServersCountryIP()
{
    loadGlobalServers();
    loadECMServers();
    global $servers_file;
    global $globalServers;
    global $Server_Conectat_Local;
    global $SERVER_PAIR;
    global $clientConectat;
    initPairs();
    initClients();
    $servers_data = file($servers_file);
    foreach ($servers_data as $currentline) {
        $inceput1 = substr($currentline, 0, 1);
        $inceput2 = substr($currentline, 1, 2);
        if ($inceput1 == "|" && $inceput2 != " H") {
            $server = explode("|", $currentline);
            $server_Host = trim($server[1]);
            $server_Time = trim($server[2]);
            $server_Type = trim($server[3]);
            $server_Ver = trim($server[4]);
            $server_Nodeid = trim($server[5]);
            $server_Cards = trim($server[6]);
            $server_Idents = trim($server[7]);
            if ($server_Host != "") {
                list($host_DNS, $host_PORT) = explode(":", $server_Host);
                $taraSaved = taraNameSaved($server_Host);
                $checkIP = true;
                if (isset($SERVER_PAIR[$server_Host])) {
                    foreach ($SERVER_PAIR[$server_Host] as $Client_afisat) {
                        $IPdiferit = false;
                        if (isset($clientConectat[$Client_afisat]["Info"][0])) {
                            $IPClient = trim($clientConectat[$Client_afisat]["Info"][0]);
                        }
                        $IPServer = trim($taraSaved[1]);
                        if ($IPClient == $IPServer) {
                            $checkIP = false;
                            break;
                        }
                    }
                } else {
                    $checkIP = false;
                }
                if ($checkIP == true || $taraSaved[0] == "" || $taraSaved[1] == "") {
                    $host_IP = getHostIP($host_DNS);
                    tara($host_IP, $server_Host);
                    $globalServers[$server_Host] = array($server_Nodeid, $host_IP, $taraSaved[0]["tara"]);
                } else {
                    $globalServers[$server_Host] = array($server_Nodeid, $taraSaved[1], $taraSaved[0]["tara"]);
                }
                $Server_Conectat_Local[$server_Nodeid] = $server_Host;
                $lastServer = $server_Host;
            }
        }
    }
    saveGlobalServers();
    saveGlobalNodeID();
}
コード例 #3
0
ファイル: client.php プロジェクト: grinco/cccaminfo
        $acEmm = "";
        $acEmmOk = "";
        $ac_Version = "-";
        $ac_LastShare = "";
        $ac_EcmTime = "";
        $acEmmOk = "";
        $clientConectat[$username]["Info"] = array($ac_IP, $ac_Connected, $ac_Idle, $acEcm, $acEcmOk, $acEmm, $acEmmOk, $ac_Version, $ac_LastShare, $ac_EcmTime, $lastSeenOnline);
    }
}
//___________________________________________________________________________________________________
if (!isset($clientConectat[$username])) {
    format1("Connected", "offline");
} else {
    $username_IP = $clientConectat[$username]["Info"][0];
    $tara_user = taraNameSaved($username);
    $tara_code = tara($username_IP, $username);
    if ($country_whois == true) {
        $tara_nume = taraName($tara_code["tara"]);
    }
    format1("Username", $username . " (" . $username_IP . ")");
    if ($country_whois == true) {
        if ($tara_code["tara"] != "<>") {
            format1("Country", $tara_code["tara"] . " , " . $tara_nume);
        } else {
            format1("Country", "Local Private IP");
        }
    }
    format1("Connected", $clientConectat[$username]["Info"][1]);
    if ($clientConectat[$username]["Info"][10] == -1) {
        format1("Idle time", $clientConectat[$username]["Info"][2]);
        format1("CCcam Version", $clientConectat[$username]["Info"][7]);
コード例 #4
0
ファイル: clientstats.php プロジェクト: grinco/cccaminfo
             if ($indexclient < 1000) {
                 $usageClient = "<FONT COLOR=orange>" . $indexclient . "</FONT>";
             } else {
                 $usageClient = "<FONT COLOR=red>" . $indexclient . "</FONT>";
             }
         }
     }
 }
 echo "<td class=\"tabel_hop_total2\">" . $usageClient . "</td>";
 if ($client["Info"][10] == -1) {
     echo "<td class=\"Node_IDr\"><A HREF=" . $pagina . "?username={$username}>" . $username . "</A></td>";
 } else {
     echo "<td class=\"Node_IDr\"><A HREF=" . $pagina . "?username={$username}><FONT COLOR=gray>" . $username . "</FONT></A></td>";
 }
 if ($country_whois == true) {
     $tara = tara($client["Info"][0], $username);
     echo "<td class=\"tabel_ecm\">" . $tara["tara"] . "</td>";
 }
 echo "<td class=\"tabel_normal\">" . $client["Info"][0] . "</td>";
 $indexclient = $lastIndexEcm;
 if ($indexclient < 100) {
     $usageClient = "<FONT COLOR=gray>" . $indexclient . "</FONT>";
 } else {
     if ($indexclient < 250) {
         $usageClient = "<FONT COLOR=green>" . $indexclient . "</FONT>";
     } else {
         if ($indexclient < 500) {
             $usageClient = "<FONT COLOR=yellow>" . $indexclient . "</FONT>";
         } else {
             if ($indexclient < 1000) {
                 $usageClient = "<FONT COLOR=orange>" . $indexclient . "</FONT>";