<?php $this->load->view('meta') ?>
<div class="wrapper">
  <?php $this->load->view('sidebar') ?>
  <?php $this->load->view('navbar') ?>
  <?php
  $width = "33";
  ?>

  <style>
    ul {
      list-style: none outside none;
      padding-left: 0;
      margin: 0;
      padding-top: 0px;
    }

    .demo .item {
      margin-bottom: 20px;
    }

    .content-slider li {
      background-color: white;
      text-align: left;
      color: #FFF;
      height: 130px;
      box-shadow: 0 0 3px grey;
      border-radius: 5px;
      padding-bottom: 10px;
    }

    .content-slider h3 {
      margin: 0;
      padding: 70px 0;
    }

    .demo {
      width: 100%;
    }
  </style>
  <link rel="stylesheet" href="<?php echo base_url(); ?>assets/themes/default/default.css" type="text/css" media="screen" />
  <link rel="stylesheet" href="<?php echo base_url(); ?>assets/themes/nivo-slider.css" type="text/css" media="screen" />


  <!-- Begin Page Content -->
  <div class="container-fluid">


    <!-- Page Heading -->

    <!-- Content Row -->
    <!-- Content Row -->
    <br>
    <?php foreach ($data_site as $ds) { ?>

      <div class="row mb-2">
        <div class="h2  font-weight-bold text-success text-uppercase mb-1"><?= $ds['name_site'] ?></div>
      </div>

<div class="h6  font-weight-bold text-info text-uppercase mb-1">Batubara Masuk :</div>
      <div class="row">
        <!-- Earnings (Monthly) Card Example -->
        <?php foreach ($ds['masuk'] as $stockpile) : ?>
          <div class="col-xl-2 col-md-6 mb-4">
            <div class="card border-left-info shadow h-100 py-2">
              <div class="card-body">
                <div class="row no-gutters align-items-center">
                  <div class="col mr-2">
                    <div class="h6 font-weight-bold text-primary text-uppercase mb-1"><?= $stockpile['name_sp'] ?></div>
                    <hr>
                    <div class="h6  font-weight-bold text-primary text-uppercase mb-1">Rit : <?= $stockpile['ritase'] ?></div>
                    <div class="h6  font-weight-bold text-primary text-uppercase mb-1">Ton : <?= $stockpile['tonase'] ?></div>
                    <div class="h6  font-weight-bold text-primary text-uppercase mb-1">Sisa : <?= $stockpile['sisa_tonase'] ?></div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        <?php endforeach; ?>
      </div>
      
    <div class="h6  font-weight-bold text-warning text-uppercase mb-1">Batubara Produksi :</div>
      <div class="row">
        <?php foreach ($ds['proses'] as $stockpile) : ?>
          <div class="col-xl-2 col-md-6 mb-4">
            <div class="card border-left-warning shadow h-100 py-2">
              <div class="card-body">
                <div class="row no-gutters align-items-center">
                  <div class="col mr-2">
                    <div class="h6 font-weight-bold text-primary text-uppercase mb-1"><?= $stockpile['name_sp'] ?></div>
                    <hr>
                    <div class="h6  font-weight-bold text-primary text-uppercase mb-1">Ton : <?= $stockpile['tonase_proses'] ?></div>
                    <div class="h6  font-weight-bold text-primary text-uppercase mb-1">Sisa : <?= $stockpile['sisa_tonase'] ?></div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        <?php endforeach; ?>
      </div>
      
      <div class="h6  font-weight-bold text-success text-uppercase mb-1">Batubara Kirim :</div>

      <div class="row">
        <?php foreach ($ds['keluar'] as $stockpile) : ?>
          <div class="col-xl-2 col-md-6 mb-4">
            <div class="card border-left-success shadow h-100 py-2">
              <div class="card-body">
                <div class="row no-gutters align-items-center">
                  <div class="col mr-2">
                    <div class="h6 font-weight-bold text-primary text-uppercase mb-1"><?= $stockpile['name_sp'] ?></div>
                    <hr>
                    <div class="h6  font-weight-bold text-primary text-uppercase mb-1">Ritase : <?= $stockpile['ritase'] ?></div>
                    <div class="h6  font-weight-bold text-primary text-uppercase mb-1">Tonase : <?= $stockpile['tonase'] ?></div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        <?php endforeach; ?>
      </div>

      <div class="h5  font-weight-bold text-primary text-uppercase mb-1">JUMLAH :</div>
      <div class="row">
        <div class="col-xl-2 col-md-6 mb-4">
          <div class="card border-left-info shadow h-100 py-2">
            <div class="card-body">
              <div class="row no-gutters align-items-center">
                <div class="col mr-2">
                  <div class="text-xs font-weight-bold text-primary text-uppercase mb-1">RITASE MASUK</div>
                  <div class="h5 mb-0 font-weight-bold text-gray-400" align="right">
                    <div class="h5 mb-0 font-weight-bold text-primary" align="left"><?php echo $ds['jumlah_ritase_masuk']; ?></div>
                  </div>
                  <div class="h5 mb-0 font-weight-bold text-gray-400" align="right"></div>
                </div>
                <div class=" col-auto">
                  <i class="fas fa-truck fa-2x text-gray-300"></i>
                </div>
              </div>
            </div>
          </div>
        </div>

        <div class="col-xl-2 col-md-6 mb-4">
          <div class="card border-left-info shadow h-100 py-2">
            <div class="card-body">
              <div class="row no-gutters align-items-center">
                <div class="col mr-2">
                  <div class="text-xs font-weight-bold text-primary text-uppercase mb-1">TONASE MASUK</div>
                  <div class="h5 mb-0 font-weight-bold text-gray-400" align="right"></div>
                  <div class="h5 mb-0 font-weight-bold text-primary" align="left"><?php echo number_format($ds['jumlah_tonase_masuk'], 3); ?></div>
                </div>
                <div class=" col-auto">
                  <i class="fas fa-tachometer-alt fa-2x text-gray-300"></i>
                </div>
              </div>
            </div>
          </div>
        </div>

        <div class="col-xl-3 col-md-6 mb-4">
          <div class="card border-left-warning shadow h-100 py-2">
            <div class="card-body">
              <div class="row no-gutters align-items-center">
                <div class="col mr-2">
                  <div class="text-xs font-weight-bold text-primary text-uppercase mb-1">TONASE PRODUKSI</div>
                  <div class="h5 mb-0 font-weight-bold text-gray-400" align="right"></div>
                  <div class="h5 mb-0 font-weight-bold text-primary" align="left"><?php echo number_format($ds['jumlah_tonase_proses'], 3); ?></div>
                </div>
                <div class=" col-auto">
                  <i class="fas fa-tachometer-alt fa-2x text-gray-300"></i>
                </div>
              </div>
            </div>
          </div>
        </div>


        <div class="col-xl-2 col-md-6 mb-4">
          <div class="card border-left-success shadow h-100 py-2">
            <div class="card-body">
              <div class="row no-gutters align-items-center">
                <div class="col mr-2">
                  <div class="text-xs font-weight-bold text-primary text-uppercase mb-1">RITASE KIRIM</div>
                  <div class="h5 mb-0 font-weight-bold text-gray-400" align="right">
                    <div class="h5 mb-0 font-weight-bold text-primary" align="left"><?php echo $ds['jumlah_ritase_kirim'];  ?></div>
                  </div>
                  <div class="h5 mb-0 font-weight-bold text-gray-400" align="right"></div>
                </div>
                <div class=" col-auto">
                  <i class="fas fa-truck fa-2x text-gray-300"></i>
                </div>
              </div>
            </div>
          </div>
        </div>

        <div class="col-xl-2 col-md-6 mb-4">
          <div class="card border-left-success shadow h-100 py-2">
            <div class="card-body">
              <div class="row no-gutters align-items-center">
                <div class="col mr-2">
                  <div class="text-xs font-weight-bold text-primary text-uppercase mb-1">TONASE KIRIM</div>
                  <div class="h5 mb-0 font-weight-bold text-gray-400" align="right"></div>
                  <div class="h5 mb-0 font-weight-bold text-primary" align="left"><?php echo number_format($ds['jumlah_tonase_kirim'], 3); ?></div>
                </div>
                <div class=" col-auto">
                  <i class="fas fa-tachometer-alt fa-2x text-gray-300"></i>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    <?php } ?>

    <hr>
    <div class="h4  font-weight-bold text-danger text-uppercase mb-1">GRAND TOTAL</div>


    <div class="row">
      <div class="col-xl-2 col-md-6 mb-4">
        <div class="card border-left-info shadow h-100 py-2">
          <div class="card-body">
            <div class="row no-gutters align-items-center">
              <div class="col mr-2">
                <div class="text-xs font-weight-bold text-danger text-uppercase mb-1">RITASE MASUK</div>
                <div class="h5 mb-0 font-weight-bold text-gray-400" align="right">
                  <div class="h5 mb-0 font-weight-bold text-danger" align="left"><?php echo $total_ritase_masuk; ?></div>
                </div>
                <div class="h5 mb-0 font-weight-bold text-gray-400" align="right"></div>
              </div>
              <div class=" col-auto">
                <i class="fas fa-truck fa-2x text-gray-300"></i>
              </div>
            </div>
          </div>
        </div>
      </div>

      <div class="col-xl-2 col-md-6 mb-4">
        <div class="card border-left-info shadow h-100 py-2">
          <div class="card-body">
            <div class="row no-gutters align-items-center">
              <div class="col mr-2">
                <div class="text-xs font-weight-bold text-danger text-uppercase mb-1">TONASE MASUK</div>
                <div class="h5 mb-0 font-weight-bold text-gray-400" align="right"></div>
                <div class="h5 mb-0 font-weight-bold text-danger" align="left"><?php echo number_format($total_tonase_masuk, 3); ?></div>
              </div>
              <div class=" col-auto">
                <i class="fas fa-tachometer-alt fa-2x text-gray-300"></i>
              </div>
            </div>
          </div>
        </div>
      </div>

      <div class="col-xl-3 col-md-6 mb-4">
        <div class="card border-left-warning shadow h-100 py-2">
          <div class="card-body">
            <div class="row no-gutters align-items-center">
              <div class="col mr-2">
                <div class="text-xs font-weight-bold text-danger text-uppercase mb-1">TONASE PRODUKSI</div>
                <div class="h5 mb-0 font-weight-bold text-gray-400" align="right"></div>
                <div class="h5 mb-0 font-weight-bold text-danger" align="left"><?php echo number_format($total_tonase_proses, 3); ?></div>
              </div>
              <div class=" col-auto">
                <i class="fas fa-tachometer-alt fa-2x text-gray-300"></i>
              </div>
            </div>
          </div>
        </div>
      </div>


      <div class="col-xl-2 col-md-6 mb-4">
        <div class="card border-left-success shadow h-100 py-2">
          <div class="card-body">
            <div class="row no-gutters align-items-center">
              <div class="col mr-2">
                <div class="text-xs font-weight-bold text-danger text-uppercase mb-1">RITASE KIRIM</div>
                <div class="h5 mb-0 font-weight-bold text-gray-400" align="right">
                  <div class="h5 mb-0 font-weight-bold text-danger" align="left"><?php echo $total_ritase_kirim;  ?></div>
                </div>
                <div class="h5 mb-0 font-weight-bold text-gray-400" align="right"></div>
              </div>
              <div class=" col-auto">
                <i class="fas fa-truck fa-2x text-gray-300"></i>
              </div>
            </div>
          </div>
        </div>
      </div>

      <div class="col-xl-2 col-md-6 mb-4">
        <div class="card border-left-success shadow h-100 py-2">
          <div class="card-body">
            <div class="row no-gutters align-items-center">
              <div class="col mr-2">
                <div class="text-xs font-weight-bold text-danger text-uppercase mb-1">TONASE KIRIM</div>
                <div class="h5 mb-0 font-weight-bold text-gray-400" align="right"></div>
                <div class="h5 mb-0 font-weight-bold text-danger" align="left"><?php echo number_format($total_tonase_kirim, 3); ?></div>
              </div>
              <div class=" col-auto">
                <i class="fas fa-tachometer-alt fa-2x text-gray-300"></i>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>

    <div class="col-lg">
      <div class="shadow h-100 py-2 mb-4 ">
        <div class="card-body text-center">
          <marquee loop="3" style="font-family: arial; font-size:14px; color:#09b03e; ">ONLINE REPORT PT. BERKAT MANDIRI LESTARI | BANJARBARU | KALIMANTAN SELATAN :: MOHON AGAR TELITI DALAM MENGINPUT DATA KE DALAM APLIKASI ::</marquee>
          <hr>
          <div class="container-fluid">
    <img src="<?php echo base_url(); ?>assets/images/bml.png" style="max-width:15%; margin-top:-10px; margin-bottom:10px; z-index: 9; position: relative;"><br>
            <b class="font-weight-bold text-success">PT. BERKAT MANDIRI LESTARI</b>
            <p class="text-gray-600 text-center">Banjarbaru | Kalimantan Selatan | Indonesia<br>
          </div>
        </div>
      </div>
    </div>
  <br>
  <br>
  <div class="row">
    <br />
  </div>

</div>


<!-- End of Main Content -->



<?php $this->load->view('footer') ?>
</div><!-- ./wrapper -->
<?php $this->load->view('js') ?>
<?php $this->load->view('dashboard/chart-area-demo') ?>
<?php $this->load->view('dashboard/chart-pie-demo') ?>

</body>

</html>