Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Initial version with Boostrap #9

Open
wants to merge 32 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
1d32815
Initial commit of allmon2 with modifications.
lurch89 Mar 7, 2020
26c38da
forgot a file. Oops
lurch89 Mar 7, 2020
4eb89cd
Made some more link ui changes.
lurch89 Mar 7, 2020
efeb732
changed readme
lurch89 Mar 7, 2020
9cee0fe
more readmes.
lurch89 Mar 7, 2020
5b7f975
Menu links that are not local (url's basically) will now open in a ne…
lurch89 Mar 7, 2020
c882f72
Updated README.md
lurch89 Mar 7, 2020
e8bdc61
updated Readme...again
lurch89 Mar 7, 2020
94be5c6
Added modal popup for bubble chart. Tried to add zooming but...that d…
lurch89 Mar 7, 2020
1e12208
Merge branch 'master' of https://git.kd0ioe.com/alynch/Allmon2-Bootstrap
lurch89 Mar 7, 2020
5ee0650
Control panel has now been styles appropriately
lurch89 Mar 8, 2020
25b1a4c
Updated Readme
lurch89 Mar 8, 2020
cd9181a
Added voter code, progress bars and all.
lurch89 Mar 8, 2020
be9db7b
Merge branch 'master' of https://git.kd0ioe.com/alynch/Allmon2-Bootstrap
lurch89 Mar 8, 2020
b70879d
Merge branch 'master-holder'
lurch89 Mar 14, 2020
82fa4e2
Merged changes properly
lurch89 Mar 14, 2020
6ea25ea
Removed unused libraries and added css and js folders
lurch89 Mar 15, 2020
045120e
Updating README for Markdown formatting
lurch89 Mar 15, 2020
79dd948
Changed Readme to Markdown format using the magic of filenames.
lurch89 Mar 15, 2020
e8fbf7c
Git better at Git. NOW added Readme file as Markdown.
lurch89 Mar 15, 2020
28252a5
Polishing up readme
lurch89 Mar 15, 2020
3f44a06
More readme shenanigans
lurch89 Mar 15, 2020
53db48c
formatting changes
lurch89 Mar 15, 2020
4ff67bf
More readme changes. Added step about site_title
lurch89 Mar 15, 2020
f43027d
Dropped readme.orig
lurch89 Mar 15, 2020
a940399
dropped some more unnecessary files.
lurch89 Mar 15, 2020
739fdda
Add files via upload
Apr 29, 2020
65426b2
Fixed System dropdown menu
ke5gdb Dec 1, 2020
8333baf
Changed directory variable from static definition to getcwd()
ke5gdb Dec 1, 2020
5ad7cda
Merge pull request #1 from W5ALC/master
lurch89 Jul 18, 2021
5818cff
Incorporated changes
lurch89 Jul 18, 2021
d9ac9dc
Merge pull request #2 from ke5gdb/master
lurch89 Jul 18, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Allmon2-Bootstrap

Allmon2 modified to have Bootstrap 4 libraries. This is based on the great work of WD6AWP and others.

## Features
- Added Bootstrap 4 Libraries
- Removed jquery-ui and switched to Bootstrap components (modal for login)
- External links open in new tab/window by default

## TODO
- Make all libraries offline (havent changed the locations in the files but the files are local.
- Enhance login mechanism *** Can be changed in class="modal-content".
use syntax {style="background color:#333333;color:white" }
you can use any color hex value or certain color names
- ***Add extra config file/modify existing config for site-wide settings (title, color prefs, etc)*** Global.inc
- ~~Change Control Panel display~~
- Add voter formatting


## Setup

1. Change parameters in global.inc
2. Copy **allmon.ini.txt** to **allmon.ini.php**
3. Modify **allmon.ini.php** to suit your setup
4. Point your browser to wherever you have served up this folder. Usually http://*your IP*/allmon2
File renamed without changes.
1 change: 1 addition & 0 deletions about.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php include "session.inc"; ?>
<?php include "header.inc"; ?>
<p>
<img src="/allstarLogo.png" />
Allmon is a web site for monitoring and managing ham radio
<a href="http://allstarlink.org" target="_blank">Allstar</a> and <a href="http://ohnosec.org/drupal/" target="_blank">app_rpt</a>
node linking and <a href="http://micro-node.com/thin-m1.html" target="_blank">RTCM clients</a>.
Expand Down
27 changes: 19 additions & 8 deletions allmon.css
Original file line number Diff line number Diff line change
Expand Up @@ -156,23 +156,28 @@
}

#footer {
color:white;
font-size:10px;
}

table.rtcm {
color:white;
border-collapse:collapse;
border:1px solid black;
font-family:verdana,arial,sans-serif;
}
table.rtcm tr {
color:white;
font-size:12px;
}

table.rtcm td {
color:white;
white-space:nowrap;
}

table.rtcm th {
color:white;
border:1px solid black;
font-size:13px;
background-color: #dedede;
Expand All @@ -181,7 +186,7 @@ table.rtcm th {
table.gridtable {
font-family: verdana,arial,sans-serif;
font-size:11px;
color:#333333;
color:white;
border-width: 1px;
border-color: #666666;
border-collapse: collapse;
Expand All @@ -192,9 +197,11 @@ table.gridtable th {
padding: 4px;
border-style: solid;
border-color: #666666;
background-color: #dedede;
background-color: #000000;
color:white;
}
table.gridtable td {
color:white;
border-width: 1px;
padding: 4px;
border-style: solid;
Expand All @@ -203,11 +210,13 @@ table.gridtable td {
}

table.gridtable tr.rColor td {
background-color: #8BA51A; color: white;
background-color: #8BA51A;
color: white;
}

table.gridtable tr.cColor td {
background-color: #FF9900; color: white;
background-color: #FF9900;
color: white;
}

.disconnect {
Expand All @@ -221,6 +230,7 @@ table.gridtable tr.cColor td {
width: 330px;
font-size: 14px;
text-align: left;
color:white
}
.barbox_a {
position: absolute;
Expand All @@ -229,6 +239,7 @@ table.gridtable tr.cColor td {
margin: 0px 0px 0px 0px;
width: 302px;
height: 22px;
color:white;
background-color: black;
}
.bar {
Expand All @@ -238,7 +249,7 @@ table.gridtable tr.cColor td {
margin: 0px 0px 0px 0px;
width: 0px;
height: 20px;
background-color: #0099FF;
background-color: black;
text-align: center;
color: white;
}
Expand All @@ -250,7 +261,7 @@ table.gridtable tr.cColor td {
left: 50%;
height: 20px;
margin: 0px 0px 0px 0px;
background-color: #0099FF;
background-color: black;
color: white;
}

Expand All @@ -273,7 +284,7 @@ table.gridtable tr.cColor td {
top: 0px;
right: 0px;
display: block;
background: #2a2a2a;
background: black;
padding: 5px 15px 5px 15px;
color: #FFF;
}
Expand All @@ -283,7 +294,7 @@ table.gridtable tr.cColor td {
right: 0px;
width: 200px;
padding: 10px 15px 5px 15px;
background: #2a2a2a;
background: black;
font-size: 8pt;
font-weight: bold;
color: #FFF;
Expand Down
37 changes: 37 additions & 0 deletions allmon.ini.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php


[1999]
host=127.0.0.1:5038
user=admin
passwd=secret
nomenu=no
hideNodeURL=no

[All Nodes]
url=https://www.allstarlink.org/nodelist/

[Active Nodes]
url=http://stats.allstarlink.org/

[Keyed Nodes]
url=http://stats.allstarlink.org/maps/allstarNodesMapKey.php


;[2000]
;system=System2
;host=my.address.com:5037
;user=admin
;passwd=password2

;[2000 RTCM]
;system=System2
;rtcmnode=2000

;[Grouped Nodes]
;nodes=500,501,2000

;[2 RTCMs]
;system=System2
;rtcmnode=2000,2001
?>
Binary file modified allstarLogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
96 changes: 31 additions & 65 deletions astdb.php
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#! /usr/bin/php -q
<?php

<<<<<<< HEAD
// Read AllStar database
//$url = "https://allstarlink.org/cgi-bin/allmondb.pl";
=======
// Code refactored / debugged by KB4FXC, 11/06/2018.
// Fixed issue where error conditions were always generated by private nodes.

Expand All @@ -24,7 +28,7 @@
- Minor edits to messages
*/

$dir = "/var/www/html/allmon2/";
$dir = getcwd() . "/";
$db = $dir . "astdb.txt";
$privatefile = $dir . "privatenodes.txt";

Expand All @@ -36,79 +40,41 @@

#$url = "https://allstarlink.org/cgi-bin/allmondb.pl";
$url2 = "https://nodelist.hamvoip.org/getASLdb.php";
>>>>>>> 8333bafbf0a8735befdb86e3144eaf0823c621f1
$url = "http://allmondb.allstarlink.org/";
$astArr = file($url);

// Load private nodes if any
// Private nodes are less than 2000 and loaded first
// to ensure proper order of file
// Read private nodes
$privatefile = "privatenodes.txt";
$privateArr = array();
if (file_exists($privatefile)) {
$Pcontents .= file_get_contents($privatefile);
$privateArr = file($privatefile);
}

// Check if ONLY private nodes
// In that case do not read Allstar database
// Maintains compatibility with pre 1.3 versions
// assumes empty environment variable
if (is_null($private) || !$private) { // If not a private node...
// If called by cron wait between 0 and 30 min
if (isset($argv[1]) && $argv[1] == 'cron') {
$seconds = mt_rand(0, 1800);
print "Waiting for $seconds seconds...\n";
while ($seconds > 0) {
if ($seconds > 60) {
print "Sleeping for $seconds seconds...\n";
sleep(60);
$seconds = $seconds - 60;
} else {
print "Sleeping for $seconds seconds...\n";
sleep($seconds);
$seconds = 0;
}
}
}

while (true) {
// Open AllStar db URL and retrieve file.
$contents2 = @file_get_contents($url);

// Test size.
$size = strlen($contents2);
if ($size < 300000) {

#if ($retries >= 2)
# $url = $url2;

if ($retries >= 5)
die ("astdb.txt: Retries exceeded!! $size bytes - Invalid: file too small, bailing out.\n");

$retries++;
print "Retry $retries of 5. Will retry $url\n";
sleep (5);
} else {
break;
}
}
} // End private node check

$contents = $Pcontents;
$contents .= $contents2;
// Merge with private nodes
if (!empty($privateArr)) {
$fileArr = array_merge($astArr, $privateArr);
} else {
$fileArr = $astArr;
}

// Added to strip non printing characters.
$contents = preg_replace('/[\x00-\x09\x0B-\x0C\x0E-\x1F\x7F-\xFF]/', '', $contents);
// Sort
natsort($fileArr);

// Save the data
if (! ($fh = fopen($db, 'w'))) {
die("Cannot open $db.");
// Output
$db = "astdb.txt";
if (! $fh = fopen($db, 'w')) {
die("Cannot open $db.");
}
if (!flock($fh, LOCK_EX)) {
echo 'Unable to obtain lock.';
exit(-1);
echo 'Unable to obtain lock.';
exit(-1);
}
if (fwrite($fh, $contents) === FALSE) {
die ("Cannot write $db.");
foreach($fileArr as $line) {
if (strlen(trim($line)) == 0) {
continue;
}
fwrite($fh, $line);
}
fclose($fh);

$size = strlen($contents);
print "Success: astdb.txt $size bytes\n";
?>
?>
Loading