<div class="content-header">
        <div>
          <h4 class="content-title"><?php echo $title; ?></h4>
        </div>
      </div><!-- content-header -->
      <div class="content-body">
      	<div class="mb-2">
      		<?php if($mulai == '' AND $sampai == '') { ?>
			<a href="admin/laporan/donasi-masuk/excel" class="btn btn-primary">
				<i class="fas fa-file-excel"></i>
			</a>
			<a href="admin/laporan/donasi-masuk/print" class="btn btn-primary" target="_blank">
				<i class="fas fa-print"></i>
			</a>
			<?php }else { ?>
				<a href="admin/laporan/donasi-masuk/excel/<?php echo $mulai; ?>/<?php echo $sampai; ?>" class="btn btn-primary">
					<i class="fas fa-file-excel"></i>
				</a>
				<a href="admin/laporan/donasi-masuk/print/<?php echo $mulai; ?>/<?php echo $sampai; ?>"  class="btn btn-primary" target="_blank">
					<i class="fas fa-print"></i>
				</a>
			<?php } ?>
			<a class="btn btn-primary" data-toggle="collapse" href="#collapseExample" role="button" aria-expanded="false" aria-controls="collapseExample">
				<i class="fas fa-filter"></i>
			</a>
      	</div>
      	<div class="collapse mg-t-5" id="collapseExample">
		  <div class="card card-body">
		  	<form action="" method="post">
		  		<input type="hidden" name="<?php echo $this->security->get_csrf_token_name(); ?>" value="<?php echo $this->security->get_csrf_hash(); ?>">
		  		<div class="row">
		  			<div class="form-group col-md-3">
		  				<label>Dari</label>
		  				<input type="date" class="form-control form-control-sm" name="start" required="">
		  			</div>
		  			<div class="form-group col-md-3">
		  				<label>Sampai</label>
		  				<input type="date" class="form-control form-control-sm" name="end" required="">
		  			</div>
		  			<div class="form-group col-md-3">
		  				<button type="submit" class="btn btn-success btn-sm mt-4">Lihat</button>
		  			</div>
		  		</div>
		  	</form>
		  </div>
		</div>
      	<table id="myTable" class="table">
	        <thead>
	          <tr>
	          	<th class="wd-5p">No</th>
							<th>Tgl</th>
							<th>Dari</th>
							<th>Jumlah</th>
							<th>Pembayaran</th>
							<th>Virtual Account</th>
							<th>Status</th>
	          </tr>
	        </thead>
	        <tbody>
	        	<?php $i = 1; ?>
				<?php foreach($donasi as $don): ?>
<?php $donbank = $don['donasi_bank'] ? strtoupper($don['donasi_bank']) : ''; ?>
					<tr>
						<td><?php echo $i; ?>.</td>
						<td><?php echo date('d-m-Y', strtotime($don['donasi_tgl'])); ?></td>
						<td><?php echo $don['user_nama']; ?></td>
						<td><?php echo number_format($don['donasi_jml'],0,',','.'); ?></td>
						<td><?php echo $donbank; ?></td>
						<td><?php echo $don['donasi_va']; ?></td>
						<td>
							<?php if($don['donasi_status'] == 1) { ?>
								<span class="badge badge-warning">Pending</span>
							<?php }else if($don['donasi_status'] == 2) { ?>
								<span class="badge badge-success">Masuk</span>
							<?php }else { ?>
								<span class="badge badge-danger">Gagal</span>
							<?php } ?>
						</td>
					</tr>	
				<?php $i++; ?>
				<?php endforeach; ?>
	        </tbody>
	      </table>
      </div><!-- content-body -->