Commit f2b982fb authored by Eric - kg6wxc's avatar Eric - kg6wxc
Browse files

Remove usage of the "wxc_custom.inc" file.

There is now a new file: "custom.inc" that can allow the user to make
site specific overrides, keep sql passwords out of the main ini file,
etc...
This is completely optional and not required. The file may even be
safely deleted if wanted.

Also some typo fixing in the README file.
parent 9ef9ddb6
......@@ -31,7 +31,7 @@ INITIAL SETUP FOR A RASPBIAN 9 (Stretch) SYSTEM
Here is an example of creating a mySQL user on Raspbian (which would apply for most linuxes):
sudo mysql
CREATE USER 'mesh-map'@'localhost' IDENTIFIED BY 'password';
GRANT SELECT, INSERT, UPDATE, DELETE, DROP, TRIGGER on node_map.* TO 'mesh-map'@'localhost';
GRANT SELECT, DELETE, DROP, INSERT, TRIGGER, UPDATE on node_map.* TO 'mesh-map'@'localhost';
FLUSH PRIVLEGES;
3: Decompress user-files.tar.gz
......
......@@ -42,6 +42,10 @@ $USER_SETTINGS = parse_ini_file($INCLUDE_DIR . "/scripts/user-settings.ini");
//kg6wxc's functions. (ALWAYS REQUIRED!, change path if you moved it!)
require $INCLUDE_DIR . "/scripts/wxc_functions.inc";
//the custom include file
//the "@" just suppresses any errors if the file is not found, the file is optional
@include $INCLUDE_DIR . "/custom.inc";
/***********************************************************************
*DO NOT CHANGE ANYTHING BELOW HERE UNLESS YOU KNOW WHAT YOU ARE DOING!!!!
************************************************************************/
......@@ -95,8 +99,8 @@ if ($TEST_MODE_NO_SQL) {
//this is probably missing for you, do not worry about it.
//It just contains very site specific things, you don't need it.
@include $INCLUDE_DIR . "/wxc_custom.inc";
$wxc_custom = 0;
//@include $INCLUDE_DIR . "/wxc_custom.inc";
//$wxc_custom = 0;
//(WiP)checks for some things we need to run
//(currently only really checks for the mysqli php extension
......@@ -110,11 +114,11 @@ $currentTime = wxc_getCurrentDateTime();
//it should not effect your site at all.
//It's safe to leave it here unless you have major problems because of it.
//That shouldn't really happen. Don't change unless you know what you are doing.
foreach (get_included_files() as $filename) {
if (strpos($filename, 'wxc_custom.inc')) {
$wxc_custom = 1;
}
}
//foreach (get_included_files() as $filename) {
// if (strpos($filename, 'wxc_custom.inc')) {
// $wxc_custom = 1;
// }
//}
$sql_db_tbl = $USER_SETTINGS['sql_db_tbl'];
$sql_db_tbl_node = $USER_SETTINGS['sql_db_tbl_node'];
......
......@@ -2,12 +2,12 @@
$INCLUDE_DIR = "..";
$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;
}
}
@include $INCLUDE_DIR . "/custom.inc";
//foreach (get_included_files() as $filename) {
// if (strpos($filename, 'wxc_custom.inc')) {
// $wxc_custom = 1;
// }
//}
$ipAddr = $argv[1];
$do_sql = $argv[2];
......
......@@ -2,7 +2,7 @@
$INCLUDE_DIR = "../..";
$USER_SETTINGS = parse_ini_file($INCLUDE_DIR . "/scripts/user-settings.ini");
include $INCLUDE_DIR . "/scripts/wxc_functions.inc";
@include $INCLUDE_DIR . "/wxc_custom.inc";
@include $INCLUDE_DIR . "/custom.inc";
$sqlSrvStatus;
$arname = "";
......
<?php
/*Aug 12, 2017 8:52:20 PM
*non_mesh_stations.php
*Eric Satterlee - KG6WXC aka ride
*Eric Satterlee - KG6WXC
*/
//simple page to add non-mesh stations to the map
$INCLUDE_DIR = "../..";
$USER_SETTINGS = parse_ini_file($INCLUDE_DIR . "/scripts/user-settings.ini");
require $INCLUDE_DIR . "/scripts/wxc_functions.inc";
@include $INCLUDE_DIR . "/wxc_custom.inc";
@include $INCLUDE_DIR . "/custom.inc";
$sql_connection = wxc_connectToMySQL();
......
<?php
/*Aug 13, 2017 9:31:21 PM
*status_updates.php
*Eric Satterlee - KG6WXC aka ride
*Eric Satterlee - KG6WXC
*/
$INCLUDE_DIR = "../..";
$USER_SETTINGS = parse_ini_file($INCLUDE_DIR . "/scripts/user-settings.ini");
include $INCLUDE_DIR . "/scripts/wxc_functions.inc";
@include $INCLUDE_DIR . "/wxc_custom.inc";
@include $INCLUDE_DIR . "/custom.inc";
$sqlSrvStatus;
$arname = "";
......
<?php
/*Aug 6, 2017 4:14:14 PM
*update_location.php
*Eric Satterlee - KG6WXC aka ride
*Eric Satterlee - KG6WXC
*/
//simple page to change node locations on the map
//this page does the actual changing
$INCLUDE_DIR = "../..";
$USER_SETTINGS = parse_ini_file($INCLUDE_DIR . "/scripts/user-settings.ini");
require $INCLUDE_DIR . "/scripts/wxc_functions.inc";
@include $INCLUDE_DIR . "/wxc_custom.inc";
@include $INCLUDE_DIR . "/custom.inc";
$sql_connection = wxc_connectToMySQL();
......
......@@ -3,7 +3,7 @@
$INCLUDE_DIR = "../..";
$USER_SETTINGS = parse_ini_file($INCLUDE_DIR . "/scripts/user-settings.ini");
require $INCLUDE_DIR . "/scripts/wxc_functions.inc";
@include $INCLUDE_DIR . "/wxc_custom.inc";
@include $INCLUDE_DIR . "/custom.inc";
$sql_connection = wxc_connectToMySQL();
......
<?php
/*Aug 7, 2017 9:49:30 AM
*view_removed_nodes.php
*Eric Satterlee - KG6WXC aka ride
*Eric Satterlee - KG6WXC
*/
//simple page to to view removed nodes
//nodes are removed from the main database table
......@@ -9,7 +9,7 @@
$INCLUDE_DIR = "../..";
$USER_SETTINGS = parse_ini_file($INCLUDE_DIR . "/scripts/user-settings.ini");
require $INCLUDE_DIR . "/scripts/wxc_functions.inc";
@include $INCLUDE_DIR . "/wxc_custom.inc";
@include $INCLUDE_DIR . "/custom.inc";
$sql_connection = wxc_connectToMySQL();
......
......@@ -116,7 +116,7 @@ require $INCLUDE_DIR . "/scripts/map_functions.inc";
date_default_timezone_set($USER_SETTINGS['localTimeZone']);
@include $INCLUDE_DIR . "/wxc_custom.inc";
@include $INCLUDE_DIR . "/custom.inc";
/*
* SQL Connections
*********************/
......
......@@ -32,7 +32,7 @@ require $INCLUDE_DIR . "/scripts/wxc_functions.inc";
require $INCLUDE_DIR . "/scripts/map_functions.inc";
date_default_timezone_set($USER_SETTINGS['localTimeZone']);
@include $INCLUDE_DIR . "/wxc_custom.inc";
@include $INCLUDE_DIR . "/custom.inc";
/*
* SQL Connections
*********************/
......
Markdown is supported
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