<?php
$sn=0;
//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 = "admin.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 = "admin.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;
}
?>


<!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="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>
<? include ('adminav.php');?>
</div>
<div class="clearBoth"></div>
</div>
</div>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>

  </tr>
  <tr>
    <td bgcolor="#FFFFFF"><p>&nbsp;
	</p>
      <p>
        <?php require_once('Connections/connect.php'); ?>
  <?php
mysqli_select_db($GLOBALS["___mysqli_ston"], $database_connect);
$initStartLimit = 0;
$limitPerPage = 100;

$startLimit = $_REQUEST['startLimit'];
$numberOfRows = $_REQUEST['rows'];
$sortBy = $_REQUEST['sortBy'];
$sortOrder = $_REQUEST['sortOrder'];

if ($startLimit=="")
{
		$startLimit = $initStartLimit;
}

if ($numberOfRows=="")
{
		$numberOfRows = $limitPerPage;
}

if ($sortOrder=="")
{
		$sortOrder  = "DESC";
}
if ($sortOrder == "DESC") { $newSortOrder = "ASC"; } else  { $newSortOrder = "DESC"; }
$limitQuery = " LIMIT ".$startLimit.",".$numberOfRows;
$nextStartLimit = $startLimit + $limitPerPage;
$previousStartLimit = $startLimit - $limitPerPage;

if ($sortBy!="")
{
		$orderByQuery = " ORDER BY ".$sortBy." ".$sortOrder;
}

$owner = $_SESSION['MM_Username'];
$sql = "SELECT * FROM client ".$orderByQuery.$limitQuery;
//echo $sql."<br>";

$result = mysqli_query($GLOBALS["___mysqli_ston"], $sql);
$numberOfRows = mysqli_num_rows($result);



if ($numberOfRows==0) {  
?>
        
        <?
}
else if ($numberOfRows>0) {

	$i=0;
?>
        <a href="<?php echo $logoutAction ?>">Logout</a></p>
      <form action="search.php" method="post" name="customersPowerSearchForm" class="backg" id="customersPowerSearchForm">
        <table cellspacing="2" cellpadding="2" border="0" width="500">
          <tr>
            <td align="right"><p>&nbsp;</p>
            <p><font color="red"><b>Keyword :</b></font></p></td>
            <td><p>&nbsp;
              </p>
              <p>
                <input type="text" name="keyword" value="" />
            </p></td>
          </tr>
        </table>
        <input type="submit" name="submitpowerSearchCustomersForm" value="search  Members" />
        <input type="reset" name="resetForm" value="Clear Form" />
      </form>
      <p><a href="adminchairmo.php">Create Client</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="view.php">View Client.</a> <a href="transaction.php">Transaction details</a><br />
        <?
if ($_REQUEST['startLimit'] != "")
{
?>
        <a href="<? echo  $_SERVER['PHP_SELF']; ?>?startLimit=<? echo $previousStartLimit; ?>&limitPerPage=<? echo $limitPerPage; ?>&sortBy=<? echo $sortBy; ?>&sortOrder=<? echo $sortOrder; ?>">Previous <? echo $limitPerPage; ?> Results</a>....
        <? } ?>
        <?
if ($numberOfRows == $limitPerPage)
{
?>
        <a href="<? echo $_SERVER['PHP_SELF']; ?>?startLimit=<? echo $nextStartLimit; ?>&limitPerPage=<? echo $limitPerPage; ?>&sortBy=<? echo $sortBy; ?>&sortOrder=<? echo $sortOrder; ?>">Next <? echo $limitPerPage; ?> Results</a>
        <? } ?>
      </p>
      <table width="100%" border="1" align="center" cellpadding="3" cellspacing="3">
        <tr>
          <td width="19"><a href="<? echo $PHP_SELF; ?>?sortBy=sn&amp;sortOrder=<? echo $newSortOrder; ?>&amp;startLimit=<? echo $startLimit; ?>&amp;rows=<? echo $limitPerPage; ?>"> <b>Id</b> </a></td>
          <td width="67"><a href="<? echo $PHP_SELF; ?>?sortBy=fullname&amp;sortOrder=<? echo $newSortOrder; ?>&amp;startLimit=<? echo $startLimit; ?>&amp;rows=<? echo $limitPerPage; ?>"> <b>Full Name</b> </a></td>
          <td width="105"><a href="<? echo $PHP_SELF; ?>?sortBy=phone&amp;sortOrder=<? echo $newSortOrder; ?>&amp;startLimit=<? echo $startLimit; ?>&amp;rows=<? echo $limitPerPage; ?>"> <b>Phone</b> </a></td>
          <td width="135"><a href="<? echo $PHP_SELF; ?>?sortBy=username&amp;sortOrder=<? echo $newSortOrder; ?>&amp;startLimit=<? echo $startLimit; ?>&amp;rows=<? echo $limitPerPage; ?>"><b>username</b></a></td>
          <td width="131"><a href="<? echo $PHP_SELF; ?>?sortBy=password&amp;sortOrder=<? echo $newSortOrder; ?>&amp;startLimit=<? echo $startLimit; ?>&amp;rows=<? echo $limitPerPage; ?>"><b>Password</b></a></td>
        </tr>
        <?
	while ($i<$numberOfRows)
	{

		if (($i%2)==0) { $bgColor = "#FFFFFF"; } else { $bgColor = "#C0C0C0"; }

	$fullname = mysqli_result($result, $i, "fullname");
	$accountstatus = mysqli_result($result, $i, "accountstatus");
	$phone = mysqli_result($result, $i, "phone");
	$email = mysqli_result($result, $i, "email");
	$country = mysqli_result($result, $i, "country");
	$address = mysqli_result($result, $i, "address");
	
	$username = mysqli_result($result, $i, "username");
	$password = mysqli_result($result, $i, "password");
	$code = mysqli_result($result, $i, "code");
	$accountno = mysqli_result($result, $i, "accountno");
	

?>
        <tr bgcolor="<? echo $bgColor; ?>">
          <td nowrap="nowrap"><? echo ++$sn; ?></td>
          <td><? echo $fullname; ?></td>
          <td><? echo $phone; ?></td>
          <td><? echo $username; ?></td>
          <td><? echo $password; ?></td>
          <td width="77"><a href="edit.php?code=<? echo $code; ?>">Edit</a></td>
          <td width="108"><a href="confirm_delete.php?code=<? echo $code; ?>">Delete</a></td>
          <td width="108"><a href="updaterecord.php?code=<? echo $code; ?>">update</a></td>
          <td width="111"><a href="breakdown.php?code=<? echo $code; ?>">account breakdown.</a></td>
        </tr>
        <?
		$i++;

	} // end while loop
?>
      </table>      
      <p>
        <?
if ($_REQUEST['startLimit'] != "")
{
?>
        <a href="<? echo  $_SERVER['PHP_SELF']; ?>?startLimit=<? echo $previousStartLimit; ?>&limitPerPage=<? echo $limitPerPage; ?>&sortBy=<? echo $sortBy; ?>&sortOrder=<? echo $sortOrder; ?>">Previous <? echo $limitPerPage; ?> Results</a>....
        <? } ?>
        <?
if ($numberOfRows == $limitPerPage)
{
?>
        <a href="<? echo $_SERVER['PHP_SELF']; ?>?startLimit=<? echo $nextStartLimit; ?>&limitPerPage=<? echo $limitPerPage; ?>&sortBy=<? echo $sortBy; ?>&sortOrder=<? echo $sortOrder; ?>">Next <? echo $limitPerPage; ?> Results</a>
        <? } ?>
        <br />
        <?
} // end of if numberOfRows > 0 
 ?>
    </p></td>
  </tr>
</table>
<br>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p></p>
</body>
</html>