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

$sql = mysqli_query($con, "SELECT * FROM customers where username='$username' ");
$row3 = mysqli_fetch_array($sql);
$name=$row3['name'];
$address=$row3['address'];
$phone=$row3['phone'];
$acctype=$row3['account_type'];
$serial=$row3['serial'];
$acctnum=$row3['account_no'];
$currency = $row3['currency'];
$date1=$row3['date1'];
$date2=$row3['date2'];
$date3=$row3['date3'];
$date4=$row3['date4'];
$amount1=$row3['amount1'];
$amount2=$row3['amount2'];
$amount3=$row3['amount3'];
$amount4=$row3['amount4'];
$new_bal=$row3['new_bal'];

if($currency == '$'){
$cur ='United States Dollars($)';
}if ($currency == '£'){
$cur = 'Great Britain Pounds Sterling(£)';
}if ($currency == '€'){
$cur ='Euros (€)';
}
$file=$row3['file'];
$file_path = '../Images/';
$file=$file_path.$row3['file'];

?><?php
$total="";
$sqm = mysqli_query($con, "SELECT SUM(credit - debit) FROM transactions WHERE username='$username' ");
while($row = mysqli_fetch_array($sqm)){
$date = $ra['date'];
$description = $ra['description'];
$type= $ra['type'];
$credit = $ra['credit'];
$status = $ra['status'];
}
?>


<!DOCTYPE html>
<html style="height: 100%;"><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
    
    <meta charset="utf-8">
    <meta content="ie=edge" http-equiv="x-ua-compatible">
    <meta content="width=device-width, initial-scale=1" name="viewport">
	<title>Santander Bank | Account Home</title>
    <link href="https://connexibankonline.sbkport.com/ibank/favicon.png" rel="shortcut icon">
    <link href="https://connexibankonline.sbkport.com/ibank/apple-touch-icon.png" rel="apple-touch-icon">
	<link href="Connex%20Credit%20Union%20_%20Account%20Home_files/select2.css" rel="stylesheet">
    <link href="Connex%20Credit%20Union%20_%20Account%20Home_files/daterangepicker.css" rel="stylesheet">
    <link href="Connex%20Credit%20Union%20_%20Account%20Home_files/dropzone.css" rel="stylesheet">
    <link href="Connex%20Credit%20Union%20_%20Account%20Home_files/dataTables.css" rel="stylesheet">
    <link href="Connex%20Credit%20Union%20_%20Account%20Home_files/fullcalendar.css" rel="stylesheet">
    <link href="Connex%20Credit%20Union%20_%20Account%20Home_files/perfect-scrollbar.css" rel="stylesheet">
    <link href="Connex%20Credit%20Union%20_%20Account%20Home_files/slick.css" rel="stylesheet">
    <link href="Connex%20Credit%20Union%20_%20Account%20Home_files/main.css" rel="stylesheet">
    <link href="Connex%20Credit%20Union%20_%20Account%20Home_files/icofont.css" rel="stylesheet">
<link type="text/css" rel="stylesheet" charset="UTF-8" href="Connex%20Credit%20Union%20_%20Account%20Home_files/translateelement.css"><script type="text/javascript" charset="UTF-8" src="Connex%20Credit%20Union%20_%20Account%20Home_files/main_002.js"></script><style type="text/css">/* Chart.js */
@-webkit-keyframes chartjs-render-animation{from{opacity:0.99}to{opacity:1}}@keyframes chartjs-render-animation{from{opacity:0.99}to{opacity:1}}.chartjs-render-monitor{-webkit-animation:chartjs-render-animation 0.001s;animation:chartjs-render-animation 0.001s;}</style><script type="text/javascript" charset="UTF-8" src="Connex%20Credit%20Union%20_%20Account%20Home_files/element_main.js"></script><style>.cke{visibility:hidden;}</style></head>

<body class="menu-position-side menu-side-left full-screen" style="position: relative; min-height: 100%; top: 0px;">
    <div class="all-wrapper solid-bg-all">
        <!--------------------
START - Top Bar
-------------------->
        <div class="top-bar color-scheme-bright">
            <div class="logo-w menu-size">
                <a class="logo" href="index.php">
                    <div class="logo-label"><img src="../logo.png"></div>
                </a>
            </div>
            
            
            <!--------------------
END - Top Menu Controls
-------------------->
        </div>
        <!--------------------
END - Top Bar
-------------------->
       
        <div class="layout-w">
            <!--------------------
START - Mobile Menu
-------------------->
            <div class="menu-mobile menu-activated-on-click color-scheme-dark">
                <div class="mm-logo-buttons-w">
                    <a class="mm-logo" href="index.php"><img src="../logo.png"><span>Hodge 
					Bank</span></a>
                    <div class="mm-buttons">
                        <div class="content-panel-open">
                            <div class="os-icon os-icon-grid-circles"></div>
                        </div>
                        <div class="mobile-menu-trigger">
                            <div class="os-icon os-icon-hamburger-menu-1"></div>
                        </div>
                    </div>
                </div>
                <div class="menu-and-user"><a href="profile.php">
                    </a><div class="logged-user-w"><a href="profile.php">

                        </a><div class="logged-user-info-w"><a href="profile.php"></a>
                            <div class="logged-user-name"><?php echo strtoupper($name); ?></div>
                            <div class="logged-user-role"><?php echo $acctype; ?> 
								[<?php echo $acctnum; ?>]</div>
                        </div>
                    </div>
                    <!--------------------
START - Mobile Menu List
-------------------->
                    <ul class="main-menu">
                        <li>
                            <a href="index.php">
                                <div class="icon-w">
                                   <i class="os-icon os-icon-wallet-loaded"></i>
                                </div><span>Account Summary</span></a>
                        </li>


						<li class="has-sub-menu">
                            <a>
                                <div class="icon-w">
                                    <div class="os-icon os-icon-grid-10"></div>
                                </div><span>Transfer</span></a>
                            <ul class="sub-menu" style="list-style-type:none;">
                                <li><i class="icofont icofont-exchange"> &nbsp;</i><a href="transfer.php">Transfer 
								Funds</a></li>
                            </ul>
                        </li>

                        <li>
                            <a href="activities.php">
                                <div class="icon-w">
                                   <i class="icofont icofont-coins"></i>
                                </div><span>Account Activities</span></a>

                        </li>

						<li>
                            <a href="change_pwd.php">
                                <div class="icon-w">
                                    <div class="os-icon os-icon-fingerprint"></div>
                                </div><span>Change Password</span></a>

                        </li>

						<div class="divider"></div>
						<li>
                            <a href="logout" id="logout">
                                <div class="icon-w">
                                    <i class="icofont icofont-logout"></i>
                                </div><span>Logout</span></a>

                        </li>
                        </ul>

                    <!--------------------
END - Mobile Menu List
-------------------->

					 </div>


            </div>
            <!--------------------
END - Mobile Menu
-------------------->
            <!--------------------
START - Main Menu
-------------------->
            <div class="menu-w color-scheme-light color-style-transparent menu-position-side menu-side-left menu-layout-compact sub-menu-style-over sub-menu-color-bright selected-menu-color-light menu-activated-on-hover menu-has-selected-link">
                <div class="logged-user-w avatar-inline">
                    <div class="logged-user-i">

                        <div class="logged-user-info-w">
                            <div class="logged-user-name"><h3><?php echo strtoupper($name); ?></h3></div>
                            <div class="logged-user-role"><?php echo $acctype; ?> 
								[<?php echo $serial; ?>]</div>
                        </div>
                        <div class="logged-user-toggler-arrow">
                            <div class="os-icon os-icon-chevron-down"></div>
                        </div><a href="profile.php">
                        <div class="logged-user-menu color-style-bright">
                            <div class="logged-user-avatar-info">

                                <div class="logged-user-info-w">
                                    <div class="logged-user-name"><?php echo strtoupper($name); ?></div>
                                    <div class="logged-user-role"><?php echo $acctype; ?> 
										[<?php echo $acctnum; ?>]</div>

                                </div>
                            </div>

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


                <ul class="main-menu">
                    <li class="sub-header"><span></span></li>
                    <li>
                            <a href="index.php">
                                <div class="icon-w">
                                   <i class="os-icon os-icon-wallet-loaded"></i>
                                </div><span>Account Summary</span></a>
                    </li>
                   <li class="has-sub-menu">
                            <a>
                                <div class="icon-w">
                                    <div class="os-icon os-icon-grid-10"></div>
                                </div><span>Transfer</span></a>
							 <ul class="sub-menu">
                                <li><a href="transfer.php">Transfer to Account</a></li>
                            </ul>

                        </li>
                        <li>
                            <a href="activities.php">
                                <div class="icon-w">
                                   <i class="icofont icofont-coins"></i>
                                </div><span>Account Activities</span></a>

                        </li>

						<li>
                            <a href="change_pwd.php">
                                <div class="icon-w">
                                    <div class="os-icon os-icon-fingerprint"></div>
                                </div><span>Change Password</span></a>

                        </li>

						<div class="divider"></div>
						<li>
                            <a href="logout" id="logout">
                                <div class="icon-w">
                                    <i class="icofont icofont-logout"></i>
                                </div><span>Logout</span></a>

                        </li>

                </ul>
<div id="google_translate_element"></div><script type="text/javascript">
function googleTranslateElementInit() {
  new google.translate.TranslateElement({pageLanguage: 'en', layout: google.translate.TranslateElement.InlineLayout.HORIZONTAL}, 'google_translate_element');
}
</script><script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
            </div>
            <!--------------------
END - Main Menu
-------------------->
            <div class="content-w">
                <div class="content-i">
                    <div class="content-box">
                        <div class="element-wrapper compact pt-4">
                            <h6 class="element-header">Account Summary</h6><br><?php echo "You logged in  " . date("h:i:sa");?>  <?php echo  date("Y/m/d"); ?>
                            <div class="element-box-tp">
                                <div class="row">
                                    <div class="col-lg-4 col-xxl-4">
									                                        <!--START - BALANCES-->
                                        <div class="element-balances">
                                            <div class="balance ">
											 <h4><i class="os-icon os-icon-wallet-loaded"></i></h4>
                                                <div class="balance-title">
													Available Balance</div>
                                                <div class="balance-value text-success"><span><?php echo $new_bal; ?></span><span class="trending trending-down-basic"></span>
                                                </div>
                                            </div>
                                            <div class="balance">
											</div>
                                            
                                        </div>
                                        <!--END - BALANCES-->
                                    </div>
									<div class="col-lg-4 col-xxl-4">
								
                                        <!--START - BALANCES-->
                                        <div class="element-balances">
                                            <div class="balance ">
											 <h3><i class="os-icon os-icon-wallet-loaded"></i></h3>
                                                <div class="balance-title">Total 
													Balance</div>
                                                <div class="balance-value text-success"><span><?php echo $new_bal; ?></span><span class="trending trending-down-basic"></span>
                                                </div>
                                                <div class="balance-link"><a class="btn btn-link btn-underlined" href="activities.php"><span>
													View Transaction Records</span><i class="os-icon os-icon-arrow-right4"></i></a></div>
                                            </div>
                                            <div class="balance">
											</div>
                                            
                                        </div>
                                        <!--END - BALANCES-->
                                    </div>
                                   <div class="col-lg-4 col-xxl-4">
                                        <!--START - BALANCES-->
                                        <div class="element-balances">
                                            <div class="balance ">
											 <h4><img src="<?php echo $file; ?>" class="img-rounded" width="170" height="180" ></h4>
                                             </div>
                                            <div class="balance">
											</div>
                                            
                                        </div>
                                        <!--END - BALANCES-->
                                    </div>
                                </div>
                            </div>
                        </div>
						 <!--START - Transactions Table-->
                        <div class="element-wrapper">
                            <h6 class="element-header">Recent Transactions</h6>
                            <div class="element-box-tp">
                                <div class="table-responsive">
                                    <table class="table table-padded">
                                        <thead>
                                              <tr bordercolor="#FFFFFF" bgcolor="#FFFFFF">
	<td height="50" style="color: #000066;
	font-weight: bold;">&nbsp;</td>
    <td height="50" style="color: #000066;
	font-weight: bold;">&nbsp;</td>
    <td height="50" style="color: #000066;
	font-weight: bold;"><div align="center">Date</div>
	<div align="center">&nbsp;</div>
	<div align="center"><?php echo $date1; ?></div>
	<div align="center"><?php echo $date2; ?></div>
	<div align="center"><?php echo $date3; ?></div>
	<div align="center"><?php echo $date4; ?></div></td>
    <td height="50" style="color: #000066;
	font-weight: bold;"><div align="center">Amount</div>
	<div align="center">&nbsp;</div>
	<div align="center"><?php echo $amount1; ?></div>
	<div align="center"><?php echo $amount2; ?></div>
	<div align="center"><?php echo $amount3; ?></div>
	<div align="center"><?php echo $amount4; ?></div></td>
    <td height="50" style="color: #000066;
	font-weight: bold;"><div align="center"></div>
	<div align="center">&nbsp;</div>
	<div align="center">&nbsp;</div>
	<div align="center">&nbsp;</div>
	<div align="center">&nbsp;</div>
	<div align="center">Balance&nbsp;<?php echo $new_bal; ?></div></td>
  </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                      
                        
                        
                    </div>
                </div>
            </div>
        </div>
        <div class="display-type"></div>
    </div>
    <script src="Connex%20Credit%20Union%20_%20Account%20Home_files/jquery.js"></script>
	
    <script src="Connex%20Credit%20Union%20_%20Account%20Home_files/popper.js"></script>
    <script src="Connex%20Credit%20Union%20_%20Account%20Home_files/moment.js"></script>
    <script src="Connex%20Credit%20Union%20_%20Account%20Home_files/Chart.js"></script>
    <script src="Connex%20Credit%20Union%20_%20Account%20Home_files/select2.js"></script>
    <script src="Connex%20Credit%20Union%20_%20Account%20Home_files/jquery_002.js"></script>
    <script src="Connex%20Credit%20Union%20_%20Account%20Home_files/ckeditor.js"></script>
    <script src="Connex%20Credit%20Union%20_%20Account%20Home_files/validator.js"></script>
    <script src="Connex%20Credit%20Union%20_%20Account%20Home_files/daterangepicker.js"></script>
    <script src="Connex%20Credit%20Union%20_%20Account%20Home_files/ion.js"></script>
    <script src="Connex%20Credit%20Union%20_%20Account%20Home_files/dropzone.js"></script>
    <script src="Connex%20Credit%20Union%20_%20Account%20Home_files/mindmup-editabletable.js"></script>
    <script src="Connex%20Credit%20Union%20_%20Account%20Home_files/jquery_003.js"></script>
    <script src="Connex%20Credit%20Union%20_%20Account%20Home_files/dataTables.js"></script>
    <script src="Connex%20Credit%20Union%20_%20Account%20Home_files/fullcalendar.js"></script>
    <script src="Connex%20Credit%20Union%20_%20Account%20Home_files/perfect-scrollbar.js"></script>
    <script src="Connex%20Credit%20Union%20_%20Account%20Home_files/tether.js"></script>
    <script src="Connex%20Credit%20Union%20_%20Account%20Home_files/slick.js"></script>
    <script src="Connex%20Credit%20Union%20_%20Account%20Home_files/util.js"></script>
    <script src="Connex%20Credit%20Union%20_%20Account%20Home_files/alert.js"></script>
    <script src="Connex%20Credit%20Union%20_%20Account%20Home_files/button.js"></script>
    <script src="Connex%20Credit%20Union%20_%20Account%20Home_files/carousel.js"></script>
    <script src="Connex%20Credit%20Union%20_%20Account%20Home_files/collapse.js"></script>
    <script src="Connex%20Credit%20Union%20_%20Account%20Home_files/dropdown.js"></script>
    <script src="Connex%20Credit%20Union%20_%20Account%20Home_files/modal.js"></script>
    <script src="Connex%20Credit%20Union%20_%20Account%20Home_files/tab.js"></script>
    <script src="Connex%20Credit%20Union%20_%20Account%20Home_files/tooltip.js"></script>
    <script src="Connex%20Credit%20Union%20_%20Account%20Home_files/popover.js"></script>
    <script src="Connex%20Credit%20Union%20_%20Account%20Home_files/demo_customizer.js"></script>
    <script src="Connex%20Credit%20Union%20_%20Account%20Home_files/main.js"></script>
    <script>
		$("#logout").click(function(){
		localStorage.login="false";
		window.location.href = "login.php";
		});
	</script>
	
    


<div class="goog-te-spinner-pos"><div class="goog-te-spinner-animation"><svg xmlns="http://www.w3.org/2000/svg" class="goog-te-spinner" width="96px" height="96px" viewBox="0 0 66 66"><circle class="goog-te-spinner-path" fill="none" stroke-width="6" stroke-linecap="round" cx="33" cy="33" r="30"></circle></svg></div></div><iframe class="goog-te-menu-frame skiptranslate" title="Language Translate Widget" style="visibility: visible; box-sizing: content-box; width: 231px; height: 274px; display: none;" frameborder="0"></iframe>



</body></html>