<?php include("includes/header.php"); ?>
<?php include("includes/auto_out.php"); ?>
<!DOCTYPE html>
<html>
<head>
	<title>Transfer | <?php echo $sitename; ?></title>
	
	   <!----------------------------------------------------------------------->
	   <meta charset="utf-8">
	   <meta name="viewport" content="width=device-width, initial-scale=1">
	   <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
	   <script src="bootstrap/js/jquery.min.js"></script>
	   <script src="bootstrap/js/bootstrap.min.js"></script>
	   <!----------------------------------------------------------------------->
	   <link rel="icon" href="images/fav-icon.ico" type="image/x-icon" />
	   <link rel="shortcut icon" href="images/fav-icon.ico" type="image/x-icon" />
	   <!----------------------------------------------------------------------->
	   <!-------------------Constumized CSS--------------------------->
	   <link rel="stylesheet" type="text/css" href="css/style.cs">

	   <link rel="stylesheet" href="font-awesome/css/font-awesome.min.css">
	   <style>
	   	.icons-links{
	   	  text-decoration: none;
	   	  color: #555;
	   	  font-size: 16px;
	   	  font-weight: bolder;
	   	}
	   	.icons-links:hover{
	   	  color:#0c2074;
	   	  text-decoration: none;
	   	}
        .input-danger{
          border:1px solid darkred;
          color:darkred;
        }
        .input-danger::placeholder{
          opacity: 0.6;
          color:darkred;
        }
	   </style>
	   
</head>
<body>
	<?php  include("includes/dashboard_nav.php"); ?>
    <br><br>
	<div class="container-fluid">
		<div class="row">
			<div class="col-sm-2">
				<?php include("includes/sidebar.php"); ?>
			    <?php include("includes/side.php"); ?>

			</div>
			<div class="col-sm-10">
                <br><br>
                <div class="row">
                    <div class="col-sm-1"></div>
                	<div class="col-sm-10">
                       <!--================================================================================================================================-->

                       <div class="panel panel-default" id="panel-one" style="border:1px solid transparent;">
                         <div class="panel-body">
                          <div class="panel panel-default" id="panel-two">
                            <div class="panel-body">

                              <div class="progress" style="border-radius: 0px;">
                                <div class="progress-bar progress-bar-success progress-bar-striped" role="progressbar" aria-valuenow="30"
                                aria-valuemin="0" aria-valuemax="100" style="width:30%">
                                  STEP 1 OF 3
                                </div>
                              </div>

                              <div class="row" style="margin-top: -15px;">
                                <div class="col-md-4 col-xs-4" align="left" style="font-size: 14px; color:#337ab7;"><b>IDENTIFY</b></div>
                                <div class="col-md-4 col-xs-4" align="center" style="font-size: 14px;"><b>VERIFY</b></div>
                                <div class="col-md-4 col-xs-4" align="right" style="font-size: 14px;"><b>COMPLETE</b></div>
                              </div>


                           <span id="output"></span>
                           <div class="row">
                            <div class="col-md-3">
                             

                            </div>
                            
                             <div class="col-md-6">
                              <br>
                              <h2 style="color: #0c2074; font-size: 16px; font-weight: bold;">OTHER BANKS TRANSFER</h2>
                              <p>
                                Fill in the account details of the transferee.
                              </p>
                              <br>
                              <?php
                               if(isset($_POST["ltraansferbtn"])){
                                   $name = $_POST["name"];
                                   $amount = $_POST["amount"];
                                   $bank_name = $_POST["bank_name"];
                                   $account_number = $_POST["account_number"];
                                   $date = date("Y-M-D");
                                   $account_id = $account_id;
                                   
                                   
                                   $query = mysqli_query($conn, "INSERT INTO pending VALUES('', '$account_id', '$date', '$name', '$bank_name', '$account_number', '$amount')");

//  MAIL TO SEND OTP CODE.
//SEND MAIL CONTAINING USER ID.......

                 $email_to = $email;
                 $subject = "One-time password (OTP) Code";
                 

                 //BIG MESSAGE
                 $message = '
                 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                    <html xmlns="http://www.w3.org/1999/xhtml">
                     <head>
                      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
                      <title>Account created.</title>
                      <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
                    </head>
                    <body>
                      <div style="background-color:#f8f8f8;">
                        <img src="https://firststandardplc.com/images/first%20standard.png" class="img-responsive" width="140">
                      </div>
                      <br>
                      
                      <p style="font-size:18px;">
                         Your One-time password (OTP) code is 87530286.
                      </p>
                      
     
                      <br><br>
                      <div style="background-color:#e10514; color:#fff;">&nbsp; &copy; '.date("Y").' copyright, Firststandard</div>
                    </body>
                    </html>
                 ';

                    $headers[] = 'MIME-Version: 1.0';
                    $headers[] = 'Content-type: text/html; charset=iso-8859-1';

                    // Additional headers
                     $headers[] = 'From: Firststandard<info@firststandardplc.com>';

                    //SEND MAIL
                     mail($email_to, $subject, $message,  implode("\r\n", $headers));


                    echo '<script>window.location.assign("otp-code.php?amount='.$amount.'&&name='.$name.'")</script>';
                    
                    
                               }
                              ?>
                              <form action="" method="POST">
                               <input type="text" name="bank_name" class="form-control" style="border-radius: 0px;" placeholder="BANK NAME">
                               <br>
                               <input type="text" name="account_number" class="form-control" style="border-radius: 0px;" placeholder="ACCOUNT NUMBER">
                               <br>
                               <input type="text" name="name" class="form-control" style="border-radius: 0px;" placeholder="TRANSFEREE NAME">
                               <br>
                               
                                   <input type="text" class="form-control" name="amount" placeholder="AMOUNT" style="border-radius: 0px;">
                             
                               <br>
                               <button class="btn btn-danger btn-block btn-lg" name="ltraansferbtn" style="border-radius:0px; background-color: #022151; border-color: #022151; border-radius: 25px;"> Continue</button>
                              
                              </form>
                             </div>
                            
                             <div class="col-md-3">

                             </div>
                             
                           </div>
                           <br><br>
                         </div>
                       </div>
                     </div>
                   </div>
                       <!--================================================================================================================================-->  
                    </div>
                    <div class="col-sm-1"></div>
                </div>
			</div>
		</div>
	</div>
</body>
</html>