Commit e6f7963c authored by dmorley's avatar dmorley

some cleanup

parent 96215f86
...@@ -26,7 +26,7 @@ body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size: ...@@ -26,7 +26,7 @@ body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:
.container:after{clear:both;} .container:after{clear:both;}
.container-fluid{position:relative;min-width:940px;padding-left:20px;padding-right:20px;zoom:1;}.container-fluid:before,.container-fluid:after{display:table;content:"";zoom:1;*display:inline;} .container-fluid{position:relative;min-width:940px;padding-left:20px;padding-right:20px;zoom:1;}.container-fluid:before,.container-fluid:after{display:table;content:"";zoom:1;*display:inline;}
.container-fluid:after{clear:both;} .container-fluid:after{clear:both;}
.container-fluid>.sidebar{float:right;width:120px;} .container-fluid>.sidebar{float:right;width:160px;}
.container-fluid>.content{margin-left:2px;width:85%;} .container-fluid>.content{margin-left:2px;width:85%;}
a{color:#0069d6;text-decoration:none;line-height:inherit;font-weight:inherit;}a:hover{color:#00438a;text-decoration:underline;} a{color:#0069d6;text-decoration:none;line-height:inherit;font-weight:inherit;}a:hover{color:#00438a;text-decoration:underline;}
.pull-right{float:right;} .pull-right{float:right;}
...@@ -180,7 +180,7 @@ input[disabled],select[disabled],textarea[disabled],input[readonly],select[reado ...@@ -180,7 +180,7 @@ input[disabled],select[disabled],textarea[disabled],input[readonly],select[reado
.form-stacked .inputs-list{margin-bottom:0;}.form-stacked .inputs-list li{padding-top:0;}.form-stacked .inputs-list li label{font-weight:normal;padding-top:0;} .form-stacked .inputs-list{margin-bottom:0;}.form-stacked .inputs-list li{padding-top:0;}.form-stacked .inputs-list li label{font-weight:normal;padding-top:0;}
.form-stacked div.clearfix.error{padding-top:10px;padding-bottom:10px;padding-left:10px;margin-top:0;margin-left:-10px;} .form-stacked div.clearfix.error{padding-top:10px;padding-bottom:10px;padding-left:10px;margin-top:0;margin-left:-10px;}
.form-stacked .actions{margin-left:-20px;padding-left:20px;} .form-stacked .actions{margin-left:-20px;padding-left:20px;}
table{width:100%;margin-bottom:18px;padding:0;border-collapse:separate;*border-collapse:collapse;font-size:13px;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}table th,table td{padding:10px 10px 9px;line-height:18px;text-align:left;} table{width:100%;margin-bottom:18px;padding:0;border-collapse:separate;*border-collapse:collapse;font-size:12px;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}table th,table td{padding:10px 10px 9px;line-height:2px;text-align:left;}
table th{padding-top:9px;font-weight:bold;vertical-align:middle;border-bottom:1px solid #ddd;} table th{padding-top:9px;font-weight:bold;vertical-align:middle;border-bottom:1px solid #ddd;}
table td{vertical-align:top;} table td{vertical-align:top;}
table th+th,table td+td{border-left:1px solid #ddd;} table th+th,table td+td{border-left:1px solid #ddd;}
...@@ -189,7 +189,7 @@ table tbody tr:first-child td:first-child{-webkit-border-radius:4px 0 0 0;-moz-b ...@@ -189,7 +189,7 @@ table tbody tr:first-child td:first-child{-webkit-border-radius:4px 0 0 0;-moz-b
table tbody tr:first-child td:last-child{-webkit-border-radius:0 4px 0 0;-moz-border-radius:0 4px 0 0;border-radius:0 4px 0 0;} table tbody tr:first-child td:last-child{-webkit-border-radius:0 4px 0 0;-moz-border-radius:0 4px 0 0;border-radius:0 4px 0 0;}
table tbody tr:last-child td:first-child{-webkit-border-radius:0 0 0 4px;-moz-border-radius:0 0 0 4px;border-radius:0 0 0 4px;} table tbody tr:last-child td:first-child{-webkit-border-radius:0 0 0 4px;-moz-border-radius:0 0 0 4px;border-radius:0 0 0 4px;}
table tbody tr:last-child td:last-child{-webkit-border-radius:0 0 4px 0;-moz-border-radius:0 0 4px 0;border-radius:0 0 4px 0;} table tbody tr:last-child td:last-child{-webkit-border-radius:0 0 4px 0;-moz-border-radius:0 0 4px 0;border-radius:0 0 4px 0;}
.zebra-striped tbody tr:nth-child(odd) td{background-color:#f9f9f9;} .zebra-striped tbody tr:nth-child(odd) td{background-color:#eee;}
.zebra-striped tbody tr:hover td{background-color:#f5f5f5;} .zebra-striped tbody tr:hover td{background-color:#f5f5f5;}
table .header{cursor:pointer;}table .header:after{content:"";float:right;margin-top:7px;border-width:0 4px 4px;border-style:solid;border-color:#000 transparent;visibility:hidden;} table .header{cursor:pointer;}table .header:after{content:"";float:right;margin-top:7px;border-width:0 4px 4px;border-style:solid;border-color:#000 transparent;visibility:hidden;}
table .headerSortUp,table .headerSortDown{background-color:rgba(141, 192, 219, 0.25);text-shadow:0 1px 1px rgba(255, 255, 255, 0.75);} table .headerSortUp,table .headerSortDown{background-color:rgba(141, 192, 219, 0.25);text-shadow:0 1px 1px rgba(255, 255, 255, 0.75);}
......
...@@ -6,7 +6,7 @@ $debug = 1;//isset($_GET['debug'])?1:0; ...@@ -6,7 +6,7 @@ $debug = 1;//isset($_GET['debug'])?1:0;
include('config.php'); include('config.php');
//get master code version //get master code version
$mv = curl_init(); $mv = curl_init();
curl_setopt($mv, CURLOPT_URL, "https://raw.github.com/diaspora/diaspora/master/config/defaults.yml"); curl_setopt($mv, CURLOPT_URL, "https://raw.githubusercontent.com/diaspora/diaspora/master/config/defaults.yml");
curl_setopt($mv, CURLOPT_POST, 0); curl_setopt($mv, CURLOPT_POST, 0);
curl_setopt($mv, CURLOPT_HEADER, 0); curl_setopt($mv, CURLOPT_HEADER, 0);
curl_setopt($mv, CURLOPT_CONNECTTIMEOUT, 5); curl_setopt($mv, CURLOPT_CONNECTTIMEOUT, 5);
...@@ -201,23 +201,23 @@ $ipv6="no"; ...@@ -201,23 +201,23 @@ $ipv6="no";
$ipv6="yes"; $ipv6="yes";
} }
//curl ip //curl ip
require_once "Net/GeoIP.php"; //require_once "Net/GeoIP.php";
$geoip = Net_GeoIP::getInstance("GeoLiteCity.dat"); //$geoip = Net_GeoIP::getInstance("GeoLiteCity.dat");
try { try {
$location = $geoip->lookupLocation($ipnum); $location = geoip_record_by_name($ipnum); //$geoip->lookupLocation($ipnum);
if ($debug) {echo "GEOIP: ".$location."<br>";} if ($debug) {echo "GEOIP: ".$location."<br>";}
} catch (Exception $e) { } catch (Exception $e) {
// Handle exception // Handle exception
} }
$ipdata = "Country: ".$location->countryName."\n"; $ipdata = "Country: ".$location["country_name"]."\n";
$whois = "Country: ".$location->countryName."\n Lat:".$location->latitude." Long:".$location->longitude; $whois = "Country: ".$location["country_name"]."\n Lat:".$location["latitude"]." Long:".$location["longitude"];
$country=$location->countryName; $country=$location["country_name"];
$city= isset($location->city)?iconv("UTF-8", "UTF-8//IGNORE", $location->city):null; $city= isset($location->city)?iconv("UTF-8", "UTF-8//IGNORE", $location->city):null;
$state=""; $state="";
$months=0; $months=0;
$uptime=0; $uptime=0;
$lat=$location->latitude; $lat=$location["latitude"];
$long=$location->longitude; $long=$location["longitude"];
$connection=""; $connection="";
$pingdomdate = date('Y-m-d H:i:s'); $pingdomdate = date('Y-m-d H:i:s');
if (strpos($row[$i]['pingdomurl'], "pingdom.com")) { if (strpos($row[$i]['pingdomurl'], "pingdom.com")) {
......
...@@ -16,7 +16,7 @@ if [ ! -s /tmp/index.google ];then ...@@ -16,7 +16,7 @@ if [ ! -s /tmp/index.google ];then
exit; exit;
else else
echo "Pulling in new pod data"; echo "Pulling in new pod data";
cd /var/www/podup/db cd /var/www/poduptime/db
php5 pull.php debug=1 php5 pull.php debug=1
touch last.data touch last.data
php5 backup.php php5 backup.php
......
<?php
$dur = (time() - filemtime("last.data"));
echo $dur;
if ($dur > 4000) {
http_response_code(500);
}
else {
http_response_code(200);
}
?>
<!doctype html><html><head><meta charset="utf-8"><title>Diaspora Pod uptime - Find your new social home</title> <!doctype html><html><head><meta charset="utf-8"><title>Diaspora Pod Uptime Status - Find your new social home on a hosted pod</title>
<meta name="keywords" content="diaspora, podupti.me, diasp, diasporg, diasp.org, facebook, open source social, open source facebook, open source social network" /> <meta name="keywords" content="diaspora, podupti.me, diasp, diasporg, diasp.org, facebook, open source social, open source facebook, open source social network" />
<meta name="description" content="Diaspora Pod Live Status. Find a Diaspora pod to sign up for, rate pods, find one close to you!" /> <meta name="description" content="Diaspora Pod Live Status. Find a Diaspora pod to sign up for, rate pods, find one close to you!" />
<script type="text/javascript" src="http://c807316.r16.cf2.rackcdn.com/jquery.min.js"></script> <script type="text/javascript" src="http://c807316.r16.cf2.rackcdn.com/jquery.min.js"></script>
...@@ -21,46 +21,31 @@ include("vendor/mobiledetect/Mobile_Detect.php"); ...@@ -21,46 +21,31 @@ include("vendor/mobiledetect/Mobile_Detect.php");
$detect = new Mobile_Detect(); $detect = new Mobile_Detect();
if ($detect->isMobile()) {echo '<link rel="stylesheet" href="http://c807316.r16.cf2.rackcdn.com/mobile.css" /><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">';} if ($detect->isMobile()) {echo '<link rel="stylesheet" href="http://c807316.r16.cf2.rackcdn.com/mobile.css" /><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">';}
?> ?>
<script type="text/javascript"> </head>
(function() {
var s = document.createElement('SCRIPT'), s1 = document.getElementsByTagName('SCRIPT')[0];
s.type = 'text/javascript';
s.async = true;
s.src = 'http://widgets.digg.com/buttons.js';
s1.parentNode.insertBefore(s, s1);
})();
</script></head>
<body> <body>
<header> <header>
<div class="page-header"> <div class="page-header">
<div class="row"> <div class="row">
<div class="span6"> <div class="span6">
<h2 id="title"> <h2 id="title">
DIASPORA* POD UPTIME Diaspora Hosted Pods
</h2> </h2>
</div> </div>
<div class="span3" style="margin-top:8px;"> <div class="span3" style="margin-top:8px;">
<!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_default_style ">
<a class="addthis_button_preferred_1"></a>
<a class="addthis_button_preferred_2"></a>
<a class="addthis_button_preferred_3"></a>
<a class="addthis_button_preferred_4"></a>
<a class="addthis_button_compact"></a>
<a class="addthis_counter addthis_bubble_style"></a>
</div>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=davidmmorley"></script>
<!-- AddThis Button END -->
</div> </div>
<div class="span4" style="margin-top:8px;"> <div class="span4" style="margin-top:8px;">
<a class="FlattrButton" style="display:none;" rev="flattr;button:compact;" href="http://podupti.me"></a> <a href="http://flattr.com/thing/170048/Diaspora-Pod-Live-Uptime-watch" target="_blank"><img src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0" /></a>
</div>
<div class="span2" style="margin-top:8px;">
<a onClick="map();">Map View</a>
</div> </div>
<div class="span2" style="margin-top:8px;"> <div class="span2" style="margin-top:8px;">
<a onClick="map();">Show Map View</a> <a onClick="nomap();">Table View</a>
</div> </div>
<div class="span2" style="margin-top:8px;"> <div class="span2" style="margin-top:8px;">
<a onClick="nomap();">Show Table View</a> <a href="https://diasporafoundation.org/">More Info</a>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
...@@ -69,11 +54,11 @@ s1.parentNode.insertBefore(s, s1); ...@@ -69,11 +54,11 @@ s1.parentNode.insertBefore(s, s1);
<div class="sidebar"> <div class="sidebar">
<div class="adsense2"> <div class="adsense2">
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- podsky --> <!-- podup3 -->
<ins class="adsbygoogle" <ins class="adsbygoogle"
style="display:inline-block;width:120px;height:600px" style="display:inline-block;width:160px;height:600px"
data-ad-client="ca-pub-3662181805557062" data-ad-client="ca-pub-3662181805557062"
data-ad-slot="2647650630"></ins> data-ad-slot="3844961434"></ins>
<script> <script>
(adsbygoogle = window.adsbygoogle || []).push({}); (adsbygoogle = window.adsbygoogle || []).push({});
</script> </script>
...@@ -109,35 +94,6 @@ is mostly because of selfsigned or openca certs, if you need a free ssl cert get ...@@ -109,35 +94,6 @@ is mostly because of selfsigned or openca certs, if you need a free ssl cert get
<br> <br>
</div> </div>
<!-- Piwik -->
<script type="text/javascript">
var _paq = _paq || [];
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u=(("https:" == document.location.protocol) ? "https" : "http") + "://podupti.me/s//";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', 1]);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.type='text/javascript';
g.defer=true; g.async=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<noscript><p><img src="http://podupti.me/s/piwik.php?idsite=1" style="border:0" alt="" /></p></noscript>
<!-- End Piwik Code -->
<script type="text/javascript">
/* <![CDATA[ */
(function() {
var s = document.createElement('script'), t = document.getElementsByTagName('script')[0];
s.type = 'text/javascript';
s.async = true;
s.src = 'http://api.flattr.com/js/0.6/load.js?mode=auto';
t.parentNode.insertBefore(s, t);
})();
/* ]]> */
</script>
</div> </div>
</div> </div>
</body> </body>
......
<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" width="98%"> <table id="myTable" class="tablesorter zebra-striped" width="98%">
<thead> <thead>
<tr> <tr>
<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>
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
<th>Signups<a class="tipsy" title="Open to public or Closed/Invite only.">?</a></th> <th>Signups<a class="tipsy" title="Open to public or Closed/Invite only.">?</a></th>
<th>Users<a class="tipsy" title="Number of total users on this pod.">?</a></th> <th>Users<a class="tipsy" title="Number of total users 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>Months Online<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>User 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>Location<a class="tipsy" title="Pod location, based on IP Geolocation">?</a></th>
</tr> </tr>
</thead> </thead>
...@@ -49,8 +49,7 @@ $verdiff = str_replace(".", "", $row["masterversion"]) - str_replace('.', '', $ ...@@ -49,8 +49,7 @@ $verdiff = str_replace(".", "", $row["masterversion"]) - str_replace('.', '', $
$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.="\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.="Code base is {$row["shortversion"]} and the current github base is {$row["masterversion"]}. "; $tip.="On a score of -20 to +20 this pod is a {$row["score"]} right now";
$tip.="This pod is {$verdiff} versions behind the current code. This pods IP {$row["ip"]} ". ($row["ipv6"] == "yes" ? "has" : "does not have") ." 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. Pod " . ($row["signup"] == "1" ? "does" : "does not") . " allow new users.";
echo "<tr><td><div title='$tip' class='tipsy'><a class='$class' target='new' href='". $method . $row["domain"] ."'>" . $method . $row["domain"] . "</a></div></td>"; echo "<tr><td><div title='$tip' class='tipsy'><a class='$class' target='new' href='". $method . $row["domain"] ."'>" . $method . $row["domain"] . "</a></div></td>";
"</div></td>"; "</div></td>";
...@@ -89,6 +88,8 @@ echo "✪"; ...@@ -89,6 +88,8 @@ echo "✪";
} }
pg_free_result($result); pg_free_result($result);
pg_close($dbh); pg_close($dbh);
$country_code = $_SERVER["HTTP_CF_IPCOUNTRY"];
//echo $country_code;
?> ?>
</tbody> </tbody>
</table> </table>
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