Replace fixed path with docroot variable

This commit is contained in:
bergware
2016-10-24 09:44:19 +02:00
parent 594db1b286
commit d76573653a
6 changed files with 18 additions and 11 deletions
@@ -18,11 +18,13 @@
</head>
<body style="margin:14px 10px">
<?
require_once 'webGui/include/Markdown.php';
$docroot = $docroot ?: @$_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
require_once "$docroot/webGui/include/Markdown.php";
$file = $_GET['file'];
if (file_exists($file)) echo Markdown(file_get_contents($file)); else echo Markdown("*No release notes available!*");
?>
<br><center><input type="button" value="Done" onclick="top.Shadowbox.close()"></center>
<br><div style="text-align:center"><input type="button" value="Done" onclick="top.Shadowbox.close()"></div>
</body>
</html>