File Manager
Viewing File: applicationform.php
<?php
session_start();
require_once 'admin/class.admin.php';
include_once ('admin/session.php');
$reg_user = new USER();
if (isset($_POST['create'])) {
$fname = trim($_POST['fname']);
$fname = strip_tags($fname);
$fname = htmlspecialchars($fname);
$mname = trim($_POST['mname']);
$mname = strip_tags($mname);
$mname = htmlspecialchars($mname);
$lname = trim($_POST['lname']);
$lname = strip_tags($lname);
$lname = htmlspecialchars($lname);
$uname = trim($_POST['uname']);
$uname = strip_tags($uname);
$uname = htmlspecialchars($uname);
$upass = $_POST['upass'];
$phone = trim($_POST['phone']);
$phone = strip_tags($phone);
$phone = htmlspecialchars($phone);
$email = trim($_POST['email']);
$email = strip_tags($email);
$email = htmlspecialchars($email);
$adminemail = trim($_POST['adminemail']);
$adminemail = strip_tags($adminemail);
$adminemail = htmlspecialchars($adminemail);
$type = trim($_POST['type']);
$type = strip_tags($type);
$type = htmlspecialchars($type);
$reg_date = trim($_POST['reg_date']);
$work = trim($_POST['work']);
$work = strip_tags($work);
$work = htmlspecialchars($work);
$acc_no = trim($_POST['acc_no']);
$acc_no = strip_tags($acc_no);
$acc_no = htmlspecialchars($acc_no);
$addr = trim($_POST['addr']);
$addr = strip_tags($addr);
$addr = htmlspecialchars($addr);
$sex = trim($_POST['sex']);
$sex = strip_tags($sex);
$sex = htmlspecialchars($sex);
$dob = trim($_POST['dob']);
$dob = strip_tags($dob);
$dob = htmlspecialchars($dob);
$marry = trim($_POST['marry']);
$marry = strip_tags($marry);
$marry = htmlspecialchars($marry);
$t_bal = trim($_POST['t_bal']);
$t_bal = strip_tags($t_bal);
$t_bal = htmlspecialchars($t_bal);
$a_bal = trim($_POST['a_bal']);
$a_bal = strip_tags($a_bal);
$a_bal = htmlspecialchars($a_bal);
$currency = trim($_POST['currency']);
$currency = strip_tags($currency);
$currency = htmlspecialchars($currency);
$cot = trim($_POST['cot']);
$cot = strip_tags($cot);
$cot = htmlspecialchars($cot);
$tax = trim($_POST['tax']);
$tax = strip_tags($tax);
$tax = htmlspecialchars($tax);
$imf = trim($_POST['imf']);
$imf = strip_tags($imf);
$imf = htmlspecialchars($imf);
$pin_auth = trim($_POST['pin_auth']);
$pin_auth = strip_tags($pin_auth);
$pin_auth = htmlspecialchars($pin_auth);
$pin = trim($_POST['pin']);
$pin = strip_tags($pin);
$pin = htmlspecialchars($pin);
$verify = trim($_POST['verify']);
$verify = strip_tags($verify);
$verify = htmlspecialchars($verify);
$verify = trim($_POST['verify']);
$verify = strip_tags($verify);
$verify = htmlspecialchars($verify);
$status = trim($_POST['status']);
$status = strip_tags($status);
$status = htmlspecialchars($status);
$stmt = $reg_user->runQuery("SELECT * FROM account WHERE email=:email");
$stmt1 = $reg_user->runQuery("SELECT * FROM account WHERE uname=:uname");
$stmt->execute(array(":email" => $email));
$stmt1->execute(array(":uname" => $uname));
$row = $stmt->fetch(PDO::FETCH_ASSOC);
$row1 = $stmt1->fetch(PDO::FETCH_ASSOC);
if ($stmt->rowCount() > 0 || $stmt1->rowCount() > 0) {
$msg = "
<div class='alert alert-danger col-12'>
<button class='close' data-dismiss='alert'>×</button>
<strong>Sorry!</strong> Email or Username already exists! Please, try another one!
</div>
";
} else {
if ($reg_user->createsign($fname, $mname, $lname, $uname, $upass, $phone, $email, $adminemail, $type, $reg_date, $work, $acc_no, $addr, $sex, $dob, $marry, $t_bal, $a_bal, $currency, $cot, $tax, $imf, $pin_auth, $pin, $verify, $status)) {
$id = $reg_user->lasdID();
$messag = "
<!DOCTYPE html>
<html lang='en' xmlns='http://www.w3.org/1999/xhtml' xmlns:v='urn:schemas-microsoft-com:vml' xmlns:o='urn:schemas-microsoft-com:office:office'>
<head>
<meta charset='utf-8'>
<meta name='viewport' content='width=device-width'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<meta name='x-apple-disable-message-reformatting'>
<title></title>
<link href='https://fonts.googleapis.com/css?family=Roboto:400,600' rel='stylesheet' type='text/css'>
<!-- Web Font / @font-face : BEGIN -->
<!--[if mso]>
<style>
* {
font-family: 'Roboto', sans-serif !important;
}
</style>
<![endif]-->
<!--[if !mso]>
<link href='https://fonts.googleapis.com/css?family=Roboto:400,600' rel='stylesheet' type='text/css'>
<![endif]-->
<!-- Web Font / @font-face : END -->
<!-- CSS Reset : BEGIN -->
<style>
/* What it does: Remove spaces around the email design added by some email clients. */
/* Beware: It can remove the padding / margin and add a background color to the compose a reply window. */
html,
body {
margin: 0 auto !important;
padding: 0 !important;
height: 100% !important;
width: 100% !important;
font-family: 'Roboto', sans-serif !important;
font-size: 14px;
margin-bottom: 10px;
line-height: 24px;
color:#8094ae;
font-weight: 400;
}
* {
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
margin: 0;
padding: 0;
}
table,
td {
mso-table-lspace: 0pt !important;
mso-table-rspace: 0pt !important;
}
table {
border-spacing: 0 !important;
border-collapse: collapse !important;
table-layout: fixed !important;
margin: 0 auto !important;
}
table table table {
table-layout: auto;
}
a {
text-decoration: none;
}
img {
-ms-interpolation-mode:bicubic;
}
@media only screen and (max-width:480px)
{
table[class='MainContainer'], td[class='cell']
{
width: 100% !important;
height:auto !important;
}
td[class='specbundle']
{
width: 100% !important;
float:left !important;
font-size:13px !important;
line-height:17px !important;
display:block !important;
}
td[class='specbundle1']
{
width: 100% !important;
float:left !important;
font-size:13px !important;
line-height:17px !important;
display:block !important;
padding-bottom:20px !important;
}
td[class='specbundle2']
{
width:90% !important;
float:left !important;
font-size:14px !important;
line-height:18px !important;
display:block !important;
padding-left:5% !important;
padding-right:5% !important;
}
td[class='specbundle3']
{
width:90% !important;
float:left !important;
font-size:14px !important;
line-height:18px !important;
display:block !important;
padding-left:5% !important;
padding-right:5% !important;
padding-bottom:20px !important;
}
td[class='specbundle4']
{
width: 100% !important;
float:left !important;
font-size:13px !important;
line-height:17px !important;
display:block !important;
padding-bottom:20px !important;
text-align:center !important;
}
td[class='spechide']
{
display:none !important;
}
img[class='banner']
{
width: 100% !important;
height: auto !important;
}
td[class='left_pad']
{
padding-left:15px !important;
padding-right:15px !important;
}
}
@media only screen and (max-width:540px)
{
table[class='MainContainer'], td[class='cell']
{
width: 100% !important;
height:auto !important;
}
td[class='specbundle']
{
width: 100% !important;
float:left !important;
font-size:13px !important;
line-height:17px !important;
display:block !important;
}
td[class='specbundle1']
{
width: 100% !important;
float:left !important;
font-size:13px !important;
line-height:17px !important;
display:block !important;
padding-bottom:20px !important;
}
td[class='specbundle2']
{
width:90% !important;
float:left !important;
font-size:14px !important;
line-height:18px !important;
display:block !important;
padding-left:5% !important;
padding-right:5% !important;
}
td[class='specbundle3']
{
width:90% !important;
float:left !important;
font-size:14px !important;
line-height:18px !important;
display:block !important;
padding-left:5% !important;
padding-right:5% !important;
padding-bottom:20px !important;
}
td[class='specbundle4']
{
width: 100% !important;
float:left !important;
font-size:13px !important;
line-height:17px !important;
display:block !important;
padding-bottom:20px !important;
text-align:center !important;
}
td[class='spechide']
{
display:none !important;
}
img[class='banner']
{
width: 100% !important;
height: auto !important;
}
td[class='left_pad']
{
padding-left:15px !important;
padding-right:15px !important;
}
.font{
font-size:15px !important;
line-height:19px !important;
}
}
</style>
</head>
<body width='100%' style='margin: 0; padding: 0 !important; mso-line-height-rule: exactly; background-color: #f5f6fa;'>
<center style='width: 100%; background-color: #f5f6fa;'>
<table width='100%' border='0' cellpadding='0' cellspacing='0' bgcolor='#f5f6fa'>
<tr>
<td style='padding: 40px 0;'>
<table style='width:100%;max-width:620px;margin:0 auto;'>
<tbody>
<tr>
<td style='text-align: center; padding-bottom:25px'>
<a href='#'><img style='height: 40px' src='$site_url/dashboard/admin/logo/logo.png' alt='logo'></a>
<p style='font-size: 14px; color: #6576ff; padding-top: 12px;'>--***--</p>
</td>
</tr>
</tbody>
</table>
<table style='width:100%;max-width:620px;margin:0 auto;background-color:#ffffff;'>
<tbody>
<tr>
<td style='padding: 30px 30px 20px'>
<p style='margin-bottom: 10px;'>Hi $fname,</p>
<center>
<p style='font-size:18px;font-weight:normal;color:green;'>Congratulations,Your Account have been approved<br>
successfully <br>
</p>
<h3>Account Details</h3>
<table style='border:1px solid black;padding:2px;' width='400'>
<tr>
<th style='text-align:left;'>Account Number</th>
<td>$acc_no</td>
</tr>
<tr>
<th style='text-align:left;'>Account Password</th>
<td>$upass</td>
</tr>
<tr>
<th style='text-align:left;'>Balance</th>
<td>$currency $t_bal</td>
</tr>
<tr>
<th style='text-align:left;'>Account Login Pin</th>
<td>$pin_auth</td>
</tr>
<tr>
<th style='text-align:left;'>Pending Credit</th>
<td>$currency 0.00</td>
</tr>
<tr style='background-color:#AA2E33;'>
<th style='text-align:left; color:#fff;'>Available Balance</th>
<td style='color:#fff;'>$currency $a_bal</td>
</tr>
</table>
</center>
<br>
<p style='margin-bottom: 15px;'>Hope you'll enjoy the experience, we're here if you have any questions, drop us a line at <a style='color: #6576ff; text-decoration:none;' href='mailto:$site_email'>$site_email</a> anytime. </p>
</td>
</tr>
</tbody>
</table>
<table style='width:100%;max-width:620px;margin:0 auto;'>
<tbody>
<tr>
<td style='text-align: center; padding:25px 20px 0;'>
<p style='font-size: 13px;'>Copyright © <script>(new Date).getFullYear();</script> $site_title. All rights reserved.</p>
<ul style='margin: 10px -4px 0;padding: 0;'>
<li style='display: inline-block; list-style: none; padding: 4px;'><a style='display: inline-block; height: 30px; width:30px;border-radius: 50%; background-color: #ffffff' href='#'><img style='width: 30px' src='$site_url/images/brand-b.png' alt='brand'></a></li>
<li style='display: inline-block; list-style: none; padding: 4px;'><a style='display: inline-block; height: 30px; width:30px;border-radius: 50%; background-color: #ffffff' href='#'><img style='width: 30px' src='$site_url/images/brand-e.png' alt='brand'></a></li>
<li style='display: inline-block; list-style: none; padding: 4px;'><a style='display: inline-block; height: 30px; width:30px;border-radius: 50%; background-color: #ffffff' href='#'><img style='width: 30px' src='$site_url/images/brand-d.png' alt='brand'></a></li>
<li style='display: inline-block; list-style: none; padding: 4px;'><a style='display: inline-block; height: 30px; width:30px;border-radius: 50%; background-color: #ffffff' href='#'><img style='width: 30px' src='$site_url/images/brand-c.png' alt='brand'></a></li>
</ul>
<p style='padding-top: 15px; font-size: 12px;'>This email was sent to you as a registered user of <a style='color: #6576ff; text-decoration:none;' href='$site_url'>$site_title</a>. To update your emails preferences <a style='color: #6576ff; text-decoration:none;' href='$site_url/login.php'>click here</a>.</p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</table>
</center>
</body>
</html>
";
$subject = "Welcome $fname - Your Account Application Has Been Approved!";
$send_otp_mobile = preg_replace('/[^0-9]/', '', $_POST['phone']);
$reg_user->send_mail($email, $messag, $subject);
//$reg_user->otp($send_otp_mobile, $subject);
$msg1 = "
<div class='alert alert-info'>
<button class='close' data-dismiss='alert'>×</button>
<strong> Account Form </strong>Has Been Successfully Submitted You will recieve a confirmation Email shortly!
</div>
";
} else {
echo "Sorry , Query could no execute...";
}
}
}
?>
<title>Register</title>
<?php include('../authheader.php')?>
<div class="card card-bordered">
<div class="card-inner card-inner-lg">
<div class="nk-block-head">
<div class="nk-block-head-content">
<h4 class="nk-block-title">Sign-Up</h4>
<div class="nk-block-des">
<p>Create New <?php echo $site_title; ?> Account</p>
</div>
</div>
</div>
<?php if (isset($msg1)) echo $msg1; ?>
<?php if (isset($msg)) echo $msg; ?>
<form role="form" method="POST" enctype="multipart/form-data">
<div class="form-group">
<div class="form-label-group">
<label class="form-label" for="acct">First Name</label>
</div>
<input type="text" name="fname" placeholder="Enter your First Name" autofocus class="form-control form-control-lg" required>
</div>
<div class="form-group">
<div class="form-label-group">
<label class="form-label" for="acct">Middle Name (Optional)</label>
</div>
<input type="text" name="mname" placeholder="Enter your Middle Name (Optional)" autofocus class="form-control form-control-lg" >
</div>
<div class="form-group">
<div class="form-label-group">
<label class="form-label" for="acct">Last Name</label>
</div>
<input type="text" name="lname" placeholder="Enter your Last Name" autofocus class="form-control form-control-lg" required>
</div>
<div class="form-group">
<div class="form-label-group">
<label class="form-label" for="acct">Username</label>
</div>
<input type="text" name="uname" placeholder="Enter your Username" autofocus class="form-control form-control-lg" required>
</div>
<div class="form-group">
<div class="form-label-group">
<label class="form-label" for="acct">Password</label>
</div>
<input type="password" name="upass" placeholder="Enter your Password" autofocus class="form-control form-control-lg" required>
</div>
<div class="form-group">
<div class="form-label-group">
<label class="form-label" for="acct">Login Pin <b><small>(Enter 4 Digit Pin)</small></b></label>
</div>
<input type="password" name="pin_auth" placeholder="Enter your Login Pin" autofocus class="form-control form-control-lg" maxlength="4" required>
</div>
<div class="form-group">
<div class="form-label-group">
<label class="form-label" for="acct">Occupation</label>
</div>
<input type="text" name="work" placeholder="Enter your Occupation" autofocus class="form-control form-control-lg" required>
</div>
<div class="form-group">
<div class="form-label-group">
<label class="form-label" for="acct">Mobile Phone</label>
</div>
<input type="tel" name="phone" placeholder="Enter your Mobile Phone" autofocus class="form-control form-control-lg" required>
</div>
<div class="form-group">
<div class="form-label-group">
<label class="form-label" for="acct">Email Address</label>
</div>
<input type="email" name="email" placeholder="Enter your Email Address" autofocus class="form-control form-control-lg" required>
</div>
<div class="form-group">
<div class="form-label-group">
<label class="form-label" for="acct">Date of Birth</label>
</div>
<input type="date" data-format="dd/MM/yyyy" name="dob" placeholder="Enter your Date of Birth dd/MM/yyyy" autofocus class="form-control form-control-lg" required>
</div>
<div class="form-group">
<div class="form-label-group">
<label class="form-label" for="acct">Marital Status</label>
</div>
<select name="marry" class="form-control form-control-lg validate[required]">
<option value="Single">Single</option>
<option value="Married">Married</option>
<option value="Widowed">Widowed</option>
<option value="Divorced">Divorced</option>
</select>
</div>
<div class="form-group">
<div class="form-label-group">
<label class="form-label" for="acct">Gender</label>
</div>
<select name="sex" class="form-control form-control-lg validate[required]">
<option value="Male">Male</option>
<option value="Female">Female</option>
<option value="Other">Other</option>
</select>
</div>
<div class="form-group">
<div class="form-label-group">
<label class="form-label" for="acct">Home Address</label>
</div>
<textarea name="addr" name="email" placeholder="Enter your Home Address" autofocus class="form-control form-control-lg" required></textarea>
</div>
<div class="form-group">
<div class="form-label-group">
<label class="form-label" for="acct">Account Type</label>
</div>
<select name="type" class="form-control form-control-lg validate[required]">
<option value="Savings">Savings</option>
<option value="Current">Current</option>
<option value="Checking">Checking</option>
<option value="Fixed Deposit">Fixed Deposit</option>
<option value="NON-Resident">NON-Resident</option>
<option value="Online Banking">Online Banking</option>
<option value="Joint Account">Joint Account</option>
<option value="DOMICILIARY ACCOUNT">DOMICILIARY ACCOUNT</option>
</select>
</div>
<div class="form-group">
<div class="form-label-group">
<label class="form-label" for="acct">Account Currency</label>
</div>
<select name="currency" class="form-control form-control-lg validate[required]">
<option value="$">Dollar ($)</option>
<option value="£">Pound (£)</option>
<option value="€">Euro (€)</option>
<option value="¥">Yen (¥)</option>
<option value="₹">Rupee (₹)</option>
</select>
</div>
<!-- hidden-->
<input data-format="dd/MM/yyyy" name="reg_date" type="text" value="<?php
echo " " . date("d/m/Y") ;
?>" class="form-control input-sm" hidden/>
<input type="number" name="t_bal" class="input100" value="0" hidden>
<input type="text" name="adminemail" class="input100" value="contactus@hightowerwealthm.co.uk" hidden>
<input type="number" name="a_bal" class="input100" value="0" hidden>
<input type="text" name="acc_no" placeholder="" value="<?php echo(rand(1000000000,9999999999)); ?>" hidden >
<input type="text" name="cot" class="input100" value="00" hidden>
<input type="text" name="tax" class="input100" value="00" hidden>
<input type="text" name="imf" class="input100" value="00" hidden>
<input type="text" name="pin" class="input100" value="00" hidden>
<input type="text" name="verify" class="input100" value="Y" hidden>
<input type="text" name="status" class="input100" value="NOT VERIFIED" hidden>
<!-- hidden -->
<div class="form-group">
<button class="btn btn-lg btn-primary btn-block" name="create" type="submit">Sign up</button>
<button class="btn btn-lg btn-primary btn-block" style="display:none" id="authHide" disabled>
<div class="spinner-border spinner-border-sm" role="status">
<span class="sr-only">Loading...</span>
</div>
<div class="spinner-grow spinner-grow-sm" role="status">
<span class="sr-only">Loading...</span>
</div>
Authenticating Account
</button>
</div>
</form>
<div class="form-note-s2 text-center pt-4"> Already Customer? <a href="/login.php">Login.</a>
</div>
</div>
</div>
</div>
<?php include('../authfooter.php')?>