<?php
session_start();
if (!isset($_SESSION['user'])) {
        header("location:../loginfailed.html");
}
include_once("../connect.php");
 
$username= $_SESSION['user'];		  


$result3 = mysqli_query($con, "SELECT * FROM customers WHERE username='$username' LIMIT 1 ");
$row3 = mysqli_fetch_array($result3);
$name=$row3['name'];
$file=$row3['file'];
$file_path = '../Images/';
$file=$file_path.$row3['file'];

?>
<head>
<meta http-equiv="Page-Enter" content="revealTrans(Duration=7.0,Transition=14)">
<title>Transfer</title>

<script>


function checkrequired(which){
var pass=true
if (document.images){
for (i=0;i<which.length;i++){
var tempobj=which.elements[i]
if (tempobj.name.substring(0,8)=="required"){
if (((tempobj.type=="text"||tempobj.type=="textarea")&&tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&tempobj.selectedIndex==-1)){
pass=false
break
}
}
}
}
if (!pass){
alert("All fields must be filled in!")
return false
}
else
return true
}
</script>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head>
<body link="#336666">
<p align="center"><img border="0" src="../logo.png" width="101" height="93"><br>
</p>
<font color="#336666"><table border="0" cellpadding="6" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111" width="100%" class="AutoNumber4" height="203"> 
</font>
<tr> 
  <td width="100%" height="19" valign="top" bordercolor="#EEF1FB" bgcolor="#EEF1FB"> 
    <font color="#336666"><b><font face="Arial">Customer Account&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    <a class="link" href="acclogout.php">Log out</a></font></b></font></td>
</tr>
<font color="#336666"><font color="#800000"></font>
<tr> <font color="#336666"><font color="#800000"></font>
  <td width="100%" height="158" valign="top"> <table border="0" cellspacing="1" width="100%" id="AutoNumber2" height="5">
      <tr> 
        <form method=post action="transferring.php" onSubmit="return checkrequired(this)">
                    <td width="100%" height="83" valign="top"><p><font face="Arial" size="2" color="#336666">Destination 
              Bank Name:<br>
              </font> <font color="#336666"> 
              <input type="text" name="requiredD" size="44" style="background-color: #EEF1FB">
              </font></p>
            <p><font face="Arial" size="2" color="#336666">Destination Bank Branch:<br>
              </font> <font color="#336666"> 
              <input type="text" name="requiredB" size="44" style="background-color: #EEF1FB">
              </font></p>
            <font face="Arial" size="2" color="#336666"> Destination Bank City:<br>
            </font> <font color="#336666"> 
            <input type="text" name="requiredcity" size="44" style="background-color: #EEF1FB">
            </font> <p><font face="Arial" size="2" color="#336666"> Destination 
              Bank Swift Code:<br>
              </font> <font color="#336666"> 
              <input type="text" name="requiredsc" size="44" style="background-color: #EEF1FB">
              </font></p>
            <font face="Arial" size="2" color="#336666"> Destination Account Name/Holder:<br>
            </font> <font color="#336666"> 
            <input type="text" name="requiredn" size="44" style="background-color: #EEF1FB">
            </font> <p><font face="Arial" size="2" color="#336666"> Destination 
              Account Number:<br>
              </font> <font color="#336666"> 
              <input type="text" name="requiredaccnu" size="44" style="background-color: #EEF1FB">
              </font></p>
            <p><font face="Arial" size="2" color="#336666">Amount:<br>
              </font> <font color="#336666"> 
              <input name="amount" type="text" id="amount" style="background-color: #EEF1FB" size="44">
              <br>
              <input type="submit" value="Transfer!" name="B3">
              </font></p>
        </form>
        <p>&nbsp;</p>
        &nbsp; 
        <p>&nbsp;</p>
        &nbsp; 
        <p>&nbsp;</p>
        &nbsp; 
        <p><font color="#336666">&nbsp;<font color="#800000"></form></font></font> 
        <P align="center"><font color="#336666"><img border="0" src="ntap4.gif" width="105" height="60"></font></P>
    </table>
