From 6293153ba4e91c71405fe4a1cb2f9bbf86aca344 Mon Sep 17 00:00:00 2001 From: dg9vh Date: Sat, 30 Apr 2016 15:38:12 +0200 Subject: [PATCH] First attempt of dashboard --- README.md | 11 ++++++++++ config/config.php | 8 ++++++++ include/functions.php | 47 +++++++++++++++++++++++++++++++++++++++++++ include/lh.php | 34 +++++++++++++++++++++++++++++++ index.php | 38 ++++++++++++++++++++++++++++++++++ 5 files changed, 138 insertions(+) create mode 100644 config/config.php create mode 100644 include/functions.php create mode 100644 include/lh.php create mode 100644 index.php diff --git a/README.md b/README.md index d6084fc..6ef1c98 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,13 @@ # MMDVMHost-Dashboard Dashboard for MMDVMHost (by G4KLX) +================================== + +This is a first attempt for a dashboard for MMDVMHost-Software by G4KLX. It is configured by a file +"config/config.php" where some basic information are defined. + +Copy all files into your webroot and enjoy working with it. + +Contact +======= + +Feel free to contact the author via email: dg9vh@darc.de \ No newline at end of file diff --git a/config/config.php b/config/config.php new file mode 100644 index 0000000..c128f78 --- /dev/null +++ b/config/config.php @@ -0,0 +1,8 @@ + \ No newline at end of file diff --git a/include/functions.php b/include/functions.php new file mode 100644 index 0000000..e4f1db3 --- /dev/null +++ b/include/functions.php @@ -0,0 +1,47 @@ + 0) { + $callsign = substr($callsign2, 0, strpos($callsign2,"/")); + } + $callsign = trim($callsign); + $id =""; + if ($mode == "D-Star") { + $id = substr($callsign2, strpos($callsign2,"/") + 1); + } + $target = substr($logLine, strpos($logLine, "to") + 3); + + if ( strlen($callsign <7) ) { + array_push($heardList, array($timestamp, $mode, $callsign, $id, $target)); + } + //Last-Heard-Liste: Array aufbauen in umgekehrter Richtung des Logs + //Zeilen ausblenden, bei denen das Callsign länger als 6 Stellen ist + } + fclose($log); + } + array_multisort($heardList,SORT_DESC); + foreach ($heardList as $listElem) { + if(!(array_search($listElem[2], $heardCalls) > -1)) { + array_push($heardCalls, $listElem[2]); + array_push($lastHeard, $listElem); + } + } + return $lastHeard; +} + +//getLastHeard(); +?> \ No newline at end of file diff --git a/include/lh.php b/include/lh.php new file mode 100644 index 0000000..ae53922 --- /dev/null +++ b/include/lh.php @@ -0,0 +1,34 @@ + +
+ +
Last Heard List
+
+

In the following table you find the last heard callsigns on this repeater of the current day

+
+ + + + + + + + + + +"; + echo""; + echo""; + echo""; + echo""; + echo""; + echo""; + } + +?> +
TimeModeCallsignDSTAR-IDTarget
$listElem[0]$listElem[1]$listElem[2]$listElem[3]$listElem[4]
+
\ No newline at end of file diff --git a/index.php b/index.php new file mode 100644 index 0000000..37627ac --- /dev/null +++ b/index.php @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + MMDVM-Dashboard by DG9VH + + + + +
+ +
+ + \ No newline at end of file