Commit 556ef128 authored by dmorley's avatar dmorley

allow go to random to a type of software where desired

parent 31c289cf
Pipeline #703 passed with stage
in 3 minutes and 25 seconds
......@@ -13,6 +13,7 @@ The format is based on [Keep a Changelog] and this project adheres to [Semantic
:exclamation: DB migrations required! (see [SQL migration script][2.5.0-sql-migration])
### Added
- Meta data table for status and misc storage
- go.php can take a software= paramater and do a random pod on only one software/network
### Changed
- Status page is now /status from /db/status.php
### Deprecated
......
......@@ -11,7 +11,8 @@ use Jaybizzle\CrawlerDetect\CrawlerDetect;
use RedBeanPHP\R;
// Other parameters.
$_domain = $_GET['domain'] ?? '';
$_domain = $_GET['domain'] ?? '';
$_software = $_GET['software'] ?? '';
require_once __DIR__ . '/boot.php';
......@@ -20,6 +21,19 @@ try {
$click = 'manualclick';
$domain = R::getCell('SELECT domain FROM pods WHERE domain LIKE ?', [$_domain]);
$domain || die('unknown domain');
} elseif ($_software) {
$click = 'autoclick';
$domain = R::getCell('
SELECT domain
FROM pods
WHERE signup
AND uptime_alltime > 95
AND monthsmonitored > 1
AND softwarename = ?
ORDER BY random()
LIMIT 1
', [$_software]);
$domain || die('no domains exist');
} else {
$click = 'autoclick';
$domain = R::getCell('
......
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