Template system add for public facing pages.

pull/67/head
Joe Prochazka 2016-01-21 13:37:28 -05:00
rodzic 095a25e624
commit e64ed7727f
21 zmienionych plików z 890 dodań i 752 usunięć

Wyświetl plik

@ -1,108 +1,108 @@
<?php
/*
#####################################################################################
# ADS-B FEEDER #
#####################################################################################
# #
# A set of scripts created to automate the process of installing the software #
# needed to setup a Mode S decoder as well as feeders which are capable of #
# sharing your ADS-B results with many of the most popular ADS-B aggregate sites. #
# #
# Project Hosted On GitHub: https://github.com/jprochazka/adsb-feeder #
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# Copyright (c) 2015 Joseph A. Prochazka #
# #
# Permission is hereby granted, free of charge, to any person obtaining a copy #
# of this software and associated documentation files (the "Software"), to deal #
# in the Software without restriction, including without limitation the rights #
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell #
# copies of the Software, and to permit persons to whom the Software is #
# furnished to do so, subject to the following conditions: #
# #
# The above copyright notice and this permission notice shall be included in all #
# copies or substantial portions of the Software. #
# #
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE #
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, #
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE #
# SOFTWARE. #
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
*/
session_start();
echo "Authenticated: ".$_SESSION['authenticated'].'<br />';
echo "Login: ".$_SESSION['login'].'<br />';
echo "First Login: ".$_SESSION['firstLogin'].'<br />';
// Load the require PHP classes.
require_once('classes/common.class.php');
require_once('classes/account.class.php');
$common = new common();
$account = new account();
// Check if the user is logged in.
if (!$account->isAuthenticated()) {
// The user is not logged in so forward them to the login page.
header ("Location: login.php?origin=".urlencode('account.php'));
}
if ($common->postBack()) {
echo "POSTBACK!";
// Check that the user supplied a password matching the one currently stored in administrators.xml.
$authenticated = $account->authenticate($_SESSION['login'], $_POST['password'], FALSE, FALSE);
// Check that the supplied passwords match.
if ($authenticated && $_POST['password1'] == $_POST['password2']) {
echo "AUTHENTICATED!";
// Change the password stored in administrators.xml related to this users login.
$account->changePassword($_SESSION['login'], $_POST['password1']);
// Since the password has changed we will log the user out to clear older session variables.
$account->logout();
}
}
require_once('includes/header.include.php');
/////////////////////
// BEGIN HTML BODY //
?>
<div>You must change your current password before continuing.</div>
<div>The password for this account has been changed successfully.</div>
<div>You must supply the correct current password for this account.</div>
<div>The passwords supplied for the new password did not match.</div>
<form method="post" action="account.php">
<div>
<label for="password">Current Password:</label>
<input type="password" name="password">
</div>
<div>
<label for="password1">New Password:</label>
<input type="password" name="password1">
</div>
<div>
<label for="password2">Confirm Password:</label>
<input type="password" name="password2">
</div>
<input type="submit" value="Change Password">
</form>
<?php
// END HTML BODY //
///////////////////
require_once('includes/footer.include.php');
?>
<?php
/*
#####################################################################################
# ADS-B FEEDER #
#####################################################################################
# #
# A set of scripts created to automate the process of installing the software #
# needed to setup a Mode S decoder as well as feeders which are capable of #
# sharing your ADS-B results with many of the most popular ADS-B aggregate sites. #
# #
# Project Hosted On GitHub: https://github.com/jprochazka/adsb-feeder #
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# Copyright (c) 2015 Joseph A. Prochazka #
# #
# Permission is hereby granted, free of charge, to any person obtaining a copy #
# of this software and associated documentation files (the "Software"), to deal #
# in the Software without restriction, including without limitation the rights #
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell #
# copies of the Software, and to permit persons to whom the Software is #
# furnished to do so, subject to the following conditions: #
# #
# The above copyright notice and this permission notice shall be included in all #
# copies or substantial portions of the Software. #
# #
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE #
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, #
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE #
# SOFTWARE. #
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
*/
session_start();
echo "Authenticated: ".$_SESSION['authenticated'].'<br />';
echo "Login: ".$_SESSION['login'].'<br />';
echo "First Login: ".$_SESSION['firstLogin'].'<br />';
// Load the require PHP classes.
require_once('../classes/common.class.php');
require_once('../classes/account.class.php');
$common = new common();
$account = new account();
// Check if the user is logged in.
if (!$account->isAuthenticated()) {
// The user is not logged in so forward them to the login page.
header ("Location: login.php?origin=".urlencode('account.php'));
}
if ($common->postBack()) {
echo "POSTBACK!";
// Check that the user supplied a password matching the one currently stored in administrators.xml.
$authenticated = $account->authenticate($_SESSION['login'], $_POST['password'], FALSE, FALSE);
// Check that the supplied passwords match.
if ($authenticated && $_POST['password1'] == $_POST['password2']) {
echo "AUTHENTICATED!";
// Change the password stored in administrators.xml related to this users login.
$account->changePassword($_SESSION['login'], $_POST['password1']);
// Since the password has changed we will log the user out to clear older session variables.
$account->logout();
}
}
require_once('includes/header.include.php');
/////////////////////
// BEGIN HTML BODY //
?>
<div>You must change your current password before continuing.</div>
<div>The password for this account has been changed successfully.</div>
<div>You must supply the correct current password for this account.</div>
<div>The passwords supplied for the new password did not match.</div>
<form method="post" action="account.php">
<div>
<label for="password">Current Password:</label>
<input type="password" name="password">
</div>
<div>
<label for="password1">New Password:</label>
<input type="password" name="password1">
</div>
<div>
<label for="password2">Confirm Password:</label>
<input type="password" name="password2">
</div>
<input type="submit" value="Change Password">
</form>
<?php
// END HTML BODY //
///////////////////
require_once('includes/footer.include.php');
?>

Wyświetl plik

@ -1,38 +1,38 @@
body {
padding-top: 40px;
padding-bottom: 40px;
background-color: #eee;
}
.form-signin {
max-width: 330px;
padding: 15px;
margin: 0 auto;
}
.form-signin .form-signin-heading, .form-signin .checkbox {
margin-bottom: 10px;
}
.form-signin .checkbox {
font-weight: normal;
}
.form-signin .form-control {
position: relative;
height: auto;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 10px;
font-size: 16px;
}
.form-signin .form-control:focus {
z-index: 2;
}
.form-signin input[type="email"] {
margin-bottom: -1px;
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
}
.form-signin input[type="password"] {
margin-bottom: 10px;
border-top-left-radius: 0;
border-top-right-radius: 0;
}
body {
padding-top: 40px;
padding-bottom: 40px;
background-color: #eee;
}
.form-signin {
max-width: 330px;
padding: 15px;
margin: 0 auto;
}
.form-signin .form-signin-heading, .form-signin .checkbox {
margin-bottom: 10px;
}
.form-signin .checkbox {
font-weight: normal;
}
.form-signin .form-control {
position: relative;
height: auto;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 10px;
font-size: 16px;
}
.form-signin .form-control:focus {
z-index: 2;
}
.form-signin input[type="email"] {
margin-bottom: -1px;
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
}
.form-signin input[type="password"] {
margin-bottom: 10px;
border-top-left-radius: 0;
border-top-right-radius: 0;
}

Wyświetl plik

@ -1,68 +1,68 @@
<?php
/*
#####################################################################################
# ADS-B FEEDER #
#####################################################################################
# #
# A set of scripts created to automate the process of installing the software #
# needed to setup a Mode S decoder as well as feeders which are capable of #
# sharing your ADS-B results with many of the most popular ADS-B aggregate sites. #
# #
# Project Hosted On GitHub: https://github.com/jprochazka/adsb-feeder #
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# Copyright (c) 2015 Joseph A. Prochazka #
# #
# Permission is hereby granted, free of charge, to any person obtaining a copy #
# of this software and associated documentation files (the "Software"), to deal #
# in the Software without restriction, including without limitation the rights #
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell #
# copies of the Software, and to permit persons to whom the Software is #
# furnished to do so, subject to the following conditions: #
# #
# The above copyright notice and this permission notice shall be included in all #
# copies or substantial portions of the Software. #
# #
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE #
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, #
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE #
# SOFTWARE. #
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
*/
session_start();
// Load the require PHP classes.
require_once('classes/common.class.php');
require_once('classes/account.class.php');
$common = new common();
$account = new account();
// Check if the user is logged in.
if (!$account->isAuthenticated()) {
// The user is not logged in so forward them to the login page.
header ("Location: login.php");
}
echo "Authenticated: ".$_SESSION['authenticated'].'<br />';
echo "Login: ".$_SESSION['login'].'<br />';
echo "First Login: ".$_SESSION['firstLogin'].'<br />';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title></title>
</head>
<body>
index.php
</body>
</html>
<?php
/*
#####################################################################################
# ADS-B FEEDER #
#####################################################################################
# #
# A set of scripts created to automate the process of installing the software #
# needed to setup a Mode S decoder as well as feeders which are capable of #
# sharing your ADS-B results with many of the most popular ADS-B aggregate sites. #
# #
# Project Hosted On GitHub: https://github.com/jprochazka/adsb-feeder #
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# Copyright (c) 2015 Joseph A. Prochazka #
# #
# Permission is hereby granted, free of charge, to any person obtaining a copy #
# of this software and associated documentation files (the "Software"), to deal #
# in the Software without restriction, including without limitation the rights #
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell #
# copies of the Software, and to permit persons to whom the Software is #
# furnished to do so, subject to the following conditions: #
# #
# The above copyright notice and this permission notice shall be included in all #
# copies or substantial portions of the Software. #
# #
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE #
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, #
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE #
# SOFTWARE. #
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
*/
session_start();
// Load the require PHP classes.
require_once('../classes/common.class.php');
require_once('../classes/account.class.php');
$common = new common();
$account = new account();
// Check if the user is logged in.
if (!$account->isAuthenticated()) {
// The user is not logged in so forward them to the login page.
header ("Location: login.php");
}
echo "Authenticated: ".$_SESSION['authenticated'].'<br />';
echo "Login: ".$_SESSION['login'].'<br />';
echo "First Login: ".$_SESSION['firstLogin'].'<br />';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title></title>
</head>
<body>
index.php
</body>
</html>

Wyświetl plik

@ -1,122 +1,122 @@
<?php
/*
#####################################################################################
# ADS-B FEEDER #
#####################################################################################
# #
# A set of scripts created to automate the process of installing the software #
# needed to setup a Mode S decoder as well as feeders which are capable of #
# sharing your ADS-B results with many of the most popular ADS-B aggregate sites. #
# #
# Project Hosted On GitHub: https://github.com/jprochazka/adsb-feeder #
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# Copyright (c) 2015 Joseph A. Prochazka #
# #
# Permission is hereby granted, free of charge, to any person obtaining a copy #
# of this software and associated documentation files (the "Software"), to deal #
# in the Software without restriction, including without limitation the rights #
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell #
# copies of the Software, and to permit persons to whom the Software is #
# furnished to do so, subject to the following conditions: #
# #
# The above copyright notice and this permission notice shall be included in all #
# copies or substantial portions of the Software. #
# #
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE #
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, #
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE #
# SOFTWARE. #
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
*/
///////////////////////////////
// Default Login Information //
///////////////////////////////
// Login: admin //
// Password: adsbfeeder //
///////////////////////////////
session_start();
// Load the require PHP classes.
require_once('classes/common.class.php');
require_once('classes/account.class.php');
$common = new common();
$account = new account();
// Check if the user is already logged in.
if ($account->isAuthenticated()) {
if (isset($_REQUEST['origin'])) {
// Redirect the authenticated visitor to their original destination.
header ("Location: ".urldecode($_REQUEST['origin']));
} else {
// Redirect the user to the administration homepage.
header ("Location: index.php");
}
}
if ($common->postBack()) {
// Try to authenticate the user using the credentials supplied.
$remember = (isset($_POST['remember']) ? TRUE : FALSE);
$origin = (isset($_REQUEST['origin']) ? $_REQUEST['origin'] : NULL);
$authenticated = $account->authenticate($_POST['login'], $_POST['password'], $remember, TRUE, $origin);
}
/////////////////////
// BEGIN HTML BODY //
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title></title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" />
<link rel="stylesheet" href="../assets/css/admin.login.css" />
</head>
<body>
<div class="container">
<?php
// If authentication failed display the following error message.
if ($common->postBack() && !$authenticated) {
?>
<div>The supplied login and/or password did not match.</div>
<?php
}
?>
<form class="form-signin" method="post" action="login.php">
<h2 class="form-signin-heading">ADS-B Feeder Login</h2>
<div>
<label for="login" class="sr-only">Login</label>
<input type="text" id="login" name="login" class="form-control" placeholder="Login" required autofocus>
</div>
<div>
<label for="password" class="sr-only">Password</label>
<input type="password" id="password" name="password" class="form-control" placeholder="Password" required autofocus>
</div>
<div class="checkbox">
<label>
<input type="checkbox" name="remember" value="TRUE"> Remember me
</label>
</div>
<input type="submit" value="Login" class="btn btn-lg btn-primary btn-block">
</form>
</div>
<script type="text/javascript" src="//code.jquery.com/jquery-2.1.4.min.js"></script>
<script type="text/javascript" src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
</body>
</html>
<?php
// END HTML BODY //
///////////////////
?>
<?php
/*
#####################################################################################
# ADS-B FEEDER #
#####################################################################################
# #
# A set of scripts created to automate the process of installing the software #
# needed to setup a Mode S decoder as well as feeders which are capable of #
# sharing your ADS-B results with many of the most popular ADS-B aggregate sites. #
# #
# Project Hosted On GitHub: https://github.com/jprochazka/adsb-feeder #
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# Copyright (c) 2015 Joseph A. Prochazka #
# #
# Permission is hereby granted, free of charge, to any person obtaining a copy #
# of this software and associated documentation files (the "Software"), to deal #
# in the Software without restriction, including without limitation the rights #
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell #
# copies of the Software, and to permit persons to whom the Software is #
# furnished to do so, subject to the following conditions: #
# #
# The above copyright notice and this permission notice shall be included in all #
# copies or substantial portions of the Software. #
# #
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE #
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, #
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE #
# SOFTWARE. #
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
*/
///////////////////////////////
// Default Login Information //
///////////////////////////////
// Login: admin //
// Password: adsbfeeder //
///////////////////////////////
session_start();
// Load the require PHP classes.
require_once('../classes/common.class.php');
require_once('../classes/account.class.php');
$common = new common();
$account = new account();
// Check if the user is already logged in.
if ($account->isAuthenticated()) {
if (isset($_REQUEST['origin'])) {
// Redirect the authenticated visitor to their original destination.
header ("Location: ".urldecode($_REQUEST['origin']));
} else {
// Redirect the user to the administration homepage.
header ("Location: index.php");
}
}
if ($common->postBack()) {
// Try to authenticate the user using the credentials supplied.
$remember = (isset($_POST['remember']) ? TRUE : FALSE);
$origin = (isset($_REQUEST['origin']) ? $_REQUEST['origin'] : NULL);
$authenticated = $account->authenticate($_POST['login'], $_POST['password'], $remember, TRUE, $origin);
}
/////////////////////
// BEGIN HTML BODY //
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title></title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" />
<link rel="stylesheet" href="assets/css/login.css" />
</head>
<body>
<div class="container">
<?php
// If authentication failed display the following error message.
if ($common->postBack() && !$authenticated) {
?>
<div>The supplied login and/or password did not match.</div>
<?php
}
?>
<form class="form-signin" method="post" action="login.php">
<h2 class="form-signin-heading">ADS-B Feeder Login</h2>
<div>
<label for="login" class="sr-only">Login</label>
<input type="text" id="login" name="login" class="form-control" placeholder="Login" required autofocus>
</div>
<div>
<label for="password" class="sr-only">Password</label>
<input type="password" id="password" name="password" class="form-control" placeholder="Password" required autofocus>
</div>
<div class="checkbox">
<label>
<input type="checkbox" name="remember" value="TRUE"> Remember me
</label>
</div>
<input type="submit" value="Login" class="btn btn-lg btn-primary btn-block">
</form>
</div>
<script type="text/javascript" src="//code.jquery.com/jquery-2.1.4.min.js"></script>
<script type="text/javascript" src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
</body>
</html>
<?php
// END HTML BODY //
///////////////////
?>

Wyświetl plik

@ -1,134 +1,134 @@
<?php
/*
#####################################################################################
# ADS-B FEEDER #
#####################################################################################
# #
# A set of scripts created to automate the process of installing the software #
# needed to setup a Mode S decoder as well as feeders which are capable of #
# sharing your ADS-B results with many of the most popular ADS-B aggregate sites. #
# #
# Project Hosted On GitHub: https://github.com/jprochazka/adsb-feeder #
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# Copyright (c) 2015 Joseph A. Prochazka #
# #
# Permission is hereby granted, free of charge, to any person obtaining a copy #
# of this software and associated documentation files (the "Software"), to deal #
# in the Software without restriction, including without limitation the rights #
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell #
# copies of the Software, and to permit persons to whom the Software is #
# furnished to do so, subject to the following conditions: #
# #
# The above copyright notice and this permission notice shall be included in all #
# copies or substantial portions of the Software. #
# #
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE #
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, #
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE #
# SOFTWARE. #
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
*/
class account {
/////////////////////////////////////////////////////////
// Check if the administrator is authenticated or not.
function isAuthenticated() {
// Check if the remeber me cookie is set and if so set sessions variables using the stored values.
if (isset($_COOKIE['login']) && isset($_COOKIE['authenticated']) && isset($_COOKIE['firstLogin']) && $_COOKIE['authenticated']) {
$_SESSION['authenticated'] = TRUE;
$_SESSION['login'] = $_COOKIE['login'];
$_SESSION['firstLogin'] = $_COOKIE['firstLogin'];
} else {
// Unset any cookies pertaining to user authentication since something is wrong or missing.
unset($_COOKIE["authenticated"]);
unset($_COOKIE["login"]);
unset($_COOKIE["firstLogin"]);
}
// Make sure that the session variable Authenticated is set to TRUE and that the session Login variable is set.
if (isset($_SESSION['login']) && isset($_SESSION['authenticated']) && isset($_SESSION['firstLogin']) && $_SESSION['authenticated']) {
if ($_SESSION['firstLogin'] && basename($_SERVER['PHP_SELF']) != "account.php") {
header ("Location: account.php");
}
return TRUE;
}
return FALSE;
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Authenticate an administrator by comparing their supplied login and password with the ones stored in administrators.xml.
function authenticate($login, $password, $remember = FALSE, $forward = TRUE, $origin = NULL) {
$common = new common();
// Get all the administrators from the administrators.xml file.
$administrators = simplexml_load_file("../data/administrators.xml") or die("Error: Cannot create administrators object");
foreach ($administrators as $administrator) {
// If or when we get to a matching login compare the supplied password to the one stored inadministrators.xml.
if ($administrator->login == $login) {
if (password_verify($password, $administrator->password)) {
// Set the session variable Authenticated to TRUE and assign the variable Login the supplied login.
$_SESSION['authenticated'] = TRUE;
$_SESSION['login'] = $login;
$_SESSION['firstLogin'] = $common->stringToBoolean($administrator->firstLogin);
// If the user wishes to be remembered set a cookie containg the authenticated and login variables.
if ($remember) {
setcookie("authenticated", TRUE, time() + (10 * 365 * 24 * 60 * 60));
setcookie("login", $login, time() + (10 * 365 * 24 * 60 * 60));
setcookie("firstLogin", $common->stringToBoolean($administrator->firstLogin), time() + (10 * 365 * 24 * 60 * 60));
}
// Forward the user if the $forward variable is set to TRUE.
if ($forward) {
if (isset($origin)) {
// Redirect the authenticated visitor to their original destination.
header ("Location: ".urldecode($origin));
} else {
// Redirect the user to the administration homepage.
header ("Location: index.php");
}
}
return TRUE;
}
}
}
// If things got this far authentication failed.
return FALSE;
}
//////////////////////////////////////////////////////////////////////////////////////////////////
// Logs the user out by deleting current session varialbes related to administrative functions.
function logout() {
// Unset any session variables pertaining to user authentication.
unset($_SESSION['authenticated']);
unset($_SESSION['login']);
unset($_SESSION['firstLogin']);
// Unset any cookies pertaining to user authentication.
unset($_COOKIE["authenticated"]);
unset($_COOKIE["login"]);
unset($_COOKIE["firstLogin"]);
// Redirect the user to the main homepage.
header ("Location: login.php");
}
////////////////////////////////////////////////////////////////////////////////////////////
// Change a password stored for an existing administrator in the file administrators.xml.
function changePassword($login, $password) {
$administrators = simplexml_load_file("../data/administrators.xml") or die("Error: Cannot create administrators object");
foreach ($administrators->xpath("administrator[login='".$login."']") as $administrator) {
$administrator->password = password_hash($password, PASSWORD_DEFAULT);
$administrator->firstLogin = "FALSE";
}
file_put_contents("../data/administrators.xml", $administrators->asXML());
}
}
?>
<?php
/*
#####################################################################################
# ADS-B FEEDER #
#####################################################################################
# #
# A set of scripts created to automate the process of installing the software #
# needed to setup a Mode S decoder as well as feeders which are capable of #
# sharing your ADS-B results with many of the most popular ADS-B aggregate sites. #
# #
# Project Hosted On GitHub: https://github.com/jprochazka/adsb-feeder #
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# Copyright (c) 2015 Joseph A. Prochazka #
# #
# Permission is hereby granted, free of charge, to any person obtaining a copy #
# of this software and associated documentation files (the "Software"), to deal #
# in the Software without restriction, including without limitation the rights #
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell #
# copies of the Software, and to permit persons to whom the Software is #
# furnished to do so, subject to the following conditions: #
# #
# The above copyright notice and this permission notice shall be included in all #
# copies or substantial portions of the Software. #
# #
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE #
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, #
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE #
# SOFTWARE. #
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
*/
class account {
/////////////////////////////////////////////////////////
// Check if the administrator is authenticated or not.
function isAuthenticated() {
// Check if the remeber me cookie is set and if so set sessions variables using the stored values.
if (isset($_COOKIE['login']) && isset($_COOKIE['authenticated']) && isset($_COOKIE['firstLogin']) && $_COOKIE['authenticated']) {
$_SESSION['authenticated'] = TRUE;
$_SESSION['login'] = $_COOKIE['login'];
$_SESSION['firstLogin'] = $_COOKIE['firstLogin'];
} else {
// Unset any cookies pertaining to user authentication since something is wrong or missing.
unset($_COOKIE["authenticated"]);
unset($_COOKIE["login"]);
unset($_COOKIE["firstLogin"]);
}
// Make sure that the session variable Authenticated is set to TRUE and that the session Login variable is set.
if (isset($_SESSION['login']) && isset($_SESSION['authenticated']) && isset($_SESSION['firstLogin']) && $_SESSION['authenticated']) {
if ($_SESSION['firstLogin'] && basename($_SERVER['PHP_SELF']) != "account.php") {
header ("Location: account.php");
}
return TRUE;
}
return FALSE;
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Authenticate an administrator by comparing their supplied login and password with the ones stored in administrators.xml.
function authenticate($login, $password, $remember = FALSE, $forward = TRUE, $origin = NULL) {
$common = new common();
// Get all the administrators from the administrators.xml file.
$administrators = simplexml_load_file("../data/administrators.xml") or die("Error: Cannot create administrators object");
foreach ($administrators as $administrator) {
// If or when we get to a matching login compare the supplied password to the one stored inadministrators.xml.
if ($administrator->login == $login) {
if (password_verify($password, $administrator->password)) {
// Set the session variable Authenticated to TRUE and assign the variable Login the supplied login.
$_SESSION['authenticated'] = TRUE;
$_SESSION['login'] = $login;
$_SESSION['firstLogin'] = $common->stringToBoolean($administrator->firstLogin);
// If the user wishes to be remembered set a cookie containg the authenticated and login variables.
if ($remember) {
setcookie("authenticated", TRUE, time() + (10 * 365 * 24 * 60 * 60));
setcookie("login", $login, time() + (10 * 365 * 24 * 60 * 60));
setcookie("firstLogin", $common->stringToBoolean($administrator->firstLogin), time() + (10 * 365 * 24 * 60 * 60));
}
// Forward the user if the $forward variable is set to TRUE.
if ($forward) {
if (isset($origin)) {
// Redirect the authenticated visitor to their original destination.
header ("Location: ".urldecode($origin));
} else {
// Redirect the user to the administration homepage.
header ("Location: index.php");
}
}
return TRUE;
}
}
}
// If things got this far authentication failed.
return FALSE;
}
//////////////////////////////////////////////////////////////////////////////////////////////////
// Logs the user out by deleting current session varialbes related to administrative functions.
function logout() {
// Unset any session variables pertaining to user authentication.
unset($_SESSION['authenticated']);
unset($_SESSION['login']);
unset($_SESSION['firstLogin']);
// Unset any cookies pertaining to user authentication.
unset($_COOKIE["authenticated"]);
unset($_COOKIE["login"]);
unset($_COOKIE["firstLogin"]);
// Redirect the user to the main homepage.
header ("Location: login.php");
}
////////////////////////////////////////////////////////////////////////////////////////////
// Change a password stored for an existing administrator in the file administrators.xml.
function changePassword($login, $password) {
$administrators = simplexml_load_file("../data/administrators.xml") or die("Error: Cannot create administrators object");
foreach ($administrators->xpath("administrator[login='".$login."']") as $administrator) {
$administrator->password = password_hash($password, PASSWORD_DEFAULT);
$administrator->firstLogin = "FALSE";
}
file_put_contents("../data/administrators.xml", $administrators->asXML());
}
}
?>

Wyświetl plik

@ -1,68 +1,88 @@
<?php
/*
#####################################################################################
# ADS-B FEEDER #
#####################################################################################
# #
# A set of scripts created to automate the process of installing the software #
# needed to setup a Mode S decoder as well as feeders which are capable of #
# sharing your ADS-B results with many of the most popular ADS-B aggregate sites. #
# #
# Project Hosted On GitHub: https://github.com/jprochazka/adsb-feeder #
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# Copyright (c) 2015 Joseph A. Prochazka #
# #
# Permission is hereby granted, free of charge, to any person obtaining a copy #
# of this software and associated documentation files (the "Software"), to deal #
# in the Software without restriction, including without limitation the rights #
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell #
# copies of the Software, and to permit persons to whom the Software is #
# furnished to do so, subject to the following conditions: #
# #
# The above copyright notice and this permission notice shall be included in all #
# copies or substantial portions of the Software. #
# #
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE #
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, #
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE #
# SOFTWARE. #
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
*/
class common {
////////////////////////////////////////
// Check if page load is a post back.
function postBack() {
if (empty($_SERVER['HTTP_REFERER'])) {
return FALSE;
}
$methodUsed = strtoupper($_SERVER['REQUEST_METHOD']);
$referer = strtolower(basename($_SERVER['HTTP_REFERER']));
$thisScript = strtolower(basename($_SERVER['SCRIPT_NAME']));
if ($methodUsed == 'POST' && $referer == $thisScript) {
return TRUE;
}
return FALSE;
}
/////////////////////////////////////
// Return a boolean from a string.
function stringToBoolean($value) {
switch(strtoupper($value)) {
case 'TRUE': return TRUE;
case 'FALSE': return FALSE;
default: return NULL;
}
}
}
?>
<?php
/*
#####################################################################################
# ADS-B FEEDER #
#####################################################################################
# #
# A set of scripts created to automate the process of installing the software #
# needed to setup a Mode S decoder as well as feeders which are capable of #
# sharing your ADS-B results with many of the most popular ADS-B aggregate sites. #
# #
# Project Hosted On GitHub: https://github.com/jprochazka/adsb-feeder #
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# Copyright (c) 2015 Joseph A. Prochazka #
# #
# Permission is hereby granted, free of charge, to any person obtaining a copy #
# of this software and associated documentation files (the "Software"), to deal #
# in the Software without restriction, including without limitation the rights #
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell #
# copies of the Software, and to permit persons to whom the Software is #
# furnished to do so, subject to the following conditions: #
# #
# The above copyright notice and this permission notice shall be included in all #
# copies or substantial portions of the Software. #
# #
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE #
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, #
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE #
# SOFTWARE. #
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
*/
class common {
////////////////////////////////////////
// Check if page load is a post back.
function postBack() {
if (empty($_SERVER['HTTP_REFERER'])) {
return FALSE;
}
$methodUsed = strtoupper($_SERVER['REQUEST_METHOD']);
$referer = strtolower(basename($_SERVER['HTTP_REFERER']));
$thisScript = strtolower(basename($_SERVER['SCRIPT_NAME']));
if ($methodUsed == 'POST' && $referer == $thisScript) {
return TRUE;
}
return FALSE;
}
/////////////////////////////////////
// Return a boolean from a string.
function stringToBoolean($value) {
switch(strtoupper($value)) {
case 'TRUE': return TRUE;
case 'FALSE': return FALSE;
default: return NULL;
}
}
//////////////////////////////////////////////////////////
// Returns the supplied file name without an extension.
function removeExtension($fileName) {
return pathinfo($fileName, PATHINFO_FILENAME);
}
///////////////////////////////////////////////////////
// Returns the value for the specified setting name.
function getSetting($name) {
$settings = simplexml_load_file("../data/setting.xml") or die("Error: Cannot create settings object");
foreach ($settings as $setting) {
if ($setting->name == $name) {
return $setting->value
}
}
return "default";
}
}
?>

Wyświetl plik

@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <administrators>
<administrator>
<login>admin</login>
<password>$2y$10$uDSOA6NhbgmtMAiNp.QAROD/PG6RUQE/m0xp6fRgo5/TBkMWxReBq</password>
<firstLogin>TRUE</firstLogin>
</administrator>
</administrators>
<?xml version="1.0" encoding="utf-8"?>
<administrators>
<administrator>
<login>admin</login>
<password>$2y$10$uDSOA6NhbgmtMAiNp.QAROD/PG6RUQE/m0xp6fRgo5/TBkMWxReBq</password>
<firstLogin>TRUE</firstLogin>
</administrator>
</administrators>

Wyświetl plik

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8" ?>
<settings>
<setting>
<name>siteName</name>
<value>ADS-B Feeder</value>
</setting>
<setting>
<name>template</name>
<value>default</value>
</setting>
<setting>
<name>enableGraphs</name>
<value>true</value>
</setting>
<setting>
<name>enableDump1090</name>
<value>true</value>
</setting>
<setting>
<name>enableDump978</name>
<value>true</value>
</setting>
<setting>
<name>enablePfclient</name>
<value>true</value>
</setting>
</settings>

Wyświetl plik

@ -1,26 +1,46 @@
<div id="wrapper">
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">ADS-B Feeder</a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li id="graphs-link"><a href="/graphs/">Performance Graphs</a></li>
<li id="map-link" class="active"><a href="/map/">Live Dump1090 Map</a></li>
<!-- Plane Finder ADS-B Client Link Placeholder -->
</ul>
</div>
</div>
</nav>
<div id="iframe-wrapper">
<iframe id="map" src="/dump1090/gmap.html"></iframe>
</div>
<div id="push"></div>
</div>
<?php
/////////////////////////////////////////////////////////////////////////////////////
// ADS-B FEEDER PORTAL //
// =============================================================================== //
// Copyright and Licensing Information: //
// //
// The MIT License (MIT) //
// //
// Copyright (c) 2015 Joseph A. Prochazka //
// //
// Permission is hereby granted, free of charge, to any person obtaining a copy //
// of this software and associated documentation files (the "Software"), to deal //
// in the Software without restriction, including without limitation the rights //
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell //
// copies of the Software, and to permit persons to whom the Software is //
// furnished to do so, subject to the following conditions: //
// //
// The above copyright notice and this permission notice shall be included in all //
// copies or substantial portions of the Software. //
// //
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR //
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, //
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE //
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER //
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, //
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE //
// SOFTWARE. //
/////////////////////////////////////////////////////////////////////////////////////
// Start session
session_start();
// Load the common PHP classes.
require_once('classes/common.class.php');
$common = new common();
// Get the name of the template to use from the settings.
$template = $common->getSetting("template");
// Include the index template.
require_once('templates/'.$template.'/dump1090.tpl.php');
// Include the master template.
require_once('templates/'.$template.'/master.tpl.php');
?>

Wyświetl plik

@ -0,0 +1,42 @@
<?php
/////////////////////////////////////////////////////////////////////////////////////
// ADS-B FEEDER PORTAL //
// =============================================================================== //
// Copyright and Licensing Information: //
// //
// The MIT License (MIT) //
// //
// Copyright (c) 2015 Joseph A. Prochazka //
// //
// Permission is hereby granted, free of charge, to any person obtaining a copy //
// of this software and associated documentation files (the "Software"), to deal //
// in the Software without restriction, including without limitation the rights //
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell //
// copies of the Software, and to permit persons to whom the Software is //
// furnished to do so, subject to the following conditions: //
// //
// The above copyright notice and this permission notice shall be included in all //
// copies or substantial portions of the Software. //
// //
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR //
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, //
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE //
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER //
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, //
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE //
// SOFTWARE. //
/////////////////////////////////////////////////////////////////////////////////////
// Start session
session_start();
// Get the name of the template to use from the settings.
$template = getSetting("template");
// Include the index template.
require_once('templates/'.$template.'/dump978.tpl.php');
// Include the master template.
require_once('templates/'.$template.'/master.tpl.php');
?>

Wyświetl plik

@ -1,159 +0,0 @@
<?php
?>
<div id="wrapper">
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">ADS-B Feeder</a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li id="graphs-link" class="active"><a href="/graphs/">Performance Graphs</a></li>
<li id="map-link"><a href="/map/">Live Dump1090 Map</a></li>
<!-- Plane Finder ADS-B Client Link Placeholder -->
</ul>
</div>
</div>
</nav>
<div class="container">
<h1>Performance Graphs</h1>
<div class="btn-group" role="group">
<button type="button" id="btn-1h" class="btn btn-default btn-sm active" onclick="switchView('1h')">Hourly</button>
<button type="button" id="btn-6h" class="btn btn-default btn-sm" onclick="switchView('6h')">Six Hours</button>
<button type="button" id="btn-24h" class="btn btn-default btn-sm" onclick="switchView('24h')">Daily</button>
<button type="button" id="btn-7d" class="btn btn-default btn-sm" onclick="switchView('7d')">Weekly</button>
<button type="button" id="btn-30d" class="btn btn-default btn-sm" onclick="switchView('30d')">Monthly</button>
<button type="button" id="btn-365d" class="btn btn-default btn-sm" onclick="switchView('365d')">Yearly</button>
</div>
<div class="padding"></div>
<!-- Dump1090 Graphs -->
<div class="panel panel-default">
<div class="panel-heading">Dump1090 Graphs</div>
<div class="panel-body">
<div class="row">
<div class="col-md-12 text-center">
<a id ="dump1090-local_trailing_rate-link" href="#">
<img id="dump1090-local_trailing_rate-image" class="img-responsive" src="#" alt="Message Rate (Trailing)">
</a>
</div>
</div>
<div class="padding"></div>
<div class="row">
<div class="col-md-6 text-center">
<a id ="dump1090-aircraft-link" href="#">
<img id="dump1090-aircraft-image" class="img-responsive" src="#" alt="Aircraft Seen">
</a>
</div>
<div class="col-md-6 text-center">
<a id ="dump1090-tracks-link" href="#">
<img id="dump1090-tracks-image" class="img-responsive" src="#" alt="Tracks Seen">
</a>
</div>
</div>
<div class="padding"></div>
<div class="row">
<div class="col-md-6 text-center">
<a id ="dump1090-range-link" href="#">
<img id="dump1090-range-image" class="img-responsive" src="#" alt="Max Range">
</a>
</div>
<div class="col-md-6 text-center">
<a id ="dump1090-signal-link" href="#">
<img id="dump1090-signal-image" class="img-responsive" src="#" alt="Signal Level">
</a>
</div>
</div>
<div class="padding"></div>
<div class="row">
<div class="col-md-6 text-center">
<a id ="dump1090-local_rate-link" href="#">
<img id="dump1090-local_rate-image" class="img-responsive" src="#" alt="Message Rate">
</a>
</div>
<div class="col-md-6 text-center">
<a id ="dump1090-cpu-link" href="#">
<img id="dump1090-cpu-image" class="img-responsive" src="#" alt="CPU Utilization">
</a>
</div>
</div>
</div>
</div>
<!-- System Graphs -->
<div class="panel panel-default">
<div class="panel-heading">System Graphs</div>
<div class="panel-body">
<div class="row">
<div class="col-md-12 text-center">
<a id ="system-cpu-link" href="#">
<img id="system-cpu-image" class="img-responsive" src="#" alt="Overall CPU Utilization">
</a>
</div>
</div>
<div class="padding"></div>
<div class="row">
<div class="col-md-6 text-center">
<a id ="system-temperature-link" href="#">
<img id="system-temperature-image" class="img-responsive" src="#" alt="Core Temperature">
</a>
</div>
<div class="col-md-6 text-center">
<a id ="system-memory-link" href="#">
<img id="system-memory-image" class="img-responsive" src="#" alt="Memory Utilization">
</a>
</div>
</div>
<div class="padding"></div>
<div class="row">
<!--
<div class="col-md-6 text-center">
<a id ="system-wlan0_bandwidth-link" href="#">
<img id="system-wlan0_bandwidth-image" class="img-responsive" src="#" alt="Bandwidth Usage (wlan0)">
</a>
</div>
-->
<div class="col-md-6 text-center">
<a id ="system-eth0_bandwidth-link" href="#">
<img id="system-eth0_bandwidth-image" class="img-responsive" src="#" alt="Bandwidth Usage (eth0)">
</a>
</div>
<div class="col-md-6 text-center">
<a id ="system-df_root-link" href="#">
<img id="system-df_root-image" class="img-responsive" src="#" alt="Disk Space Usage (/)">
</a>
</div>
</div>
<div class="padding"></div>
<div class="row">
<div class="col-md-6 text-center">
<a id ="system-disk_io_iops-link" href="#">
<img id="system-disk_io_iops-image" class="img-responsive" src="#" alt="Disk I/O - IOPS">
</a>
</div>
<div class="col-md-6 text-center">
<a id ="system-disk_io_octets-link" href="#">
<img id="system-disk_io_octets-image" class="img-responsive" src="#" alt="Disk I/O - Bandwidth">
</a>
</div>
</div>
</div>
</div>
</div>
<div id="push"></div>
</div>
<footer id="footer">
<div class="container">
<p class="muted credits">
<a href="https://github.com/jprochazka/adsb-feeder">The ADS-B Feeder Project</a>
</p>
</div>
</footer>
<script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script src="assets/js/graphs.js"></script>

Wyświetl plik

@ -1,10 +0,0 @@
<footer id="footer">
<div class="container">
<p class="muted credits">
<a href="https://github.com/jprochazka/adsb-feeder">The ADS-B Feeder Project</a>
</p>
</div>
</footer>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
</body>
</html>

Wyświetl plik

@ -1,12 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>ADS-B Feeder: Live Dump1090 Map</title>
<meta http-equiv="cache-control" content="no-cache" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="assets/css/portal.css">
</head>
<body>

Wyświetl plik

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2015 Joseph A. Prochazka
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Wyświetl plik

@ -0,0 +1,18 @@
/* Contains CSS which is specific to the file dump978.php */
html, body {
height: 100%;
width: 100%;
margin: 0;
}
#iframe-wrapper {
position: fixed;
top: 50px;
bottom: 60px;
width: 100%;
}
#map {
display: block;
width: 100%;
height: 100%;
border: 0;
}

Wyświetl plik

@ -0,0 +1,45 @@
<?php
////////////////////////////////////////////////////////////////////////////////
// ADS-B FEEDER PORTAL TEMPLATE INFORMATION //
// ========================================================================== //
// Template Set: default //
// Template Name: master //
// Version: 1.0.0 //
// Release Date: //
// Author: Joe Prochazka //
// Website: https://www.swiftbyte.com //
// ========================================================================== //
// Copyright and Licensing Information: //
// //
// Copyright (c) 2015 Joseph A. Prochazka //
// //
// This template set is licensed under The MIT License (MIT) //
// A copy of the license can be found package along with these files. //
////////////////////////////////////////////////////////////////////////////////
// The title of this page.
$pageTitle = "Live Dump1090 Map";
////////////////////////////////
// Additional <head> content.
function headContent() {
?>
<link rel="stylesheet" href="assets/css/dump1090.css">
<?php
}
///////////////////
// Page content.
function pageContent() {
?>
<div id="iframe-wrapper">
<iframe id="map" src="/dump1090/gmap.html"></iframe>
</div>
<?php
}
/////////////////////////////////////////////////
// Content to be added to the scripts section.
function scriptContent() {}
?>

Wyświetl plik

@ -0,0 +1,45 @@
<?php
////////////////////////////////////////////////////////////////////////////////
// ADS-B FEEDER PORTAL TEMPLATE INFORMATION //
// ========================================================================== //
// Template Set: default //
// Template Name: master //
// Version: 1.0.0 //
// Release Date: //
// Author: Joe Prochazka //
// Website: https://www.swiftbyte.com //
// ========================================================================== //
// Copyright and Licensing Information: //
// //
// Copyright (c) 2015 Joseph A. Prochazka //
// //
// This template set is licensed under The MIT License (MIT) //
// A copy of the license can be found package along with these files. //
////////////////////////////////////////////////////////////////////////////////
// The title of this page.
$pageTitle = "Live Dump978 Map";
////////////////////////////////
// Additional <head> content.
function headContent() {
?>
<link rel="stylesheet" href="assets/css/dump978.css">
<?php
}
///////////////////
// Page content.
function pageContent() {
?>
<div id="iframe-wrapper">
<iframe id="map" src="/dump978/gmap.html"></iframe>
</div>
<?php
}
/////////////////////////////////////////////////
// Content to be added to the scripts section.
function scriptContent() {}
?>

Wyświetl plik

@ -0,0 +1,80 @@
<?php
////////////////////////////////////////////////////////////////////////////////
// ADS-B FEEDER PORTAL TEMPLATE INFORMATION //
// ========================================================================== //
// Template Set: default //
// Template Name: master //
// Version: 1.0.0 //
// Release Date: //
// Author: Joe Prochazka //
// Website: https://www.swiftbyte.com //
// ========================================================================== //
// Copyright and Licensing Information: //
// //
// Copyright (c) 2015 Joseph A. Prochazka //
// //
// This template set is licensed under The MIT License (MIT) //
// A copy of the license can be found package along with these files. //
////////////////////////////////////////////////////////////////////////////////
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title><?php echo $common->getSetting("siteName"); ?>: <?php echo $pageTitle; ?></title>
<meta http-equiv="cache-control" content="no-cache" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="assets/css/portal.css">
<?php
headContent();
?>
</head>
<body>
<div id="wrapper">
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/"><?php echo $common->getSetting("siteName"); ?></title></a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<?php (strtoupper($common->("enableGraphs")) == "TRUE" ? ?><li id="graphs-link"><a href="/graphs.php">Performance Graphs</a></li><?php : ''); ?>
<?php (strtoupper($common->getSetting("enableDump1090")) == "TRUE" ? ?><li id="dump1090-link"><a href="/dump1090.php">Live Dump1090 Map</a></li><?php : ''); ?>
<?php (strtoupper($common->getSetting("enableDump978")) == "TRUE" ? ?><li id="dump978-link"><a href="/dump978.php">Live Dump978 Map</a></li><?php : ''); ?>
<?php (strtoupper($common->getSetting("enablePfclient")) == "TRUE" ? ?><!-- Plane Finder ADS-B Client Link Placeholder --><?php : ''); ?>
</ul>
</div>
</div>
</nav>
<?php
pageContent();
?>
<div id="push"></div>
</div>
<footer id="footer">
<div class="container">
<p class="muted credits">
<a href="https://github.com/jprochazka/adsb-feeder">The ADS-B Feeder Project</a>
</p>
</div>
</footer>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script src="http://code.jquery.com/jquery-2.2.0.min.js"></script>
<script type="text/javascript">
$('#<?php echo $common->removeExtension($_SERVER["SCRIPT_NAME"])."-link"; ?>').addClass("active");
</script>
<?php
scriptContent();
?>
</body>
</html>