anggota_v.php 4.02 KB
Newer Older
SonyaSipahutar committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113
<div>
	 <section class="content-header">
		<h1>
			Data Anggota
		</h1>
		<ol class="breadcrumb">
			<li><a href="<?= site_url('dashboard')?>"><i class="fa fa-dashboard"></i> Home</a></li>
			<li class="active">Data Anggota</li>
		</ol>
    </section>

    <section class="content">
    	<button class="btn btn-primary" data-toggle="modal" data-target="#exampleModal"><i class="fa fa-plus"></i> Tambah Anggota</button>
		<a class="btn btn-danger" href="<?php echo base_url('anggota/cetak')?>"><i class="fa fa-print"></i> Print</a>
		<a class="btn btn-warning" href="<?php echo base_url('anggota/pdf')?>"><i class="fa fa-file"></i> Export PDF</a>
		<a class="btn btn-warning" href="<?php echo base_url('anggota/excel')?>"><i class="fa fa-file"></i> Export Excel</a>

		<div class="navbar-form navbar-right">
			<?php echo form_open('anggota/search')?>
				<input type="text" name="keyword" class="form-control" placeholder="Masukkan kata/angka">
				<button type="submit" class="btn btn-success">Search</button>
			<?php echo form_close()?>
		</div>

		<table  id="table" class="table table-bordered table-sm" >
		<thead>
    		<tr>
    			<th>No</th>
                <th>ID Anggota</th>
				<th>Nama Anggota</th>
				<th>Alamat Lengkap</th>
				<th>Tanggal Lahir</th>
				<th>Email</th>
				<th>No Telepon</th>
                <th colspan="2">Aksi</th>
    		</tr>
		</thead>

		<tbody>
    		<?php
			
    		foreach ($anggota as $agt) : ?>

				<tr>
					<td><?php echo ++$start?></td>
                    <td><?php echo $agt->id_anggota?></td>
					<td><?php echo $agt->nama_anggota?></td>
					<td><?php echo $agt->alamat_lengkap?></td>
					<td><?php echo $agt->tanggal_lahir?></td>
					<td><?php echo $agt->email?></td>
					<td><?php echo $agt->no_telepon?></td>
                    <td><?php echo anchor('anggota/detail/'. $agt->id_anggota,'<div class="btn btn-success btn-sm">detail<i class="fa fa-search-plus"></i></div>')?></td>
                    <td><?php echo anchor('anggota/hapus/'. $agt->id_anggota, '<div class="btn btn-danger btn-sm">hapus<i class="fa fa-trash"></i></div>') ?></td>
                    <td><?php echo anchor ('anggota/edit/'.$agt->id_anggota, '<div class="btn btn-primary btn-sm">edit<i class="fa fa-edit"></i></div>')?></td>
				</tr>
			<?php endforeach;?>
		</tbody>	
    	</table>
		<div class="row">
        <div class="col">
            <!--Tampilkan pagination-->
            <?php echo $pagination; ?>
        </div>
    </div>
    </section>
	

	<!-- Modal -->
	<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
	<div class="modal-dialog" role="document">
		<div class="modal-content">
		<div class="modal-header">
			<h5 class="modal-title" id="exampleModalLabel">FORM DATA ANGGOTA</h5>
			<button type="button" class="close" data-dismiss="modal" aria-label="Close">
			<span aria-hidden="true">&times;</span>
			</button>
		</div>
		<div class="modal-body">
			
			<form method="post" enctype="multipart/form-data" action="<?php echo base_url().'anggota/tambah_aksi';?>">
				<div class="form-group">
					<label>ID Anggota</label>
					<input type="text" name="id_anggota" class="form-control">
				</div>
				<div class="form-group">
					<label>Nama Anggota</label>
					<input type="text" name="nama_anggota" class="form-control">
				</div>
				<div class="form-group">
					<label>Alamat Lengkap</label>
					<input type="text" name="alamat_lengkap" class="form-control">
				</div>
				<div class="form-group">
					<label>Tanggal Lahir</label>
					<input type="date" name="tanggal_lahir" class="form-control">
				</div>
				<div class="form-group">
					<label>email</label>
					<input type="text" name="email" class="form-control">
				</div>
				<div class="form-group">
					<label>No Telepon</label>
					<input type="text" name="no_telepon" class="form-control">
				</div>
				<button type="reset" class="btn btn-danger" data-dismiss="modal">Reset</button>
				<button type="submit" class="btn btn-primary">Simpan</button>
			</form>
		</div>
		</div>
	</div>
	</div>
	</div>