            <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?penarikan"><i class="material-icons">vertical_align_top</i> Penarikan</a></li>
                                <li class="active"> Penarikan View</li>
                            </ol>
                </h2>
            </div>
			<?php 
if(isset($_POST['submit'])){
	$del=noninjection($koneksi,$_POST['del']);
	$idanggota=noninjection($koneksi,$_POST['idanggota']);
	$iduser=noninjection($koneksi,$_POST['iduser']);
	$pin=noninjection($koneksi,$_POST['pin']);
	$task="34567fghjkl;FGHJK09865fghjs12345@#$@#$!@#";
			
	$pin=md5($pin);
	$pin_encript=md5($pin.$task);
		
	if($iduser==$_SESSION['iduser'])
	{		
	$qry_pin=mysqli_query($koneksi,"SELECT * FROM `tb_user` WHERE (email='".$_SESSION['email']."') AND (password='".$_SESSION['password']."') AND (pin='".$pin_encript."')");
	$N_pin=mysqli_num_rows($qry_pin);
	if($N_pin<>0)
	{

		$qry_rek=mysqli_query($koneksi,"SELECT * FROM `tb_rekening` WHERE idanggota='".$idanggota."' order by id desc limit 1");
			$N=mysqli_num_rows($qry_rek);
			if($N<>0)
			{
				$row=mysqli_fetch_array($qry_rek);
				if($row['id']==$del)
				{

					$qry_del=mysqli_query($koneksi,"DELETE FROM `tb_rekening` WHERE (id='".$del."') and (iduser='".$_SESSION['iduser']."')");
					if($qry_del){echo ' <div class="alert bg-green alert-dismissible" role="alert">
                                <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                <strong>Well done!</strong> Hapus Data Sukses.
                            </div>';
							
							}else {
							echo '<div class="alert bg-pink alert-dismissible" role="alert">
                                <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                               <strong>Warning!</strong> Hapus Data Gagal.
                            </div>';
							}
				}else {
				echo '<div class="alert bg-pink alert-dismissible" role="alert">
                                <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                               <strong>Warning!</strong> HAPUS GAGAL, Hanya data terbaru yang bisa di hapus.
                            </div>';
				}
			}
		}else {
				echo '<div class="alert bg-pink alert-dismissible" role="alert">
                                <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                               <strong>Warning!</strong> HAPUS GAGAL, PIN Salah.
                            </div>';
				}
}else {
				echo '<div class="alert bg-pink alert-dismissible" role="alert">
                                <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                               <strong>Warning!</strong> HAPUS GAGAL, Hapus data harus petugas yang input.
                            </div>';
				}
}
?>
			
			<?php 
		
			if(isset($_GET['id']))
			{
			$id=noninjection($koneksi,$_GET['id']);
			$qry_rek=mysqli_query($koneksi,"SELECT * FROM `tb_rekening` WHERE id='".$id."'");
			$N=mysqli_num_rows($qry_rek);
			if($N<>0)
			{
			while($row=mysqli_fetch_array($qry_rek))
			{
			$qry_cari=mysqli_query($koneksi,"SELECT * FROM `tb_anggota` WHERE idanggota='".$row['idanggota']."'");
			$row_cari=mysqli_fetch_array($qry_cari)
			?>
			<form action="index.php?penarikan&mn=penarikan_del&id=<?php echo $id?>" method="post">
 <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>KONFIRMASI HAPUS PENARIKAN </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 $row['idanggota'];?></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 $row_cari['kategori'];?></div>
							</div> 
							
							
							
							<div class="row"  style=" padding-top:8px;">
  							<div class="col-sm-4">Nama</div>
 							 <div class="col-sm-8"><?php echo  $row_cari['nama'];?></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  $row_cari['phone'];?></div>
							</div>
							
							<div class="row"  style=" padding-top:8px; font-size:16px">
  							<div class="col-sm-4">Input PIN </div>
 							 <div class="col-sm-8"> <input type="password" class="form-control" name="pin" style="width:200px"  required></div>
							</div>
							 
							
							</div><div class="col-sm-6">
							<div class="row" style="padding-top:8px;">
  							<div class="col-sm-4">Nominal</div>
 							 <div class="col-sm-8"><?php echo  number_format($row['nominal'],0,",",".");?> IDR</div>
							</div> 
							
							<div class="row"  style="background-color:#D8F5D3; padding-top:8px;">
  							<div class="col-sm-4">Keterangan</div>
 							 <div class="col-sm-8"><?php echo $row['keterangan'];?></div>
							</div> 
							
							<div class="row" style="padding-top:8px;">
  							<div class="col-sm-4">Saldo</div>
 							 <div class="col-sm-8"><?php echo number_format($row['saldo'],0,",",".");
							 ?> IDR</div>
							</div>
							
							<div class="row"  style="background-color:#D8F5D3; padding-top:8px;">
  							<div class="col-sm-4">Reff 1</div>
 							 <div class="col-sm-8"><?php echo $row['reff'];?></div>
							</div>
							<div class="row"  style=" padding-top:8px;">
  							<div class="col-sm-4">Reff 2</div>
 							 <div class="col-sm-8"><?php echo $row['reff2'];?></div>
							</div>
							
							<div class="row"  style="background-color:#D8F5D3; padding-top:8px;">
  							<div class="col-sm-4">Tanggal Transaksi</div>
 							 <div class="col-sm-8"><?php echo $row['tgl'];?></div>
							</div>
							</div>
							<div align="center">
							<input name="idanggota" type="hidden" value="<?php echo $row['idanggota'];?>"  />
							
								<input name="del" type="hidden" value="<?php echo $row['id'];?>" />
								<input name="iduser" type="hidden" value="<?php echo $row['iduser'];?>" />
							
								  	<button type="submit" name="submit" class="btn bg-red btn-circle waves-effect waves-circle waves-float" data-toggle="tooltip onclick="return confirm('Yakin ingin Hapus data ini?');"" data-placement="left" title="HAPUS TRANSAKSI">
                                    	<i class="material-icons">delete_sweep</i>
                                	</button> 
							
							</div>
							</div>
							</form>
							
							
<?php }} else {?> 
 <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>PENARIKAN VIEW</h2>
                           
                        </div>
                      

</div>
</div>
</div>
<?php }} ?>