EOD;
}
private static function getBridges($showInactive, &$totalBridges, &$totalActiveBridges) {
$body = '';
$totalActiveBridges = 0;
$inactiveBridges = '';
$bridgeList = Bridge::getBridgeNames();
$formats = Format::searchInformation();
$totalBridges = count($bridgeList);
foreach($bridgeList as $bridgeName) {
if(Bridge::isWhitelisted($bridgeName)) {
$body .= BridgeCard::displayBridgeCard($bridgeName, $formats);
$totalActiveBridges++;
} elseif($showInactive) {
// inactive bridges
$inactiveBridges .= BridgeCard::displayBridgeCard($bridgeName, $formats, false) . PHP_EOL;
}
}
$body .= $inactiveBridges;
return $body;
}
private static function getHeader() {
$warning = '';
if(Debug::isEnabled()) {
if(!Debug::isSecure()) {
$warning .= << {$version}RSS-Bridge
Reconnecting the Web
{$warning}
EOD;
}
private static function getSearchbar() {
$query = filter_input(INPUT_GET, 'q');
return <<Search
EOD;
}
private static function getFooter($totalBridges, $totalActiveBridges, $showInactive) {
$version = Configuration::getVersion();
$email = Configuration::getConfig('admin', 'email');
$admininfo = '';
if (!empty($email)) {
$admininfo = <<
';
} else {
$inactive = '
';
}
}
return <<
{$inactive}
{$admininfo}
EOD;
}
static function create($showInactive = true) {
$totalBridges = 0;
$totalActiveBridges = 0;
return ''
. BridgeList::getHead()
. ''
. BridgeList::getHeader()
. BridgeList::getSearchbar()
. BridgeList::getBridges($showInactive, $totalBridges, $totalActiveBridges)
. BridgeList::getFooter($totalBridges, $totalActiveBridges, $showInactive)
. '';
}
}