<?php 
session_start();
        
if(!isset($_SESSION['customer_login'])) 
    header('location:index.php');   
?>
<head>
  
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">

  <title>Transfer</title>

  <!-- GOOGLE FONTS -->
  <link href="https://fonts.googleapis.com/css?family=Montserrat:400,500|Poppins:400,500,600,700|Roboto:400,500" rel="stylesheet">
  <link href="https://cdn.materialdesignicons.com/3.0.39/css/materialdesignicons.min.css" rel="stylesheet">

  <!-- PLUGINS CSS STYLE -->
  <link href="assets/plugins/toaster/toastr.min.css" rel="stylesheet">
  <link href="assets/plugins/nprogress/nprogress.css" rel="stylesheet">
  <link href="assets/plugins/flag-icons/css/flag-icon.min.css" rel="stylesheet">
  <link href="assets/plugins/jvectormap/jquery-jvectormap-2.0.3.css" rel="stylesheet">
  <link href="assets/plugins/ladda/ladda.min.css" rel="stylesheet">
  <link href="assets/plugins/select2/css/select2.min.css" rel="stylesheet">
  <link href="assets/plugins/daterangepicker/daterangepicker.css" rel="stylesheet">

  <!-- SLEEK CSS -->
  <link id="sleek-css" rel="stylesheet" href="assets/css/sleek.css">

  

  <!-- FAVICON -->
  <link href="assets/img/favicon.png" rel="shortcut icon">

  <!--
    HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries
  -->
  <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  <![endif]-->
  <script src="assets/plugins/nprogress/nprogress.js"></script>
</head>
<?php include 'header.php' ?>
<?php include 'customer_navbar.php'?>



 

<div class="content-wrapper">
	<div class="content">
	<div class="row">
<!-- TradingView Widget BEGIN -->
<div class="col-xl-12">
                                <div class="card widget-block p-4 ">
                                    <div class="card-block">
<div class="tradingview-widget-container">
  <div class="tradingview-widget-container__widget"></div>
  
  <script type="text/javascript" src="https://s3.tradingview.com/external-embedding/embed-widget-ticker-tape.js" async>
  {
  "symbols": [
    {
      "proName": "OANDA:SPX500USD",
      "title": "S&P 500"
    },
    {
      "proName": "OANDA:NAS100USD",
      "title": "Nasdaq 100"
    },
    {
      "proName": "FX_IDC:EURUSD",
      "title": "EUR/USD"
    },
    {
      "proName": "BITSTAMP:BTCUSD",
      "title": "BTC/USD"
    },
    {
      "proName": "BITSTAMP:ETHUSD",
      "title": "ETH/USD"
    }
  ],
  "colorTheme": "light",
  "isTransparent": false,
  "displayMode": "adaptive",
  "locale": "en"
}
  </script>
</div></div></div></div>
</div>
<!-- TradingView Widget END -->


	<div class="error-wrapper rounded border bg-white ">
              <div class="row justify-content-center">
			  
                <div class="col-xl-6 text-center">
                  <h1 class="text-danger bold ">Transfer Funds</h1>
                  <p class="pt-4 pb-5 error-subtitle text-center">Fill all Information accordingly. All are required</p>

 <div class="card-body">    


                  	        <?php
        include '_inc/dbconn.php';
        $sender_id=$_SESSION["login_id"];
        
        
        $sql="SELECT * FROM customer WHERE id='$sender_id' AND accstatus='Active'";
        $result=  mysqli_query($con, $sql);
        $rws=mysqli_fetch_array($result);
        $s_id=$rws[0];              
        ?>

<div class="card-body">
                      <ul class="nav nav-tabs nav-style-border pl-0 justify-content-between " id="myTab" role="tablist">
                        <li class="nav-item">
                          <a class="nav-link active show" id="home2-tab" data-toggle="tab" href="#home2" role="tab" aria-controls="home2" aria-selected="true">Same Bank</a>
                        </li>
                        <li class="nav-item">
                          <a class="nav-link" id="profile2-tab" data-toggle="tab" href="#profile2" role="tab" aria-controls="profile2" aria-selected="false">Local Bank</a>
                        </li>
                        <li class="nav-item">
                          <a class="nav-link" id="contact2-tab" data-toggle="tab" href="#contact2" role="tab" aria-controls="contact2" aria-selected="false">International Bank</a>
                        </li>
                      </ul>
                      <div class="tab-content" id="myTabContent3">
                        <div class="tab-pane pt-3 fade active show" id="home2" role="tabpanel" aria-labelledby="home2-tab">
							<?php
							if($sender_id==$s_id)    
        				{

								echo "                          <form action='customer_transfer_process.php' method='POST'>\n";
								echo "                        <div class=\"form-row col-md-12 mb-3\">\n";
								echo "                          <label for=\"exampleFormControlInput3\">Account No.</label>\n";
								echo "                          <input type=\"number\" class=\"form-control\" name='transfer' id=\"exampleFormControlInput3\" placeholder=\"Enter Account No.\" required>\n";
								echo "                        </div>\n";
								echo "                        <div class=\"form-row col-md-12 mb-3\">\n";
								echo "                          <label for=\"exampleFormControlPassword3\">Amount</label>\n";
								echo "                          <input type=\"number\" name='t_val' class=\"form-control\" id=\"exampleFormControlPassword3\" placeholder=\"Enter Amount\" required>\n";
								echo "                        </div>\n";
								echo "                        <div class=\"form-row col-md-12 mb-3\">\n";
								echo "                          <label for=\"exampleFormControlSelect3\">Bank</label>\n";
								echo "                          <input type=\"text\" class=\"form-control\" id=\"exampleFormControlInput3\" placeholder=\"Enter Bank\" required>\n";
								echo "                        </div>\n";
								echo "                        <button type=\"submit\" name='submitBtn'class=\"btn btn-danger btn-block\">Transfer Funds</button>\n";
								echo "                      </form>";
								}else{
							echo "<script>
									
							 alert('Please contact your Bank through their contact e-mail.');
								
									</script>";
							echo 'window.location= "error.php";</script>';
						}

							?>

                        </div>
                        <div class="tab-pane pt-3 fade" id="profile2" role="tabpanel" aria-labelledby="profile2-tab">
                     <?php
                     	if($sender_id==$s_id)    
        				{
        					
							echo "<form action='pending.php' method='POST'>\n";
							echo "                        <div class=\"form-row col-md-12 mb-3\">\n";
							echo "<label for=\"exampleFormControlInput3\">Account Name</label>";
							echo "<input type=\"text\" name='transname'class=\"form-control\" id=\"exampleFormControlInput3\" placeholder=\"Enter Account Name\" required>";
							echo "                        </div>\n";
							echo "                        <div class=\"form-row col-md-12 mb-3\">\n";
							echo "<label for=\"exampleFormControlInput3\">Account No.</label>";
							echo "<input type=\"number\" name='accnum' class=\"form-control\" id=\"exampleFormControlInput3\" placeholder=\"Enter Account No.\" required>";
							echo "                        </div>\n";
							echo "                        <div class=\"form-row col-md-12 mb-3\">\n";
							echo "<label for=\"exampleFormControlPassword3\">Amount</label>";
							echo "<input type=\"number\" name='t_val' class=\"form-control\" id=\"exampleFormControlPassword3\" placeholder=\"Enter Amount\" required>";
							echo "                        </div>\n";
							echo "<div class=\"form-row col-md-12 mb-3\">\n";
							echo "<label for=\"exampleFormControlSelect3\">Bank</label>";
							echo "<input type=\"text\" class=\"form-control\" id=\"exampleFormControlInput3\" name='bank' placeholder=\"Enter Bank\" required>";
							echo "</div>";
							echo "<button type=\"submit\"name='submitBtn' class=\"btn btn-block btn-danger\">Transfer Funds</button>";
							echo "                      </form>";

						}else{
							echo "<script>
									
							 alert('Please contact your Bank through their contact e-mail.');
								
									</script>";
						}

					?>

                        </div>
                        <div class="tab-pane pt-3 fade" id="contact2" role="tabpanel" aria-labelledby="contact2-tab">
                          <?php
                          if($sender_id==$s_id)    
        				{
							echo "<form action='pending.php' method='POST'>\n";
							echo "                     <div class=\"form-row col-md-12 mb-3\">\n";
							echo "                <label for=\"username2\">Reciever's Bank Name</label>\n";
							echo "                  <input type=\"text\"placeholder=\"Enter Reciever's Bank Name\" class=\"form-control\" name=\"bank\" id=\"username2\" value=\"\" required=\"yes\">\n";
							echo "                \n";
							echo "              </div>\n";
							echo "                \n";
							echo "                <div class=\"form-row col-md-12 mb-3\">\n";
							echo "                <label for=\"email2\">Reciever's Account name</label>\n";
							echo "                    <input type=\"text\" placeholder=\"Enter Reciever's Account name\" class=\"form-control\" id=\"email2\" name='transname'  value=\"\" required=\"yes\">\n";
							echo "                \n";
							echo "              </div>\n";
							echo "\n";
							echo "                <div class=\"form-row col-md-12 mb-3\">\n";
							echo "                <label for=\"email2\">Reciever's Account number</label>\n";
							echo "                    <input type=\"number\" placeholder=\"Enter Reciever's Account number\" min=\"0\" name='accnum' class=\"form-control\"  value=\"\" required=\"yes\">\n";
							echo "                \n";
							echo "              </div>\n";
							echo "\n";
							echo "                <div class=\"form-row col-md-12 mb-3\">\n";
							echo "                <label for=\"BIC\">Bank Identifier Codes</label>\n";
							echo "                    <!-- <input type=\"text\" name=\"swift\" class=\"input-text\"  value=\"\"  required=\"yes\"/> -->\n";
							echo "                    <select name=\"swift\" class=\"form-control\" required=\"yes\">\n";
							echo "                      <option disabled=\"\"  selected=\"\"> Select type of Bank Identifier Codes</option>\n";
							echo "                      <option value=\"bic\"> BIC </option>\n";
							echo "                      <option value=\"iban\"> IBAN</option>\n";
							echo "                    </select>\n";
							echo "                \n";
							echo "              </div>\n";
							echo "                <div class=\"form-row col-md-12 mb-3\">\n";
							echo "                <label for=\"email2\">Reciever's Bank Identifier Codes</label>\n";
							echo "                    <input type=\"text\" placeholder=\"Enter Reciever's Bank Identifier Codes\" name=\"bic\" class=\"form-control\"  value=\"\" name='ifsc' required=\"yes\">\n";
							echo "                \n";
							echo "              </div>\n";
							echo "                <div class=\"form-row col-md-12 mb-3\">\n";
							echo "                <label for=\"swift\">Swift Code</label>\n";
							echo "                    <input type=\"text\" placeholder=\"Enter Swift Codes\" name=\"swift\" class=\"form-control\"  value=\"\" name='swift' required=\"yes\">\n";
							echo "                \n";
							echo "              </div>\n";
							echo "                <div class=\"form-row col-md-12 mb-3\">\n";
							echo "                <label for=\"email2\">Reciever's Country </label>\n";
							echo "                    <input type=\"text\"  placeholder=\"Enter Reciever's Country\" min=\"0\" name=\"country\" class=\"form-control\" value=\"\" required=\"yes\">\n";
							echo "               \n";
							echo "              </div>\n";
							echo "\n";
							echo "                <div class=\"form-row col-md-12 mb-3\">\n";
							echo "                <label for=\"am\">Amount($) </label>\n";
							echo "                    <input type=\"number\" placeholder=\"Enter Amount($)\" id=\"am\" min=\"0\"  max=\"150960\" name='t_val' class=\"form-control\" value=\"\" required=\"yes\">\n";
							echo "               \n";
							echo "              </div>\n";
							echo "\n";
							echo "                <div class=\"form-row col-md-12 mb-3\">\n";
							echo "                <label for=\"comment\">Transfer Description</label>    \n";
							echo "                    <textarea rows=\"4\" class=\"form-control\" placeholder=\"Transaction description\" name=\"comment\" required=\"yes\"> </textarea>\n";
							echo "                \n";
							echo "              </div>\n";
							echo "                        <button type=\"submit\"name='submitBtn' class=\"btn btn-block btn-danger\">Transfer Funds</button>\n";
							echo "                      </form>\n";
							}else{
							echo "<script>
									
							 alert('Please contact your Bank through their contact e-mail.');
								
									</script>";
						}

?>
               








<!-- <script>
function onTransfer() {
  alert("Please contact your Bank through their contact mail. \n Account Status  <?php #echo $acc_status;?>");
}
</script> -->


</div>
				</div>      

</div>
 </div>
              </div>
            </div>

      

          </div>


</div>
                  
				
<?php include 'footer.php'?>







