<?php

    $this->load->view('master/header');
    $this->load->view('master/sidebar');

    foreach ($reports[1] as $key => $result) {
        $unseenorder = $result['unseenorder'];
    }

    foreach ($reports[2] as $key => $result) {
        $totalorder = $result['totalorder'];
    }

    foreach ($reports[3] as $key => $result) {
        $clients = $result['clients'];
    }

    foreach ($reports[4] as $key => $result) {
        $portfolio = $result['portfolio'];
    }

  

?>  
  <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
      <h1>
        Dashboard
        <small>it all starts here</small>
      </h1>
      <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
        <li><a href="#">Dashboard</a></li>
        <!-- <li class="active">Blank page</li> -->
      </ol>
    </section>

    <!-- Main content -->
    <section class="content">

      <div class="row">

        <?php if($unseenorder != 0){ ?>
        <div class="col-lg-3 col-xs-6">
          <!-- small box -->
          <div class="small-box bg-red <?php if($unseenorder != 0){ echo "animated infinite pulse delay-2s"; } ?>">
            <div class="inner">
              <h3><?= $unseenorder; ?></h3>

              <p>Unseen Orders</p>
            </div>
            <div class="icon">
              <i class="ion ion-bag"></i>
            </div>
            <a href="<?= site_url("user/Order/show_order"); ?>" class="small-box-footer">More info <i class="fa fa-arrow-circle-right"></i></a>
          </div>
        </div>
        <?php } ?>
        <div class="col-lg-3 col-xs-6">
            <!-- small box -->
            <div class="small-box bg-yellow">
              <div class="inner">
                <h3><?= $totalorder; ?></h3>
  
                <p>Total Orders</p>
              </div>
              <div class="icon">
                <i class="ion ion-bag"></i>
              </div>
              <a href="#" class="small-box-footer">&nbsp;</a>
            </div>
        </div>
        <div class="col-lg-3 col-xs-6">
            <!-- small box -->
            <div class="small-box bg-green">
              <div class="inner">
                <h3><?= $clients; ?></h3>
  
                <p>Total Clients</p>
              </div>
              <div class="icon">
                <i class="ion ion-stats-bars"></i>
              </div>
              <a href="#" class="small-box-footer">&nbsp;</a>
            </div>
         </div>
         <div class="col-lg-3 col-xs-6">
            <!-- small box -->
            <div class="small-box bg-aqua">
              <div class="inner">
                <h3><?= $portfolio; ?></h3>
  
                <p>Total Portfolio</p>
              </div>
              <div class="icon">
                <i class="ion ion-pie-graph"></i>
              </div>
              <a href="#" class="small-box-footer">&nbsp;</a>
            </div>
         </div>
      </div>

    </section>
    <!-- /.content -->
  </div>
  <!-- /.content-wrapper -->

<?php
    $this->load->view('master/footer');
?>