<?php defined('BASEPATH') or exit('No direct script access allowed'); ?>
<!DOCTYPE html>
<html>
  <head>
    <title>Riwayat Deposit | OtomaX API <?php echo html_escape($server->sv_nama);?></title>
    <?php include_once(VIEWPATH.'includes/head.php'); ?>
    <style type="text/css">nav{margin-bottom: 15px;float: right;}</style>
  </head>  
  <body>
    <?php include_once(VIEWPATH. '/admin/_navbar.php'); ?>
    <div class="container">
      <ul class="breadcrumb">
        <li><a href="<?php echo site_url();?>"><i class="fa fa-home"></i></a></li>
        <li><a href="<?php echo site_url('admin');?>">Admin Panel</a></li>
        <li><a href="<?php echo site_url('admin/modules/otomax');?>">OtomaX</a></li>
        <li class="active"><span><?php echo html_escape($server->sv_nama);?></span></li>
      </ul>
      <div class="row">
        <div class="col-sm-4 col-md-3">
          <?php include_once(dirname(__FILE__).'/_sidebar.php');?>
        </div>
        <div class="col-sm-8 col-md-9">
          <?php if ($info):?>
            <div class="alert alert-info"><?php echo nl2br($info);?></div>
          <?php else: ?>
          <div class="well well-sm">
            <?php echo form_open();?>
            <div style="margin-bottom: 10px;">Untuk menambah saldo, silakan ambil tiket deposit terlebih dahulu, kemudian silakan transfer sesuai petunjuk.</div>
            <div class="input-group">
              <input type="number" class="form-control" name="jumlah" value="" placeholder="Masukan jumlah deposit, Contoh: 300000"/>
              <span class="input-group-btn"><button class="btn btn-primary" type="submit" name="submit" value="deposit"><i class="fa fa-check"></i> Kirim</button></span>
            </div>
            <?php echo form_close();?>
          </div>
          <?php endif;?>
          <?php if (!$history_deposit['0101']):?>
          <?php else:?>    
          <div class="panel panel-default">
            <div class="panel-heading">
              <h3><i class="fa fa-money"></i> Riwayat Deposit</h3>
            </div>
            <div class="table-responsive">
              <table class="table table-bordered table-hover">
                <thead>
                  <tr>
                    <th style="width: 140px;">Tanggal</th>
                    <th>Jumlah</th>
                    <th>Status</th>
                    <th>Bayar ke</th>
                  </tr>
                </thead>
                <tbody>
                  <?php foreach ($history_deposit['0101'] as $item):?>
                  <tr>
                    <td style="width: 140px;"><?php echo $item['waktu'];?></td>
                    <td><?php echo $item['jumlah'];?></td>
                    <td><?php echo $item['status'];?></td>
                    <td><?php echo nl2br($item['pesan']);?></td>
                  </tr>
                  <?php endforeach;?>
                </body>
              </table>
            </div>
          </div>
          <?php echo pagination(site_url('admin/modules/otomax/deposit'), $start_num, $history_deposit['1001'], 20, '/%d');?>
          <?php endif;?>
        </div>
      </div>
    </div>
    <?php include_once(VIEWPATH.'includes/foot.php'); ?>
  </body>
</html>