Merge pull request #13 from dg9vh/develop

Better version-display ...
This commit is contained in:
Kim - DG9VH 2016-05-15 20:48:53 +02:00
commit d49dbc6790
2 changed files with 14 additions and 3 deletions

View file

@ -1,10 +1,21 @@
<?php <?php
function getMMDVMHostVersion() { function getMMDVMHostVersion() {
// returns creation-time of MMDVMHost as version-number
$filename = MMDVMHOSTPATH . "MMDVMHost";
exec($filename." -v 2>&1", $output);
if (substr($output[0],18,8) == ".ini fil") {
return getMMDVMHostFileVersion();
} else {
return substr($output[0],18,8)." (compiled ".getMMDVMHostFileVersion().")";
}
}
function getMMDVMHostFileVersion() {
// returns creation-time of MMDVMHost as version-number // returns creation-time of MMDVMHost as version-number
$filename = MMDVMHOSTPATH . "MMDVMHost"; $filename = MMDVMHOSTPATH . "MMDVMHost";
if (file_exists($filename)) { if (file_exists($filename)) {
return date("Y-m-d", filectime($filename)); return date("d M y", filectime($filename));
} }
} }
@ -393,4 +404,4 @@ function getActualReflector($logLines, $mode) {
$mmdvmconfigs = getMMDVMConfig(); $mmdvmconfigs = getMMDVMConfig();
$logLines = getLog(); $logLines = getLog();
$lastHeard = getLastHeard($logLines); $lastHeard = getLastHeard($logLines);
?> ?>

View file

@ -33,7 +33,7 @@ include "include/functions.php";
echo "Hotspot"; echo "Hotspot";
} }
?>:</small> <?php echo getCallsign($mmdvmconfigs) ?></h1> ?>:</small> <?php echo getCallsign($mmdvmconfigs) ?></h1>
<h4>MMDVMHost v<?php echo getMMDVMHostVersion() ?> by G4KLX</h4> <h4>MMDVMHost by G4KLX Version: <?php echo getMMDVMHostVersion() ?></h4>
</div> </div>
<?php <?php
// Here you can feel free to disable info-sections by commenting out with // before include // Here you can feel free to disable info-sections by commenting out with // before include