<?php require_once('head.php'); ?>

  <body>
  <!-- container section start -->
  <section id="container" class="">
      
	<?php require_once('header.php'); ?>	

	<?php require_once('sidebar.php'); ?>
      
      <!--main content start-->
      <section id="main-content">
          <section class="wrapper">

			  <div class="row">
                  <div class="col-lg-12">
                      <!--breadcrumbs start -->
                      <ul class="breadcrumb">
                          <li><a href="dashboard.php"><i class="icon_house_alt"></i> Accounts</a></li>
                          <li class="active"> Alerts</li>
						  <li class="pull-right"> <i class="icon_calendar"></i>
							 <?php echo date('l jS F Y'); ?></li>
                      </ul>
                      <!--breadcrumbs end -->
                  </div>
              </div>
			  
			  <div class="row">
					<div class="col-lg-12">
					<section class="panel panel-body">
					<h3><?php echo WEB_NAME ?></h3>
					<h4>ACCOUNT ALERTS</h4>
					</section>
					</div>
              </div>
			  
				<!-- Messages Starts -->
				<div class="row">
			    <div class="col-sm-12">
				  <section class="panel">
					  <header class="panel-heading">
						  Account Alerts
					  </header>
					  <!--collapse start-->
                      <div class="panel-group m-bot20" id="accordion">
					  
					  <?php
							dbconnect();
							alrt_read('1');
							$sql = "SELECT * FROM `".ALERT_TABLE_NAME."` WHERE alrt_rcvr='{$_SESSION['user_acc']}' ORDER BY alrt_id DESC";
							$stmt = $pdo->query($sql);
							while($row = $stmt->fetch(PDO::FETCH_ASSOC)){ 
						?> 
					  
                          <div class="panel panel-default">
                              <div class="panel-heading">
                                  <h4 class="panel-title">
                                      <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" href="#collapse<?php echo $row['alrt_id']; ?>">
									  
									  <i class="icon-warning-sign"></i>
									  
                                          <?php echo $row['alrt_subject']; ?>
                                      </a>
									  
									  <div class="date pull-right">
										<?php echo date('jS F Y', strtotime($row['alrt_date'])); ?>
										</div>
									  
                                  </h4>
                              </div>
                              <div id="collapse<?php echo $row['alrt_id']; ?>" class="panel-collapse collapse">
                                  <div class="panel-body">
                                      <?php echo $row['alrt_cnt']; ?>
                                  </div>
                              </div>
                          </div>
						  
						  <?php } ?>
						  
                      </div>
                      <!--collapse end-->
				  </section>
			  </div>
			  </div>
			  <!-- Messages end -->            

          </section>
      </section>
      <!--main content end-->
  </section>
  <!-- container section start -->

    <!-- javascripts -->
    <script src="js/jquery.js"></script>
    <script src="js/jquery-1.8.3.min.js"></script>
    <script type="text/javascript" src="js/jquery-ui-1.9.2.custom.min.js"></script>
    <!-- bootstrap -->
    <script src="js/bootstrap.min.js"></script>
    <!-- nice scroll -->
    <script src="js/jquery.scrollTo.min.js"></script>
    <script src="js/jquery.nicescroll.js" type="text/javascript"></script>
    <!-- charts scripts -->
    <script src="assets/jquery-knob/js/jquery.knob.js"></script>
    <script src="js/jquery.sparkline.js" type="text/javascript"></script>
    <script src="assets/jquery-easy-pie-chart/jquery.easy-pie-chart.js"></script>
    <script src="js/owl.carousel.js" ></script>
    <!-- jQuery full calendar -->
    <script src="assets/fullcalendar/fullcalendar/fullcalendar.min.js"></script>
    <!--script for this page only-->
    <script src="js/calendar-custom.js"></script>
    <!-- custom select -->
    <script src="js/jquery.customSelect.min.js" ></script>
    <!--custome script for all page-->
    <script src="js/scripts.js"></script>
    <!-- custom script for this page-->
    <script src="js/sparkline-chart.js"></script>
    <script src="js/easy-pie-chart.js"></script>

  <script>

      //knob
      $(function() {
        $(".knob").knob({
          'draw' : function () { 
            $(this.i).val(this.cv + '%')
          }
        })
      });

      //carousel
      $(document).ready(function() {
          $("#owl-slider").owlCarousel({
              navigation : true,
              slideSpeed : 300,
              paginationSpeed : 400,
              singleItem : true

          });
      });

      //custom select box

      $(function(){
          $('select.styled').customSelect();
      });

  </script>

  </body>
</html>