<?php 
session_start();
include('conn_auth.php');
include('customInfo.php');
?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
<title><?php echo $rowUser['cust_name']; ?> | Silvergate Bank | San Diego</title>
  <meta content="width=device-width, initial-scale=1.0" name="viewport">
   <meta name="author" content="PWB">
    <meta name="keyword" content="Investment, Pacific Western, Finance, Co-operate world, Bank"> 
    <meta name="description" content="Pacific Western">
    <meta property="og:title" content="PWB">
    <meta property="og:description" content="Pacific Western">
    

  <!-- Favicons -->
  <link href="img/favicon.png" rel="icon">
  <link href="img/apple-touch-icon.png" rel="apple-touch-icon">

  <!-- Google Fonts -->
  <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,700,700i|Raleway:300,400,500,700,800|Montserrat:300,400,700" rel="stylesheet">

  <!-- Bootstrap CSS File -->
  <link href="lib/bootstrap/css/bootstrap.min.css" rel="stylesheet">

  <!-- Libraries CSS Files -->
  <link href="lib/font-awesome/css/font-awesome.min.css" rel="stylesheet">
  <link href="lib/animate/animate.min.css" rel="stylesheet">
  <link href="lib/ionicons/css/ionicons.min.css" rel="stylesheet">
  <link href="lib/owlcarousel/assets/owl.carousel.min.css" rel="stylesheet">
  <link href="lib/magnific-popup/magnific-popup.css" rel="stylesheet">
  <link href="lib/ionicons/css/ionicons.min.css" rel="stylesheet">

  <!-- Main Stylesheet File -->
  <link href="css/style.css" rel="stylesheet">
   <link href="css/xtrastyle.css" rel="stylesheet">
   <script type="text/javascript" src="js/jquery.1.8.3.min.js"></script> 
   <script type="text/javascript" src="js/script.js"></script>

  <!-- =======================================================
    Theme Name: Reveal
    Theme URL: https://bootstrapmade.com/reveal-bootstrap-corporate-template/
    Author: BootstrapMade.com
    License: https://bootstrapmade.com/license/
  ======================================================= -->
  <style type="text/css">
<!--
.style1 {color: #FFFFFF}
#output_image{
width:150px;
height:150px;
}
-->
  </style>
</head>

<body id="body">
  
  
  <!--==========================
    Header
  ============================-->
  <header id="header2">
    <div class="container">
     <div class="pull-left">
      <div id="logo" class="pull-left">
        <a href="#body" class="scrollto"><img src="img/logo-2x.png" width="200" height="100" /></a>
        <!-- Uncomment below if you prefer to use an image logo -->
        <!-- <a href="#body"><img src="img/logo.png" alt="" title="" /></a>-->
      </div>
      </div>
      <div class="pull-right" style="width:70%;">
      <section id="topbar" class="d-none d-lg-block">
    <div class="container clearfix">
      <div class="social-links float-left">
        <a href="#" ><i class="fa fa-headphones"></i> Support</a>
      <a href="#" ><i class="fa fa-paragraph"></i> Newsletter</a>
      <a href="login.php?action=logout" style="background:#990000;" class="loginBtn" id="" ><i class="fa fa-power-off"></i> Logout</a>
      </div>
    </div>
  </section>
  
      <nav id="nav-menu-container">
        <ul class="nav-menu">
          <li class="menu-active"><a href="personal">Main</a></li>
          <li><a href="my-transaction">My Transactions</a></li>
          <li><a href="pay-bills">Pay Bills</a></li>
          <li><a href="transfer-money">Transfer Money</a></li>
           </ul>
      </nav><!-- #nav-menu-container -->
      </div>
    </div>
  </header><!-- #header -->

  <main id="main">

    <!--==========================
      Our Team Section
    ============================-->
    <section id="team">
      <div class="container">
        <div class="section-header">
        </div>
        <div class="row">
          <div class="col-lg-8 col-md-12">
            <div class="portfolio-page">
   <h2> Secure Online Banking | <?php echo $rowUser['cust_name']; ?></h2>
   <?php
				 
				 $selTrans = $conn->query("select * from credit_info  where accnt_nmb = '" . $rowUser['acct_nmb'] . "'") or die($conn->error);
				 $rowTrans = $selTrans->fetch_assoc();
				 ?> 
                
  <div class="col-lg-12">
                        <div class="pInfo">
                       <div class="transT">
                   <h3>Edit Profile</h3>
                <div>
     <script type='text/javascript'>
function preview_image(event) 
{
 var reader = new FileReader();
 reader.onload = function()
 {
  var output = document.getElementById('output_image');
  output.src = reader.result;
  document.getElementById('img_data').style.display="none";
 }
 reader.readAsDataURL(event.target.files[0]);
}

</script>             
                                   
                        <h4>&nbsp;</h4>           
                       <div class="errorInfo alert alert-danger" style="display:none;"></div>
					   <?php  
                     $d_img=  "<img src='img/profile-pictures.png' id='prof-img' class='prof-img' style='width:150px; hieght:150px;' >";
					 $p_img=  "<img src='upload/". $rowUser['cust_photo']. "' id='prof-photo' class='prof-photo' style='width:150px; hieght:150px;' />"; 
					 ?>
					  <form method="post" action="login.php"  id="formUpload" enctype="multipart/form-data" >
                   <div class="col-md-12" id="uploadForm"> 
                   <div class="col-md-5 col-xs-offset-3">
                   <div id="img_data">
                   <?php echo $rowUser['cust_photo']== "" ? $d_img : $p_img; ?>
                   </div>
                   <img id="output_image"/>
                    </div>
                 </div>
                  <div class="col-md-12 subBox">
                   <div class="col-md-5 col-xs-offset-3">
                   <div id="wrapper">
                <input type="file" name="profile_img" accept="image/*" id="up_img" onChange="preview_image(event)">
                  <input type="hidden" name="customer_id" id="customer_id" value="<?php echo $rowUser['customer_id']; ?>">
                    </div>
                       </div>
                   </div>
                  <div class="col-md-12 subBox">
                   <div class="col-md-5 col-xs-offset-2">
                   <button type="submit" value="Upload Picture" name="action" class="btn btn-info col-xs-10 btn-lg btnUpload">Continue</button>
                   </div>
                   </div>
                  
                   </form>
                              </div>
                </div>
                
              </div>
                    
                    </div>
  </div>
          </div>

          <div class="col-lg-3 col-md-6">
             <?php 
					 $d_img=  "<img src='img/profile-pictures.png' id='prof-img' class='prof-img' style='width:150px; hieght:150px;' >";
					 $p_img=  "<img src='upload/". $rowUser['cust_photo']. "' id='prof-photo' class='prof-photo' style='width:150px; hieght:150px;' />"; 
					  
		      ?>
            <div class="sideBar" style="opacity:0.2">
             <div class="prof-mg">
             <?php echo $rowUser['cust_photo'] =="" ? $d_img : $p_img; ?>
             
             <span class="acc-st">
             <a href="update-profile?fb=update password"> <i class="fa fa-lock"></i> Update password </a> | <a href="update-profile?fb=update password"> <i class="fa fa-user"></i>  My profile </a>
             </span>
             </div>
             <div class="acct-inf-st">
             <table width="100%" >
                             <tr style="border-bottom:1px solid #333333; padding:6px;">
                              <td height="34"><span class="tableHead">Name:</span></td>
                              <td>&nbsp;&nbsp;&nbsp;<?php echo $rowUser['cust_name']; ?></td>
                            </tr>
                             <tr style="border-bottom:1px solid #333333; padding:6px;">
                              <td height="34"><span class="tableHead">Account Number:</span></td>
                              <td>&nbsp;&nbsp;&nbsp;<?php echo $rowUser['acct_nmb']; ?></td>
                            </tr>
                            <tr style="border-bottom:1px solid #333333; padding:6px;">
                              <td height="35"><span class="tableHead">Swift Code:</span></td>
                              <td>&nbsp;&nbsp;&nbsp;<?php echo $rowUser['swift_code']; ?></td>
                            </tr>
                            <tr>
                              <td height="32"><span class="tableHead">Last transaction:</span></strong></td>
                              <td>&nbsp;&nbsp;&nbsp; <?php echo $rowTrans['dat_pay'] ==""? "Not available":  date('d l, Y', strtotime($rowTrans['dat_pay'])); ?></td>
                            </tr>
                          </table>
             </div>
              </div>
          </div>

         

      </div>
    </section><!-- #team -->

  </main>

  <!--==========================
    Footer
  ============================-->
  <footer id="footer">
    <div class="container">
        <div class="row">
          <div class="col-lg-3 addrs-st">
            <h3>Business Banking, Redefined.</h3>
            <p>
            Copyright © 2018 Silvergate Bank
Portions Copyright © Kasasa Ltd.
All rights reserved. 
            </p>
          </div>
          <div class="col-lg-3 cent-st">
           <ul>
           <li><a href="#">Careers</a></li>
    		<li><a href="#">Privacy Policy</a></li>
    		<li><a href="#">Terms & Conditions</a></li>
    		<li><a href="#">Fraud Prevention</a></li>
    		<li><a href="#">Disclosures</a></li>
           </ul>
          </div>
          <div class="col-lg-3 cent-st">
           <ul>
           <li><a href="#">Wire Instructions</a></li>
    		<li><a href="#">Lost or Stolen Card</a></li>
    		<li><a href="#">Investor Relations</a></li>
    		<li><a href="#">Routing Number</a></li>
    		<li><a href="#">Accessibility</a></li>
           </ul>
          </div>
          <div class="col-lg-3 cont-ls-st">
           <h3>Connect With Us</h3>
           <img src="img/bottom-img.png" width="248" height="96" />
          </div>
          
        </div>

      </div>
 </footer><!-- #footer -->

  <a href="#" class="back-to-top"><i class="fa fa-chevron-up"></i></a>

  <!-- JavaScript Libraries -->
  <script src="lib/jquery/jquery.min.js"></script>
  <script src="lib/jquery/jquery-migrate.min.js"></script>
  <script src="lib/bootstrap/js/bootstrap.bundle.min.js"></script>
  <script src="lib/easing/easing.min.js"></script>
  <script src="lib/superfish/hoverIntent.js"></script>
  <script src="lib/superfish/superfish.min.js"></script>
  <script src="lib/wow/wow.min.js"></script>
  <script src="lib/owlcarousel/owl.carousel.min.js"></script>
  <script src="lib/magnific-popup/magnific-popup.min.js"></script>
  <script src="lib/sticky/sticky.js"></script>
  <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyD8HeI8o-c1NppZA-92oYlXakhDPYR7XMY"></script>
  <!-- Contact Form JavaScript File -->
  <script src="contactform/contactform.js"></script>

  <!-- Template Main Javascript File -->
  <script src="js/main.js"></script>

</body>
</html>
