diff --git a/api.php b/api.php index 97146be76a6cce5334041a3c6490ebd3177cf47e..65f14d803da57bd3def7ce7914a9dc5b85828036 100644 --- a/api.php +++ b/api.php @@ -22,13 +22,17 @@ EOF; } $numrows = pg_num_rows($result); while ($row = pg_fetch_array($result)) { +$tip=""; +$tip.="\n This pod {$row["name"]} 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.="On a score of -20 to +20 this pod is a {$row["score"]} right now"; if ($row["secure"] == "true") {$method = "https://";} else {$method = "http://";} echo << {$method}{$row['domain']} urn:{$row['domain']} - Location {$row['country']} + Pod Location is: {$row['country']} + {$tip} {$row['lat']} {$row['long']} {$row['domain']} diff --git a/css/newstyle.css b/css/newstyle.css index 91599d93c6cbf045e03b3cbeee09a25c06cac6e9..52e6b5140f2a47e0d0feca65e329c9e033386e5a 100644 --- a/css/newstyle.css +++ b/css/newstyle.css @@ -18,6 +18,7 @@ font-size:9px; } .content { margin-left: 2px !important; + width: 65%; } .smlogo { width: 16px; diff --git a/index.php b/index.php index 97f07660172bb00e99b4f549e7bb401015c26acd..192a87ed00284147988d9bc8f6d3b3161939a72f 100644 --- a/index.php +++ b/index.php @@ -67,11 +67,22 @@ if ($detect->isMobile()) {echo '' -
+
Confused and just want to sign up?? Click Here
- NOTICE: These pods are Hidden and have problems, click here to go to working pods";} include("show.php"); ?> + NOTICE: These pods are Hidden and have problems, click here to go to working pods";} + $advancedview = isset($_GET['advancedview'])?$_GET['advancedview']:null; + $mapview = isset($_GET['mapview'])?$_GET['mapview']:null; + if ($advancedview) { + include("showfull.php"); + } elseif ($mapview) { + include("showmap.php"); + } else { + include("show.php"); + } + ?>
Pod Host? Click here to add your listing.
diff --git a/show.php b/show.php index b53cf66f283dad3b04463ec188c5e6e7fadab5b4..5c924a519497ecddb7ef869cff1a5ccc011605dc 100644 --- a/show.php +++ b/show.php @@ -21,7 +21,9 @@ echo $numrows; echo " #Diaspora Pods listed, Come see the privacy aware social network.' />"; echo $numrows; ?> - pods that are open for signup now. Click column names to sort and find a pod. Show as: Map Table + pods that are open for signup now. +Click column names to sort and find a pod. +Show as: Map Simple Table Advanced Table @@ -57,12 +59,6 @@ $tip.="On a score of -20 to +20 this pod is a {$row["score"]} right now"; echo ""; ""; -if (stristr($row["shortversion"],'head')) -{$version=".dev";$pre = "This pod runs pre release -development code";} elseif (!$row["shortversion"]) -{$version="0";$pre = "This pod runs -unknown code";} -else echo ""; echo ""; echo "\n"; diff --git a/showfull.php b/showfull.php new file mode 100644 index 0000000000000000000000000000000000000000..5a05b7282ef5931357f12afd2a712a14ae8cd354 --- /dev/null +++ b/showfull.php @@ -0,0 +1,129 @@ + 'no' ORDER BY active_users_halfyear DESC NULLS LAST, uptimelast7 DESC NULLS LAST"; + } else { + $sql = "SELECT * FROM pods WHERE adminrating <> -1 AND hidden <> 'yes' ORDER BY active_users_halfyear DESC NULLS LAST, uptimelast7 DESC NULLS LAST"; + } + $result = pg_query($dbh, $sql); + if (!$result) { + die("Error in SQL query: " . pg_last_error()); + } + $numrows = pg_num_rows($result); +echo ""; +echo $numrows; +?> + pods that are open for signup now. +Click column names to sort and find a pod. +Show as: MapSimple TableAdvanced Table + + +
" . $row["domain"] . "
?
" . $row["uptimelast7"] . "%" . $row["active_users_halfyear"] . "" . $row["country"] . "
+ + + + + + + + + + + + + + + + + +"; +""; + +if (stristr($row["shortversion"],'head')) +{$version=".dev";$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 ($row["signup"] == 1) {$signup="Open";} else {$signup="Closed";} + echo ""; + echo ""; + echo ""; + 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 "\n"; + echo "\n"; +if ($tt == 5) { +echo << + + + + + +EOF; +} + } + pg_free_result($result); + pg_close($dbh); +$country_code = $_SERVER["HTTP_CF_IPCOUNTRY"]; +//echo $country_code; +?> + +
Diaspora Pod?Version?Uptime.">?SignupsTotal Users?Active Users?Posts?Comments?Months?Rating?Location?Services?
" . $row["domain"] . "
?
{$version}
" . $row["uptimelast7"] . "%" . $signup . "" . $row["total_users"] . "" . $row["active_users_halfyear"] . "" . $row["local_posts"] . "" . $row["comment_counts"] . "
"; +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["country"] . ""; + if ($row["service_facebook"] == "t") {echo "";} + if ($row["service_twitter"] == "t") {echo "";} + if ($row["service_tumblr"] == "t") {echo "";} + if ($row["service_wordpress"] == "t") {echo "";} + echo "