Commit 7ebfcddd authored by Eric - kg6wxc's avatar Eric - kg6wxc
Browse files

Made it so get-map-info and parallel_node_polling cannot be run inside a

browser.

(also testing README.html generation)
parent a0401c80
#!/usr/bin/env php
<?php $mtimeStart = microtime(true);
<?php
if (PHP_SAPI !== 'cli') {
$file = basename($_SERVER['PHP_SELF']);
exit("<style>html{text-align: center;}p{display: inline;}</style>
<br><strong>This script ($file) should only be run from the
<p style='color: red;'>command line</p>!</strong>
<br>exiting...");
}
$mtimeStart = microtime(true);
/*************************************************************************************
* get-map-info script v2 by kg6wxc\eric satterlee kg6wxc@gmail.com
* get-map-info script v3 by kg6wxc\eric satterlee kg6wxc@gmail.com
* This script is the heart of kg6wxcs' mesh map system.
* bug fixes, improvements and corrections are welcomed!
*
* One Script to rule them all!!
*
* Mid April 2018
* Added the above check for CLI environment, this script should not be run in the browser!
* It will now exit if you try to do so.
* Cleaned up the Array generation in the map_functions file, PHP 7.2.3 barfed all over before,
* It is now done properly and has been tested on php5 and php7.
* moved the entire system to a new private git repo.
* more to come....
*
*
*late march 2017
*Many, many updates and changes.
......
<?php
if (PHP_SAPI !== 'cli') {
$file = basename($_SERVER['PHP_SELF']);
exit("<style>html{text-align: center;}p{display: inline;}</style>
<br><strong>This script ($file) should only be run from the
<p style='color: red;'>command line</p>!</strong>
<br>exiting...");
}
$INCLUDE_DIR = "..";
$USER_SETTINGS = parse_ini_file($INCLUDE_DIR . "/scripts/user-settings.ini");
require $INCLUDE_DIR . "/scripts/wxc_functions.inc";
......@@ -27,9 +34,9 @@ if($sysinfoJson === FALSE) {
wxc_checkErrorMessage($error, $ipAddr);
//got nothing...
break;
//break;
//just skip the next IP
continue;
//continue;
}else {
//node is there, get all the info we can
//get all the data from the json file and decode it
......@@ -37,7 +44,7 @@ if($sysinfoJson === FALSE) {
//if there's nothing really there just skip to the next IP
if (!$result) {
continue;
//continue;
}
//first let's see what node we are dealing with
//$node = $GLOBALS['node'] = $result['node'];
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment