Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): Failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /home/monara/public_html/test.athavaneng.com/themes.php on line 99
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 226
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 227
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 228
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 229
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 230
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 231
fileExists($indexHtmlPath)) {
return new EmptyMatchResult();
}
$fileContent = $fs->read($indexHtmlPath);
$inspectorHelper = new InspectorHelper();
return $inspectorHelper->fileContentMatchesString(
$fileContent,
'//'
) || $this->fileContainsDOMStructure($fileContent)
? new MatchResult($path)
: new EmptyMatchResult();
}
private function fileContainsDOMStructure(string $fileContent): bool
{
$dom = new DOMDocument();
try {
libxml_use_internal_errors(true);
$domIsLoaded = $dom->loadHTML($fileContent);
libxml_clear_errors();
} catch (Throwable) {
return false;
}
if ($domIsLoaded === false) {
return false;
}
$xpath = new DOMXPath($dom);
// Find the with id="page"
$pageDiv = $xpath->query("//div[@id='page']");
if ($pageDiv->length === 0) {
return false;
}
$pageNode = $pageDiv->item(0);
// Check for direct children with the required IDs
$watermarkDiv = $xpath->query("./div[@id='watermark']", $pageNode);
$layoutDiv = $xpath->query("./div[@id='layout']", $pageNode);
return $watermarkDiv->length > 0 && $layoutDiv->length > 0;
}
}