<?php

// We have to start our session every time we're
// going to call our session variable for a
// logged in issue.
session_start();

// Let's also make sure the user is logged in at all
// If the PHP $_SESSION[] array is not (!) set
if(!isset($_SESSION['username'])){
    //Then redirect them to the login page
    header( 'Location: index.html' );
}

?>

<head>
    <link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Exo:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Digital  - Login step 1</title>
<style type="text/css">
<!--
#apDiv1 {
	position:absolute;
	width:200px;
	height:115px;
	z-index:1;
	left: 23px;
	top: 19px;
}
.bold {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 18px;
	color: #036;
}
-->
</style>
<link href="css.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
#apDiv2 {
	position:absolute;
	width:200px;
	height:115px;
	z-index:2;
}
a:link {
	text-decoration: none;
}
a:visited {
	text-decoration: none;
}
a:hover {
	text-decoration: none;
}
a:active {
	text-decoration: none;
}
-->
</style>
</head>

<body style="   background: #deb866;
    font-size: 17px;
    font-family: exo;">
<p class="bmhead">Welcome to bank manager</p>
<p>&nbsp;</p>
<p><a href="vd.php" target="_blank"><strong>View Database </strong></a>~ <a href="credit.php"><strong>Credit Account</strong></a> ~ <a href="withdraw.php"><strong>Withdraw Funds</strong></a> ~<strong> <a href="bill1.php">Bill Client </a></strong>~ <a href="delete.php"><strong>Delete Account</strong></a> ~<strong> <a href="changepass.php">Change Password</a> </strong>~ <a href="logout.php"><strong>Logout</strong></a></p>
<p><strong><a href="cinfo.php">Send Activation Mail </a></strong>~ <a href="addclient.php"><strong>Add Account for Non-registered client</strong></a> ~ <strong><a href="noimg.php">Add without images</a></strong> ~ <strong><a href="vrfclnt.php">Verify Client</a></strong> ~<strong> <a href="editad.php">Edit Account Details</a></strong></p>
<p>===========================================================================================================================</p>
<p><strong>Activation for registered clients (copy client's username from <a href="vd.php" target="_blank">view database</a>) </strong></p>
<form id="form1" name="form1" method="post" action="upd2.php">
  <label> Email:	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <input type="text" name="email" id="email" />
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Enter new client's Email<br />
    <br />
    Account Number:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  <input name="customernum" type="text" id="customernum" />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" value="Generate Account#" onClick="javascript:this.form.customernum.value=randomString();">&nbsp;&nbsp;Allocate Account number to username&nbsp;</label>
  e.g. 0541300000123445
  <p>Account Type: 
    <label>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      <select name="acctype" id="acctype">
        <option value="Checking Account">Checking Account</option>
        <option value="Savings Account">Savings Account</option>
        <option value="Money Market Account">Money Market Account</option>
        <option value="Certificate of Deposit CDs">Certificate of Deposit CDs</option>
        <option value="Grant Settlements Account">Grant Settlements Account</option>
      </select>
    </label>
  </p>
  <p>Currency: 
    <label>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
    <label>
      <select name="currency" id="currency">
        <option value="GBP">GBP</option>
        <option value="USD" selected="selected">USD</option>
        <option value="EUR">EUR</option>
        <option value="YEN">YEN</option>
      </select>
    </label>
  </p>
  <p>
    <label>Account Opening Date:
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input name="startprd" type="text" id="startprd" />
    </label>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dd/mm/yyyy</p>
  <p>
    <label>Opening Balance:
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <input name="openbal" type="text" id="openbal" />
    </label>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Example: 300000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Don't add commas, type just numbers.</p>
  <p>
    <label></label>
    <label>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      <input type="submit" name="Submit" value="Activate Client" />
    </label>
  </p>
</form>
<script language="javascript" type="text/javascript">
function randomString() {
	var chars = "98765432100000000000123456789";
	var string_length = 12;
	var randomstring = '';
	for (var i=0; i<string_length; i++) {
		var rnum = Math.floor(Math.random() * chars.length);
		randomstring += chars.substring(rnum,rnum+1);
	}
	return randomstring;
}
</script>
<p>=============================== * <strong>Cross Online Banking Software </strong>* ================================================================= </p>
</body>
</html>
