<!DOCTYPE html>
<html>
    
    <head>
		<?php
		include("../includes/header-links.php");
		?>
    <link href="../bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen">
        <link href="../bootstrap/css/bootstrap-responsive.min.css" rel="stylesheet" media="screen">
        <link href="../assets/styles.css" rel="stylesheet" media="screen">
        <link href="../assets/DT_bootstrap.css" rel="stylesheet" media="screen">
        <link rel="stylesheet" href="../data-table-css/bootstrap-table.css">
    <link rel="stylesheet" href="../data-table-css/bootstrap-editable.css">
        <!--[if lte IE 8]><script language="javascript" type="text/javascript" src="vendors/flot/excanvas.min.js"></script><![endif]-->
        <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
        <!--[if lt IE 9]>
            <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
        <![endif]-->
        <script src="../vendors/modernizr-2.6.2-respond-1.1.0.min.js"></script>
    </head>
    
    <body>
        <?php include '../includes/header.php'; ?>
        <div class="container-fluid">
            <div class="row-fluid">
                <?php include '../includes/sidebar.php'; ?>
                <!--/span-->
                <div class="span9" id="content">

                     <div class="row-fluid">
                        <!-- block -->
                        <div class="block">
                            <div class="navbar navbar-inner block-header">
                                <div class="muted pull-left">All Notifications</div>
                                <div class="muted pull-right">
                                        <a href="../main/dashboard.php"><button class="btn btn-warning">close</button></a>
                                        </div>
                            </div>
                            <div class="block-content collapse in">
                                <div class="span12">
                                    
                                       
                                   <?php 
                                   $update = mysqli_query($con,"UPDATE notifications set status='0' where branch_id='$branch'");
                                   $sql = mysqli_query($con,"SELECT * from notifications where  branch_id='$branch' order by id DESC");
                                    
                                  $num = mysqli_num_rows($sql);
                                   
                                    if($num>0){
                                        while($roww=mysqli_fetch_array($sql)){
                                        ?>
                                        </br><div align="left">
                                        <i><?php echo$roww['AddedOn'];?></i>
                                     <br>
                                        <b><?php echo$roww['fullmessage'];?></b> 
                                          </div>
                                        <div align="right">
                                        <a href="delete_notification.php?nid=<?php echo$roww['id'];?>"><button class="btn btn-danger">delete</button></a>
                                        </div>
                                        <hr style="margin: 0px;">
                                        <?php }}
                                        else{
                                            echo"<h4 style='color:red;'>No notifications for you</h4>";
                                        }
                                        ?>



                                            
                                        
                                    
                                </div>
                            </div>
                        </div>
                        <!-- /block -->
                    </div>
                </div>
            </div>
            <hr>
            <?php include '../includes/footer.php'; ?>
        </div>
        <!--/.fluid-container-->

        <!--==========Footer js======-->
		<?php require_once("../includes/footerjs.php");?>
        <!--==========Footer js======-->
       <script src="../data-table-js/bootstrap-table.js"></script>
    <script src="../data-table-js/tableExport.js"></script>
    <script src="../data-table-js/data-table-active.js"></script>
    <script src="../data-table-js/bootstrap-table-editable.js"></script>
    <script src="../data-table-js/bootstrap-editable.js"></script>
    <script src="../data-table-js/bootstrap-table-resizable.js"></script>
    <script src="../data-table-js/colResizable-1.5.source.js"></script>
    <script src="../data-table-js/bootstrap-table-export.js"></script>
    </body>


 
</html>
