Commit ce6a5986 authored by dmorley's avatar dmorley

Accessable single view

parent 529d1fda
...@@ -2,22 +2,18 @@ ...@@ -2,22 +2,18 @@
The format is based on [Keep a Changelog] and this project adheres to [Semantic Versioning]. The format is based on [Keep a Changelog] and this project adheres to [Semantic Versioning].
## [Unreleased] ## [Unreleased]
:exclamation: DB migrations required! (see [SQL migration script][unreleased-sql-migration])
### Added ### Added
- osada version check - osada version check
- sitemap generator, config.php update needed
### Changed ### Changed
- /domain.tld page is simple text vs a javascript table
- link to sitemap in robots.txt
- test for official PHP 7.3 release - test for official PHP 7.3 release
### Deprecated ### Deprecated
- api-more.php calls. old droid app been dead for years - api-more.php calls. old droid app been dead for years
### Removed ### Removed
### Fixed ### Fixed
### Security
## [2.5.x]
### Added
### Changed
### Deprecated
### Removed
### Fixed
- go.php will only use online pods - go.php will only use online pods
### Security ### Security
...@@ -149,6 +145,7 @@ The format is based on [Keep a Changelog] and this project adheres to [Semantic ...@@ -149,6 +145,7 @@ The format is based on [Keep a Changelog] and this project adheres to [Semantic
### Fixed ### Fixed
- Fix ipv6 - Fix ipv6
[unreleased-sql-migration]: https://git.feneas.org/diasporg/Poduptime/blob/master/db/migrations/2.5.1-unreleased.sql
[2.5.0-sql-migration]: https://git.feneas.org/diasporg/Poduptime/blob/master/db/migrations/2.4.1-2.5.0.sql [2.5.0-sql-migration]: https://git.feneas.org/diasporg/Poduptime/blob/master/db/migrations/2.4.1-2.5.0.sql
[2.4.1-sql-migration]: https://git.feneas.org/diasporg/Poduptime/blob/master/db/migrations/2.4.0-2.4.1.sql [2.4.1-sql-migration]: https://git.feneas.org/diasporg/Poduptime/blob/master/db/migrations/2.4.0-2.4.1.sql
[2.4.0-sql-migration]: https://git.feneas.org/diasporg/Poduptime/blob/master/db/migrations/2.3.0-2.4.0.sql [2.4.0-sql-migration]: https://git.feneas.org/diasporg/Poduptime/blob/master/db/migrations/2.3.0-2.4.0.sql
...@@ -156,6 +153,7 @@ The format is based on [Keep a Changelog] and this project adheres to [Semantic ...@@ -156,6 +153,7 @@ The format is based on [Keep a Changelog] and this project adheres to [Semantic
[2.2.0-sql-migration]: https://git.feneas.org/diasporg/Poduptime/blob/master/db/migrations/2.1.4-2.2.0.sql [2.2.0-sql-migration]: https://git.feneas.org/diasporg/Poduptime/blob/master/db/migrations/2.1.4-2.2.0.sql
[Unreleased]: https://git.feneas.org/diasporg/Poduptime/compare/master...develop [Unreleased]: https://git.feneas.org/diasporg/Poduptime/compare/master...develop
[2.5.1]: https://git.feneas.org/diasporg/Poduptime/compare/2.5.0...2.5.1
[2.5.0]: https://git.feneas.org/diasporg/Poduptime/compare/2.4.1...2.5.0 [2.5.0]: https://git.feneas.org/diasporg/Poduptime/compare/2.4.1...2.5.0
[2.4.1]: https://git.feneas.org/diasporg/Poduptime/compare/2.4.0...2.4.1 [2.4.1]: https://git.feneas.org/diasporg/Poduptime/compare/2.4.0...2.4.1
[2.4.0]: https://git.feneas.org/diasporg/Poduptime/compare/2.3.1...2.4.0 [2.4.0]: https://git.feneas.org/diasporg/Poduptime/compare/2.3.1...2.4.0
......
...@@ -242,16 +242,16 @@ ...@@ -242,16 +242,16 @@
}, },
{ {
"name": "jaybizzle/crawler-detect", "name": "jaybizzle/crawler-detect",
"version": "v1.2.74", "version": "v1.2.78",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/JayBizzle/Crawler-Detect.git", "url": "https://github.com/JayBizzle/Crawler-Detect.git",
"reference": "e5fbc685383a4b8f49183b3a646b193491cc14c5" "reference": "0f91f34d375ddd5d7034b9eaf6b74acd0b2a0ed6"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/JayBizzle/Crawler-Detect/zipball/e5fbc685383a4b8f49183b3a646b193491cc14c5", "url": "https://api.github.com/repos/JayBizzle/Crawler-Detect/zipball/0f91f34d375ddd5d7034b9eaf6b74acd0b2a0ed6",
"reference": "e5fbc685383a4b8f49183b3a646b193491cc14c5", "reference": "0f91f34d375ddd5d7034b9eaf6b74acd0b2a0ed6",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
...@@ -287,7 +287,7 @@ ...@@ -287,7 +287,7 @@
"crawlerdetect", "crawlerdetect",
"php crawler detect" "php crawler detect"
], ],
"time": "2018-11-21T20:56:45+00:00" "time": "2019-01-15T21:21:27+00:00"
}, },
{ {
"name": "longman/ip-tools", "name": "longman/ip-tools",
...@@ -391,16 +391,16 @@ ...@@ -391,16 +391,16 @@
}, },
{ {
"name": "maxmind-db/reader", "name": "maxmind-db/reader",
"version": "v1.4.0", "version": "v1.4.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/maxmind/MaxMind-DB-Reader-php.git", "url": "https://github.com/maxmind/MaxMind-DB-Reader-php.git",
"reference": "2f1086e38939e808cc23b17daa469da094af9125" "reference": "eb83d0ee1c1f9b8a340206302136bc81ee02ae74"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/maxmind/MaxMind-DB-Reader-php/zipball/2f1086e38939e808cc23b17daa469da094af9125", "url": "https://api.github.com/repos/maxmind/MaxMind-DB-Reader-php/zipball/eb83d0ee1c1f9b8a340206302136bc81ee02ae74",
"reference": "2f1086e38939e808cc23b17daa469da094af9125", "reference": "eb83d0ee1c1f9b8a340206302136bc81ee02ae74",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
...@@ -443,7 +443,7 @@ ...@@ -443,7 +443,7 @@
"geolocation", "geolocation",
"maxmind" "maxmind"
], ],
"time": "2018-11-20T16:04:10+00:00" "time": "2019-01-04T19:55:56+00:00"
}, },
{ {
"name": "maxmind/web-service-common", "name": "maxmind/web-service-common",
...@@ -493,16 +493,16 @@ ...@@ -493,16 +493,16 @@
}, },
{ {
"name": "nesbot/carbon", "name": "nesbot/carbon",
"version": "1.36.1", "version": "1.36.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/briannesbitt/Carbon.git", "url": "https://github.com/briannesbitt/Carbon.git",
"reference": "63da8cdf89d7a5efe43aabc794365f6e7b7b8983" "reference": "cd324b98bc30290f233dd0e75e6ce49f7ab2a6c9"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/63da8cdf89d7a5efe43aabc794365f6e7b7b8983", "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/cd324b98bc30290f233dd0e75e6ce49f7ab2a6c9",
"reference": "63da8cdf89d7a5efe43aabc794365f6e7b7b8983", "reference": "cd324b98bc30290f233dd0e75e6ce49f7ab2a6c9",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
...@@ -547,7 +547,7 @@ ...@@ -547,7 +547,7 @@
"datetime", "datetime",
"time" "time"
], ],
"time": "2018-11-22T18:23:02+00:00" "time": "2018-12-28T10:07:33+00:00"
}, },
{ {
"name": "noplanman/xec", "name": "noplanman/xec",
...@@ -603,23 +603,23 @@ ...@@ -603,23 +603,23 @@
}, },
{ {
"name": "rinvex/countries", "name": "rinvex/countries",
"version": "v5.0.0", "version": "v5.0.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/rinvex/countries.git", "url": "https://github.com/rinvex/countries.git",
"reference": "ba4d10faf5d0d25f9aab646e80a381ae828fb268" "reference": "0435a81dc81317f3bba20029825ff8c0a651352a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/rinvex/countries/zipball/ba4d10faf5d0d25f9aab646e80a381ae828fb268", "url": "https://api.github.com/repos/rinvex/countries/zipball/0435a81dc81317f3bba20029825ff8c0a651352a",
"reference": "ba4d10faf5d0d25f9aab646e80a381ae828fb268", "reference": "0435a81dc81317f3bba20029825ff8c0a651352a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": "^7.1.3" "php": "^7.1.3"
}, },
"require-dev": { "require-dev": {
"codedungeon/phpunit-result-printer": "^0.22.0", "codedungeon/phpunit-result-printer": "^0.23.0",
"phpunit/phpunit": "^7.0.0" "phpunit/phpunit": "^7.0.0"
}, },
"type": "library", "type": "library",
...@@ -676,20 +676,20 @@ ...@@ -676,20 +676,20 @@
"rinvex", "rinvex",
"svg" "svg"
], ],
"time": "2018-10-05T07:34:25+00:00" "time": "2018-12-23T15:37:32+00:00"
}, },
{ {
"name": "symfony/contracts", "name": "symfony/contracts",
"version": "v1.0.1", "version": "v1.0.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/contracts.git", "url": "https://github.com/symfony/contracts.git",
"reference": "3edf0ab943d1985a356721952cba36ff31bd6e5f" "reference": "1aa7ab2429c3d594dd70689604b5cf7421254cdf"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/contracts/zipball/3edf0ab943d1985a356721952cba36ff31bd6e5f", "url": "https://api.github.com/repos/symfony/contracts/zipball/1aa7ab2429c3d594dd70689604b5cf7421254cdf",
"reference": "3edf0ab943d1985a356721952cba36ff31bd6e5f", "reference": "1aa7ab2429c3d594dd70689604b5cf7421254cdf",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
...@@ -744,7 +744,7 @@ ...@@ -744,7 +744,7 @@
"interoperability", "interoperability",
"standards" "standards"
], ],
"time": "2018-11-24T09:35:08+00:00" "time": "2018-12-05T08:06:11+00:00"
}, },
{ {
"name": "symfony/polyfill-mbstring", "name": "symfony/polyfill-mbstring",
...@@ -807,21 +807,21 @@ ...@@ -807,21 +807,21 @@
}, },
{ {
"name": "symfony/translation", "name": "symfony/translation",
"version": "v4.2.0", "version": "v4.2.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/translation.git", "url": "https://github.com/symfony/translation.git",
"reference": "ff9a878c9b8f8bcd4d9138e2d32f508c942773d9" "reference": "939fb792d73f2ce80e6ae9019d205fc480f1c9a0"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/translation/zipball/ff9a878c9b8f8bcd4d9138e2d32f508c942773d9", "url": "https://api.github.com/repos/symfony/translation/zipball/939fb792d73f2ce80e6ae9019d205fc480f1c9a0",
"reference": "ff9a878c9b8f8bcd4d9138e2d32f508c942773d9", "reference": "939fb792d73f2ce80e6ae9019d205fc480f1c9a0",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": "^7.1.3", "php": "^7.1.3",
"symfony/contracts": "^1.0", "symfony/contracts": "^1.0.2",
"symfony/polyfill-mbstring": "~1.0" "symfony/polyfill-mbstring": "~1.0"
}, },
"conflict": { "conflict": {
...@@ -876,22 +876,22 @@ ...@@ -876,22 +876,22 @@
], ],
"description": "Symfony Translation Component", "description": "Symfony Translation Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2018-11-27T07:20:32+00:00" "time": "2019-01-03T09:07:35+00:00"
} }
], ],
"packages-dev": [ "packages-dev": [
{ {
"name": "squizlabs/php_codesniffer", "name": "squizlabs/php_codesniffer",
"version": "3.3.2", "version": "3.4.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
"reference": "6ad28354c04b364c3c71a34e4a18b629cc3b231e" "reference": "379deb987e26c7cd103a7b387aea178baec96e48"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/6ad28354c04b364c3c71a34e4a18b629cc3b231e", "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/379deb987e26c7cd103a7b387aea178baec96e48",
"reference": "6ad28354c04b364c3c71a34e4a18b629cc3b231e", "reference": "379deb987e26c7cd103a7b387aea178baec96e48",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
...@@ -929,7 +929,7 @@ ...@@ -929,7 +929,7 @@
"phpcs", "phpcs",
"standards" "standards"
], ],
"time": "2018-09-23T23:08:17+00:00" "time": "2018-12-19T23:57:18+00:00"
} }
], ],
"aliases": [], "aliases": [],
......
...@@ -44,6 +44,9 @@ return [ ...@@ -44,6 +44,9 @@ return [
//Geolite2-city database file in mmdb format - full file path //Geolite2-city database file in mmdb format - full file path
'geoip2db' => '', 'geoip2db' => '',
//sitemap file - full dir path
'sitemap' => __DIR__ . '/sitemap.xml',
//detectlanguage.com api key //detectlanguage.com api key
'dlkey' => '', 'dlkey' => '',
]; ];
INSERT INTO meta (name) VALUES('sitemap_updated');
...@@ -25,7 +25,7 @@ $softwares = [ ...@@ -25,7 +25,7 @@ $softwares = [
'writefreely' => ['repo' => 'writeas/writefreely', 'gitsite' => 'api.github.com', 'gittype' => 'github', 'devbranch' => 'develop'], 'writefreely' => ['repo' => 'writeas/writefreely', 'gitsite' => 'api.github.com', 'gittype' => 'github', 'devbranch' => 'develop'],
'ganggo' => ['repo' => 'ganggo%2fganggo', 'gitsite' => 'git.feneas.org', 'gittype' => 'gitlab', 'devbranch' => ''], 'ganggo' => ['repo' => 'ganggo%2fganggo', 'gitsite' => 'git.feneas.org', 'gittype' => 'gitlab', 'devbranch' => ''],
'funkwhale' => ['repo' => 'funkwhale%2ffunkwhale', 'gitsite' => 'code.eliotberriot.com', 'gittype' => 'gitlab', 'devbranch' => 'develop'], 'funkwhale' => ['repo' => 'funkwhale%2ffunkwhale', 'gitsite' => 'code.eliotberriot.com', 'gittype' => 'gitlab', 'devbranch' => 'develop'],
'osada' => ['repo' => 'macgirvin%2fosada', 'gitsite' => 'framagit.org', 'gittype' => 'gitlab', 'devbranch' => 'dev'], 'osada' => ['repo' => 'macgirvin%2fosada', 'gitsite' => 'framagit.org', 'gittype' => 'gitlab', 'devbranch' => 'dev'],
]; ];
$opts = [ $opts = [
......
<?php
/**
* Create a basic sitemap.xml file to help site get indexed
*/
declare(strict_types=1);
use RedBeanPHP\R;
require_once __DIR__ . '/../boot.php';
try {
$pods = R::getAll('
SELECT domain, date_updated::TIMESTAMP::DATE
FROM pods
WHERE date_updated IS NOT NULL
ORDER BY date_updated DESC
');
$xml = '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
$xml .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">' . "\n";
foreach ($pods as $pod) {
$xml .= "\t<url>\n";
$xml .= "\t\t<loc>https://podupti.me/{$pod['domain']}</loc>\n";
$xml .= "\t\t<lastmod>{$pod['date_updated']}</lastmod>\n";
$xml .= "\t\t<changefreq>hourly</changefreq>\n";
$xml .= "\t</url>\n";
}
$xml .= '</urlset>';
file_put_contents(c('sitemap'), $xml);
} catch (\RedBeanPHP\RedException $e) {
debug('Error in SQL query: ' . sprintf($e->getMessage()));
} catch (\Exception $e) {
debug('Error updating sitemap: ' . sprintf($e->getMessage()));
}
updateMeta('sitemap_updated');
...@@ -462,14 +462,16 @@ if (!$_domain) { ...@@ -462,14 +462,16 @@ if (!$_domain) {
} }
if (Carbon::createFromFormat('Y-m-d H:i:s.u', getMeta('cacert_updated', 'date_created'))->diffInHours() > 40) { if (Carbon::createFromFormat('Y-m-d H:i:s.u', getMeta('cacert_updated', 'date_created'))->diffInHours() > 40) {
$cacert = c('cafullpath'); copy('https://curl.haxx.se/ca/cacert.pem', c('cafullpath'));
copy('https://curl.haxx.se/ca/cacert.pem', $cacert);
updateMeta('cacert_updated'); updateMeta('cacert_updated');
} }
if (Carbon::createFromFormat('Y-m-d H:i:s.u', getMeta('sitemap_updated', 'date_created'))->diffInHours() > 2) {
require __DIR__ . '/update-sitemap.php';
}
if (Carbon::createFromFormat('Y-m-d H:i:s.u', getMeta('geoip_updated', 'date_created'))->diffInHours() > 45) { if (Carbon::createFromFormat('Y-m-d H:i:s.u', getMeta('geoip_updated', 'date_created'))->diffInHours() > 45) {
$geo2ip = c('geoip2db'); copy('compress.zlib://http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz', c('geoip2db'));
copy('compress.zlib://http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz', $geo2ip);
updateMeta('geoip_updated'); updateMeta('geoip_updated');
} }
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
*/ */
declare(strict_types=1); declare(strict_types=1);
use Carbon\Carbon; use Carbon\Carbon;
require_once __DIR__ . '/boot.php'; require_once __DIR__ . '/boot.php';
...@@ -27,8 +28,8 @@ $fullview = false; ...@@ -27,8 +28,8 @@ $fullview = false;
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Open Source Social Network Pod Uptime Status</title> <title>Open Source Social Network Pod Uptime Status</title>
<meta name="keywords" content="diaspora, federated pods, <?php echo $_SERVER['HTTP_HOST'] ?>, friendica, hubzilla, open source social, open source social network"/> <meta name="keywords" content="diaspora, <?php echo $input ?>, federated pods, <?php echo $_SERVER['HTTP_HOST'] ?>, friendica, hubzilla, open source social, 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 <?php echo $input ?> Live Status. Find a Diaspora pod to sign up for, rate pods, find one close to you!"/>
<link rel="stylesheet" href="node_modules/bootstrap/dist/css/bootstrap.min.css"> <link rel="stylesheet" href="node_modules/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="css/poduptime.css"/> <link rel="stylesheet" href="css/poduptime.css"/>
<link rel="stylesheet" href="node_modules/ion-rangeslider/css/ion.rangeSlider.css"/> <link rel="stylesheet" href="node_modules/ion-rangeslider/css/ion.rangeSlider.css"/>
...@@ -36,10 +37,10 @@ $fullview = false; ...@@ -36,10 +37,10 @@ $fullview = false;
<link rel="stylesheet" href="node_modules/featherlight/release/featherlight.min.css"/> <link rel="stylesheet" href="node_modules/featherlight/release/featherlight.min.css"/>
<link rel="stylesheet" href="node_modules/tablesorter/dist/css/theme.bootstrap_4.min.css"/> <link rel="stylesheet" href="node_modules/tablesorter/dist/css/theme.bootstrap_4.min.css"/>
<link rel="stylesheet" href="node_modules/@fortawesome/fontawesome-free/css/all.min.css"/> <link rel="stylesheet" href="node_modules/@fortawesome/fontawesome-free/css/all.min.css"/>
<meta property="og:url" content="https://<?php echo $_SERVER['HTTP_HOST'] ?>"/> <meta property="og:url" content="https://<?php echo $_SERVER['HTTP_HOST'] ?>/<?php echo $input ?>"/>
<meta property="og:title" content="Social Network Pod Finder"/> <meta property="og:title" content="Social Network Pod <?php echo $input ?> Finder"/>
<meta property="og:type" content="website"/> <meta property="og:type" content="website"/>
<meta property="og:description" content="Diaspora Pod Live Status. Find a Diaspora pod to sign up for, rate pods, find one close to you!"/> <meta property="og:description" content="Diaspora Pod <?php echo $input ?> Live Status. Find a Diaspora pod to sign up for, rate pods, find one close to you!"/>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=yes"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=yes">
<meta http-equiv="x-ua-compatible" content="ie=edge"> <meta http-equiv="x-ua-compatible" content="ie=edge">
</head> </head>
...@@ -131,6 +132,8 @@ $navs = [ ...@@ -131,6 +132,8 @@ $navs = [
include_once __DIR__ . '/db/add.php'; include_once __DIR__ . '/db/add.php';
} elseif ($gettoken) { } elseif ($gettoken) {
include_once __DIR__ . '/db/gettoken.php'; include_once __DIR__ . '/db/gettoken.php';
} elseif ($input) {
include_once __DIR__ . '/singleview.php';
} else { } else {
include_once __DIR__ . '/showfull.php'; include_once __DIR__ . '/showfull.php';
$fullview = true; $fullview = true;
......
...@@ -52,11 +52,11 @@ $(document).ready(function () { ...@@ -52,11 +52,11 @@ $(document).ready(function () {
$('.resetfilters').on('click', function () { $('.resetfilters').on('click', function () {
$('table').trigger('filterReset'); $('table').trigger('filterReset');
}); });
var input = $('input:input[name="input"]').val();
$.get('tabledata.php?ajax=page2', function (html) { $.get('tabledata.php?ajax=page2', function (html) {
$('table tbody').append(html); $('table tbody').append(html);
$('table').trigger('update', [true]); $('table').trigger('update', [true]);
var columns = []; var columns = [];
var input = $('input:input[name="input"]').val();
columns[7] = 'Yes'; columns[7] = 'Yes';
if (input) { if (input) {
columns[0] = input; columns[0] = input;
......
User-agent: * User-agent: *
Allow: / Allow: /
Sitemap: https://podupti.me/sitemap.xml
\ No newline at end of file
<?php
/**
* This is just a single pod data pull for /domain.tld page
*/
declare(strict_types=1);
use RedBeanPHP\R;
// Required parameters.
($_domain = $input ?? null) || die('no domain given');
require_once __DIR__ . '/boot.php';
$iso = new Matriphe\ISO639\ISO639;
try {
$pod = R::getRow('
SELECT domain, podmin_statement, shortversion, softwarename, monthsmonitored, score, name, countryname, city, state, detectedlanguage, uptime_alltime, active_users_halfyear, services, service_xmpp, latency, total_users, local_posts, comment_counts, userrating, status, lat, long
FROM pods
WHERE domain = ?
', [$_domain]);
} catch (\RedBeanPHP\RedException $e) {
die('Error in SQL query: ' . $e->getMessage());
}
echo '<h1>Poduptime report for ' . $pod['domain'] . ' </h1><br>';
echo '<h2>This pod or node runs ' . $pod['softwarename'] . ' software version ' . $pod['shortversion'] . ' </h2><br>';
echo 'Performance score for this pod is ' . $pod['score'] . ' out of 100<br>';
echo 'Detected language of this pod is ' . ($pod['detectedlanguage'] ? $iso->languageByCode1($pod['detectedlanguage']) : '') . '<br>';
echo '<br>';
echo 'Uptime since we started monitoring this pod ' . $pod['monthsmonitored'] . ' months ago is <a href="#" class="green" data-featherlight="/podstat-uptime.php?domain=' . $pod['domain'] . '">' . $pod['uptime_alltime'] . '</a> percent<br>';
echo 'Response Time from our monitoring server in Los Angeles is ' . $pod['latency'] . ' milliseconds<br>';
echo 'This pod has <a href="#" class="green" data-featherlight="podstat-counts.php?domain=' . $pod['domain'] . '">' . $pod['total_users'] . '</a> total users with ' . $pod['active_users_halfyear'] . ' active the last 6 months, users have posted ' . $pod['local_posts'] . ' times and commented ' . $pod['comment_counts'] . ' times<br>';
echo 'Users rate this pod <a href="#" class="green" data-featherlight-variant="table-responsive" data-featherlight="rate.php?domain=' . $pod['domain'] . '">' . $pod['userrating'] . '</a> out of 10<br>';
echo 'Services this pod offers are: ';
$services = json_decode($pod['services'] ?? '[]') ?: [];
($pod['service_xmpp'] ?? false) && $services[] = 'xmpp';
echo implode(', ', $services);
echo '<br><br>';
echo 'Server Country: ' . $pod['countryname'] . '<br>';
echo 'Server State: ' . $pod['state'] . '<br>';
echo 'Server City: ' . $pod['city'] . '<br>';
echo 'Server Latitude: ' . $pod['lat'] . '<br>';
echo 'Server Longitude: ' . $pod['long'] . '<br>';
echo '<br>';
if ($pod['podmin_statement']) {
echo 'The host of the pod would like you to know<br><b><i> ' . $pod['podmin_statement'] . ' </i></b><br>';
}
...@@ -3,14 +3,14 @@ ...@@ -3,14 +3,14 @@
"@fortawesome/fontawesome-free@^5.2.0": "@fortawesome/fontawesome-free@^5.2.0":
version "5.5.0" version "5.6.3"
resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-free/-/fontawesome-free-5.5.0.tgz#0c6c53823d04457ae669cd19567b8a21dbb4fcfd" resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-free/-/fontawesome-free-5.6.3.tgz#61c122c420d7a91613f393d6a06e5a4c6ae6abf3"
integrity sha512-p4lu0jfj5QN013ddArh99r3OXZ/fp9rbovs62LfaO70OMBsAXxtNd0lAq/97fitrscR0fqfd+/a5KNcp6Sh/0A== integrity sha512-s5PLdI9NYgjBvfrv6rhirPHlAHWx+Sfo/IjsAeiXYfmemC/GSjwsyz1wLnGPazbLPXWfk62ks980o9AmsxYUEQ==
bootstrap@^4.1.3: bootstrap@^4.1.3:
version "4.1.3" version "4.2.1"
resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-4.1.3.tgz#0eb371af2c8448e8c210411d0cb824a6409a12be" resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-4.2.1.tgz#8f8bdca024dbf0e8644da32e918c8a03a90a5757"
integrity sha512-rDFIzgXcof0jDyjNosjv4Sno77X4KuPeFxG2XZZv1/Kc8DRVGVADdoQyyOVDwPqL36DDmtCQbrpMCqvpPLJQ0w== integrity sha512-tt/7vIv3Gm2mnd/WeDx36nfGGHleil0Wg8IeB7eMrVkY0fZ5iTaBisSh8oNANc2IBsCc6vCgCNTIM/IEN0+50Q==
chart.js@^2.7.2: chart.js@^2.7.2:
version "2.7.3" version "2.7.3"
...@@ -51,9 +51,9 @@ featherlight@^1.7.13: ...@@ -51,9 +51,9 @@ featherlight@^1.7.13:
integrity sha1-UA9TIEuntbtGUDcN2UrlllxVbpQ= integrity sha1-UA9TIEuntbtGUDcN2UrlllxVbpQ=
ion-rangeslider@^2.2.0: ion-rangeslider@^2.2.0:
version "2.2.0" version "2.3.0"
resolved "https://registry.yarnpkg.com/ion-rangeslider/-/ion-rangeslider-2.2.0.tgz#388f12cd70593a61b3368fad6c4f30a5da8b97c9" resolved "https://registry.yarnpkg.com/ion-rangeslider/-/ion-rangeslider-2.3.0.tgz#7957ce2e78acfc956b8c43009373da91f743347e"
integrity sha1-OI8SzXBZOmGzNo+tbE8wpdqLl8k= integrity sha512-7TtH9/X4Aq/xCzboWxjwlv20gVqR90Ysc3aehMlTuH2/ULaSxpB80hq+yvD1N0FwWbPDtxQpjQrz/iX+LWXKmg==
dependencies: dependencies:
jquery ">=1.8" jquery ">=1.8"
...@@ -68,14 +68,14 @@ leaflet.markercluster@^1.3.0: ...@@ -68,14 +68,14 @@ leaflet.markercluster@^1.3.0:
integrity sha512-ZSEpE/EFApR0bJ1w/dUGwTSUvWlpalKqIzkaYdYB7jaftQA/Y2Jav+eT4CMtEYFj+ZK4mswP13Q2acnPBnhGOw== integrity sha512-ZSEpE/EFApR0bJ1w/dUGwTSUvWlpalKqIzkaYdYB7jaftQA/Y2Jav+eT4CMtEYFj+ZK4mswP13Q2acnPBnhGOw==
leaflet@^1.3.3: leaflet@^1.3.3:
version "1.3.4" version "1.4.0"
resolved "https://registry.yarnpkg.com/leaflet/-/leaflet-1.3.4.tgz#7f006ea5832603b53d7269ef5c595fd773060a40" resolved "https://registry.yarnpkg.com/leaflet/-/leaflet-1.4.0.tgz#d5f56eeb2aa32787c24011e8be4c77e362ae171b"
integrity sha512-FYL1LGFdj6v+2Ifpw+AcFIuIOqjNggfoLUwuwQv6+3sS21Za7Wvapq+LhbSE4NDXrEj6eYnW3y7LsaBICpyXtw== integrity sha512-x9j9tGY1+PDLN9pcWTx9/y6C5nezoTMB8BLK5jTakx+H7bPlnbCHfi9Hjg+Qt36sgDz/cb9lrSpNQXmk45Tvhw==
moment@^2.10.2: moment@^2.10.2:
version "2.22.2" version "2.24.0"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.22.2.tgz#3c257f9839fc0e93ff53149632239eb90783ff66" resolved "https://registry.yarnpkg.com/moment/-/moment-2.24.0.tgz#0d055d53f5052aa653c9f6eb68bb5d12bf5c2b5b"
integrity sha1-PCV/mDn8DpP/UxSWMiOeuQeD/2Y= integrity sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==
popper.js@^1.14.3: popper.js@^1.14.3:
version "1.14.6" version "1.14.6"
...@@ -83,9 +83,9 @@ popper.js@^1.14.3: ...@@ -83,9 +83,9 @@ popper.js@^1.14.3:
integrity sha512-AGwHGQBKumlk/MDfrSOf0JHhJCImdDMcGNoqKmKkU+68GFazv3CQ6q9r7Ja1sKDZmYWTckY/uLyEznheTDycnA== integrity sha512-AGwHGQBKumlk/MDfrSOf0JHhJCImdDMcGNoqKmKkU+68GFazv3CQ6q9r7Ja1sKDZmYWTckY/uLyEznheTDycnA==
simple-icons@^1.9.2: simple-icons@^1.9.2:
version "1.9.14" version "1.9.18"
resolved "https://registry.yarnpkg.com/simple-icons/-/simple-icons-1.9.14.tgz#e358725ece95d84a9154296318c97f7aa9d0771e" resolved "https://registry.yarnpkg.com/simple-icons/-/simple-icons-1.9.18.tgz#1596ae9c50a2a0d6a86ff15bc136e24c215ee2e6"
integrity sha512-29ww/0tEXgnUCzdOVT3RQoyRYSd6aBFCG15PSmDjgAIen6tUueIcXJo+ODuMpzNXk3XlR9BmJ3EsAB8tPdmnig== integrity sha512-kF5Q4ljQxrKgypWu2loij3U7XpUcHUboyOXOm7WchA95QigDoWWTOS6/1lgfkuVdadHZ+VFHx8QqZA6pKifW2A==
tablesorter@^2.30.7: tablesorter@^2.30.7:
version "2.31.1" version "2.31.1"
......
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