} //Set variables $errorMessage = ""; if (isset($_GET['errorMessage'])) { $errorMessage = $_GET['errorMessage']; } $success = ""; if (isset($_GET['success'])) { $success = $_GET['success']; } $devInfo = dbGetDevInfo($_GET['devName']); $nameOfFields = dbGetNameOfFields($_GET['devName']); /************* * PRINT HTML *************/ $header = new outputHeader(); $header->printSimpleHeader("IoT MyAdmin - Device Details"); $header->closeHeader(); openBody(); printNavbarAndSidebar("devDetails"); printBody($devInfo, $nameOfFields, $errorMessage, $success); closeBody(); $footer = new outputFooter(); $footer->closeHtml(); /************************************************************************** * custom html code *******************/ function printBody($devInfo, $nameOfFields, $errorMessage, $success) { ?> <div id="page-wrapper">
* along with this program. If not, see <http://www.gnu.org/licenses/>. */ include_once 'outputs/includeOutputs.php'; include_once '../includes/includes.php'; //session management sec_session_start(); if (!isset($_SESSION['username'])) { header("Location: ../logout.php"); exit; } //set data $devNamesList = dbGetDevNamesListCoordinates($_SESSION['username']); /************* * PRINT HTML *************/ $header = new outputHeader(); $header->printSimpleHeader("IoT MyAdmin - Maps"); $header->closeHeader(); openBody(); printNavbarAndSidebar("devMaps"); printBody($devNamesList); closeBody(); $footer = new outputFooter(); printKmlMaps($_POST['devName'], $_POST['iniDate']); $footer->closeHtml(); /************************************************************************** * custom html code *******************/ function printBody($devNamesList) { ?>
//session management sec_session_start(); if (!isset($_SESSION['username'])) { header("Location: ../logout.php"); exit; } //pagination parameters $limit = isset($_GET['limit']) ? $_GET['limit'] : 25; $page = isset($_GET['page']) ? $_GET['page'] : 1; $links = isset($_GET['links']) ? $_GET['links'] : 1; //set varibles $table = dbGetLastLogs($limit, $page, $links, $_SESSION['username']); /************* * PRINT HTML *************/ $header = new outputHeader(); $header->printSimpleHeader("IoT MyAdmin - Last Logs"); $header->closeHeader(); openBody(); printNavbarAndSidebar("devLastLogs"); printBody($table); closeBody(); $footer = new outputFooter(); $footer->closeHtml(); function printBody($table) { ?> <div id="page-wrapper"> <div class="container-fluid"> <!-- Page Heading -->
* * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ include_once 'outputs/includeOutputs.php'; include_once '../includes/includes.php'; //session management sec_session_start(); if (!isset($_SESSION['username'])) { header("Location: ../logout.php"); exit; } /************* * PRINT HTML *************/ $header = new outputHeader(); $header->printSimpleHeader("IoT MyAdmin - Arduino Projects"); $header->closeHeader(); openBody(); printNavbarAndSidebar("arduino"); printBody(); closeBody(); $footer = new outputFooter(); $footer->closeHtml(); /************************************************************************** * custom html code *******************/ function printBody() { ?> <div id="page-wrapper">
} //pagination parameters $limit = isset($_GET['limit']) ? $_GET['limit'] : 25; $page = isset($_GET['page']) ? $_GET['page'] : 1; $links = isset($_GET['links']) ? $_GET['links'] : 1; //get data needed $devNamesList = dbGetDevNamesList($_SESSION['username']); $table = "selectDevice"; if (isset($_GET['devName']) && $_GET['devName'] != "") { //get data $table = dbGetDataTable($_GET['devName'], $limit, $page, $links); } /************* * PRINT HTML *************/ $header = new outputHeader(); $header->printSimpleHeader("IoT MyAdmin - Data Tables"); $header->closeHeader(); openBody(); printNavbarAndSidebar("devDataTables"); printBody($devNamesList, $table, $_GET['devName']); closeBody(); $footer = new outputFooter(); $footer->closeHtml(); /************************************************************************** * custom html code *******************/ function printBody($devNamesList, $table, $devName) { ?> <div id="page-wrapper">
* * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ include_once 'outputs/includeOutputs.php'; include_once '../includes/includes.php'; //session management sec_session_start(); if (!isset($_SESSION['username'])) { header("Location: ../logout.php"); exit; } /************* * PRINT HTML *************/ $header = new outputHeader(); $header->printSimpleHeader("IoT MyAdmin - Blank"); $header->closeHeader(); openBody(); printNavbarAndSidebar("blank"); printBody(); closeBody(); $footer = new outputFooter(); $footer->closeHtml(); /************************************************************************** * custom html code *******************/ function printBody() { ?> <div id="page-wrapper">
* * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ include_once 'outputs/includeOutputs.php'; include_once '../includes/includes.php'; //session management sec_session_start(); if (!isset($_SESSION['username'])) { header("Location: ../logout.php"); exit; } /************* * PRINT HTML *************/ $header = new outputHeader(); $header->printSimpleHeader("IoT MyAdmin - Web Tutorials"); $header->closeHeader(); openBody(); printNavbarAndSidebar("tutorial"); printBody(); closeBody(); $footer = new outputFooter(); $footer->closeHtml(); /************************************************************************** * custom html code *******************/ function printBody() { ?> <div id="page-wrapper">
if (!isset($_POST['numOfDataAll']) && $_POST['numOfData'] < 0) { $errorMessages[3] = 1; } else { if (isset($_POST['numOfData']) && $_POST['numOfData'] > 0) { $numOfData = $_POST['numOfData']; } else { $numOfData = "all"; } } } //set data $devNamesList = dbGetDevNamesListGeneral($_SESSION['username']); /************* * PRINT HTML *************/ $header = new outputHeader(); $header->printSimpleHeader("IoT MyAdmin - Charts"); $header->closeHeader(); openBody(); printNavbarAndSidebar("devCharts"); printBody($devNamesList, $errorMessages); closeBody(); $footer = new outputFooter(); if ($errorMessages == array(0, 0, 0, 0)) { printChartsScript($_POST['devName'], $_POST['chartType'], $_POST['firstData'], $numOfData); } $footer->closeHtml(); /************************************************************************** * custom html code *******************/ function printBody($devNamesList, $errorMessages)
* * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ include_once 'outputs/includeOutputs.php'; include_once '../includes/includes.php'; //session management sec_session_start(); if (!isset($_SESSION['username'])) { header("Location: ../logout.php"); exit; } /************* * PRINT HTML *************/ $header = new outputHeader(); $header->printSimpleHeader("IoT MyAdmin - New Device"); $header->closeHeader(); openBody(); printNavbarAndSidebar("newDevice_success"); printBody(); closeBody(); $footer = new outputFooter(); $footer->closeHtml(); /************************************************************************** * custom html code *******************/ function printBody() { ?> <div id="page-wrapper">
* * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ include_once 'outputs/includeOutputs.php'; include_once '../includes/includes.php'; //session management sec_session_start(); if (!isset($_SESSION['username'])) { header("Location: ../logout.php"); exit; } /************* * PRINT HTML *************/ $header = new outputHeader(); $header->printSimpleHeader("IoT MyAdmin - Home"); $header->closeHeader(); openBody(); printNavbarAndSidebar("home"); printBody($numOfDevices); closeBody(); $footer = new outputFooter(); printChartsScript(); $footer->closeHtml(); /************************************************************************** * custom html code *******************/ function printBody() { ?>
if (!isset($_POST['numOfDataAll']) && $_POST['numOfData'] < 0) { $errorMessages[3] = 1; } else { if (isset($_POST['numOfData']) && $_POST['numOfData'] > 0) { $numOfData = $_POST['numOfData']; } else { $numOfData = "all"; } } } //set data $devNamesList = dbGetDevNamesList(); /************* * PRINT HTML *************/ $header = new outputHeader(); $header->printSimpleHeader("IoT MyAdmin - Test"); $header->closeHeader(); openBody(); printNavbarAndSidebar("blank"); printBody($devNamesList, $errorMessages); closeBody(); $footer = new outputFooter(); if ($errorMessages == array(0, 0, 0, 0)) { printChartsScript($_POST['devName'], $_POST['chartType'], $_POST['firstData'], $numOfData); } $footer->closeHtml(); /************************************************************************** * custom html code *******************/ function printBody($devNamesList, $errorMessages)
include_once 'outputs/includeOutputs.php'; include_once '../includes/includes.php'; //session management sec_session_start(); if (!isset($_SESSION['username'])) { header("Location: ../logout.php"); exit; } //Set variables $username = $_SESSION['username']; $email = dbGetUserEmail($username); $role = dbGetUserRole($username); /************* * PRINT HTML *************/ $header = new outputHeader(); $header->printSimpleHeader("IoT MyAdmin - Profile"); $header->closeHeader(); openBody(); printNavbarAndSidebar("blank"); printBody($username, $email, $role); closeBody(); $footer = new outputFooter(); $footer->closeHtml(); /************************************************************************** * custom html code *******************/ function printBody($username, $email, $role) { ?> <div id="page-wrapper">
* * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ include_once 'outputs/includeOutputs.php'; include_once '../includes/includes.php'; //session management sec_session_start(); if (!isset($_SESSION['username'])) { header("Location: ../logout.php"); exit; } /************* * PRINT HTML *************/ $header = new outputHeader(); $header->printSimpleHeader("IoT MyAdmin - Delete"); $header->closeHeader(); openBody(); printNavbarAndSidebar("deleteDevice_succcess"); printBody($_GET['devName']); closeBody(); $footer = new outputFooter(); $footer->closeHtml(); /************************************************************************** * custom html code *******************/ function printBody($devName) { ?> <div id="page-wrapper">
//session management sec_session_start(); if (!isset($_SESSION['username'])) { header("Location: ../logout.php"); exit; } //set variables if (isset($_GET['errorMessage'])) { $errorMessage = $_GET['errorMessage']; } else { $errorMessage = "An unknown error occurred. Please try again."; } /************* * PRINT HTML *************/ $header = new outputHeader(); $header->printSimpleHeader("IoT MyAdmin - Error"); $header->closeHeader(); openBody(); printNavbarAndSidebar("error"); printBody($errorMessage); closeBody(); $footer = new outputFooter(); $footer->closeHtml(); /************************************************************************** * custom html code *******************/ function printBody($errorMessage) { ?> <div id="page-wrapper">