Added vars to enable/disable endpoint.php and newly added (now blank) location.php to config(.dist).php

This commit is contained in:
Klaus-Uwe Mitterer 2016-08-14 23:58:17 +02:00
parent f93a6eba03
commit e4bad9787f
3 changed files with 6 additions and 0 deletions

View file

@ -5,4 +5,6 @@ $username = "username";
$password = "password";
$dbname = "database";
$endpoint = True;
$access = False;
$location = False;

View file

@ -2,6 +2,10 @@
require_once("config.php");
if (!$endpoint) {
die("Endpoint not enabled in config. You should do something about that.")
}
if (isset($_GET["lat"]) && preg_match("/^-?\d+\.\d+$/", $_GET["lat"]) && isset($_GET["lon"]) && preg_match("/^-?\d+\.\d+$/", $_GET["lon"]) && isset($_GET["device"]) ) {
$conn = new mysqli($servername, $username, $password, $dbname);

0
location.php Normal file
View file