<?php 

session_start(); 

$message = $_GET['message'];



if (!$_SESSION['unamename']) { 

    $error = "You are not logged in!"; 

	header("Location:../login.php?message=$error");

    exit(); 

} 

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >

<html lang="en">



<head>

<title>Online  Banking - Accounts Summary</title>

<meta name="GENERATOR" content="Microsoft FrontPage 6.0">

<meta name="CODE_LANGUAGE" content="C#">

<meta name="vs_defaultClientScript" content="JavaScript">

<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">

<script type="text/javascript" SRC="../../../includes/scripts/script.js" type="text/javascript"></script>

<meta http-equiv="Content-Style-Type" content="text/css">

<link rel="stylesheet" type="text/css" media="aural" href="../includes/css/DPC_auralstyle.css">

<link rel="stylesheet" type="text/css" media="print" href="../includes/css/DPC_printstyle.css">

<link rel="stylesheet" type="text/css" media="screen" href="../includes/css/FA_style.css">

<script type="text/javascript" type="text/javascript" SRC="../js/common.js"></script>

<noscript></noscript>

</head>

<body topmargin="0"leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0" ms_positioning="FlowLayout">



<table border="0" cellpadding="0" cellspacing="0" class="wrapperTable" width="100%">

	<tr>

		<td class="headerCell" valign="top" colspan="2">

		<div class="ddalink">

			<a accesskey="m" title="Skip to menu" class="ddalink" href="#menu">Skip 

			to menu </a>

			<a accesskey="c" title="Skip to content" class="ddalink" href="#content">

			Skip to content </a>

			<a id="AccessLink" accesskey="o" title="Turn on Accessibility Features " class="ddalink" href="#">

			Turn on Accessibility Features</a> </div>

		



<a name="top"></a>

<table class="header" border="0" cellpadding="0" cellspacing="0" width="100%">

	<tr>

		<td valign="bottom">

		<a accesskey="h" HREF="../default.php">

		<img src="../images/logo.png" width="200" height="120" alt="" border="0"></a></td>

		<!--td width="100%" valign="top"><a href="#content" accesskey="s"></a>

		<img border="0" src="/microsites/online_/images/spacer.gif" alt=" " width="1" height="60"></td-->

		<td valign="top">

		<img src="../images/topcontainerbg.gif" width="1140" height="120" alt="" border="0"></td>

	</tr>

</table>
<hr color="#003da6">





<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">

  <tr>

  		<td class="option-bar-shadow-home" valign="top"><img border="0" SRC="../images/spacer.gif" alt=" " width="1" height="4"></td>

  </tr>

</table><br />

		<table cellspacing="0" cellpadding="0" border="0" width="100%" id="table3" class="intropara"><!-- Inline CSS Whole Table -->

			<tr>

				<td rowspan="98" valign="top" width="10" bgcolor="#ffffff">

				</td>

				<td valign="top" width="11">

				<img SRC="../images/intro/tl.gif" width="7" height="6" alt=" " border="0"></td>

				<td rowspan="2">

				<strong><?php echo $_SESSION['greeting']; ?></strong><span class="detailValueGeneral"><strong> <?php echo $_SESSION['first_name']; ?></strong></span><br />

			  </td>

				<td rowspan="2" valign="top" align="right">

				<img SRC="../images/intro/tr.gif" width="8" height="7" alt=" " border="0"></td>

				<td bgcolor="#ffffff" rowspan="2"></td>

			</tr>

			<tr>

				<td valign="top"></td>

			</tr>

			<tr>

				<td height="11" colspan="4" bgcolor="#ffffff"></td>

			</tr>

		</table>

		</td>

	</tr>

	<tr>

		<td class="menuCell" valign="top"><a id="menu" name="menu"></a>

		<table cellpadding="2" cellspacing="0" width="148">

			<tr>

				<td>

				<table class="mnu" cellspacing="0" cellpadding="0" border="0" style="width:100%;border-collapse:collapse;">

					<tr class="mnu0current">

						<td><span class="mnu0current">Accounts Summary</span></td>

					</tr>

					<tr class="mnu0">

						<td><span class="mnu0">

						<a accesskey="2" title="Access Key = 2" class="mnu0" HREF="../statements/2_0_statements.php">



						Statements</a></span></td>

					</tr>

					<tr class="mnu0">

						<td><span class="mnu0">

						<a accesskey="3" title="Access Key = 3" class="mnu0" HREF="../transfers/3_0_transfers.php">

						<span>Transfers</span></a></span></td>

					</tr>

					<tr class="mnu0">

						<td><span class="mnu0">

						<a accesskey="6" title="Access Key = 6" class="mnu0" HREF="../settings/6_0_change_settings.php">

						<span>Change Settings</span></a></span></td>

					</tr>

					<tr class="mnu0">

						<td><span class="mnu0">

						<a accesskey="7" title="Access Key = 7" class="mnu0" HREF="../logoff/default.php">

						<span>Leave</span></a></span></td>

					</tr>

				</table>

				



<!--br>

<div class="altframe" style="width:148px;margin-right:0px;padding-right:0px;">

	<b>

	<h3><span id="ASBTHE" class="fauxh3">Apply Online</span></h3>

	</b>

	<table class="olalt-panel" border="0" padding="0">

		<tr class="mnu0">

			<td>

			<a class="applynow-link" href="/ri_01a.php?id=PERSONAL/LOANS/PERSONAL_LOAN">

			Apply for a loan</a></td>

		</tr>

		<tr class="mnu0">

			<td>

			<a class="applynow-link" href="/ri_01.php?id=PERSONAL/SAVINGS_INVESTMENTS">

			Apply for a savings account</a></td>

		</tr>

		<tr class="mnu0">

			<td>

			<a class="applynow-link" href="/ri_01.php?id=PERSONAL/CREDIT_CARDS">

			Apply for a credit card</a></td>

		</tr>

		<tr class="mnu0">

			<td>

			<a class="applynow-link" href="/ri_01.php?id=PERSONAL/MORTGAGES">Apply 

			for a mortgage</a></td>

		</tr>

		<tr class="mnu0">

			<td>

			<a class="applynow-link" href="/ri_01.php?id=PERSONAL/CURRENT_ACCOUNTS">

			Apply for a current account</a></td>

		</tr>

	</table>

</div-->

</td>

			</tr>

		</table>

		</td>

		<td style="width:100%" class="contentCell" valign="Top">

		<form autocomplete="off" name="Form1" method="post" id="Form1">

			<h1 id="AS1BTHA">Accounts Summary</h1>

			<div id="AS1SIT1A" class="frame">

				<h2 id="AS1BTHB">Your Accounts </h2>

				<span id="AS1BTEA" class="clearImg">Select an account to view your 

				mini statement.</span>

				<table id="Accounts" cellpadding="4" cellspacing="0" class="ItemTable">

					<colgroup>

						<col class="General" /><col class="Numeric" />

						<col class="Numeric" /><col class="Currency" />

						<col class="Currency" />

					</colgroup>

					<thead>

						<tr>

							<th scope="col" abbr="Name">

							  <div align="left"><a class="dtHdrOn" title="Order by Account name descending" href="#">

					        Account name<img SRC="../images/arrowup_white.gif" border="0" alt="Order by Account name descending" / width="7" height="4"></a></div></th>

							<th scope="col" abbr="Number">

							  <div align="left"><a class="dtHdr" title="Order by Account number" href="#">

						    Account number</a></div></th>

							<th scope="col" abbr="Sort code">

							  <div align="left"><a class="dtHdr" title="Order by Sort code" href="#">

						    Sort code</a></div></th>

							<th scope="col" abbr="Balance">

							  <div align="left"><a class="dtHdr" title="Order by Balance" href="#">Balance</a></div></th>

							<th scope="col" abbr="Available">

							  <div align="left"><a class="dtHdr" title="Order by Available" href="#">

						    Available</a></div></th>

						</tr>

					</thead>

					<tr class="dtem">

						<td nowrap="nowrap">

						  <div align="left"><img SRC="../images/arrowright.gif" alt="Account Selected" / width="4" height="7"><span><?php echo $_SESSION['first_name']; ?>&nbsp; <?php echo $_SESSION['last_name']; ?></span></div></td>

						<td nowrap="nowrap"><div align="left"><?php echo $_SESSION['account_no']; ?></div></td>

						<td nowrap="nowrap"><div align="left"><?php echo $_SESSION['client_no']+100; ?>-92-17</div></td>

						<td nowrap="nowrap"><div align="left">&#x24;<?php echo number_format($_SESSION['bal'],2); ?> USD</div></td>

						<td nowrap="nowrap"><div align="left">&#x24;<?php echo number_format($_SESSION['bal'],2); ?> USD</div></td>

					</tr>

					</table>

			</div>

			<div id="AS1SIT2A" class="frame">

				<h3 id="AS1BTHC" class="frmHdr">Mini Statement </h3>

				<table class="dtSlaveDesc" border="0">

					<tr id="AS1BTEC1Row" class="dt">

						<td id="AS1BTEC1BrandText">Selected Account:</td>

						<td id="AS1BTEC1Text"><?php echo $_SESSION['account_type']; ?></td>

					</tr>

				</table>

				<span id="AS1BTEB">Items shown with today&#39;s date are subject to 

				confirmation and may be reversed from your account.</span>

				<table id="MiniStatementNAP" cellpadding="4" cellspacing="0" class="ItemTable">

					<colgroup>

						<col class="Date" /><col class="Wrap" />

						<col class="Currency" /><col class="Currency" />

					</colgroup>

					<thead>

						<tr>

							<th scope="col" abbr="Date">

							  <div align="left"><a class="dtHdrOn" title="Order by Date descending" href="#">

						    Date<img SRC="../images/arrowup_white.gif" border="0" alt="Order by Date descending" / width="7" height="4"></a></div></th>

							<th scope="col" abbr="Description">

							  <div align="left"><a class="dtHdr" title="Order by Description" href="#">

						    Description</a></div></th>

							<th scope="col" abbr="In">

							  <div align="left"><a class="dtHdr" title="Order by Paid In" href="#">Paid 

						    In</a></div></th>

							<th scope="col" abbr="Out">

							  <div align="left"><a class="dtHdr" title="Order by Paid Out" href="#">

						    Paid Out</a></div></th>

						</tr>

					</thead>

					<?php

$clientno = $_SESSION['client_no'];

include("../base.php"); 

$query="SELECT * FROM account WHERE client_no='$clientno'";

$result= mysql_query($query);

$num=mysql_numrows($result);

$bal= '0';

$i=0;

while ($i < $num) {



$_SESSION['trans_no']=mysql_result($result,$i,"trans_no");

$_SESSION['client_no']=mysql_result($result,$i,"client_no");

$_SESSION['date']=mysql_result($result,$i,"date");

$_SESSION['description']=mysql_result($result,$i,"description");

$_SESSION['paid_in']=mysql_result($result,$i,"paid_in");

$_SESSION['paid_out']=mysql_result($result,$i,"paid_out");

$amount=mysql_result($result,$i,"bal");

$bal=($bal + $_SESSION['paid_in']) - $_SESSION['paid_out'];

$_SESSION['bal']=$bal;



?><tr class="dto">

						<td nowrap="nowrap"><div align="left"><?php echo $_SESSION['date']; ?></div></td>

						<td><div align="left"><?php echo $_SESSION['description']; ?></div></td>

						<td nowrap="nowrap"><div align="left">&#x24;<?php echo number_format($_SESSION['paid_in'],2); ?> USD</div></td>

						<td nowrap="nowrap"><div align="left">&#x24;<?php echo number_format($_SESSION['paid_out'],2); ?> USD</div></td>

					</tr>



						<?php

$i++;

}

$query="UPDATE account SET bal='$bal' WHERE client_no='$clientno'";

mysql_query($query);



$query_acc="UPDATE mayis SET bal='$bal' WHERE client_no='$clientno'";

mysql_query($query_acc);

mysql_close();

?>

				</table>

				<table class="tbSpacer" cellspacing="0" cellpadding="0" border="0" style="border-collapse:collapse;">

					<tr>

						<td class="alcol"><span id="AS1ALA" class="call-2">

						<a id="AS1ALAAnchor" class="call-2" HREF="1_1_View_account_details.php">

						<img SRC="../images/UlsterBlueArrowRight.gif" alt="*" align="AbsMiddle" style="border-width:0px;" / width="6" height="9"><span>View 

						Account Details</span></a></span> </td>

						<td class="alcol"><span id="AS1ALB1" class="call-2">

						<a id="AS1ALB1Anchor" class="call-2" HREF="../statements/2_1_view_statements.php">

						<img SRC="../images/UlsterBlueArrowRight.gif" alt="*" align="AbsMiddle" style="border-width:0px;" / width="6" height="9"><span>View 

						Full Statement</span></a></span> </td>

					</tr>

				</table>

			</div>

		</form>

		</td>

	</tr>

	<tr>

		<td colspan="2">

		



<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">

	<tr>

		<td>

		<img border="0" SRC="../images/spacer.gif" alt=" " width="1" height="5"></td>

	</tr>

	<tr>

		<td valign="top">

		<img border="0" SRC="../images/footer/left_botcorner.gif" alt=" " align="left" hspace="0" width="10" height="23"></td>

		<td width="100%" class="bgcolor-footer" valign="top">

		<script type="text/javascript" SRC="../../../includes/scripts/redsheriff.js" type="text/javascript"></script>

		<noscript>

		<img SRC="../../../../nielsen.natwest.com/cgi-bin/count@cid=ulster Bank" alt=" " width="1" height="1">

		</noscript>

		<img border="0" SRC="../images/spacer.gif" alt=" " width="1" height="5"></td>

		<td valign="top">

		<img border="0" SRC="../images/footer/right_botcorner.gif" align="right" alt=" " hspace="0" width="10" height="23"></td>

	</tr>

</table>

</td>

	</tr>

</table>



</body>



</html>
