<?php
dbconnect();

$sql = "SELECT * FROM `".ADMIN_TABLE_NAME."` WHERE admin_login='{$_SESSION['admin_login']}'";
$stmt = $pdo->query($sql);
$row = $stmt->fetch(PDO::FETCH_ASSOC);
?>

<!--header start-->
      <header class="header white-bg">
            <div class="toggle-nav">
                <div class="icon-reorder tooltips" data-original-title="Toggle Navigation" data-placement="bottom"></div>
            </div>

			<!--logo start-->
			<a href="<?php echo HOME_URL ?>">
			<img src="../img/logo.png" alt="<?php echo WEB_NAME ?>" />
			</a>
            <!--logo end-->

            <div class="top-nav notification-row">
                <!-- notificatoin dropdown start-->
                <ul class="nav pull-right top-menu">
				
					<!-- inbox notificatoin start-->
                    <li id="mail_notificatoin_bar" class="dropdown">
                        <a href="messages.php">
                            <i class="icon-envelope-l"></i>
                            <span class="badge bg-important">
							<?php
							$nMsgs = $pdo->query("SELECT COUNT(*) FROM `".MSGS_TABLE_NAME."` WHERE msg_rcvr='admin' AND adm_read='0'")->fetchColumn(); 
							echo $nMsgs;
							?>
							</span>
                        </a>
                    </li>
					
                    <!-- user login dropdown start-->
                    <li class="dropdown">
                        <a data-toggle="dropdown" class="dropdown-toggle" href="#">
						
						<span class="profile-ava">
                                <img width="29" height="29" alt="Administrator" src="../users/user.png">
                            </span>
							
                            <span class="username">Administrator</span>
                            <b class="caret"></b>
                        </a>
                        <ul class="dropdown-menu extended logout">
                            <div class="log-arrow-up"></div>
                            <li class="eborder-top">
								<a href="dashboard.php"><i class="icon-briefcase"></i> Home</a>
							</li>
							<li>
								<a href="messages.php"><i class="icon-envelope"></i> Messages</a>
							</li>
							<li>
								<a href="password.php"><i class="icon-lock"></i> Change Password</a>
							</li>
							<li>
								<a href="signout.php"><i class="icon-key"></i> Sign Out</a>
							</li>
                        </ul>
                    </li>
                    <!-- user login dropdown end -->
                </ul>
                <!-- notificatoin dropdown end-->
            </div>
      </header>      
      <!--header end-->