Commit 2fac9a6c authored by Eric - kg6wxc's avatar Eric - kg6wxc
Browse files

Initial commit!

parents
give me a bit!
add to httpd.conf (/etc/httpd/conf/httpd.conf or on Debian /etc/apache2/httpd.conf)
Include conf/extra/httpd-meshmap.conf
Restart Apache
The cronscript can be run from cron every minute (or at whatever interval you choose)
* * * * * /home/kg6wxc/MeshMap/cronscript.sh
#!/bin/sh
#change to the directory get-map-info.php is in
cd /home/kg6wxc/MeshMap/scripts
./get-map-info.php
Alias /meshmap/ "/srv/meshmap/webpage/"
<Directory "/srv/meshmap/webpage/">
AllowOverride None
Require all granted
</Directory>
This diff is collapsed.
<?php
function gethostbyaddr_timeout( $ip, $dns, $timeout = 3 ) {
// idea from http://www.php.net/manual/en/function.gethostbyaddr.php#46869
// http://www.askapache.com/pub/php/gethostbyaddr.php
// random transaction number (for routers etc to get the reply back)
$data = rand( 10, 77 ) . "\1\0\0\1\0\0\0\0\0\0";
// octals in the array, keys are strlen of bit
$bitso = array("","\1","\2","\3" );
foreach( array_reverse( explode( '.', $ip ) ) as $bit ) {
$l=strlen($bit);
$data.="{$bitso[$l]}".$bit;
}
// and the final bit of the request
$data .= "\7in-addr\4arpa\0\0\x0C\0\1";
// create UDP socket
$errno = $errstr = 0;
$fp = fsockopen( "udp://{$dns}", 53, $errno, $errstr, $timeout );
if( ! $fp || ! is_resource( $fp ) )
return $errno;
if( function_exists( 'socket_set_timeout' ) ) {
socket_set_timeout( $fp, $timeout );
} elseif ( function_exists( 'stream_set_timeout' ) ) {
stream_set_timeout( $fp, $timeout );
}
// send our request (and store request size so we can cheat later)
$requestsize = fwrite( $fp, $data );
$max_rx = $requestsize * 3;
$response = '';
$start = time();
$responsesize = 0;
while ( $responsesize < $max_rx && ( ( time() - $start ) < $timeout ) && ($buf = fread( $fp, 1 ) ) !== false ) {
$responsesize++;
$response .= $buf;
}
// echo "[tx: $requestsize bytes] [rx: {$responsesize} bytes]";
// hope we get a reply
if ( is_resource( $fp ) )
fclose( $fp );
// if empty response or bad response, return original ip
if ( empty( $response ) || bin2hex( substr( $response, $requestsize + 2, 2 ) ) != '000c' )
return $ip;
// set up our variables
$host = '';
$len = $loops = 0;
// set our pointer at the beginning of the hostname uses the request size from earlier rather than work it out
$pos = $requestsize + 12;
do {
// get segment size
$len = unpack( 'c', substr( $response, $pos, 1 ) );
// null terminated string, so length 0 = finished - return the hostname, without the trailing .
if ( $len[1] == 0 )
return substr( $host, 0, -1 );
// add segment to our host
$host .= substr( $response, $pos + 1, $len[1] ) . '.';
// move pointer on to the next segment
$pos += $len[1] + 1;
// recursion protection
$loops++;
}
while ( $len[1] != 0 && $loops < 20 );
// return the ip in case
return $ip;
}
?>
\ No newline at end of file
This diff is collapsed.
[meshmap-settings]
; Mesh Node Markers
Device_Default = 'images/mapMarkers/greenRadioCircle-icon.png';
Device_Linux = 'images/mapMarkers/linux.png';
Device_900MHz = 'images/mapMarkers/magentaRadioCircle-icon.png';
Device_24GHz = 'images/mapMarkers/purpleRadioCircle-icon.png';
Device_3GHz = 'images/mapMarkers/blueRadioCircle-icon.png';
Device_5GHz = 'images/mapMarkers/goldRadioCircle-icon.png';
Device_Unknown = 'images/mapMarkers/greyRadioCircle-icon.png';
; Software Versions
Device_OOD = 'images/mapMarkers/redCircle.png';
Device_Experimental = 'images/mapMarkers/orangeCircle.png';
; Link colours
; Colours are also control in webpage/css/meshmap.css
DTD_Link_Plus = "steelblue";
DTD_Link_Minus = "#A020F0";
;Link_Tunnel = "lightblue";
Link_Tunnel = "#808080";
Link_Infinite = "black";
Link_GOOD = "#00FF00";
Link_BAD = "#00FF00";
; Additional Markers
Marker_Police ='images/mapMarkers/police.png';
Marker_Fire ='images/mapMarkers/fire.png';
Marker_Hospital='images/mapMarkers/hospital.png';
Marker_EOC ='images/mapMarkers/EOC.png';
Marker_Operator ='images/mapMarkers/operator.png';
Marker_Future ='images/mapMarkers/Red_Marker.png';
<?php
$INCLUDE_DIR = "/home/ride/MeshMap";
$USER_SETTINGS = parse_ini_file($INCLUDE_DIR . "/scripts/user-settings.ini");
require $INCLUDE_DIR . "/scripts/wxc_functions.inc";
@include $INCLUDE_DIR . "/wxc_custom.inc";
foreach (get_included_files() as $filename) {
if (strpos($filename, 'wxc_custom.inc')) {
$wxc_custom = 1;
}
}
$ipAddr = $argv[1];
$do_sql = $argv[2];
$testNodePolling = $argv[3];
if ($do_sql) {
$sql_connection = wxc_connectToMySql();
}
$sql_db_tbl = $USER_SETTINGS['sql_db_tbl'];
$sql_db_tbl_node = $USER_SETTINGS['sql_db_tbl_node'];
$sql_db_tbl_topo = $USER_SETTINGS['sql_db_tbl_topo'];
$sysinfoJson = @file_get_contents("http://$ipAddr:8080/cgi-bin/sysinfo.json"); //get the .json file
$jsonFetchSuccess = 1;
if($sysinfoJson === FALSE) {
$jsonFetchSuccess = 0;
$error = error_get_last();
wxc_checkErrorMessage($error, $ipAddr);
//got nothing...
break;
//just skip the next IP
continue;
}else {
//node is there, get all the info we can
//get all the data from the json file and decode it
$result = json_decode($sysinfoJson,true);
//if there's nothing really there just skip to the next IP
if (!$result) {
continue;
}
//first let's see what node we are dealing with
//$node = $GLOBALS['node'] = $result['node'];
$node = $result['node'];
//gather lots of other information from OLSRD about the node being polled (we hopefully can use this later)
//this requires a second connection to the node. no way around that.
//but only if we have a firmware version >= than 3.16.0 (or "develop-16")
$firmware_version = $result['firmware_version'];
$olsrdInfo = 0;
//chaged to always on for testing 10-10-2017
//changed again 10-21-2017 excluding a couple of nodes
//if (version_compare($result['firmware_version'], "3.16.0.0", ">") || strpos($result['firmware_version'], "evelop-16") || $result['firmware_version'] === "linux" || $result['firmware_version'] === "Linux") {
//if ($ipAddr !== "10.162.170.94" && $ipAddr !== "10.242.25.124" && $ipAddr !== "10.108.102.244") {
/************
* Temporarily REMOVED due to issues
************/
//uncommented 11:30pm oct11 2017
//commented out again 14:20 oct13 2017
//enabled again 10.20.2017
// $olsrdInfo = wxc_netcat("$ipAddr");
// $noPort9090 = 1;
//}
//maybe in the future we'll be able to get this info remotely too and use it for something
//$olsrdDotDrawInfo = wxc_netcat("$nodeName.local.mesh","2004", null, null); //save the polled nodes local dot_draw info (never know we may want it for something)
//save json data to some variables
//probably don't really need to do this, but it is what it is for now...
$model = $result['model'];
$lat = $result['lat'];
$lon = $result['lon'];
$chanbw = $result['chanbw'];
$api_version = $result['api_version'];
$board_id = $result['board_id'];
$tunnel_installed = $result['tunnel_installed'];
$ssid = $result['ssid'];
$active_tunnel_count = $result['active_tunnel_count'];
$channel = $result['channel'];
$firmware_mfg = $result['firmware_mfg'];
$grid_square = $result['grid_square'];
//W6BI requested this info to be added, so here it is now. :)
//current ip/mac address info
if ($result['interfaces']) {
foreach($result['interfaces'] as $interface) {
$eth = "eth0";
if ($result['model'] == "Ubiquiti Nanostation M XW" || $result['model'] == "AirRouter " || $result['model'] == "NanoStation M5 XW ") {
//"AirRouter " model name bug caught and fixed by Mark, N2MH 13 March 2017.
$eth = "eth0.0";
}
if ($interface['name'] == $eth) { // error with KK9DS on $name (undefined index)
$lan_ip = $interface['ip']; //error with ke6upi here on $ip (undefinded index)
}
if ($interface['name'] == "wlan0") {
$wlan_ip = $interface['ip'];
$wifi_mac_address = $interface['mac']; //added to fix MAC address issue, caught by Mark, N2MH 14 March 2017.
}
}
}
//**change node locations via admin page now!!**
// if ($wxc_custom) {
// if($do_sql) {
// $nodesToFixLocations = fixLocations($node, $lat, $lon);
// list ($node, $lat, $lon) = explode(" ", $nodesToFixLocations);
// $node = $node;
// $lat = $lat;
// $lon = $lon;
// }
// }
if ($testNodePolling) {
echo "Name: "; wxc_echoWithColor($result['node'], "purple"); echo "\n";
echo "MAC Address: " . $wifi_mac_address . "\n";
echo "Model: " . $result['model'] . "\n";
if ($result['firmware_version'] !== $USER_SETTINGS['current_stable_fw_version']) {
if (version_compare($result['firmware_version'], $USER_SETTINGS['current_stable_fw_version'], "<")) {
if ($result['firmware_version'] === "Linux" || $result['firmware_version'] === "linux") {
echo "Firmware: " . $result['firmware_version'] . " <- \033[1;32mViva Linux!!!\033[0m\n";
}else {
echo "Firmware: " . $result['firmware_mfg'] . " " . $result['firmware_version'];
wxc_echoWithColor(" Should update firmware!", "red");
echo "\n";
}
}
if (version_compare($result['firmware_version'], $USER_SETTINGS['current_stable_fw_version'], ">")) {
//echo "Firmware: " . $result['firmware_mfg'] . " " . $result['firmware_version'] . " <- \033[31mBeta firmware!\033[0m\n";
echo "Firmware: " . $result['firmware_mfg'] . " " . $result['firmware_version'];
wxc_echoWithColor(" Beta firmware!", "red");
echo "\n";
}
}else {
//echo "Firmware Version: " . $firmware_version . "\n";
echo "Firmware: \033[32m" . $result['firmware_mfg'] . " " . $result['firmware_version'] . "\033[0m\n";
}
echo "LAN ip: " . $lan_ip . " WLAN ip: " . $wlan_ip . "\n";
if (($result['lat']) && ($result['lon'])) {
echo "Location: \033[32m" . $result['lat'] . ", " . $result['lon']. "\033[0m\n";
//}elseif ($nodeLocationFixed = 1) {
// echo "\033[31mNo Location Info Set!\033[0m (FIXED!)\n";
// $nodeLocationFixed = 0;
}else {
echo "\033[31mNo Location Info Set!\033[0m\n";
//K6GSE's solution to deal with non-null values in the DB
$lat = 0.00;
$lon = 0.00;
//end
}
if ($sysinfoJson && $olsrdInfo) {
echo "\033[32mSaved OLSRd info and sysinfo.json\033[0m\n";
}elseif ($sysinfoJson && !$olsrdInfo) {
echo "\033[33mOnly saved sysinfo.json\033[0m\n";
if ($olsrdInfo != 0) {
echo $GLOBALS['errorMessageFrom_wxc_netcat_function'] . "\n";
}else {
echo "Did not try to fetch full OLSRd data...\n" .
"\033[33mFirmware version less than 3.16 does not allow for remote OLSRd info gathering.\033[0m\n";
}
}else {
echo "\033[31mGOT NOTHING FROM THE NODE!!!!\033[0m";
}
echo "\n";
}
if ($do_sql) {
$removed_node = wxc_getMySql("SELECT node, wifi_mac_address FROM removed_nodes WHERE node = '$node' OR wifi_mac_address = '$wifi_mac_address'");
if ($removed_node['node'] == $node || $removed_node['wifi_mac_address'] == $wifi_mac_address) {
wxc_putMySql("DELETE FROM removed_nodes WHERE node = '$node' OR wifi_mac_address = '$wifi_mac_address'");
}
}
//our queries
//this is saved in case it's actually needed later
$sql_update_when_mac_addr_has_changed = "UPDATE $sql_db_tbl SET
wifi_mac_address=$wifi_mac_address,model=$model,
firmware_version=$firmware_version,
lat=$lat,lon=$lon,ssid=$ssid,chanbw=$chanbw,
api_version=$api_version,board_id=$board_id,
tunnel_install=$tunnel_installed,
active_tunnel_count=$active_tunnel_count,
channel=$channel,firmware_mfg=$firmware_mfg,
lan_ip=$lan_ip,wlan_ip=$wlan_ip,last_seen=NOW()
WHERE node=$node";
/* testing trying to make things more readable and
* not use extra variables...
* it's not really working, quite a bitch to get formated just right
*
$sql = "INSERT INTO $sql_db_tbl(wifi_mac_address, node, model, firmware_version,
lat, lon, ssid, chanbw, api_version, board_id,
tunnel_installed, active_tunnel_count, channel,
firmware_mfg, lan_ip, wlan_ip, sysinfo_json, olsrinfo_json, last_seen) VALUES('" .
$wifi_mac_address . "','" .
$result['node'] . "','" .
$result['model'] . "','" .
$result['firmware_version'] . "','" .
$result['lat'] . "','" .
$result['lon'] . "','" .
$result['ssid'] . "','" .
$result['chanbw'] . "','" .
$result['api_version'] . "','" .
$result['board_id'] . "','" .
$result['tunnel_installed'] . "','" .
$result['active_tunnel_count'] . "','" .
$result['channel'] . "','" .
$result['firmware_mfg'] . "','" .
$lan_ip . "','" .
$wlan_ip . "','" .
$sysinfoJson . "','" .
$olsrdInfo . "', NOW()) " .
"ON DUPLICATE KEY UPDATE " .
"node = '" . $result['node'] . "','" .
"model = '" . $result['model'] . "','" .
"firmware_version = '" . $result['firmware_version'] . "','" .
"lat = '" . $result['lat'] . "','" .
"lon = '" . $result['lon'] . "','" .
"ssid = '" . $result['ssid'] . "','" .
"chanbw = '" . $result['chanbw'] . "','" .
"api_version = '" . $result['api_version'] . "','" .
"board_id = '" . $result['board_id'] . "','" .
"tunnel_installed = '" . $result['tunnel_installed'] . "','" .
"active_tunnel_count = '" . $result['active_tunnel_count'] . "','" .
"channel =' " . $result['channel'] . "','" .
"firmware_mfg = '" . $result['firmware_mfg'] . "','" .
"lan_ip = '" . $lan_ip . "','" .
$wlan_ip . "','" .
$sysinfoJson . "','" .
$olsrdInfo . "', NOW())";
*/
$sql = "INSERT INTO $sql_db_tbl(
wifi_mac_address, node, model, firmware_version, lat, lon, grid_square, ssid, chanbw, api_version, board_id,
tunnel_installed, active_tunnel_count, channel, firmware_mfg, lan_ip, wlan_ip, sysinfo_json, olsrinfo_json, last_seen)
VALUES('$wifi_mac_address', '$node', '$model', '$firmware_version',
'$lat', '$lon', '$grid_square', '$ssid', '$chanbw', '$api_version', '$board_id',
'$tunnel_installed', '$active_tunnel_count', '$channel',
'$firmware_mfg', '$lan_ip', '$wlan_ip', '$sysinfoJson', '$olsrdInfo', NOW())
ON DUPLICATE KEY UPDATE wifi_mac_address = '$wifi_mac_address', node = '$node', model = '$model', firmware_version = '$firmware_version',
lat = '$lat', lon = '$lon', grid_square = '$grid_square', ssid = '$ssid', chanbw = '$chanbw', api_version = '$api_version',
board_id = '$board_id', tunnel_installed = '$tunnel_installed',
active_tunnel_count = '$active_tunnel_count', channel = '$channel',
firmware_mfg = '$firmware_mfg', lan_ip = '$lan_ip', wlan_ip = '$wlan_ip',
sysinfo_json = '$sysinfoJson', olsrinfo_json = '$olsrdInfo', last_seen = NOW()";
$sql_no_location_info = "INSERT INTO $sql_db_tbl(
wifi_mac_address, node, model, firmware_version, grid_square, ssid, chanbw, api_version, board_id,
tunnel_installed, active_tunnel_count, channel, firmware_mfg, lan_ip, wlan_ip, sysinfo_json, olsrinfo_json, last_seen)
VALUES('$wifi_mac_address', '$node', '$model', '$firmware_version',
'$grid_square', '$ssid', '$chanbw', '$api_version', '$board_id',
'$tunnel_installed', '$active_tunnel_count', '$channel',
'$firmware_mfg', '$lan_ip', '$wlan_ip', '$sysinfoJson', '$olsrdInfo', NOW())
ON DUPLICATE KEY UPDATE wifi_mac_address = '$wifi_mac_address', node = '$node', model = '$model', firmware_version = '$firmware_version',
grid_square = '$grid_square', ssid = '$ssid', chanbw = '$chanbw', api_version = '$api_version',
board_id = '$board_id', tunnel_installed = '$tunnel_installed',
active_tunnel_count = '$active_tunnel_count', channel = '$channel',
firmware_mfg = '$firmware_mfg', lan_ip = '$lan_ip', wlan_ip = '$wlan_ip',
sysinfo_json = '$sysinfoJson', olsrinfo_json = '$olsrdInfo', last_seen = NOW()";
$sql_update_when_node_name_has_changed = "UPDATE $sql_db_tbl SET
node = '$node', model = '$model',
firmware_version = '$firmware_version',
lat = '$lat', lon = '$lon', grid_square = '$grid_square', ssid = '$ssid', chanbw = '$chanbw',
api_version = '$api_version', board_id = '$board_id',
tunnel_installed = '$tunnel_installed',
active_tunnel_count = '$active_tunnel_count',
channel = '$channel', firmware_mfg = '$firmware_mfg',
lan_ip = '$lan_ip', wlan_ip = '$wlan_ip', last_seen=NOW()
WHERE wifi_mac_address = '$wifi_mac_address'";
$sql_update_when_node_name_has_changed_no_location_info = "UPDATE $sql_db_tbl SET
node = '$node', model = '$model',
firmware_version = '$firmware_version',
grid_square = '$grid_square', ssid = '$ssid', chanbw = '$chanbw',
api_version = '$api_version', board_id = '$board_id',
tunnel_installed = '$tunnel_installed',
active_tunnel_count = '$active_tunnel_count',
channel = '$channel', firmware_mfg = '$firmware_mfg',
lan_ip = '$lan_ip', wlan_ip = '$wlan_ip', last_seen=NOW()
WHERE wifi_mac_address = '$wifi_mac_address'";
//find the currently stored name and mac address of the node we are looking at
if($do_sql) {
$node_name_array = wxc_getMySql("SELECT node, wifi_mac_address FROM $sql_db_tbl WHERE wifi_mac_address = '$wifi_mac_address'");
$existing_node_name = $node_name_array['node'];
$existing_mac_addr = $node_name_array['wifi_mac_address'];
}
//check if we are updating this nodes location info or not
if($do_sql) {
$fixedLocation = wxc_getMySql("SELECT location_fix FROM $sql_db_tbl_node WHERE node = '$node'");
if ($fixedLocation['location_fix'] == "1") {
//check if we have changed node name and have the same hardware.
//the database itself should handle if there is new hardware with the same node name.
//if name has not changed, update the DB as normal for each node
if ($do_sql && $sysinfoJson) {
if(!$existing_mac_addr) {
wxc_putMySql($sql_no_location_info);
}elseif($existing_mac_addr == $wifi_mac_address) {
if ($existing_node_name !== $node) {
wxc_putMySql($sql_update_when_node_name_has_changed_no_location_info);
//echo "";
}else {
wxc_putMySQL($sql_no_location_info);
}
}
}
}else {
//check if we have changed node name and have the same hardware.
//the database itself should handle if there is new hardware with the same node name.
//if name has not changed, update the DB as normal for each node
if ($do_sql && $sysinfoJson) {
if(!$existing_mac_addr) {
wxc_putMySql($sql);
}elseif($existing_mac_addr == $wifi_mac_address) {
if ($existing_node_name !== $node) {
wxc_putMySql($sql_update_when_node_name_has_changed);
//echo "";
}else {
wxc_putMySQL($sql);
}
}
}
}
}
//Thanks to K6GSE
// Clear Variables so they do not carry over
$wifi_mac_address = NULL;
$node = NULL;
$model = NULL;
$firmware_version = NULL;
$lat = NULL;
$lon = NULL;
$ssid = NULL;
$chanbw = NULL;
$api_version = NULL;
$board_id = NULL;
$tunnel_installed = NULL;
$active_tunnel_count = NULL;
$channel = NULL;
$firmware_mfg = NULL;
$lan_ip = NULL;
$wlan_ip = NULL;
$sysinfoJson = NULL;
$olsrdInfo = NULL;
}
//$sql_connection = wxc_connectToMySql();
//if ($sql_connection) {
//}
?>
[user-settings]
;Please change the below variables for your setup.
;For instance, if your on the USA east coast, your "localTimeZone" should be changed to: "America/New_York"
;You want to make your changes in between the quotes,
;Each section has comments that should explain what they are for.
;;SQL username, password, database name, table names.
;You **must** at least update username, passwd, and server to reflect *your* environment!
sql_user = "mesh-map"
sql_passwd = "mesh-map_sql_user_password"
sql_server = "localhost"
sql_db = "node_map"
sql_db_tbl = "node_info"
sql_db_tbl_node = "node_info"
sql_db_tbl_topo = "topology"
;this table is only needed for map_display.php
sql_db_tbl_marker = "marker_info"
;;Your localnode's IP address or hostname
;Just leave it set at "localnode.local.mesh" unless you need to change it
localnode = "localnode.local.mesh"
;;Current firmware version.
;(this will have to be edited by hand each time it changes)
;Sorry, no way around that yet.
current_stable_fw_version = "3.16.1.1"
;;Time Zone we're going to be running in.
;It must be in "PHP Format". Sorry. :)
;Please see: http://php.net/manual/en/timezones.php
;If you need to change it, you can find it there.
localTimeZone = "America/Los_Angeles"
;;How often would you like the script sections to run? (in minutes)
;node_polling_interval controls how often the scripts go out across the mesh to poll each node
;this defaults to once an hour (60 minutes)
;node polling uses mesh resources and really should not be done all that often.
;more than once an hour is probably overkill, unless it's needed for a big build out or something.
;link_interval controls how often we update the link info
;this defaults to 5 minutes
;getting the link info *does not* really use mesh resources, we just ask our localnode for the info.
;in other words this part could be made to operate in pretty much realtime, but it does not yet.
node_polling_interval = "91"
link_update_interval = "5"
;;There is another, new, aspect to node polling, it can be run in parallel.
;a separate php script is spawned for each node on the network,
;this runs much faster time wise, but you lose the ability to see what the node polling script is doing.
;it probably doesn't use more resources than doing it sequetially, it just does it all in one big burst.
;this does make the link lines take a bit longer properly to build in the database,
;as sometimes the info is just not there yet. over time this seems to work itself out.
;All this is being worked on, but for now, turn the parallelism on or off here
node_polling_parallel = "0"
numParallelThreads = "2"
;;Map Center Coordinates and starting zoom level
;this might take some experimenting to get just right
map_center_coordinates = "34.35, -119.6"
map_initial_zoom_level = "10"
;;if you have map tiles or a tile server of your own
offlineMapTileDir = "osm_tiles"
;;The Title of the web page, web page logo and the text above the map.
pageTitle = "Mesh Map"
pageLogo = ""
logoHeaderText = "Mesh Map"
;;Welcome to the Mesh Map Message
welcomeMessage = "Welcome to the Mesh Map"
otherTopOfMapMsg = ""
;;Custom message if you are on the Mesh Server
meshServerText = "You are connected to the Mesh Network and running on device: %s"
;;Custom Message if you are on the Internet Server
inetServerText = "Your are connected to the internet and are running on device: %s"
;;Custom Mesh Warning message
meshWarning = ""
;;Node expiration intervals
;after how many *days* do nodes get removed when we have not heard from them?
;if the same node re-appears after this time it will get automatically removed from the ignore list,
;and will continue to be updated as normal.
node_expire_interval = "30"
expire_old_nodes = "0"
;;How many *hours* to ignore hosts that give us a 404 error when asking for the json files
;a "404 error" from the node usually indicates it is running really old firmware.
;this allows the script to only check these nodes once a day, and not waste time.
;hopefully the owner will update one of these days. :)
error404_expire_interval = "26"
;;How many *minutes* to ignore nodes that give us a "no route to host" error
;these may be temporary errors and should not be ignored long
errorNoRoute_expire_interval = "90"
;;How many *minutes* to ignore nodes that give us a "connection refused" error
;these can also be quite temporary, like when olsrd happens to be restarting or something
errorRefused_expire_interval = "90"
;;The map has the ability to tell what host it is running on.
;Things can change accordingly. Say you want the map on the mesh?
;You'll need offline map files and to use offline js add-on scripts.
;If your system can be accessed by both the mesh and the internet,
;this may come in handy.
;Just set these next three variables accodingly, if unsure leave them.
meshServerHostName = ""
inetServerHostname = ""
;;Values below control how the map is displayed in map_display.php
;--------------------------------------------------------------
;Map size
; 0 = display the map in full screen.
; 1 = display the map in an iFrame.
map_iFrame_Enabled = "0"
This diff is collapsed.
<?php
if ($_POST['action'] == "add_non_mesh_station") {