diff --git a/css/bootstrap.min.css b/css/bootstrap.min.css index edc470291826e12cb4c94ab6cc82f400b7b4af5a..97e526c661301a5f12ddc79e1d8fa2f1470764b3 100644 --- a/css/bootstrap.min.css +++ b/css/bootstrap.min.css @@ -26,7 +26,7 @@ body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size: .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: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%;} a{color:#0069d6;text-decoration:none;line-height:inherit;font-weight:inherit;}a:hover{color:#00438a;text-decoration:underline;} .pull-right{float:right;} @@ -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 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;} -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 td{vertical-align:top;} 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 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: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;} 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);} diff --git a/db/pull.php b/db/pull.php index 5cf3ac60596d3a62225c2f8595bdc43ab2ede06b..f4dcf15fe010a366b3f487549a8dc10e101c5a9f 100644 --- a/db/pull.php +++ b/db/pull.php @@ -6,7 +6,7 @@ $debug = 1;//isset($_GET['debug'])?1:0; include('config.php'); //get master code version $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_HEADER, 0); curl_setopt($mv, CURLOPT_CONNECTTIMEOUT, 5); @@ -201,23 +201,23 @@ $ipv6="no"; $ipv6="yes"; } //curl ip -require_once "Net/GeoIP.php"; -$geoip = Net_GeoIP::getInstance("GeoLiteCity.dat"); +//require_once "Net/GeoIP.php"; +//$geoip = Net_GeoIP::getInstance("GeoLiteCity.dat"); try { - $location = $geoip->lookupLocation($ipnum); + $location = geoip_record_by_name($ipnum); //$geoip->lookupLocation($ipnum); if ($debug) {echo "GEOIP: ".$location."
";} } catch (Exception $e) { // Handle exception } -$ipdata = "Country: ".$location->countryName."\n"; -$whois = "Country: ".$location->countryName."\n Lat:".$location->latitude." Long:".$location->longitude; -$country=$location->countryName; +$ipdata = "Country: ".$location["country_name"]."\n"; +$whois = "Country: ".$location["country_name"]."\n Lat:".$location["latitude"]." Long:".$location["longitude"]; +$country=$location["country_name"]; $city= isset($location->city)?iconv("UTF-8", "UTF-8//IGNORE", $location->city):null; $state=""; $months=0; $uptime=0; -$lat=$location->latitude; -$long=$location->longitude; +$lat=$location["latitude"]; +$long=$location["longitude"]; $connection=""; $pingdomdate = date('Y-m-d H:i:s'); if (strpos($row[$i]['pingdomurl'], "pingdom.com")) { diff --git a/db/pull.sh b/db/pull.sh index 230d6a552229036365efbd0edc08888e029984bc..8170901882cad013955106410644f8a1ddcd4779 100755 --- a/db/pull.sh +++ b/db/pull.sh @@ -16,7 +16,7 @@ if [ ! -s /tmp/index.google ];then exit; else echo "Pulling in new pod data"; - cd /var/www/podup/db + cd /var/www/poduptime/db php5 pull.php debug=1 touch last.data php5 backup.php diff --git a/db/status.php b/db/status.php new file mode 100644 index 0000000000000000000000000000000000000000..6cd3a906f4f0b6f1ce4c26a00061609fea167216 --- /dev/null +++ b/db/status.php @@ -0,0 +1,10 @@ + 4000) { +http_response_code(500); +} +else { +http_response_code(200); +} +?> diff --git a/index.php b/index.php index 17fa2341d07b0ff854b035f628c5399aa8833b61..d70a31001b3780691155113ec2a6f26692438f17 100644 --- a/index.php +++ b/index.php @@ -1,4 +1,4 @@ -Diaspora Pod uptime - Find your new social home +Diaspora Pod Uptime Status - Find your new social home on a hosted pod @@ -21,46 +21,31 @@ include("vendor/mobiledetect/Mobile_Detect.php"); $detect = new Mobile_Detect(); if ($detect->isMobile()) {echo '';} ?> - +
@@ -69,11 +54,11 @@ s1.parentNode.insertBefore(s, s1); diff --git a/show.php b/show.php index 8bdc49b9e1f2786b3436a99302a11d38048ec315..9c20e80bcddcaf67ee38cb1eecb5326a40d3e42d 100644 --- a/show.php +++ b/show.php @@ -1,6 +1,6 @@ - +
@@ -9,8 +9,8 @@ - - + + @@ -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.="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"]} ". ($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."; +$tip.="On a score of -20 to +20 this pod is a {$row["score"]} right now"; echo ""; ""; @@ -89,6 +88,8 @@ echo "✪"; } pg_free_result($result); pg_close($dbh); +$country_code = $_SERVER["HTTP_CF_IPCOUNTRY"]; +//echo $country_code; ?>
Diaspora Pod?Signups? Users? Posts?Months Online?User Rating?Months?Rating? Location?