From ab37f73a29b518b16a916378099714f44b1444d2 Mon Sep 17 00:00:00 2001 From: ayasystems Date: Wed, 15 Jun 2016 15:21:14 +0200 Subject: [PATCH 01/48] Create halt.php --- scripts/halt.php | 65 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 scripts/halt.php diff --git a/scripts/halt.php b/scripts/halt.php new file mode 100644 index 0000000..6651b72 --- /dev/null +++ b/scripts/halt.php @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + <?php echo getCallsign($mmdvmconfigs) ?> - MMDVM-Dashboard by DG9VH + + + + + /dev/null 2>&1 &'); +?> + + +
+ +'; +?> | get your own at: https://github.com/dg9vh/MMDVMHost-Dashboard +
+ + From 89327fce181cfe24cee96bab13f85e4f2dc0a4aa Mon Sep 17 00:00:00 2001 From: ayasystems Date: Wed, 15 Jun 2016 15:23:04 +0200 Subject: [PATCH 02/48] Create log.php --- scripts/log.php | 96 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 scripts/log.php diff --git a/scripts/log.php b/scripts/log.php new file mode 100644 index 0000000..df7bd2e --- /dev/null +++ b/scripts/log.php @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + <?php echo getCallsign($mmdvmconfigs) ?> - MMDVM-Dashboard by DG9VH + + + + +
+
+ Fichero log +
+
+eof()) { + // Echo one line from the file. + echo $file->fgets(); + echo "
"; +} + +// Unset the file to call __destruct(), closing the file handle. +$file = null; + +?> +
+ +
+ + + + From 74dc6efeebe41472a32f38efb4d05bc724211bca Mon Sep 17 00:00:00 2001 From: ayasystems Date: Wed, 15 Jun 2016 15:24:21 +0200 Subject: [PATCH 03/48] Create reboot.php --- scripts/reboot.php | 65 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 scripts/reboot.php diff --git a/scripts/reboot.php b/scripts/reboot.php new file mode 100644 index 0000000..55c256b --- /dev/null +++ b/scripts/reboot.php @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + <?php echo getCallsign($mmdvmconfigs) ?> - MMDVM-Dashboard by DG9VH + + + + + /dev/null 2>&1 &'); +?> + + +
+ +'; +?> | get your own at: https://github.com/dg9vh/MMDVMHost-Dashboard +
+ + From 3e191701f97a3f240b0c3f4bd839b12a8c0b6813 Mon Sep 17 00:00:00 2001 From: ayasystems Date: Wed, 15 Jun 2016 15:25:03 +0200 Subject: [PATCH 04/48] Create rebootmmdvm.php ea4gkq new feature --- scripts/rebootmmdvm.php | 66 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 scripts/rebootmmdvm.php diff --git a/scripts/rebootmmdvm.php b/scripts/rebootmmdvm.php new file mode 100644 index 0000000..fe2724d --- /dev/null +++ b/scripts/rebootmmdvm.php @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + <?php echo getCallsign($mmdvmconfigs) ?> - MMDVM-Dashboard by DG9VH + + + + + + + +
+ +'; +?> | get your own at: https://github.com/dg9vh/MMDVMHost-Dashboard +
+ + From fdf8bff555c0ce4f32ce739f6ebe0f86b1f9d03d Mon Sep 17 00:00:00 2001 From: ayasystems Date: Wed, 15 Jun 2016 15:26:45 +0200 Subject: [PATCH 05/48] Update setup.php Scripts setup commands --- setup.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/setup.php b/setup.php index eea2085..b143d9b 100644 --- a/setup.php +++ b/setup.php @@ -134,6 +134,19 @@ include "include/tools.php"; +
+ Reboot MMDVMHost command: + +
+
+ Reboot system command: + +
+
+
+ Halt system command: + +
From aa7b50d97cb46b6d1228bbb85b7559ff92e09356 Mon Sep 17 00:00:00 2001 From: ayasystems Date: Wed, 15 Jun 2016 15:28:51 +0200 Subject: [PATCH 06/48] Update setup.php --- setup.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/setup.php b/setup.php index b143d9b..f0c5126 100644 --- a/setup.php +++ b/setup.php @@ -130,10 +130,6 @@ include "include/tools.php"; Last heard list lines: -
- - -
Reboot MMDVMHost command: @@ -142,12 +138,15 @@ include "include/tools.php"; Reboot system command:
-
Halt system command: -
-
+
+
+ + + +
Date: Wed, 15 Jun 2016 15:32:59 +0200 Subject: [PATCH 07/48] Update index.php EA4GKQ -> Add buttons with new commands to dashboard --- index.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index c66c5f9..87fd587 100644 --- a/index.php +++ b/index.php @@ -35,6 +35,11 @@ include "include/functions.php"; ?>:

MMDVMHost by G4KLX Version:

+ + + + + '; ?> | get your own at: https://github.com/dg9vh/MMDVMHost-Dashboard - \ No newline at end of file + From 8edc96c97897ff7919a82f0ac84d9c64acd0d3db Mon Sep 17 00:00:00 2001 From: ayasystems Date: Wed, 15 Jun 2016 15:34:28 +0200 Subject: [PATCH 08/48] Create halt.php --- scripts/halt.php | 65 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 scripts/halt.php diff --git a/scripts/halt.php b/scripts/halt.php new file mode 100644 index 0000000..6651b72 --- /dev/null +++ b/scripts/halt.php @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + <?php echo getCallsign($mmdvmconfigs) ?> - MMDVM-Dashboard by DG9VH + + + + + /dev/null 2>&1 &'); +?> + + +
+ +'; +?> | get your own at: https://github.com/dg9vh/MMDVMHost-Dashboard +
+ + From 118468789af0a3fc756614ac6fe18fd2f66b5869 Mon Sep 17 00:00:00 2001 From: ayasystems Date: Wed, 15 Jun 2016 15:36:08 +0200 Subject: [PATCH 09/48] Update index.php --- index.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.php b/index.php index 87fd587..2f6fa0a 100644 --- a/index.php +++ b/index.php @@ -17,11 +17,11 @@ include "include/functions.php"; - + - + - + <?php echo getCallsign($mmdvmconfigs) ?> - MMDVM-Dashboard by DG9VH From 1e87f802c57398272e6f25971078ef341e00e9ad Mon Sep 17 00:00:00 2001 From: EA4GKQ Date: Thu, 23 Jun 2016 21:13:53 +0200 Subject: [PATCH 10/48] Fix RF color tag --- include/functions.php | 117 +++++++++++------------------------------- 1 file changed, 31 insertions(+), 86 deletions(-) diff --git a/include/functions.php b/include/functions.php index a9f126b..f718680 100644 --- a/include/functions.php +++ b/include/functions.php @@ -15,32 +15,20 @@ function getMMDVMHostFileVersion() { // returns creation-time of MMDVMHost as version-number $filename = MMDVMHOSTPATH."/MMDVMHost"; if (file_exists($filename)) { - return date("d M y", filectime($filename)); + return date("d M y", filectime($filename)); } } function getMMDVMConfig() { // loads MMDVM.ini into array for further use - $conf = array(); + $mmdvmconfigs = array(); if ($configs = fopen(MMDVMINIPATH."/".MMDVMINIFILENAME, 'r')) { while ($config = fgets($configs)) { - array_push($conf, trim ( $config, " \t\n\r\0\x0B")); + array_push($mmdvmconfigs, trim ( $config, " \t\n\r\0\x0B")); } fclose($configs); } - return $conf; -} - -function getYSFGatewayConfig() { - // loads MMDVM.ini into array for further use - $conf = array(); - if ($configs = fopen(YSFGATEWAYINIPATH."/".YSFGATEWAYINIFILENAME, 'r')) { - while ($config = fgets($configs)) { - array_push($conf, trim ( $config, " \t\n\r\0\x0B")); - } - fclose($configs); - } - return $conf; + return $mmdvmconfigs; } function getCallsign($mmdvmconfigs) { @@ -88,13 +76,13 @@ function showMode($mode, $mmdvmconfigs) { } } } else { - echo "label-default"; + echo "label-default"; } ?>"> 0 ) { - $source = "Network"; + $source = "Net"; } - + switch ($mode) { case "D-Star": $duration = $dstarduration; @@ -252,7 +225,9 @@ function getHeardList($logLines) { $ber = $ysfber; break; } - + if ($ber>=10){ + $ber = "" .$ber. ""; + } // Callsign or ID should be less than 11 chars long, otherwise it could be errorneous if ( strlen($callsign) < 11 ) { array_push($heardList, array($timestamp, $mode, $callsign, $id, $target, $source, $duration, $loss, $ber)); @@ -287,6 +262,9 @@ function getLastHeard($logLines) { function getActualMode($metaLastHeard, $mmdvmconfigs) { // returns mode of repeater actual working in + //$lastHeard = $metaLastHeard; + //array_multisort($lastHeard,SORT_DESC); + //$listElem = $lastHeard[0]; $listElem = $metaLastHeard[0]; $timestamp = new DateTime($listElem[0]); $mode = $listElem[1]; @@ -366,6 +344,7 @@ function getActualLink($logLines, $mode) { //M: 2016-05-02 07:04:10.504 D-Star link status set to "Verlinkt zu DCS002 S" //M: 2016-04-03 16:16:18.638 DMR Slot 2, received network voice header from 4000 to 2625094 //M: 2016-04-03 19:30:03.099 DMR Slot 2, received network voice header from 4020 to 2625094 + //array_multisort($logLines,SORT_DESC); switch ($mode) { case "D-Star": if (isProcessRunning(IRCDDBGATEWAY)) { @@ -377,7 +356,7 @@ function getActualLink($logLines, $mode) { case "DMR Slot 1": foreach ($logLines as $logLine) { if(substr($logLine, 27, strpos($logLine,",") - 27) == "DMR Slot 1") { - $to = ""; + $to = ""; if (strpos($logLine,"to")) { $to = trim(substr($logLine, strpos($logLine,"to") + 3)); } @@ -391,7 +370,7 @@ function getActualLink($logLines, $mode) { case "DMR Slot 2": foreach ($logLines as $logLine) { if(substr($logLine, 27, strpos($logLine,",") - 27) == "DMR Slot 2") { - $to = ""; + $to = ""; if (strpos($logLine,"to")) { $to = trim(substr($logLine, strpos($logLine,"to") + 3)); } @@ -414,8 +393,8 @@ function getActualReflector($logLines, $mode) { //array_multisort($logLines,SORT_DESC); foreach ($logLines as $logLine) { - if(substr($logLine, 27, strpos($logLine,",") - 27) == "DMR Slot 2") { - $from = substr($logLine, strpos($logLine,"from") + 5, strpos($logLine,"to") - strpos($logLine,"from") - 6); + if(substr($logLine, 27, strpos($logLine,",") - 27) == "DMR Slot 2") { + $from = substr($logLine, strpos($logLine,"from") + 5, strpos($logLine,"to") - strpos($logLine,"from") - 6); if (strlen($from) == 4 && startsWith($from,"4")) { if ($from == "4000") { @@ -424,49 +403,15 @@ function getActualReflector($logLines, $mode) { return "Reflector ".$from; } } - } + } } return "Reflector not linked"; } -function getActiveYSFReflectors($logLines) { -// 00000000001111111111222222222233333333334444444444555555555566666666667777777777888888888899999999990000000000111111111122 -// 01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901 -// D: 2016-06-11 19:09:31.371 Have reflector status reply from 89164/FUSIONBE2 /FusionBelgium /002 - $reflectors = Array(); - $reflectorlist = Array(); - foreach ($logLines as $logLine) { - if (strpos($logLine, "Have reflector status reply from")) { - $timestamp = substr($logLine, 3, 19); - $timestamp2 = new DateTime($timestamp); - $now = new DateTime(); - $timestamp2->add(new DateInterval('PT2H')); - - if ($now->format('U') <= $timestamp2->format('U')) { - $str = substr($logLine, 60); - $id = strtok($str, "/"); - $name = strtok("/"); - $description = strtok("/"); - $concount = strtok("/"); - if(!(array_search($name, $reflectors) > -1)) { - array_push($reflectors,$name); - array_push($reflectorlist, array($name, $description, $id, $concount, $timestamp)); - } - } - } - } - array_multisort($reflectorlist); - return $reflectorlist; -} - //Some basic inits $mmdvmconfigs = getMMDVMConfig(); -$logLinesMMDVM = getMMDVMLog(); -$reverseLogLinesMMDVM = $logLinesMMDVM; -array_multisort($reverseLogLinesMMDVM,SORT_DESC); -$lastHeard = getLastHeard($reverseLogLinesMMDVM); -$YSFGatewayconfigs = getYSFGatewayConfig(); -$logLinesYSFGateway = getYSFGatewayLog(); -$reverseLogLinesYSFGateway = $logLinesYSFGateway; -array_multisort($reverseLogLinesYSFGateway,SORT_DESC); +$logLines = getLog(); +$reverseLogLines = $logLines; +array_multisort($reverseLogLines,SORT_DESC); +$lastHeard = getLastHeard($reverseLogLines); ?> From 18c9866ff32b2e011f85b7b6126eb5db8180aedf Mon Sep 17 00:00:00 2001 From: EA4GKQ Date: Thu, 23 Jun 2016 21:14:54 +0200 Subject: [PATCH 11/48] fix color tag --- include/lh.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/lh.php b/include/lh.php index 710a757..07bc238 100644 --- a/include/lh.php +++ b/include/lh.php @@ -25,7 +25,11 @@ for ($i = 0; ($i < LHLINES) AND ($i < count($lastHeard)); $i++) { echo"$listElem[2]"; echo"$listElem[3]"; echo"$listElem[4]"; - echo"$listElem[5]"; + if ($listElem[5] == "RF"){ + echo "RF"; + }else{ + echo"$listElem[5]"; + } if ($listElem[6] == null) { echo'transmitting'; } else if ($listElem[6] == "SMS") { From 0a8e6e2fb7280399f00227461bd1afdb029288d0 Mon Sep 17 00:00:00 2001 From: EA4GKQ Date: Thu, 23 Jun 2016 21:15:37 +0200 Subject: [PATCH 12/48] mobile aspect --- include/lh.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/lh.php b/include/lh.php index 07bc238..fe264aa 100644 --- a/include/lh.php +++ b/include/lh.php @@ -4,7 +4,7 @@
Last Heard List of today's callsigns.
- +
From 7f7407702aecc96253fdbef111a765c9e2aebe3d Mon Sep 17 00:00:00 2001 From: EA4GKQ Date: Thu, 23 Jun 2016 21:17:09 +0200 Subject: [PATCH 13/48] Update index.php --- index.php | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index 2f6fa0a..56b4636 100644 --- a/index.php +++ b/index.php @@ -13,15 +13,29 @@ include "include/functions.php"; - + + - + + + + + + + + + + <?php echo getCallsign($mmdvmconfigs) ?> - MMDVM-Dashboard by DG9VH From bbd3c9efe658a4f30e4cd42ed3c79fcd4d188c73 Mon Sep 17 00:00:00 2001 From: EA4GKQ Date: Thu, 23 Jun 2016 21:18:36 +0200 Subject: [PATCH 14/48] table sorting features --- include/lh.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/include/lh.php b/include/lh.php index fe264aa..f5ded88 100644 --- a/include/lh.php +++ b/include/lh.php @@ -4,7 +4,9 @@
Last Heard List of today's callsigns.
+
Time (UTC) Mode
+ @@ -16,6 +18,8 @@ + + +
Time (UTC) ModeLoss BER
+ + From 1c67f000b021abcd5b9df7e2a56f2f63ad4da333 Mon Sep 17 00:00:00 2001 From: EA4GKQ Date: Fri, 24 Jun 2016 18:45:34 +0200 Subject: [PATCH 15/48] EA4GKQ mod --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a154deb..482a275 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,8 @@ It relies on MMDVMHost by G4KLX (see https://github.com/g4klx/MMDVMHost). At this place a big thank you to Jonathan for his great work he did with this software. +Based on G4KLX code, mod by EA4GKQ + Required are ============ * Webserver like @@ -43,4 +45,5 @@ At the moment there are several information-sections shown: Contact ======= -Feel free to contact the author via email: dg9vh@darc.de \ No newline at end of file +Feel free to contact the author via email: dg9vh[@]darc.de +Feel free to contact the mod author via email: ea4gkq[@]ure.es From d3d5618e9ebcd5b9e7696d096e741dbcd73409ca Mon Sep 17 00:00:00 2001 From: EA4GKQ Date: Fri, 24 Jun 2016 18:50:58 +0200 Subject: [PATCH 16/48] Update README.md --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 482a275..0a4a28e 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,11 @@ At the moment there are several information-sections shown: This is a list of the last x callsigns heard in general in the system over all modes and directions. X is to be configured in /config/config.php * Today's last 10 local transmissions: For better debugging/calibrating etc. the last 10 local transmissions (RF-side of the repeater) are listed. +New features by EA4GKQ +====================== +* Buttons toolbar +* LastHeard table are sorted +* Some mods to improve mobile experience Contact ======= From 53e4f535b83693013700ea3856e3f202525fab28 Mon Sep 17 00:00:00 2001 From: EA4GKQ Date: Fri, 24 Jun 2016 18:53:58 +0200 Subject: [PATCH 17/48] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 0a4a28e..01743d4 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,7 @@ At the moment there are several information-sections shown: This is a list of the last x callsigns heard in general in the system over all modes and directions. X is to be configured in /config/config.php * Today's last 10 local transmissions: For better debugging/calibrating etc. the last 10 local transmissions (RF-side of the repeater) are listed. + New features by EA4GKQ ====================== * Buttons toolbar @@ -51,4 +52,5 @@ New features by EA4GKQ Contact ======= Feel free to contact the author via email: dg9vh[@]darc.de + Feel free to contact the mod author via email: ea4gkq[@]ure.es From ca2b5763036c1892a3c8fb5915bea17667253d68 Mon Sep 17 00:00:00 2001 From: EA4GKQ Date: Fri, 24 Jun 2016 18:59:05 +0200 Subject: [PATCH 18/48] some fix --- index.php | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/index.php b/index.php index 56b4636..85fea4a 100644 --- a/index.php +++ b/index.php @@ -13,7 +13,7 @@ include "include/functions.php"; - + @@ -27,15 +27,11 @@ include "include/functions.php"; - - + + - + <?php echo getCallsign($mmdvmconfigs) ?> - MMDVM-Dashboard by DG9VH @@ -77,7 +73,8 @@ $time = $time[1] + $time[0]; $finish = $time; $total_time = round(($finish - $start), 4); echo ''; -?> | get your own at: https://github.com/dg9vh/MMDVMHost-Dashboard +?> | get your own at: Github + From 4a84b2cb862149111ab0c237ee9a6bb686354ea9 Mon Sep 17 00:00:00 2001 From: EA4GKQ Date: Fri, 24 Jun 2016 19:36:53 +0200 Subject: [PATCH 19/48] Update lh.php From 26ae8bc76319fa1ebd70a926c4b739faf230750f Mon Sep 17 00:00:00 2001 From: EA4GKQ Date: Fri, 24 Jun 2016 19:37:41 +0200 Subject: [PATCH 20/48] Update localtx.php --- include/localtx.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/include/localtx.php b/include/localtx.php index b6133fe..07aa2e3 100644 --- a/include/localtx.php +++ b/include/localtx.php @@ -1,6 +1,6 @@ @@ -8,7 +8,8 @@ $localTXList = getHeardList($reverseLogLinesMMDVM);
Today's last 10 local transmissions.
- +
+
@@ -23,7 +24,7 @@ $localTXList = getHeardList($reverseLogLinesMMDVM); "; echo""; @@ -33,7 +34,7 @@ for ($i = 0; $i < count($localTXList); $i++) { echo""; echo""; if ($listElem[6] == null) { - echo''; + echo''; } else if ($listElem[6] == "SMS") { echo''; } else { @@ -50,5 +51,7 @@ for ($i = 0; $i < count($localTXList); $i++) { } ?> +
Time (UTC) Mode$listElem[0]$listElem[4]$listElem[5]transmittingin TXsending or receiving SMS
+ From 0a659bcc53c3f3be9b557b2cfad6509aca99fc01 Mon Sep 17 00:00:00 2001 From: EA4GKQ Date: Fri, 24 Jun 2016 19:38:35 +0200 Subject: [PATCH 21/48] Update index.php From 675b78ae04153c04afb35a26c09fd7f848f95b47 Mon Sep 17 00:00:00 2001 From: EA4GKQ Date: Fri, 24 Jun 2016 19:43:06 +0200 Subject: [PATCH 22/48] log output as table --- scripts/log.php | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/scripts/log.php b/scripts/log.php index df7bd2e..a825693 100644 --- a/scripts/log.php +++ b/scripts/log.php @@ -15,8 +15,8 @@ $fileName = MMDVMLOGPATH. "/MMDVM-".date(Y)."-".date(m)."-".date(d).".log"; - - + + @@ -48,7 +48,10 @@ $fileName = MMDVMLOGPATH. "/MMDVM-".date(Y)."-".date(m)."-".date(d).".log";
Fichero log
-
+
+ + Log file + eof()) { // Echo one line from the file. - echo $file->fgets(); - echo "
"; + echo""; + echo ""; + echo"\n"; } // Unset the file to call __destruct(), closing the file handle. $file = null; ?> +
"; + echo $file->fgets(); + echo "
+ +
From 708e0e7cb60ce56d852386ea5784bd2f24c9e24c Mon Sep 17 00:00:00 2001 From: EA4GKQ Date: Fri, 24 Jun 2016 19:43:46 +0200 Subject: [PATCH 23/48] Update halt.php --- scripts/halt.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/halt.php b/scripts/halt.php index 6651b72..804d762 100644 --- a/scripts/halt.php +++ b/scripts/halt.php @@ -13,7 +13,7 @@ include "../include/functions.php"; - + From 91208ed7bee75d7fbc334f877101cb38be6e5e6d Mon Sep 17 00:00:00 2001 From: EA4GKQ Date: Fri, 24 Jun 2016 19:44:12 +0200 Subject: [PATCH 24/48] Update reboot.php --- scripts/reboot.php | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/reboot.php b/scripts/reboot.php index 55c256b..6592d53 100644 --- a/scripts/reboot.php +++ b/scripts/reboot.php @@ -1,5 +1,4 @@ Date: Fri, 24 Jun 2016 21:01:16 +0200 Subject: [PATCH 25/48] Sync from original code --- include/functions.php | 115 +++++++++++++++++++++++++++++++----------- 1 file changed, 85 insertions(+), 30 deletions(-) diff --git a/include/functions.php b/include/functions.php index f718680..711829b 100644 --- a/include/functions.php +++ b/include/functions.php @@ -15,20 +15,32 @@ function getMMDVMHostFileVersion() { // returns creation-time of MMDVMHost as version-number $filename = MMDVMHOSTPATH."/MMDVMHost"; if (file_exists($filename)) { - return date("d M y", filectime($filename)); + return date("d M y", filectime($filename)); } } function getMMDVMConfig() { // loads MMDVM.ini into array for further use - $mmdvmconfigs = array(); + $conf = array(); if ($configs = fopen(MMDVMINIPATH."/".MMDVMINIFILENAME, 'r')) { while ($config = fgets($configs)) { - array_push($mmdvmconfigs, trim ( $config, " \t\n\r\0\x0B")); + array_push($conf, trim ( $config, " \t\n\r\0\x0B")); } fclose($configs); } - return $mmdvmconfigs; + return $conf; +} + +function getYSFGatewayConfig() { + // loads MMDVM.ini into array for further use + $conf = array(); + if ($configs = fopen(YSFGATEWAYINIPATH."/".YSFGATEWAYINIFILENAME, 'r')) { + while ($config = fgets($configs)) { + array_push($conf, trim ( $config, " \t\n\r\0\x0B")); + } + fclose($configs); + } + return $conf; } function getCallsign($mmdvmconfigs) { @@ -76,13 +88,13 @@ function showMode($mode, $mmdvmconfigs) { } } } else { - echo "label-default"; + echo "label-default"; } ?>"> 0 ) { $source = "Net"; } - + switch ($mode) { case "D-Star": $duration = $dstarduration; @@ -225,9 +252,7 @@ function getHeardList($logLines) { $ber = $ysfber; break; } - if ($ber>=10){ - $ber = "" .$ber. ""; - } + // Callsign or ID should be less than 11 chars long, otherwise it could be errorneous if ( strlen($callsign) < 11 ) { array_push($heardList, array($timestamp, $mode, $callsign, $id, $target, $source, $duration, $loss, $ber)); @@ -262,9 +287,6 @@ function getLastHeard($logLines) { function getActualMode($metaLastHeard, $mmdvmconfigs) { // returns mode of repeater actual working in - //$lastHeard = $metaLastHeard; - //array_multisort($lastHeard,SORT_DESC); - //$listElem = $lastHeard[0]; $listElem = $metaLastHeard[0]; $timestamp = new DateTime($listElem[0]); $mode = $listElem[1]; @@ -344,7 +366,6 @@ function getActualLink($logLines, $mode) { //M: 2016-05-02 07:04:10.504 D-Star link status set to "Verlinkt zu DCS002 S" //M: 2016-04-03 16:16:18.638 DMR Slot 2, received network voice header from 4000 to 2625094 //M: 2016-04-03 19:30:03.099 DMR Slot 2, received network voice header from 4020 to 2625094 - //array_multisort($logLines,SORT_DESC); switch ($mode) { case "D-Star": if (isProcessRunning(IRCDDBGATEWAY)) { @@ -356,7 +377,7 @@ function getActualLink($logLines, $mode) { case "DMR Slot 1": foreach ($logLines as $logLine) { if(substr($logLine, 27, strpos($logLine,",") - 27) == "DMR Slot 1") { - $to = ""; + $to = ""; if (strpos($logLine,"to")) { $to = trim(substr($logLine, strpos($logLine,"to") + 3)); } @@ -370,7 +391,7 @@ function getActualLink($logLines, $mode) { case "DMR Slot 2": foreach ($logLines as $logLine) { if(substr($logLine, 27, strpos($logLine,",") - 27) == "DMR Slot 2") { - $to = ""; + $to = ""; if (strpos($logLine,"to")) { $to = trim(substr($logLine, strpos($logLine,"to") + 3)); } @@ -393,8 +414,8 @@ function getActualReflector($logLines, $mode) { //array_multisort($logLines,SORT_DESC); foreach ($logLines as $logLine) { - if(substr($logLine, 27, strpos($logLine,",") - 27) == "DMR Slot 2") { - $from = substr($logLine, strpos($logLine,"from") + 5, strpos($logLine,"to") - strpos($logLine,"from") - 6); + if(substr($logLine, 27, strpos($logLine,",") - 27) == "DMR Slot 2") { + $from = substr($logLine, strpos($logLine,"from") + 5, strpos($logLine,"to") - strpos($logLine,"from") - 6); if (strlen($from) == 4 && startsWith($from,"4")) { if ($from == "4000") { @@ -403,15 +424,49 @@ function getActualReflector($logLines, $mode) { return "Reflector ".$from; } } - } + } } return "Reflector not linked"; } +function getActiveYSFReflectors($logLines) { +// 00000000001111111111222222222233333333334444444444555555555566666666667777777777888888888899999999990000000000111111111122 +// 01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901 +// D: 2016-06-11 19:09:31.371 Have reflector status reply from 89164/FUSIONBE2 /FusionBelgium /002 + $reflectors = Array(); + $reflectorlist = Array(); + foreach ($logLines as $logLine) { + if (strpos($logLine, "Have reflector status reply from")) { + $timestamp = substr($logLine, 3, 19); + $timestamp2 = new DateTime($timestamp); + $now = new DateTime(); + $timestamp2->add(new DateInterval('PT2H')); + + if ($now->format('U') <= $timestamp2->format('U')) { + $str = substr($logLine, 60); + $id = strtok($str, "/"); + $name = strtok("/"); + $description = strtok("/"); + $concount = strtok("/"); + if(!(array_search($name, $reflectors) > -1)) { + array_push($reflectors,$name); + array_push($reflectorlist, array($name, $description, $id, $concount, $timestamp)); + } + } + } + } + array_multisort($reflectorlist); + return $reflectorlist; +} + //Some basic inits $mmdvmconfigs = getMMDVMConfig(); -$logLines = getLog(); -$reverseLogLines = $logLines; -array_multisort($reverseLogLines,SORT_DESC); -$lastHeard = getLastHeard($reverseLogLines); +$logLinesMMDVM = getMMDVMLog(); +$reverseLogLinesMMDVM = $logLinesMMDVM; +array_multisort($reverseLogLinesMMDVM,SORT_DESC); +$lastHeard = getLastHeard($reverseLogLinesMMDVM); +$YSFGatewayconfigs = getYSFGatewayConfig(); +$logLinesYSFGateway = getYSFGatewayLog(); +$reverseLogLinesYSFGateway = $logLinesYSFGateway; +array_multisort($reverseLogLinesYSFGateway,SORT_DESC); ?> From 7866556a062bc16d77f5d026b80b066acc1f1cf7 Mon Sep 17 00:00:00 2001 From: EA4GKQ Date: Fri, 24 Jun 2016 21:08:10 +0200 Subject: [PATCH 26/48] Update index.php --- index.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/index.php b/index.php index 85fea4a..ed96ef2 100644 --- a/index.php +++ b/index.php @@ -45,11 +45,6 @@ include "include/functions.php"; ?>:

MMDVMHost by G4KLX Version:

- - - - - '; +echo ''; ?> | get your own at:
Github From f7adafc55926052d18f192fe8159ebeb0ee9798d Mon Sep 17 00:00:00 2001 From: EA4GKQ Date: Fri, 24 Jun 2016 21:12:11 +0200 Subject: [PATCH 27/48] Update index.php --- index.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/index.php b/index.php index ed96ef2..3986a50 100644 --- a/index.php +++ b/index.php @@ -45,6 +45,11 @@ include "include/functions.php"; ?>:

MMDVMHost by G4KLX Version:

+ + + + + Date: Fri, 24 Jun 2016 21:20:07 +0200 Subject: [PATCH 28/48] Update sysinfo.php --- include/sysinfo.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/sysinfo.php b/include/sysinfo.php index 0d8d75a..1532b9e 100644 --- a/include/sysinfo.php +++ b/include/sysinfo.php @@ -94,6 +94,7 @@
System Info
+
@@ -131,4 +132,5 @@
+
From 0727bfc1873e085d0f378d1a153b64befc205a6a Mon Sep 17 00:00:00 2001 From: EA4GKQ Date: Fri, 24 Jun 2016 21:21:42 +0200 Subject: [PATCH 29/48] Update repeaterinfo.php --- include/repeaterinfo.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/repeaterinfo.php b/include/repeaterinfo.php index eb035ce..45c8b8c 100644 --- a/include/repeaterinfo.php +++ b/include/repeaterinfo.php @@ -3,6 +3,7 @@
Repeater Info
+
@@ -81,4 +82,5 @@
Actual Mode
+
From bac47ad98ac8b31dbd18a560ecc2aa2eb768355c Mon Sep 17 00:00:00 2001 From: EA4GKQ Date: Fri, 24 Jun 2016 21:24:34 +0200 Subject: [PATCH 30/48] Update lh.php --- include/lh.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/include/lh.php b/include/lh.php index f5ded88..6175554 100644 --- a/include/lh.php +++ b/include/lh.php @@ -24,24 +24,24 @@ for ($i = 0; ($i < LHLINES) AND ($i < count($lastHeard)); $i++) { $listElem = $lastHeard[$i]; echo""; - echo"$listElem[0]"; - echo"$listElem[1]"; - echo"$listElem[2]"; - echo"$listElem[3]"; - echo"$listElem[4]"; + echo"$listElem[0]"; + echo"$listElem[1]"; + echo"$listElem[2]"; + echo"$listElem[3]"; + echo"$listElem[4]"; if ($listElem[5] == "RF"){ - echo "RF"; + echo "RF"; }else{ - echo"$listElem[5]"; + echo"$listElem[5]"; } if ($listElem[6] == null) { - echo'transmitting'; + echo'transmitting'; } else if ($listElem[6] == "SMS") { - echo'sending or receiving SMS'; + echo'sending or receiving SMS'; } else { - echo"$listElem[6]"; - echo"$listElem[7]"; - echo"$listElem[8]"; + echo"$listElem[6]"; + echo"$listElem[7]"; + echo"$listElem[8]"; } echo"\n"; } From 6e1d8e1dc23af5802a5bfb65d2c46bf0c972fcb0 Mon Sep 17 00:00:00 2001 From: EA4GKQ Date: Fri, 24 Jun 2016 21:37:52 +0200 Subject: [PATCH 31/48] Update localtx.php --- include/localtx.php | 43 ++++++++++++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/include/localtx.php b/include/localtx.php index 07aa2e3..c377f97 100644 --- a/include/localtx.php +++ b/include/localtx.php @@ -1,15 +1,16 @@
-
Today's last 10 local transmissions.
+
Today's last 20 local transmissions.
- +
+ @@ -21,30 +22,32 @@ $localTXList = getHeardList($reverseLogLines); + + "; - echo""; - echo""; - echo""; - echo""; - echo""; - echo""; + echo""; + echo""; + echo""; + echo""; + echo""; + echo""; if ($listElem[6] == null) { - echo''; + echo''; } else if ($listElem[6] == "SMS") { - echo''; + echo''; } else { - echo""; - echo""; - echo""; + echo""; + echo""; + echo""; } echo"\n"; $counter++; - if ($counter == 10) { + if ($counter == 20) { break; } } @@ -52,6 +55,16 @@ for ($i = 0; $i < count($localTXList); $i++) { ?> +
Time (UTC) ModeLoss BER
$listElem[0]$listElem[1]$listElem[2]$listElem[3]$listElem[4]$listElem[5]$listElem[0]$listElem[1]$listElem[2]$listElem[3]$listElem[4]$listElem[5]in TXin TXsending or receiving SMSsending or receiving SMS$listElem[6]$listElem[7]$listElem[8]$listElem[6]$listElem[7]$listElem[8]
+ From a5ce6d14d1665d106f145bf200abde3d1ee4df77 Mon Sep 17 00:00:00 2001 From: EA4GKQ Date: Fri, 24 Jun 2016 22:12:47 +0200 Subject: [PATCH 32/48] Update lh.php --- include/lh.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/lh.php b/include/lh.php index 6175554..a554256 100644 --- a/include/lh.php +++ b/include/lh.php @@ -1,8 +1,9 @@
-
Last Heard List of today's callsigns.
+
Last Heard List of today's callsigns.
@@ -21,7 +22,7 @@ "; echo""; From ee25557478dded79c65fadb3247f5ed51dbe8588 Mon Sep 17 00:00:00 2001 From: EA4GKQ Date: Fri, 24 Jun 2016 22:13:34 +0200 Subject: [PATCH 33/48] Update localtx.php --- include/localtx.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/localtx.php b/include/localtx.php index c377f97..652bf78 100644 --- a/include/localtx.php +++ b/include/localtx.php @@ -47,9 +47,6 @@ for ($i = 0; $i < count($localTXList); $i++) { } echo"\n"; $counter++; - if ($counter == 20) { - break; - } } } From 5b1b54fac7d0b74e5d682f4e20107112b95d1fcf Mon Sep 17 00:00:00 2001 From: EA4GKQ Date: Fri, 24 Jun 2016 22:14:57 +0200 Subject: [PATCH 34/48] Update index.php --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index 3986a50..47fd1db 100644 --- a/index.php +++ b/index.php @@ -73,7 +73,7 @@ $time = $time[1] + $time[0]; $finish = $time; $total_time = round(($finish - $start), 4); echo ''; -?> | get your own at: Github +?> | get your own at: https://github.com/dg9vh/MMDVMHost-Dashboard From f43e901c6f0132136489d62cde275971c960126d Mon Sep 17 00:00:00 2001 From: EA4GKQ Date: Fri, 24 Jun 2016 23:12:23 +0200 Subject: [PATCH 35/48] all external links this https --- index.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.php b/index.php index 47fd1db..aeebb1c 100644 --- a/index.php +++ b/index.php @@ -23,12 +23,12 @@ include "include/functions.php"; - + - + - - + + From 05281fa1acdfcb3426545eecd19c5b3362b90448 Mon Sep 17 00:00:00 2001 From: EA4GKQ Date: Fri, 24 Jun 2016 23:33:53 +0200 Subject: [PATCH 36/48] Update index.php --- index.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index aeebb1c..f50480d 100644 --- a/index.php +++ b/index.php @@ -75,6 +75,16 @@ $total_time = round(($finish - $start), 4); echo ''; ?> | get your own at: https://github.com/dg9vh/MMDVMHost-Dashboard - + From 7acb50aeac29e2ba9978e8b9fed1de5eac0f3220 Mon Sep 17 00:00:00 2001 From: EA4GKQ Date: Fri, 24 Jun 2016 23:34:16 +0200 Subject: [PATCH 37/48] move to index.php --- include/lh.php | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/include/lh.php b/include/lh.php index a554256..e3a4a06 100644 --- a/include/lh.php +++ b/include/lh.php @@ -52,12 +52,4 @@ for ($i = 0; ($i < $totalLH); $i++) {
$listElem[0]
- + From 5589be8dffd2a23211af25e0a54474baa952c333 Mon Sep 17 00:00:00 2001 From: EA4GKQ Date: Fri, 24 Jun 2016 23:34:38 +0200 Subject: [PATCH 38/48] move to index.php --- include/localtx.php | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/include/localtx.php b/include/localtx.php index 652bf78..52875b8 100644 --- a/include/localtx.php +++ b/include/localtx.php @@ -56,12 +56,4 @@ for ($i = 0; $i < count($localTXList); $i++) { - + From 4e2d35e32cc5a8e0183c56019e7a5b2657e20ce0 Mon Sep 17 00:00:00 2001 From: EA4GKQ Date: Fri, 24 Jun 2016 23:39:37 +0200 Subject: [PATCH 39/48] Update index.php --- index.php | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/index.php b/index.php index f50480d..b319350 100644 --- a/index.php +++ b/index.php @@ -23,10 +23,6 @@ include "include/functions.php"; - - - - @@ -75,16 +71,16 @@ $total_time = round(($finish - $start), 4); echo ''; ?> | get your own at: https://github.com/dg9vh/MMDVMHost-Dashboard - + From be928327f40338921bd61c034dc0703298bab082 Mon Sep 17 00:00:00 2001 From: EA4GKQ Date: Sat, 25 Jun 2016 00:02:49 +0200 Subject: [PATCH 40/48] Update lh.php --- include/lh.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/lh.php b/include/lh.php index e3a4a06..86ae301 100644 --- a/include/lh.php +++ b/include/lh.php @@ -6,7 +6,7 @@ $totalLH = count($lastHeard);
Last Heard List of today's callsigns.
- +
From 50d8f83b7b876e6b94c19c58a5f9d396a3211bda Mon Sep 17 00:00:00 2001 From: EA4GKQ Date: Sat, 25 Jun 2016 00:03:01 +0200 Subject: [PATCH 41/48] Update localtx.php --- include/localtx.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/localtx.php b/include/localtx.php index 52875b8..0307ea3 100644 --- a/include/localtx.php +++ b/include/localtx.php @@ -9,7 +9,7 @@ $localTXList = getHeardList($reverseLogLinesMMDVM);
Today's last 20 local transmissions.
-
Time (UTC)
+
From a535bbc305bca785c46839b6cb9349074a6314ec Mon Sep 17 00:00:00 2001 From: EA4GKQ Date: Sat, 25 Jun 2016 00:04:28 +0200 Subject: [PATCH 42/48] Update index.php --- index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index b319350..934100e 100644 --- a/index.php +++ b/index.php @@ -74,10 +74,10 @@ echo '';
Time (UTC)