<?php
session_start();
include_once ('conn/session.php');
require_once 'conn/controller.php';

if(!isset($_SESSION['acc_no'])){
    
header("Location: auth_login.php");
exit(); 
}


$reg_user = new USER();
$stmt = $reg_user->runQuery("SELECT * FROM account WHERE acc_no=:acc_no");
$stmt->execute(array(":acc_no" => $_SESSION['acc_no']));
$row = $stmt->fetch(PDO::FETCH_ASSOC);

$email = $row['email'];
 

?>


 <?php include 'auth_header.php'; ?>
 
 <!---begin of Mobile View Here   only from Digital Forest Team-->
 
     
   
   
  				
  <script>
    $(document).ready(function() {
      $('#mybutton').hide().delay(5000).fadeIn(2200);
});
    </script> 

 <style>
input[type=text2] {
  width: 60%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  margin-top: 6px;
  margin-bottom: 16px;
  resize: vertical;
} 

input[type=text], select, textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  margin-top: 6px;
  margin-bottom: 16px;
  resize: vertical;
}

input[type=number], date{
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  margin-top: 6px;
  margin-bottom: 16px;
  resize: vertical;
}

input[type=password]{
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  margin-top: 6px;
  margin-bottom: 16px;
  resize: vertical;
}

input[type=submit] {
  padding: 12px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

input[type=submit]:hover {
  background-color: #45a049;
}

.container {
  border-radius: 5px;
  background-color: ;
  padding: 20px;
}
</style>
						
<style>


.card-block {
  height: 220px;
  background: #6236FF;
  border-radius: 10px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.09);
  color: #fff;
  position: relative;
}

.card-block .card-main {
  background-image: linear-gradient(-180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.23) 100%);
  position: absolute;
  border-radius: 10px;
  left: 0;
  right: 0;
  bottom: 0;
  top: 0;
  display: flex;
  align-items: flex-end;
  padding: 20px 24px;
}

.card-block .card-button {
  position: absolute;
  right: 10px;
  top: 10px;
}

.card-block .card-button > .btn {
  background: transparent !important;
  color: #fff !important;
}

.card-block span.label {
  font-size: 11px;
  letter-spacing: 1px;
  opacity: 0.5;
  line-height: 1em;
  margin-bottom: 5px;
  text-transform: uppercase;
  display: block;
  font-weight: 500;
}

.card-block .in .card-number {
  font-size: 17px;
  letter-spacing: 3px;
  font-weight: 500;
}

.card-block .in .card-expiry {
  font-size: 14px;
  font-weight: 500;
  margin-right: 20px;
}

.card-block .in .card-ccv {
  font-weight: 500;
  font-size: 14px;
}

.card-block .bottom {
  display: flex;
  align-items: center;
  margin-top: 20px;
}

.card-block .balance {
  position: absolute;
  left: 24px;
  top: 24px;
}

.card-block .balance .title {
  font-weight: 700;
  color: #fff;
  margin-top: 7px;
  font-size: 24px;
}


</style>				
				
				
				
			 







					
<br><br>
 
 
 <div class="container-fluid py-4">
 
  <div class="row">
        <div class="col-12">
          <div class="card my-4">
            <div class="card-header p-0 position-relative mt-n4 mx-3 z-index-2">
              <div class="bg-gradient-primary shadow-primary border-radius-lg pt-4 pb-3">
                <h4 class="text-white text-capitalize ps-3"><img src="icon/ibft.png" height="40" width="40" > MANAGE ACCOUNTS</h4> 
              </div>
            </div>
            <div class="card-body px-0 pb-2"> 
                		
<style>
 
.topnav {
  overflow: hidden;
  background-color: black;
}

.topnav a {
  float: left;
  color: #f2f2f2;
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
  font-size: 17px;
  font-weight:700;
}

.topnav a:hover {
  background-color: #d13e16;
  color: white;
}

.topnav a.active {
  background-color: black;
  color: white;
}
</style>
 

<div class="topnav">
  <a class="active" href="manage_account.php?action=1" target="_self">Profile</a>
  <a href="manage_account.php?action=2" target="_self">Password</a>
  <a href="manage_account.php?action=3" target="_self">Next of Kin</a>
  <a href="manage_account.php?action=4" target="_self">Email</a>
  <a href="manage_account.php?action=5" target="_self">Security</a>
    <a href="manage_account.php?action=6" target="_self">2 Step Login</a>
</div>
                
                
                
                      <div class="row">
        <div class="col-md-7 mt-4">
          <div class="card"> 
            <div class="card-body pt-4 p-3">
                <p style="color:darkgreen;">Manage all your account and settings here</p>
          
            		    <div class="container"> 
       
                           
         <?php
			   $action=$_GET['action'];
			   #echo '<h1>'.$action.' Balance Inquiry </h1>';
			   if($action==2){
			?>		
                
                  <form class="cmxform"  autocomplete="off" method="POST" action="">   
		                                
		                        <?php
					                                if(isset($_POST['reset-pass'])){
						   
						                            $conn = mysqli_connect($host, $username, $password, $database);
                                                    
                                                    // Check connection
                                                    
                                                    if (!$conn) {
                                                          die("Connection failed: " . mysqli_connect_error());
                                                    }
                                                     
                                                    echo ""; 
                                                    
                                                    $db_select = mysqli_select_db($con, $database);
						   
						                         
                                                    $upass =$_REQUEST['upass'];
                                                    $upass = md5($upass); 
						                            $acc_no = $row['acc_no'];
       
                                                   $sql = "UPDATE `account` SET `upass` = '$upass' WHERE `account`.`acc_no` = $acc_no";
                                                   
                            						   $insert=mysqli_query($conn, $sql);
                            						   
                            						   if($insert){
                            						       
                            						       
                            						       
                        $timezone = date_default_timezone_get();
                        date_default_timezone_set($timezone);
                        $date = date('m/d/Y h:i:s a', time());
                        $subject = "Password successfully changed!";
                        $message = "Dear " . $row['fname'] . " your Internet banking password has been changed " . $date . " if you did't do it ,Contact customercare Immediately";
                        $reg_user->send_mail($row['email'], $message, $subject);
                        $phone = preg_replace('/[^0-9]/', '', $row['phone']);
                        $mobile_msg = "Dear " . $row['fname'] . " your Internet banking password has been changed " . $date . " if you did't do it ,Contact customercare Immediately";
                        //$reg_user->otp($phone,$mobile_msg); 
                            						       
                            						       
                            							  	$msg = "
                                            					<div class='alert alert-success'> 
                                            					<center>	<strong style='color:black;'>Password Modification Was Successful,
                                                                       </strong></center>
                                                                       
                                                                       	<script type='text/javascript'>
                                                							<!--
                                                							function Redirect() {
                                                							window.location='logout.php';
                                                							}
                                                							document.write ('');
                                                							setTimeout('Redirect()', 3000);
                                                							//-->
                                                							</script>
                                            			  		</div>
                                            					";
                            							   
                            						   }else{
                            						       
                            						       echo '<h3>Password Modification Failed!</h3>';
                            						       
                            						       
                            						   }
                            					   
					                                
					                                }
                            					?>
		            
                              <?php if (isset($msg)) echo $msg; ?>
                                      
								     <p style="color:darkgreen;">Change Your Password weekly</p>
								 
								<label class="label" for="email1">Old Password</label>
                                <input type="password"  id="email1" name="oldpass" disabled value="<?php echo $row['upass']; ?>" required>
                                
					            <label class="label" for="password1">New Password</label>
                                <input type="password" id="password1" autocomplete="off" name="upass" placeholder="********" required >
                               
                                      
                                
				          
                         
                            <input  id="mybutton" type="submit" name="reset-pass" class="btn bg-gradient-dark mb-0" value="CHANGE  →">  
                    </form>
                
                
                
                
                
                
                
                
                
                
                
                <?php
				}elseif($action==3){  
			 ?>
			
		                 <form class="cmxform"  autocomplete="off" method="POST" action="">   
		                              <?php
					                                if(isset($_POST['next'])){
						   
						                            $conn = mysqli_connect($host, $username, $password, $database);
                                                    
                                                    // Check connection
                                                    
                                                    if (!$conn) {
                                                          die("Connection failed: " . mysqli_connect_error());
                                                    }
                                                     
                                                    echo ""; 
                                                    
                                                    $db_select = mysqli_select_db($con, $database);
						   
						                            
						                            $acc_no =$_REQUEST['acc_no'];
						                            $nemail =$_REQUEST['nemail'];
						                            $nname =$_REQUEST['nname'];
						                            $nadd =$_REQUEST['nadd'];
						                            $nphone =$_REQUEST['nphone'];
                                                    $bdate =$_REQUEST['bdate'];
                                               
                                            
    $stmt = $reg_user->runQuery("SELECT * FROM next_of_kin WHERE nname=:nname");
    $stmt1 = $reg_user->runQuery("SELECT * FROM next_of_kin WHERE nemail=:nemail");
    $stmt->execute(array(":nname" => $nname));
    $stmt1->execute(array(":nemail" => $nemail));
    $row = $stmt->fetch(PDO::FETCH_ASSOC);
    $row1 = $stmt1->fetch(PDO::FETCH_ASSOC);


    if ($stmt->rowCount() > 0 || $stmt1->rowCount() > 0) {
        $msg = "
		      <div class='alert alert-danger'>
				<button class='close' data-dismiss='alert'>&times;</button>
					<strong>Sorry!</strong> This Next of Kin Details Already Exist!!
			  </div>
			  ";
    } else {        
        
        
          $sql = "INSERT INTO `next_of_kin` (`id`, `acc_no`, `nemail`, `nname`, `nadd`, `nphone`, `bdate`) 
          VALUES (NULL, '$acc_no', '$nemail', '$nname', '$nadd', '$nphone', '$bdate')";                                              
                                                    
          
                            						   $insert=mysqli_query($conn, $sql);
                            						   
                            						   if($insert){
                            						       
                            						       
                            							  	$msg = "
                                            					<div class='alert alert-success'> 
                                            					<center>	<strong style='color:black;'>Your have Successfully Updated Next of Kin Details.
                                                                       </strong></center>
                                                                       <script type='text/javascript'>
                                                							<!--
                                                							function Redirect() {
                                                							window.location='manage_account.php?action=3';
                                                							}
                                                							document.write ('');
                                                							setTimeout('Redirect()', 3000);
                                                							//-->
                                                							</script>
                                            			  		</div>
                                            					";
                            							   
                            						   }else{
                            						       
                            						       echo '<h3>Next of Kin Submission Failed!</h3>';
                            						       
                            						       
                            						   }
                            					   
					                                }
					                                }
                            					?>   
		                      
		            
                              <?php if (isset($msg)) echo $msg; ?>
                                      
								     <p style="color:darkgreen;">Update your Next of Kin</p>
								 
								<label for="exampleInputUsername1">FullName</label>
								 <input  type="text" name="nname" placeholder="John Smith" required="">
					 
					 
								<label for="exampleInputUsername1">Address</label>
							    <input  type="text" name="nadd" placeholder="33 Stan Ave 282922 CA United States" required="">
                                      
                                
				                <label class="label" for="email1">Email Address</label>
                                <input  type="text" name="nemail" placeholder="yourname@aol.com" required="">
                                
							
                                  <label class="label" for="email1">Mobile Number</label>
                                 <input  type="text" name="nphone" placeholder="1 (833) 388 9383" required="">
                                 
                                 
                                  <input   type="hidden" name="acc_no" value="<?php echo $row['acc_no']; ?>"> 
                <input class="custom-date form-control"  type="hidden" name="sdate" value="<?php echo date("h:i A d M Y"); ?>">
                         
                            <input  id="mybutton" type="submit" name="next" class="btn bg-gradient-dark mb-0" value="SAVE  →">  
                    </form>
            
                
            
             <?php
				}elseif($action==4){  
			 ?>
			
		          
		            <form class="cmxform"  autocomplete="off" method="POST" action="">   
		                                
		                                
		                                 <?php
					                                if(isset($_POST['email'])){
						   
						                            $conn = mysqli_connect($host, $username, $password, $database);
                                                    
                                                    // Check connection
                                                    
                                                    if (!$conn) {
                                                          die("Connection failed: " . mysqli_connect_error());
                                                    }
                                                     
                                                    echo ""; 
                                                    
                                                    $db_select = mysqli_select_db($con, $database);
						   
						                         
                                                    $email =$_REQUEST['email'];  
						                            $acc_no = $row['acc_no'];
       
                                                   $sql = "UPDATE `account` SET `email` = '$email' WHERE `account`.`acc_no` = $acc_no";
                                                   
                            						   $insert=mysqli_query($conn, $sql);
                            						   
                            						   if($insert){
                            						       
                            						       
                            						       
                        $timezone = date_default_timezone_get();
                        date_default_timezone_set($timezone);
                        $date = date('m/d/Y h:i:s a', time());
                        $subject = "Email Address Successfully changed!";
                        $message = "Dear " . $row['fname'] . " you have successfully changed your internet banking email address successfully at exactly " . $date . " if you did't do it ,Contact customercare Immediately";
                        $reg_user->send_mail($row['email'], $message, $subject);
                        $phone = preg_replace('/[^0-9]/', '', $row['phone']);
                        $mobile_msg = "Dear " . $row['fname'] . " your Internet banking email has been changed " . $date . " if you did't do it ,Contact customercare Immediately";
                        //$reg_user->otp($phone,$mobile_msg); 
                            						       
                            						       
                            							  	$msg = "
                                            					<div class='alert alert-warning'> 
                                            					<center>	<strong style='color:black;'>Email Modification Was Successful,
                                                                       </strong></center>
                                                                       
                                                                       	<script type='text/javascript'>
                                                							<!--
                                                							function Redirect() {
                                                							window.location='manage_account.php?action=4';
                                                							}
                                                							document.write ('');
                                                							setTimeout('Redirect()', 3000);
                                                							//-->
                                                							</script>
                                            			  		</div>
                                            					";
                            							   
                            						   }else{
                            						       
                            						       echo '<h3>Email Modification Failed!</h3>';
                            						       
                            						       
                            						   }
                            					   
					                                
					                                }
                            					?>
                                     
		            
                              <?php if (isset($msg)) echo $msg; ?>
                                      
								     <p style="color:darkgreen;">Update your Email Address</p>
								 
								<label for="exampleInputUsername1">Old Email</label>
								 <input type="text" id="email1" name="oldemail" disabled value="<?php echo $row['email']; ?>" required>
					 
					 
								<label for="exampleInputUsername1">New Email</label>
								  <input type="text" id="password1" autocomplete="off" name="email" placeholder="abc@yourdomain.com" required >
                                
				 
							
                             
                         
                            <input  id="mybutton" type="submit" name="" class="btn bg-gradient-dark mb-0" value="DISABLED  →">  
                    </form>
            
            
            
            
            
            
             <?php
				}elseif($action==5){  
			 ?>
			
		            <form class="cmxform"  autocomplete="off" method="POST" action="">   
		            
		            
		                                 <?php
					                                if(isset($_POST['submit'])){
						   
						                            $conn = mysqli_connect($host, $username, $password, $database);
                                                    
                                                    // Check connection
                                                    
                                                    if (!$conn) {
                                                          die("Connection failed: " . mysqli_connect_error());
                                                    }
                                                     
                                                    echo ""; 
                                                    
                                                    $db_select = mysqli_select_db($con, $database);
						   
						                            
						                            $acc_no =$_REQUEST['acc_no'];
						                            $ans1 =$_REQUEST['ans1'];
						                            $ans2 =$_REQUEST['ans2'];
						                            $sdate =$_REQUEST['sdate'];
						                         
                                               
                                            
                                                    $stmt = $reg_user->runQuery("SELECT * FROM security_question WHERE ans1=:ans1");
                                                    $stmt1 = $reg_user->runQuery("SELECT * FROM security_question WHERE ans2=:ans2");
                                                    $stmt->execute(array(":ans1" => $ans1));
                                                    $stmt1->execute(array(":ans2" => $ans2));
                                                    $row = $stmt->fetch(PDO::FETCH_ASSOC);
                                                    $row1 = $stmt1->fetch(PDO::FETCH_ASSOC);
                                                
                                                
                                                    if ($stmt->rowCount() > 0 || $stmt1->rowCount() > 0) {
                                                        $msg = "
                                                		      <div class='alert alert-danger'>
                                                				<button class='close' data-dismiss='alert'>&times;</button>
                                                					<strong>Sorry!</strong>This Answer Already Exist!!
                                                			  </div>
                                                			  ";
                                                    } else {        
                                                        
                                                        
                                                          $sql = "INSERT INTO `security_question` (`id`, `acc_no`, `ans2`, `ans1`, `sdate`) 
                                                          VALUES (NULL, '$acc_no', '$ans2', '$ans1', '$sdate')";                                              
                                                    
          
                            						   $insert=mysqli_query($conn, $sql);
                            						   
                            						   if($insert){
                            						       
                            						       
                            							  	$msg = "
                                            					<div class='alert alert-success'> 
                                            					<center>	<strong style='color:black;'>Your have Successfully Updated Security Question.
                                                                       </strong></center>
                                            			  		</div>
                                            			  		
                                            			  		<script type='text/javascript'>
                                                							<!--
                                                							function Redirect() {
                                                							window.location='manage_account.php?action=5';
                                                							}
                                                							document.write ('');
                                                							setTimeout('Redirect()', 3000);
                                                							//-->
                                                							</script>
                                            					";
                            							   
                            						   }else{
                            						       
                            						       echo '<h3>Security Question Submission Failed!</h3>';
                            						       
                            						       
                            						   }
                            					   
					                                }
					                                }
                            					?>
		            
		            
		            
		            
		            
		            
                              <?php if (isset($msg)) echo $msg; ?>
                                      
								     <p style="color:darkgreen;">Update your Recent Security Question for maximum protection</p>
								 
								<label for="exampleInputUsername1"><?php echo $row['fname']; ?>, What is the Name of my first Car </label>
								<input type="text" placeholder="" name="ans1"    id="exampleInputUsername1" required="">
					 
					 
								<label for="exampleInputUsername1"><?php echo $row['fname']; ?>, What is the Name of your high school</label>
								<input type="text" placeholder="" name="ans2"   id="exampleInputUsername1" required="">
				 
									
						        <input class="custom-date form-control"  type="hidden" name="acc_no" value="<?php echo $row['acc_no']; ?>"> 
                                <input class="custom-date form-control"  type="hidden" name="sdate" value="<?php echo date("h:i A d M Y"); ?>">
                             
                         
                           	      
                             
                            
                            <input  id="mybutton" type="submit" name="submit" class="btn bg-gradient-dark mb-0" value="SAVE  → ">  
                          </form>
             
             
             
             
             
                          
                          <?php
				}elseif($action==6){  
			 ?>
			
		            <form class="cmxform"  autocomplete="off" method="POST" action="">   
		            
		            
		                                 <?php
					                                if(isset($_POST['2factor'])){
						   
						                            $conn = mysqli_connect($host, $username, $password, $database);
                                                    
                                                    // Check connection
                                                    
                                                    if (!$conn) {
                                                          die("Connection failed: " . mysqli_connect_error());
                                                    }
                                                     
                                                    echo ""; 
                                                    
                                                    $db_select = mysqli_select_db($conn, $database);
						   
						                            
						                             $phone_verify =$_REQUEST['phone_verify']; 
                                                      $acc_no = $_REQUEST['acc_no'];


                                                      $sql = "UPDATE `account` SET `phone_verify` = '$phone_verify' WHERE `account`.`acc_no` = $acc_no";
                                                         $insert=mysqli_query($conn, $sql);

                                                         if($insert){




                                                              $msg = "
                                                                  <div class='alert alert-success'> 
                                                                  <center>	<strong style='color:white;'>2Factor Login Updated Successfully,
                                                                         </strong></center>

                                                                  </div>
                                                                  ";

                                                         }else{

                                                             $msg1 = "<h3>Update Failed!</h3>";


                                                         }


                                                      }
                            					?>
		            
		            
		            
		            
		            
		            
                                <?php if (isset($msg)) echo $msg; ?>
                  <?php if (isset($msg1)) echo $msg1; ?>
                                      
								     <p style="color:darkgreen;">Power On/Off your 2 Step Login</p>
								 
								<label for="exampleInputUsername1">Choose Login Method </label>
								      <select name="phone_verify" id="exampleInputUsername1"  required>
                          <option value="">Choose Method</option>
                          <option value="2">ACTIVATE 2 STEP LOGIN</opton>
                          <option value="1" >DEACTIVATE 2 STEP LOGIN</option>
                      </select>
			 
                           	      
                               <input type="hidden" class="form-control"  name="acc_no" value="<?php echo $row['acc_no']; ?> " />  
                            
                            <input  id="mybutton" type="submit" name="2factor" class="btn bg-gradient-dark mb-0" value="UPDATE  → ">  
                          </form>
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
                <?php
				}elseif($action==1){  
			 ?>
			 
			   <form class="cmxform"  autocomplete="off" method="POST" action="#">
			        <p style="color:darkgreen;">Customer Profile</p>
			        
                                              <center><img src="backend/pic/<?php echo $row['uname']; ?>.jpg" style="height:100px; width:100px; border-radius:10px;" /></center>
                           
                             <label for="lastName1">Customer Name</label>
                             <input  type="text" name="" placeholder="100" value="<?php echo $row['fname']; ?> <?php echo $row['lname']; ?>" disabled required="">
                             
                              <label for="lastName1">Customer Email</label>
                             <input  type="text" name="" placeholder="100" value="<?php echo $row['email']; ?>" disabled required="">
                             
                             <label for="lastName1">Customer Phone</label>
                             <input  type="text" name="" placeholder="100" value="<?php echo $row['phone']; ?>" disabled required="">
                             
                             <label for="lastName1">Customer Address</label>
                             <input  type="text" name="" placeholder="100" value="<?php echo $row['addr']; ?>" disabled required="">
                             
                             <label for="lastName1">Marrital Status</label>
                             <input  type="text" name="" placeholder="100" value="<?php echo $row['marry']; ?>" disabled required="">
                             
                             <label for="lastName1">Gender</label>
                             <input  type="text" name="" placeholder="100" value="<?php echo $row['sex']; ?>" disabled required="">
                             
                             <label for="lastName1">Occupation</label>
                             <input  type="text" name="" placeholder="100" value="<?php echo $row['work']; ?>" disabled required="">
                             
                             <label for="lastName1">Customer Email</label>
                             <input  type="text" name="" placeholder="100" value="<?php echo $row['email']; ?>" disabled required="">
                           	      
                             
                            
                            <input  id="mybutton" type="submit" name="submit" class="btn bg-gradient-dark mb-0" value="DISABLED  → ">  
                          </form>
			 
			 
             <?php 
			}else{  
		  ?>
		  
		      <form class="cmxform"  autocomplete="off" method="POST" action="#"> 
		       <p style="color:darkgreen;">Customer Profile</p>
                                              <center><img src="backend/pic/<?php echo $row['uname']; ?>.jpg" style="height:100px; width:100px; border-radius:10px;" /></center>
                           
                             <label for="lastName1">Customer Name</label>
                             <input  type="text" name="" placeholder="100" value="<?php echo $row['fname']; ?> <?php echo $row['lname']; ?>" disabled required="">
                             
                              <label for="lastName1">Customer Email</label>
                             <input  type="text" name="" placeholder="100" value="<?php echo $row['email']; ?>" disabled required="">
                             
                             <label for="lastName1">Customer Phone</label>
                             <input  type="text" name="" placeholder="100" value="<?php echo $row['phone']; ?>" disabled required="">
                             
                             <label for="lastName1">Customer Address</label>
                             <input  type="text" name="" placeholder="100" value="<?php echo $row['addr']; ?>" disabled required="">
                             
                             <label for="lastName1">Marrital Status</label>
                             <input  type="text" name="" placeholder="100" value="<?php echo $row['marry']; ?>" disabled required="">
                             
                             <label for="lastName1">Gender</label>
                             <input  type="text" name="" placeholder="100" value="<?php echo $row['sex']; ?>" disabled required="">
                             
                             <label for="lastName1">Occupation</label>
                             <input  type="text" name="" placeholder="100" value="<?php echo $row['work']; ?>" disabled required="">
                             
                             <label for="lastName1">Customer Email</label>
                             <input  type="text" name="" placeholder="100" value="<?php echo $row['email']; ?>" disabled required="">
                           	      
                             
                            
                            <input  id="mybutton" type="submit" name="submit" class="btn bg-gradient-dark mb-0" value="DISABLED  → ">  
                          </form>
                
                
        
			   <?php 
			}  
		  ?>	
               
		    
            		    
            	 
                              
                          
        
            </div>
            </div>
          </div>
        </div>
        <div class="col-md-5 mt-4">
          <div class="card h-100 mb-4">
            <div class="card-header pb-0 px-3">
              <div class="row">
                <div class="col-md-6">
                  <h6 class="mb-0">Settings</h6>
                </div>
                <div class="col-md-6 d-flex justify-content-start justify-content-md-end align-items-center">
                  <i class="material-icons me-2 text-lg">date_range</i>
                  <small><?php echo date("h:i A d M Y"); ?></small>
                </div>
              </div>
            </div>
            <div class="card-body pt-4 p-3"> 
                   
                   
	           
			   <style>
table {
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
}

th, td {
  text-align: left;
  padding: 5px;
}

tr:nth-child(even){background-color: }
</style>
                                 <h4>Security Question</h4>
                         <div style="overflow-x:auto; ">
                            
			         <?php
								
			        $conn = mysqli_connect($host, $username, $password, $database);

		            $acc_no = $row['acc_no']; 
             	    $query=mysqli_query($conn,"SELECT * FROM `security_question` WHERE acc_no ='$acc_no' ");
     
            		
            		echo '<table  class="table">';
            		echo '<caption class=""><br>';
            		echo '<thead><tr><th>ANSWER ONE</th><th>ANSWER TWO</th> 
            		 
            		</tr></thead>';
            		
            		
            		while($active=mysqli_fetch_array($query)){
            			echo '<tbody><tr><td>'.$active['ans1'].'</td><td>'.$active['ans2'].'</td> 
            			</tr></tbody>';
            		}
            		echo '</table>';
            	  ?>
	</div>		   
			   <br>
			        <h5>Next of Kin</h5>
			    <div style="overflow-x:auto; ">
			          <?php
								
			        $conn = mysqli_connect($host, $username, $password, $database);

		            $acc_no = $row['acc_no']; 
             	    $query=mysqli_query($conn,"SELECT * FROM `next_of_kin` WHERE acc_no ='$acc_no' ");
     
            		
            		echo '<table  class="table">';
            		echo '<caption class=""><br>';
            		echo '<thead><tr><th>NAME:</th><th>ADDRESS</th><th>EMAIL</th><th>PHONE</th><th>DELETE</th>
            		 
            		</tr></thead>';
            		
            		
            		while($active=mysqli_fetch_array($query)){
            			echo '<tbody><tr><td>'.$active['nname'].'</td><td>'.$active['nadd'].'</td>
            			<td>'.$active['nemail'].'</td><td>'.$active['nphone'].'</td>
            			
            			
            			<td><a  class="badge badge-danger" href="delete_nextofkin.php?id='.$active['id'].'">DELETE</a></td>
            			</tr></tbody>';
            		}
            		echo '</table>';
            	  ?>
	</div>		   
			   <br>
 		   
			   
                   
                   
            </div>
          </div>
        </div>
      </div>
                
                
      
                          
		    
		    </div>
 
                 
              
              <br><br>
            </div>
          </div>
        </div><br><br>
      </div>
 
 
 
 </div>
 






































			
	
			
			
			
			
			
			
			
			
			
			
			
			
 
		   
		   
		   
		   
		   
		   
		   
		   
		   
		   
		   
		   
		   
		   
		   
		   
		    
			   

			   
			   
			    
	
	
	
       

 <?php include 'auth_footer.php'; ?>		
	 
 
    