' . $title . "
\n"; $includeHeader = UserSettings::getHeaderName(); if ($includeHeader) { $this->printIncludes($this->path, $includeHeader); } } protected function printIncludes($path, $name) { $testNames = ["$name.html", "$name.htm", $name]; foreach ($testNames as $testname) { $filename = $path . $testname; if (file_exists($filename) && !is_link($filename)) { $content = file_get_contents($filename); if (!$content) { break; } $style = ($name == 'HEADER') ? 'header-text' : 'readme-text'; echo "\n" . htmlspecialchars($content, ENT_QUOTES | ENT_SUBSTITUTE) . "
\n";
break;
}
}
}
protected function printFooter()
{
$includeReadme = UserSettings::getReadmeName();
if ($includeReadme) {
$this->printIncludes($this->path, $includeReadme);
}
echo 'Proudly Served by LiteSpeed Web Server at '
. $_SERVER['SERVER_NAME'] . ' Port ' . $_SERVER['SERVER_PORT']
. '