<?php 


/**
 * file: navbar_header.php
 *
 * Copyright Miller Electric Mfg. Co. as an unpublished work.
 * All rights reserved.
 *
 * The information contained herein is confidential property of
 * Miller Electric Mfg. Co.  The use of, copying, transfer or
 * disclosure of such information is prohibited except by express
 * written agreement with Miller Electric.
 */


// Read in configuration files



$id_filespec = "/Insight/identity.config";

if(file_exists($id_filespec)) 
{
	$id_json = file_get_contents($id_filespec);

	if($id_json !== false)
	{
		$id = json_decode($id_json);
		//print_r($id);
		//echo "<br>sn = " . $id->{'serialNumber'} . "<br>";
		$SerialNumber = $id->{'serialNumber'};
	}
	else
	{
		$SerialNumber = '';
	}
}

?>

<div class="navbar navbar-default" role="navigation">
  <div class="container-fluid">
    <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 hidden-sm hidden-xs" href="#" id="millerlink"></a>
      <a class="navbar-brand hidden-md hidden-lg" href="#" id="millerlinksmall"></a>
    </div>
    <div class="navbar-collapse collapse">
      <ul class="nav navbar-nav navbar-right">
        <li class="active hidden-sm"><a id="setup_badge" href="/setup/setup.min.php"><span class="glyphicon glyphicon-cog"></span> Setup</a></li>
        <li class="active hidden-xs hidden-md hidden-lg"><a href="/setup/setup.min.php"><span class="glyphicon glyphicon-cog"></span></a></li>
		<li class="active hidden-sm"><a id="setup_badge" href="/password/set_password.php"><span class="glyphicon glyphicon-pencil"></span> Change Password</a></li>
        <li class="active hidden-xs hidden-md hidden-lg"><a href="/password/set_password.php"><span class="glyphicon glyphicon-pencil"></span></a></li>
		<li class="active hidden-sm"><a id="setup_badge" href="/password/login.php"><span class="glyphicon glyphicon-log-out"></span> Logout</a></li>
        <li class="active hidden-xs hidden-md hidden-lg"><a href="/password/login.php"><span class="glyphicon glyphicon-log-out"></span></a></li>
      </ul>
    </div><!--/.nav-collapse -->
  </div><!--/.container-fluid -->
</div>
<div class="page-header">
  <div class="row">
      <div class="col-md-2">
          <h4 id="unit_name"> </h4>
      </div>
      <div class="col-md-3">
          <h4 id="serial_number_title">Serial Number:<span class="badge" id="serial_number_badge"> <?php echo $SerialNumber ?> </span></h4>
      </div>
      <div class="col-md-2">
          <h4 id="region_badge"></h4>
      </div>
  </div>
</div>

 