Commit c6430f85 authored by dmorley's avatar dmorley
Browse files

clean up views

parent 8bfcd3bc
...@@ -18,7 +18,7 @@ font-size:9px; ...@@ -18,7 +18,7 @@ font-size:9px;
} }
.content { .content {
margin-left: 2px !important; margin-left: 2px !important;
width: 65%; width: 750px;
} }
.smlogo { .smlogo {
width: 16px; width: 16px;
......
...@@ -71,10 +71,10 @@ if ($detect->isMobile()) {echo '<link rel="stylesheet" href="css/mobile.css" />' ...@@ -71,10 +71,10 @@ if ($detect->isMobile()) {echo '<link rel="stylesheet" href="css/mobile.css" />'
<div id="results"> <div id="results">
<a href='random.php' class='btn danger large'>Confused and just want to sign up?? Click Here</a><br> <a href='random.php' class='btn danger large'>Confused and just want to sign up?? Click Here</a><br>
<?php <?php
if ($hidden == "true") {echo "<a href='http://podupti.me' class='btn danger large'>NOTICE: These pods are Hidden and have problems, click here to go to working pods</a>";} $advancedview = isset($_GET['advancedview'])?$_GET['advancedview']:null;
$advancedview = isset($_GET['advancedview'])?$_GET['advancedview']:null; $mapview = isset($_GET['mapview'])?$_GET['mapview']:null;
$mapview = isset($_GET['mapview'])?$_GET['mapview']:null;
if ($advancedview) { if ($advancedview) {
echo "<a href='http://podupti.me' class='btn danger large'>NOTICE: This view shows all pods in all states, some offline, click here to go to list of pods open for signup</a><br>";
include("showfull.php"); include("showfull.php");
} elseif ($mapview) { } elseif ($mapview) {
include("showmap.php"); include("showmap.php");
...@@ -89,7 +89,7 @@ if ($detect->isMobile()) {echo '<link rel="stylesheet" href="css/mobile.css" />' ...@@ -89,7 +89,7 @@ if ($detect->isMobile()) {echo '<link rel="stylesheet" href="css/mobile.css" />'
<div id="info"> <div id="info">
Data last refreshed at: <?php echo date("F d Y H:i:s.", filemtime($lastfile)) ?> Pacific Time<br> Data last refreshed at: <?php echo date("F d Y H:i:s.", filemtime($lastfile)) ?> Pacific Time<br>
Poduptime is run by <a href="https://diasp.org/u/davidmorley" target=_new>David Morley</a> and is open source on <a href="https://github.com/diasporg/Poduptime">GitHub</a> Feel free to contribute with pull requests or bug reports!<br> Poduptime is run by <a href="https://diasp.org/u/davidmorley" target=_new>David Morley</a> and is open source on <a href="https://github.com/diasporg/Poduptime">GitHub</a> Feel free to contribute with pull requests or bug reports!<br>
Some pods are <a href="http://podupti.me/?hidden=true">Hidden</a> since they have too many issues, see the <a href="https://github.com/diasporg/Poduptime/wiki">Wiki</a> for more.<br><br> Questions on how this works? <a href="https://github.com/diasporg/Poduptime/wiki">Wiki</a><br>
<a href="https://diasporafoundation.org/">More about Diaspora</a> <a href="https://diasporafoundation.org/">More about Diaspora</a>
</div> </div>
<div id="howto" style="display:none; margin-left:50px"> <div id="howto" style="display:none; margin-left:50px">
......
...@@ -24,7 +24,7 @@ echo $numrows; ...@@ -24,7 +24,7 @@ echo $numrows;
?> ?>
pods that are open for signup now. pods that are open for signup now.
Click column names to sort and find a pod. Click column names to sort and find a pod.
Show as: <a href="?mapview=true">Map</a> <a href="/">Simple Table</a> <a href="?advancedview=true">Advanced Table</a> Show as: <a href="?mapview=true">Map</a> | <a href="/">Simple Table</a> | <a href="?advancedview=true">Advanced Table</a>
<meta charset="utf-8"> <meta charset="utf-8">
<!-- /* Copyright (c) 2011, David Morley. This file is licensed under the Affero General Public License version 3 or later. See the COPYRIGHT file. */ --> <!-- /* Copyright (c) 2011, David Morley. This file is licensed under the Affero General Public License version 3 or later. See the COPYRIGHT file. */ -->
<table id="myTable" class="tablesorter zebra-striped" width="98%"> <table id="myTable" class="tablesorter zebra-striped" width="98%">
...@@ -75,7 +75,7 @@ $tip.="On a score of -20 to +20 this pod is a {$row["score"]} right now"; ...@@ -75,7 +75,7 @@ $tip.="On a score of -20 to +20 this pod is a {$row["score"]} right now";
echo "</td></tr>\n"; echo "</td></tr>\n";
if ($tt == 4) { if ($tt == 4) {
echo <<<EOF echo <<<EOF
<td colspan='12' style='padding-left:200px;'> <td colspan='12'>
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- podup2015 --> <!-- podup2015 -->
<ins class="adsbygoogle" <ins class="adsbygoogle"
......
...@@ -9,7 +9,7 @@ $tt=0; ...@@ -9,7 +9,7 @@ $tt=0;
if ($hidden == "true") { if ($hidden == "true") {
$sql = "SELECT * FROM pods WHERE hidden <> 'no' ORDER BY weightedscore DESC"; $sql = "SELECT * FROM pods WHERE hidden <> 'no' ORDER BY weightedscore DESC";
} else { } else {
$sql = "SELECT * FROM pods WHERE adminrating <> -1 AND hidden <> 'yes' ORDER BY weightedscore DESC"; $sql = "SELECT * FROM pods ORDER BY weightedscore DESC";
} }
$result = pg_query($dbh, $sql); $result = pg_query($dbh, $sql);
if (!$result) { if (!$result) {
...@@ -21,9 +21,14 @@ echo $numrows; ...@@ -21,9 +21,14 @@ echo $numrows;
echo " #Diaspora Pods listed, Come see the privacy aware social network.' />"; echo " #Diaspora Pods listed, Come see the privacy aware social network.' />";
echo $numrows; echo $numrows;
?> ?>
<style>
.content {
width: 99%;
}
</style>
pods that are open for signup now. pods that are open for signup now.
Click column names to sort and find a pod. Click column names to sort and find a pod.
Show as: <a href="?mapview=true">Map</a> <a href="/">Simple Table</a> <a href="?advancedview=true">Advanced Table</a> Show as: <a href="?mapview=true">Map</a> | <a href="/">Simple Table</a> | <a href="?advancedview=true">Advanced Table</a>
<meta charset="utf-8"> <meta charset="utf-8">
<!-- /* Copyright (c) 2011, David Morley. This file is licensed under the Affero General Public License version 3 or later. See the COPYRIGHT file. */ --> <!-- /* Copyright (c) 2011, David Morley. This file is licensed under the Affero General Public License version 3 or later. See the COPYRIGHT file. */ -->
<table id="myTable" class="tablesorter zebra-striped" width="98%"> <table id="myTable" class="tablesorter zebra-striped" width="98%">
...@@ -32,14 +37,17 @@ Show as: <a href="?mapview=true">Map</a> <a href="/">Simple Table</a> <a href=" ...@@ -32,14 +37,17 @@ Show as: <a href="?mapview=true">Map</a> <a href="/">Simple Table</a> <a href="
<th width="220px">Diaspora Pod<a class="tipsy" title="A pod is a site for you to set up your account.">?</a></th> <th width="220px">Diaspora Pod<a class="tipsy" title="A pod is a site for you to set up your account.">?</a></th>
<th>Version<a class="tipsy" title="Version of Diaspora this pod runs">?</a></th> <th>Version<a class="tipsy" title="Version of Diaspora this pod runs">?</a></th>
<th>Uptime<a class="tipsy" title="Percent of the time the pod is online for <?php echo date("F") ?>.">?</a></th> <th>Uptime<a class="tipsy" title="Percent of the time the pod is online for <?php echo date("F") ?>.">?</a></th>
<th>Responsetime</th>
<th>Signups</th> <th>Signups</th>
<th>Total Users<a class="tipsy" title="Number of total users on this pod.">?</a></th> <th>Total Users<a class="tipsy" title="Number of total users on this pod.">?</a></th>
<th>Active Users<a class="tipsy" title="Number of users active last 6 months on this pod.">?</a></th> <th>Active Last 6<a class="tipsy" title="Number of users active last 6 months on this pod.">?</a></th>
<th>Active Last 1<a class="tipsy" title="Number of users active last 1 month on this pod.">?</a></th>
<th>Posts<a class="tipsy" title="Number of total posts on this pod.">?</a></th> <th>Posts<a class="tipsy" title="Number of total posts on this pod.">?</a></th>
<th>Comments<a class="tipsy" title="Number of total comments on this pod.">?</a></th> <th>Comments<a class="tipsy" title="Number of total comments on this pod.">?</a></th>
<th>Months<a class="tipsy" title="How many months has this pod been online? Click number for more history.">?</a></th> <th>Months<a class="tipsy" title="How many months has this pod been online? Click number for more history.">?</a></th>
<th>Rating<a class="tipsy" title="User and Admin rating for this pod.">?</a></th> <th>Rating<a class="tipsy" title="User and Admin rating for this pod.">?</a></th>
<th>Location<a class="tipsy" title="Pod location, based on IP Geolocation">?</a></th> <th>Score<a class="tipsy" title="System Score on a -20 to +20 scale">?</a></th>
<th>Country<a class="tipsy" title="Pod location, based on IP Geolocation">?</a></th>
<th>Services<a class="tipsy" title="External Social Networks this pod can post to">?</a></th> <th>Services<a class="tipsy" title="External Social Networks this pod can post to">?</a></th>
</tr> </tr>
</thead> </thead>
...@@ -76,10 +84,12 @@ else ...@@ -76,10 +84,12 @@ else
if ($row["shortversion"] == $row["masterversion"] && $row["shortversion"] != "") {$classver = "green";} elseif ($verdiff > 6) {$classver = "red";} else {$classver = "black";} if ($row["shortversion"] == $row["masterversion"] && $row["shortversion"] != "") {$classver = "green";} elseif ($verdiff > 6) {$classver = "red";} else {$classver = "black";}
echo "<td class='$classver'><div title='{$pre} codename: {$row["longversion"]} master version is: {$row["masterversion"]}' class='tipsy'>{$version}</div></td>"; echo "<td class='$classver'><div title='{$pre} codename: {$row["longversion"]} master version is: {$row["masterversion"]}' class='tipsy'>{$version}</div></td>";
echo "<td>" . $row["uptimelast7"] . "%</td>"; echo "<td>" . $row["uptimelast7"] . "%</td>";
echo "<td>" . $row["responsetimelast7"] . "</td>";
if ($row["signup"] == 1) {$signup="Open";} else {$signup="Closed";} if ($row["signup"] == 1) {$signup="Open";} else {$signup="Closed";}
echo "<td>" . $signup . "</td>"; echo "<td>" . $signup . "</td>";
echo "<td>" . $row["total_users"] . "</td>"; echo "<td>" . $row["total_users"] . "</td>";
echo "<td class='tipsy' title='active six months: " . $row["active_users_halfyear"] . ", active one month: " . $row["active_users_monthly"] . "'>" . $row["active_users_halfyear"] . "</td>"; echo "<td>" . $row["active_users_halfyear"] . "</td>";
echo "<td>" . $row["active_users_monthly"] . "</td>";
echo "<td>" . $row["local_posts"] . "</td>"; echo "<td>" . $row["local_posts"] . "</td>";
echo "<td>" . $row["comment_counts"] . "</td>"; echo "<td>" . $row["comment_counts"] . "</td>";
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"];} 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"];}
...@@ -97,7 +107,8 @@ echo "✪"; ...@@ -97,7 +107,8 @@ echo "✪";
} }
echo "</div></a></td>"; echo "</div></a></td>";
echo "<td class='tipsy' title='".$row["whois"]." '>" . $row["country"] . "</td>\n"; echo "<td>" . $row["score"] . "</td>\n";
echo "<td>" . $row["country"] . "</td>\n";
echo "<td class='' title=''>"; echo "<td class='' title=''>";
if ($row["service_facebook"] == "t") {echo "<div id='facebook' class='smlogo'></div>";} if ($row["service_facebook"] == "t") {echo "<div id='facebook' class='smlogo'></div>";}
if ($row["service_twitter"] == "t") {echo "<div id='twitter' class='smlogo'></div>";} if ($row["service_twitter"] == "t") {echo "<div id='twitter' class='smlogo'></div>";}
...@@ -106,7 +117,7 @@ echo "✪"; ...@@ -106,7 +117,7 @@ echo "✪";
echo "</td></tr>\n"; echo "</td></tr>\n";
if ($tt == 5) { if ($tt == 5) {
echo <<<EOF echo <<<EOF
<td colspan='12' style='padding-left:200px;'> <td colspan='12'>
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- podup2015 --> <!-- podup2015 -->
<ins class="adsbygoogle" <ins class="adsbygoogle"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment