added some basic info to non-ebusd clients

This commit is contained in:
john30
2019-12-14 16:36:43 +01:00
parent f8f4d216ff
commit 7ad5098451
+25 -2
View File
@@ -9,12 +9,35 @@ if (substr($agent, 0, 5)==='ebusd') {
exit;
}
readVersions();
$ref = @file_get_contents('ebusd-configuration/.git/refs/heads/master');
?>
<html>
<head>
<title>ebusd update check service</title>
<title>ebusd update check webservice</title>
</head>
<body>
<p>latest ebusd version: <?=$versions['ebusd'][0]?></p>
<p>last update: <?=date('c', @filemtime('versions.txt'))?></p>
<?php
if ($ref) {
echo " <p>git revision: <a href=\"https://github.com/john30/ebusd-configuration/tree/$ref\">".substr($ref, 0, 7).'</a></p>';
}
?>
<p>latest ebusd version: <?=$versions['ebusd'][0]?></p>
<p>config files:
<?php
$func = function($v, $k) {
if ($k==='ebusd') {
return;
}
global $ref;
$str = "$k: ".date('d.m.Y H:i:s', $v[2]);
if ($ref) {
echo " <br><a href=\"https://github.com/john30/ebusd-configuration/blob/$ref/ebusd-2.1.x/de/$k\">$str</a>\n";
} else {
echo " <br>$str\n";
}
};
array_walk($versions, $func);
?>
</p>
</body>