<?php
//initialize the session
if (!isset($_SESSION)) {
  session_start();
}

// ** Logout the current user. **
$logoutAction = $_SERVER['PHP_SELF']."?doLogout=true";
if ((isset($_SERVER['QUERY_STRING'])) && ($_SERVER['QUERY_STRING'] != "")){
  $logoutAction .="&". htmlentities($_SERVER['QUERY_STRING']);
}

if ((isset($_GET['doLogout'])) &&($_GET['doLogout']=="true")){
  //to fully log out a visitor we need to clear the session varialbles
  $_SESSION['MM_Username'] = NULL;
  $_SESSION['MM_UserGroup'] = NULL;
  $_SESSION['PrevUrl'] = NULL;
  unset($_SESSION['MM_Username']);
  unset($_SESSION['MM_UserGroup']);
  unset($_SESSION['PrevUrl']);
	
  $logoutGoTo = "login.php";
  if ($logoutGoTo) {
    header("Location: $logoutGoTo");
    exit;
  }
}
?>
<?php
if (!isset($_SESSION)) {
  session_start();
}
$MM_authorizedUsers = "";
$MM_donotCheckaccess = "true";

// *** Restrict Access To Page: Grant or deny access to this page
function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) { 
  // For security, start by assuming the visitor is NOT authorized. 
  $isValid = False; 

  // When a visitor has logged into this site, the Session variable MM_Username set equal to their username. 
  // Therefore, we know that a user is NOT logged in if that Session variable is blank. 
  if (!empty($UserName)) { 
    // Besides being logged in, you may restrict access to only certain users based on an ID established when they login. 
    // Parse the strings into arrays. 
    $arrUsers = Explode(",", $strUsers); 
    $arrGroups = Explode(",", $strGroups); 
    if (in_array($UserName, $arrUsers)) { 
      $isValid = true; 
    } 
    // Or, you may restrict access to only certain users based on their username. 
    if (in_array($UserGroup, $arrGroups)) { 
      $isValid = true; 
    } 
    if (($strUsers == "") && true) { 
      $isValid = true; 
    } 
  } 
  return $isValid; 
}

$MM_restrictGoTo = "login.php";
if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) {   
  $MM_qsChar = "?";
  $MM_referrer = $_SERVER['PHP_SELF'];
  if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";
  if (isset($QUERY_STRING) && strlen($QUERY_STRING) > 0) 
  $MM_referrer .= "?" . $QUERY_STRING;
  $MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" . urlencode($MM_referrer);
  header("Location: ". $MM_restrictGoTo); 
  exit;
}
?>
<script type="text/javascript">
<!--
function MM_validateForm() { //v4.0
  if (document.getElementById){
    var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
    for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]);
      if (val) { nm=val.name; if ((val=val.value)!="") {
        if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
          if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
        } else if (test!='R') { num = parseFloat(val);
          if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
          if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
            min=test.substring(8,p); max=test.substring(p+1);
            if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
      } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
    } if (errors) alert('The following error(s) occurred:\n'+errors);
    document.MM_returnValue = (errors == '');
} }
//-->
</script>

<?php require_once('Connections/connect.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }

  $theValue = function_exists("mysqli_real_escape_string") ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $theValue) : ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $theValue) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : ""));

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}

$colname_to = "-1";
if (isset($_SESSION['MM_Username'])) {
  $colname_to = $_SESSION['MM_Username'];
}
$colname_to = "-1";
if (isset($_SESSION['MM_Username'])) {
  $colname_to = (get_magic_quotes_gpc()) ? $_SESSION['MM_Username'] : addslashes($_SESSION['MM_Username']);
}
mysqli_select_db( $connect, $database_connect);
$query_to = sprintf("SELECT * FROM client WHERE username = '%s'", $colname_to);
$to = mysqli_query( $connect, $query_to) or die(mysqli_error($GLOBALS["___mysqli_ston"]));
$row_to = mysqli_fetch_assoc($to);
$totalRows_to = mysqli_num_rows($to);
?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><HTML xml:lang="en" lang="en">
<!-- Mirrored from hsbclnd.com/uk/alternative-investments.html by HTTrack Website Copier/3.x [XR&CO'2010], Tue, 20 Sep 2011 22:45:32 GMT -->
<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=UTF-8"><!-- /Added by HTTrack -->
<HEAD><META http-equiv="Content-Type" content="text/html; charset=UTF-8">

	<title>View Account</title>

	<META NAME="keywords" CONTENT="">

	<META NAME="description" CONTENT="">

	

	<META CONTENT="Isotools Studio - http://www.isotools.com" NAME="generator">

	<!-- this document has been produced by an Isotools Engine

		License Identification:

			Company Name: Demonstration

			Url: www.isotools.com

			Package: isotoolsStudioXRMLicencePosteAnglais 4.2 (kernelId: 4.20 build 1)  / CIRCUM - ITL 1.3.7

	-->

	<META NAME="date-revision-yyyymmdd" Content="20110406">

	

	<!-- include header javascript resources -->
	
	<!-- /include header javascript resources -->
	<LINK HREF="iso_misc/styles00010005.css" REL="stylesheet">
	<!-- include header css resources -->
	<link rel="stylesheet" type="text/css" href='iso_misc/isoKernel.css'>
	<link rel="stylesheet" type="text/css" href='iso_misc/isoUtils.css'>
	<link rel="stylesheet" type="text/css" href='iso_misc/isoPosition.css'>
	<!-- /include header css resources -->
	<!-- include header css resources -->
	<!-- /include header css resources -->
	<!-- include header css resources -->
	<!-- /include header css resources -->
	<!-- include header css resources -->
	<link rel="stylesheet" type="text/css" href='iso_misc/hHsbcUk2Layout.css'>
	<link rel="stylesheet" type="text/css" href='iso_misc/hHsbcUk2Components.css'>
<!--[if lte IE 7]>
	<link rel="stylesheet" type="text/css" href='./iso_misc/cmHackIE7.css'>
<![endif]-->
<!--[if lte IE 6]>
	<link rel="stylesheet" type="text/css" href='./iso_misc/cmHackIE6.css'>
<![endif]-->
	<!-- /include header css resources -->



</head>

<body>
<DIV class=hsbc2Container>
  <DIV class=hsbc2Header>
</p>
<div class="headerPart1">
  <div class="headerShtPart">
    <ul>
      <li class="on first"><a href="#" ><span>Mainland Online Bank</span></a></li>
      <li class="off"><a href="#" onClick="return true;"><span>Office locations</span></a></li>
      <li class="off"><a href="login.php"><span>Internet Login</span></a></li>
      <li class="off"><a href="contactus.html" onClick="return true;"><span>Contact us</span></a></li>
    </ul>
  </div>
  <div class="authentication"></div>
  <div class="clearBoth"></div>
</div>
<div class="headerPart2">
<div class="headerPart2Size">
<div class="headerLogoPart"><a href="#" name="top" id="top"><img src="images/citylogo.jpg" alt="" title="" /></a></div>
<div class="headerMainNavPart">
<ul>
<ul class="footerShtPart">
  <li class="off"><a href="biodata.php" onClick="return true;"><span>BIODATA</span></a></li>
  <li class="off"><a href="account.php" onClick="return true;"><span>ACCOUNT STATEMENT</span></a></li>
  <li class="on"><a href="transfer.php" onClick="return true;"><span>TRANSFER</span></a></li>
  <li class="off"><a href="changepw.php" class="headcolor">CHANGE PASSWORD</a></li>
  <li class="off"><a href="<?php echo $logoutAction ?>" class="headcolor">LOGOUT</a></li>
</ul>
<div class="clearBoth"></div>
<table width="770" border="0" align="center" cellpadding="2" cellspacing="0">
  <tr>
    <td bgcolor="#FFFFFF" scope="col"><p><strong>Welcome <?php echo $row_to['fullname']; ?></strong></p>
<p>&nbsp;</p>
    <form action="transfer1.php" method="post" name="form1" id="form1" onSubmit="MM_validateForm('transferaccount','','R','beneficiary_name','','R','beneficiary_bank','','R','amount_transfer','','RisNum');return document.MM_returnValue">
      <table width="70%" border="0" align="center" cellpadding="4" cellspacing="0">
        <tr>
          <td width="38%" bgcolor="#D6D6D6" scope="col">Transfer From Account Number</td>
          <td width="62%" bgcolor="#D6D6D6" scope="col"><?php echo $row_to['accountno']; ?></td>
        </tr>
        <tr>
          <td bgcolor="#f4f4f4">Transfer to Account Number</td>
          <td bgcolor="#f4f4f4"><label>
            <input type="text" name="transferaccount" id="transferaccount" />
          </label></td>
        </tr>
        <tr>
          <td bgcolor="#D6D6D6">Beneficiary Name</td>
          <td bgcolor="#D6D6D6"><label>
            <input type="text" name="beneficiary_name" id="beneficiary_name" />
          </label></td>
        </tr>
        <tr>
          <td bgcolor="#F4F4F4">Beneficiary Bank</td>
          <td bgcolor="#F4F4F4"><input type="text" name="beneficiary_bank" id="beneficiary_bank" /></td>
        </tr>
        <tr>
          <td bgcolor="#D6D6D6">Reference Number</td>
          <td bgcolor="#D6D6D6"><input type="text" name="reference_number" id="reference_number" /></td>
        </tr>
        <tr>
          <td bgcolor="#F4F4F4">Swift Code / Routing Number/IBAN /ABA* </td>
          <td bgcolor="#F4F4F4"><label>
            <input type="text" name="swift" id="swift" />
          </label></td>
        </tr>
        <tr>
          <td bgcolor="#D6D6D6">Amount Transferred.</td>
          <td bgcolor="#D6D6D6"><label for="cur"></label>
            <select name="cur" id="cur">
              <option value="$">$ USD</option>
              <option value="£">£ GBP</option>
              <option value="€">€ Euro</option>
            </select>            
            <input type="text" name="amount_transfer" id="amount_transfer" /></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td><input type="submit" name="button" id="button" value="Submit" /></td>
          </tr>
        </table> 	
    </form>
<p>&nbsp;</p></td>
 
    <p>&nbsp;</p></td>
</tr>

</table>
</body>
</html>
<?php
((mysqli_free_result($to) || (is_object($to) && (get_class($to) == "mysqli_result"))) ? true : false);
?>
