21 lines
500 B
PHP
21 lines
500 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
$html = file_get_contents(__DIR__ . '/_render.html');
|
|
if ($html === false) {
|
|
fwrite(STDERR, "missing _render.html\n");
|
|
exit(2);
|
|
}
|
|
|
|
echo (str_contains($html, 'href="/adminer"') ? "has_adminer\n" : "no_adminer\n");
|
|
|
|
// Find the adminer card chunk (rough)
|
|
$pos = strpos($html, 'href="/adminer"');
|
|
if ($pos === false) {
|
|
exit(0);
|
|
}
|
|
$chunk = substr($html, $pos, 800);
|
|
|
|
echo (str_contains($chunk, 'status-badge') ? "adminer_has_badge\n" : "adminer_no_badge\n");
|
|
|