<?
session_start();
$brcode=$_SESSION['brcode'];
$user=$_SESSION['user'];
$user_level=$_SESSION['user_level'];
$xyy=$_SESSION['xyy'];
?>

<script type="text/javascript">
function timedMsg()
{
//alert('Change your password Immediately\n - Admin');
var t=setTimeout("timedMsg()",500)
}
</script>
<?
include("opendb.php");
$br=mysqli_query($db,"select * from branch where brcode='$brcode'");
$brrow=mysqli_fetch_row($br);

?>
<body bgcolor="red" leftmargin=0 onLoad=timedMsg()>
<link rel="stylesheet" href="css/bootstrap.css" rel="stylesheet">
        <!-- Template CSS -->        
<link rel="stylesheet" href="css/nexus.css" rel="stylesheet">
<style>
body{
background-image: url("images/backg.jpeg");
}
td
{
color:#FF0000;
font-size:15px;
font-weight:bold;
}
#hornav ul#hornavmenu {
    display: inline-block;
    margin: 0 0 -6px;
    padding: 0px;
    width: 1000px;
}
#hornav .container {
    background-color: #1d39a8;
    box-shadow: 0 -2px 0 #33747a inset, 0 0 20px rgba(0, 0, 0, 0.1);
    min-height: 60px;
    display: block;
}
</style>
<base target=contents>
<div id="hornav" >
                <div class="container no-padding border-bottom">             
                        <div class="col-md-8 no-padding">                           
                               <ul id="hornavmenu" class="nav navbar-nav">
<img src="img/pic-008.jpg" alt="PSN Telcon" align='right' height="50" width="100"></img>
                                    <li>
                                       <a href='vehmnu.php'>Vehicle</a>
                                    </li>
<?
$us=mysqli_query($db,"select level from bruser where username='$user'")or die(mysqli_error());
$r=mysqli_fetch_row($us);
$user_level=$r[0];

if($user_level==0 || $user_level==12|| $user_level==11 || $user_level==10)
{
   print "<script>document.location='exetop.php'</script>";
   return;
}
if($user_level>5)
{
?>
									<li>
                                       <a href='dms/dmsmnu.php'>DMS</a>
                                    </li>
<?
}
if($user_level>='2' && $user_level<=6 ||$user=='admin')
{ 
?>							
                                    <li>
                                       <a href='acmnu.php'>ACCOUNTS</a>
                                    </li>
                                    <li>
                                       <a href='utilmnu.html'>UTILITY</a>
                                    </li>
<?
}
if($user_level>'2' && $user_level<=5 || $user=='admin')
{
?>
                                    <li>
                                       <a href='amastmnu.php'>ASSET MASTER</a>
                                    </li>
<?
	if($brcode=='PSN841' || $brcode =='PSN705' || $brcode == 'PSN638' || $brcode == 'PSN880')
		{
?>
<!-- <li>
                                        <a href='sparemnu.php'>SPARES</a>
                                    </li> -->
                                    <li>
                                       <a href='servmnu.php'>SERVICE</a>
                                    </li>

                                    <!-- <li>
                                       <a href='mastermnu.php'>GEN MASTER</a>
                                    </li> -->
<?
    	}
}
if($user_level>5 ||$user=='admin')
{
?>									<li>
                                       <a href='setupmnu.php'>SETUP</a>
                                    </li>
<?
}
?>
					<li>
                                        <a href='abt.html'>ABOUT</a>
                                    </li>
									<li>
                                        <a href='sft.html'>SOFTWARE CELL</a>
                                    </li>
                                    <li>
                                        <a href='logout.php' onMouseOver="window.status='Logout';return true"; onMouseOut="window.status='';return true"; >Logout</a>
                                   </li>
<? 
if ($xyy<=5)
{
print "<script>alert('Change your password Immediately');</script>";
}
?>
									
                                </ul>
 </div>

                </div>
<TABLE WIDTH=100% border=0>
<tr><td align=left>
PSN AUTO-Globally Accessible Administration Software</TD>
<td align=left bgcolor='green'>Branch: <b><?print $branch."[2025-2026]";?></b></td><td align=left> User: <b><?print $user?><b></td><td><? print "Password expires in ".$xyy." days";?></td></tr>
</TABLE>
            </div>
