'no' ORDER BY Hgitdate DESC, uptimelast7 DESC"; } else { $sql = "SELECT * FROM pods WHERE adminrating <> -1 AND hidden <> 'yes' ORDER BY Hgitdate DESC, uptimelast7 DESC"; } $result = pg_query($dbh, $sql); if (!$result) { die("Error in SQL query: " . pg_last_error()); } $numrows = pg_num_rows($result); while ($row = pg_fetch_array($result)) { $tt=$tt+1; if ($row["secure"] == "true") { $method = "https://"; $class="green"; $tip="This pod uses SSL encryption for traffic.";} else { $method = "http://"; $class="red"; $tip="This pod does not offer SSL"; } $verdiff = str_replace(".", "", $row["masterversion"]) - str_replace('.', '', $row["shortversion"]); $tip.="\n This pod {$row["domain"]} has been watched for {$row["monthsmonitored"]} months and its average ping time is {$row["responsetimelast7"]} with uptime of {$row["uptimelast7"]} this month and was last checked on {$row["dateupdated"]}. "; $tip.="Code base is {$row["shortversion"]} and the current github base is {$row["masterversion"]}. "; $tip.="This pod is {$verdiff} versions behind the current code. This pods IP {$row["ip"]} has IPv6 {$row["ipv6"]} and is located in {$row["country"]}. On a score of -20 to +20 this pod is a {$row["score"]} right now, all data is checked every hour."; //if ($tt == "3") {echo "";} echo ""; // echo ""; // echo ""; if (stristr($row["shortversion"],'head')) {$version=".development code";$pre = "This pod runs pre release development code";} elseif (!$row["shortversion"]) {$version="0";$pre = "This pod runs unknown code";} else {$version=$row["shortversion"];$pre="This pod runs production code";} if ($row["shortversion"] == $row["masterversion"] && $row["shortversion"] != "") {$classver = "green";} elseif ($verdiff > 6) {$classver = "red";} else {$classver = "black";} echo ""; echo ""; if (strpos($row["pingdomurl"], "pingdom.com")) {$moreurl = $row["pingdomurl"];} else {$moreurl = "http://api.uptimerobot.com/getMonitors?format=json&customUptimeRatio=7-30-60-90&apiKey=".$row["pingdomurl"];} echo ""; if ($row["userrating"] >6) {$userratingclass="green";} elseif ($row["userrating"] <7) {$userratingclass="yellow";} elseif ($row["userrating"] <3) {$userratingclass="red";} echo ""; // echo ""; // echo "\n"; echo "\n"; } pg_free_result($result); pg_close($dbh); ?>
Diaspora Pod? Version Code? Uptime Percent.">? Months Online? User Rating? Server Location?
" . $row["status"] . "
" . strtotime($row["hgitdate"]) . "
{$version}
" . $row["uptimelast7"] . "
"; if ($row["userrating"] == 0) {echo "no rating yet";} for ($i = 0; $i < $row["userrating"]; $i++) { echo "✪"; } if ($row["adminrating"] >6) {$adminratingclass="green";} elseif ($row["adminrating"] <7) {$adminratingclass="yellow";} elseif ($row["adminrating"] <3) {$adminratingclass="red";} echo "

"; for ($iw = 0; $iw < $row["adminrating"]; $iw++) { echo "✪"; } echo "
" . $row["responsetimelast7"] . "" . $row["ipv6"] . "" . $row["country"] . "