예제 #1
0
    $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">
    <div class="container-fluid">

        <!-- Page Heading -->
        <div class="row">
예제 #2
0
//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)
{
    ?>
<div id="page-wrapper">
    <div class="container-fluid">

        <!-- Page Heading -->
예제 #3
0
    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 -->
        <div class="row">
            <div class="col-lg-12">
                <h1 class="page-header">
                    Last Logs
예제 #4
0
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">
    <div class="container-fluid">

        <!-- Page Heading -->
        <div class="row">
예제 #5
0
$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">
    <div class="container-fluid">

        <!-- Page Heading -->
        <div class="row">
예제 #6
0
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">
    <div class="container-fluid">

        <!-- Page Heading -->
        <div class="row">
예제 #7
0
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">
    <div class="container-fluid">

        <!-- Page Heading -->
        <div class="row">
예제 #8
0
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">
    <div class="container-fluid">

        <!-- Page Heading -->
        <div class="row" >
예제 #9
0
    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 variables
$table = dbGetDevList($limit, $page, $links, $_SESSION['username']);
/*************
 * PRINT HTML
 *************/
$header = new outputHeader();
$header->printSimpleHeader("IoT MyAdmin - Devices");
$header->closeHeader();
openBody();
printNavbarAndSidebar("devList");
printBody($table);
closeBody();
$footer = new outputFooter();
$footer->closeHtml();
/**************************************************************************
 * custom html code
 *******************/
function printBody($table)
{
    ?>
<div id="page-wrapper">
    <div class="container-fluid">

        <!-- Page Heading -->
        <div class="row">
예제 #10
0
    $newDev_checkDevNameErrorMsg = $_GET['newDev_checkDevNameErrorMsg'];
}
if (isset($_GET['newDev_checkPwdError'])) {
    $newDev_checkPwdErrorMsg = $_GET['newDev_checkPwdError'];
}
if (isset($_GET['newDev_insertErrorMsg'])) {
    $newDev_insertErrorMsg = $_GET['newDev_insertErrorMsg'];
}
/*************
 * PRINT HTML
 *************/
$header = new outputHeader();
$header->printSimpleHeader("IoT MyAdmin - New Device");
$header->closeHeader();
openBody();
printNavbarAndSidebar("newDevice");
printBody($_GET['devName'], $_GET['devType'], $_GET['devNumOfFields'], $_GET['devPrivacy'], $_GET['devStatus'], $newDev_insertErrorMsg, $newDev_checkDevNameErrorMsg, $newDev_checkPwdErrorMsg);
closeBody();
$footer = new outputFooter();
$footer->closeHtml();
/**************************************************************************
 * custom html code
 *******************/
function printBody($postDevName, $postDevType, $postDevNumOfFields, $postDevPrivacy, $postDevStatus, $newDev_insertErrorMsg, $newDev_checkDevNameErrorMsg, $newDev_checkPwdErrorMsg)
{
    ?>
<div id="page-wrapper">
    <div class="container-fluid">

        <!-- Page Heading -->
        <div class="row" >
예제 #11
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)
{
    ?>
<div id="page-wrapper">
    <div class="container-fluid">
예제 #12
0
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()
{
    ?>
<div id="page-wrapper">
    <div class="container-fluid">

        <!-- Page Heading -->
예제 #13
0
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">
    <div class="container-fluid">

        <!-- Page Heading -->
        <div class="row" >
예제 #14
0
    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">
    <div class="container-fluid">

        <!-- Page Heading -->
        <div class="row" >