EOD; } private static function getHeader() { $warning = ''; if (Debug::isEnabled()) { if (!Debug::isSecure()) { $warning .= <<Warning : Debug mode is active from any location, make sure only you can access RSS-Bridge. EOD; } else { $warning .= <<Warning : Debug mode is active from your IP address, your requests will bypass the cache. EOD; } } return << {$warning} EOD; } private static function getSearchbar() { $query = filter_input(INPUT_GET, 'q', \FILTER_SANITIZE_SPECIAL_CHARS); return <<

Search

EOD; } private static function getBridges($showInactive, &$totalBridges, &$totalActiveBridges) { $body = ''; $totalActiveBridges = 0; $inactiveBridges = ''; $bridgeFactory = new BridgeFactory(); $bridgeClassNames = $bridgeFactory->getBridgeClassNames(); $formatFactory = new FormatFactory(); $formats = $formatFactory->getFormatNames(); $totalBridges = count($bridgeClassNames); foreach ($bridgeClassNames as $bridgeClassName) { if ($bridgeFactory->isWhitelisted($bridgeClassName)) { $body .= BridgeCard::displayBridgeCard($bridgeClassName, $formats); $totalActiveBridges++; } elseif ($showInactive) { $inactiveBridges .= BridgeCard::displayBridgeCard($bridgeClassName, $formats, false) . PHP_EOL; } } $body .= $inactiveBridges; return $body; } private static function getFooter($totalBridges, $totalActiveBridges, $showInactive) { $version = Configuration::getVersion(); $email = Configuration::getConfig('admin', 'email'); $admininfo = ''; if ($email) { $admininfo = << You may email the administrator of this RSS-Bridge instance at {$email} EOD; } $inactive = ''; if ($totalActiveBridges !== $totalBridges) { if ($showInactive) { $inactive = '
'; } else { $inactive = '
'; } } return << RSS-Bridge ~ Public Domain

{$version}

{$totalActiveBridges}/{$totalBridges} active bridges.
{$inactive} {$admininfo}
EOD; } }