<?php

?>

<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Admin</title>

    <!-- Bootstrap Core CSS -->
    <link href="../vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">

	<link href="../vendor/bootstrap-toggle/css/bootstrap-toggle.min.css" rel="stylesheet">
	
    <!-- MetisMenu CSS -->
    <link href="../vendor/metisMenu/metisMenu.min.css" rel="stylesheet">

    <!-- Custom CSS -->
    <link href="../dist/css/sb-admin-2.css" rel="stylesheet">

    <!-- Morris Charts CSS -->
    <link href="../vendor/morrisjs/morris.css" rel="stylesheet">

    <!-- Custom Fonts -->
    <link href="../vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

    <script src="../libs/js/jquery-3.2.1.min.js"></script>
    <script src="../libs/js/functions.js"></script> <!-- load our javascript file -->
			
</head>

<body>
		
    <div id="wrapper">

        <!-- Navigation -->
        <nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
            <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="gateway_config.php">Gateway Web Admin</a>
                <?php
                	if (is_file("my_logo_1.png")) {
                		echo '<img class="navbar-brand" alt=" " src="my_logo_1.png" align="middle">';
                	}
				?>
            </div>

            <!-- /.navbar-header -->

            <ul class="nav navbar-top-links navbar-right">
                <li id="header_msg" class="dropdown">
            	</li>
            	<li class="dropdown">
            	</li>
                <!-- /.dropdown -->
                <li class="dropdown">
                	<?php
                		$date=date('Y-m-d\TH:i:s');
						echo $date;
						
						ob_start(); 
						system("wget -q --tries=3 --spider http://www.google.com", $retval);
						$msg=ob_get_contents(); 
						ob_clean();
						if ($retval == 0) {
							echo ' <font color="green"><b>[online]</b></font>';					
						}
						else {
							echo ' <font color="red"><b>[offline]</b></font>';					
						}
					?>			
                    <button id="btn_internet" type="button" class="btn btn-primary" href="process.php?internet=true">Test Internet</button>
<!--
                    <button id="btn_low_level_status" type="button" class="btn btn-primary" href="process.php?low_level_status=true">Low-level status ON</button>
-->                                        
                    <button id="btn_pkt_logger" type="button" class="btn btn-primary" onclick="window.location.href='pkt_logger.php';">pkt logger</button>
                    
    				<button id="btn_reboot" class="btn btn-primary" data-href="process.php?reboot=true" data-toggle="modal" data-target="#confirm-reboot">
        				Reboot
    				</button>
    				
    				<button id="btn_shutdown" class="btn btn-primary" data-href="process.php?shutdown=true" data-toggle="modal" data-target="#confirm-shutdown">
        				Shutdown
    				</button>
    
            	</li>
            	   
                <!-- /.dropdown -->
                <li class="dropdown">
                    <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                        <i class="fa fa-user fa-fw"></i> <i class="fa fa-caret-down"></i>
                    </a>
                    <ul class="dropdown-menu dropdown-user">
                        <li class="divider"></li>
                        <li><a id="logout" href="process.php?logout=true"><i class="fa fa-sign-out fa-fw"></i> Logout</a>
                        </li>
                    </ul>
                    <!-- /.dropdown-user -->
                </li>
                <!-- /.dropdown -->
            </ul>
            <!-- /.navbar-top-links -->
		
					
		
		
