            <div class="block-header">
                <h2>
                  
                     <ol class="breadcrumb breadcrumb-bg-teal">
                                <li><a href="index.php?home"><i class="material-icons">home</i> Home</a></li>
                               <li><a href="index.php?anggota"><i class="material-icons">person</i> Member</a></li>
                                <li class="active">Member View</li>
                            </ol>
                </h2>
            </div>
			<?php 
		
			if(isset($_GET['id']))
			{
			$id=noninjection($koneksi,$_GET['id']);
			$qry_cari=mysqli_query($koneksi,"SELECT * FROM `tb_anggota` WHERE idanggota='".$id."'");
			$row=mysqli_fetch_array($qry_cari);
			$kategori=$row['kategori'];
			$idmember=$row['idanggota'];
			$nik=$row['nik'];
			$nama=$row['nama'];
			$alamat=$row['alamat'];
			$phone=$row['phone'];
			$status=$row['status'];
			$email=$row['email'];
			$pin=$row['pin'];
			$password=$row['password'];
			}else {
			$kategori='';
			$idmember='';
			$nik='';
			$nama='';
			$alamat='';
			$phone='';
			$status='';
			$pin='';
			$email='';
			$password='';
			}
			
			?>
 <div class="row clearfix">
                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                    <div class="card">
                        <div class="header">
                            <h2>MEMBER VIEW</h2>
                           
                        </div>
                        <div class="body">
						<div class="row" style="padding-top:8px; ">
						<div class="col-sm-6">
						<div class="row" style="padding-top:8px; ">
  							<div class="col-sm-4">ID Member</div>
 							 <div class="col-sm-8"><?php echo $idmember;?></div>
							</div> 
							
							<div class="row" style="background-color:#D8F5D3; padding-top:8px; ">
  							<div class="col-sm-4">Kategori</div>
 							 <div class="col-sm-8"><?php echo $kategori;?></div>
							</div> 
							
							<div class="row" style="padding-top:8px;">
  							<div class="col-sm-4">NIK</div>
 							 <div class="col-sm-8"><?php echo $nik;?></div>
							</div> 
							
							<div class="row"  style="background-color:#D8F5D3; padding-top:8px;">
  							<div class="col-sm-4">Nama</div>
 							 <div class="col-sm-8"><?php echo $nama;?></div>
							</div> 
							
							<div class="row" style="padding-top:8px;">
  							<div class="col-sm-4">Alamat</div>
 							 <div class="col-sm-8"><?php echo $alamat;?></div>
							</div> 
							
							<div class="row"  style="background-color:#D8F5D3; padding-top:8px;">
  							<div class="col-sm-4">Phone</div>
 							 <div class="col-sm-8"><?php echo $phone;?></div>
							</div> 
							
							</div> 
							<div class="col-sm-6">
							<div class="row" style="padding-top:8px;">
  							<div class="col-sm-4">eMail</div>
 							 <div class="col-sm-8"><?php echo $email;?></div>
							</div> 
							
							<div class="row"  style="background-color:#D8F5D3; padding-top:8px;">
  							<div class="col-sm-4">Password</div>
 							 <div class="col-sm-8"><?php echo $password;?></div>
							</div> 
							
							<div class="row" style="padding-top:8px;">
  							<div class="col-sm-4">PIN</div>
 							 <div class="col-sm-8"><?php echo $pin;?></div>
							</div>
							
							<div class="row"  style="background-color:#D8F5D3; padding-top:8px;">
  							<div class="col-sm-4">Status</div>
 							 <div class="col-sm-8"><?php echo $status;?></div>
							</div>
							
							<div class="row"  style="padding-top:8px;">
  							<div class="col-sm-4">Saldo</div>
 							 <div class="col-sm-8"><?php 
									$qry_rek=mysqli_query($koneksi,"SELECT * FROM `tb_rekening`  WHERE idanggota='".$id."' order by id desc limit 1");
									$row_rek=mysqli_fetch_array($qry_rek);
									if(mysqli_num_rows($qry_rek)<>0){
									echo number_format($row_rek['saldo'],0,",",".");
									} else {echo '0';}
									?> IDR</div>
							</div>
							</div>
							<div align="right">
							<a href="index.php?anggota&mn=anggota_edit&edit=<?php echo $idmember;?>">
									<button type="button" class="btn bg-green btn-circle waves-effect waves-circle waves-float" data-toggle="tooltip" data-placement="left" title="Edit Data">
                                    	<i class="material-icons">create</i>
                                	</button>
							</a>
									
							<a href="index.php?anggota&del=<?php echo $idmember;?>" onclick="return confirm('Yakin ingin Hapus data ini?');">
								  	<button type="button" class="btn bg-red btn-circle waves-effect waves-circle waves-float" data-toggle="tooltip" data-placement="left" title="Hapus Data">
                                    	<i class="material-icons">delete_sweep</i>
                                	</button>
							</a>
							</div>
							
<?php 		
		$query_cari="SELECT * FROM `tb_rekening` where  (idanggota='".$idmember."') order by id desc";	
		$qry_cari=mysqli_query($koneksi,$query_cari);
		if(mysqli_num_rows($qry_cari)<>0){					
		?>
		
                        <div class="header">
                            <h2>REKENING ANGGOTA</h2>
                           
                        </div>
                        <div class="body">
		 						<div class="table-responsive">
                                <table class="table table-bordered table-striped table-hover dataTable js-exportable">
                                    <thead>
                                        <tr>
                                          <th>ID</th>
											<th>In/Out</th>
											<th>Keterangan</th>
                                            <th>Nominal</th>
                                            <th>Saldo</th>
											<th>Tanggal</th>
											<th>Petugas </th>
                                        </tr>
                                    </thead>
                                    <tfoot>
                                        <tr>
                                           <th>ID</th>
											<th>In/Out</th>
											<th>Keterangan</th>
                                            <th>Nominal</th>
                                            <th>Saldo</th>
											<th>Tanggal</th>
											<th>Petugas </th>
                                        </tr>
                                    </tfoot>
                                    <tbody>
									<?php 
									while($row=mysqli_fetch_array($qry_cari)){
									?>
                                        <tr>
										 <td><?php echo $row['id'];?></td>
										 
										  <td><?php if($row['in_out']=='out'){?><i class="material-icons" style="color:#CC0000">vertical_align_top</i> <?php } elseif($row['in_out']=='in') {?><i class="material-icons" style="color:#336600">vertical_align_bottom</i>  <?php } echo $row['in_out']; ?></td>
                                            	 <td><?php echo $row['keterangan'];?></td>
                                            <td align="right"><?php echo number_format($row['nominal'],0,",",".");?> IDR </td>
                                            <td align="right"><?php echo number_format($row['saldo'],0,",",".");?> IDR</td>
											<td><?php echo $row['tgl'];?></td>
                                           <td>
										   <?php 
									$qry_user=mysqli_query($koneksi,"SELECT * FROM `tb_user`  WHERE id='".$row['iduser']."' limit 1");
									$qry_user=mysqli_fetch_array($qry_user);
									
									echo $qry_user['nama'];
									?>
										   </td>	
                                        </tr>
                                      <?php }?>
                                    </tbody>
                                </table>
                            </div>
							<?php }?>