<?php
include 'header.php';

	$err = "";
	$msg = "";

	if ($status == "Verified") {
		$err = "Account has been verified already";
	}


	if (isset($_POST['upload_document'])) {

		$document = trim($_POST['document']);
		$date = date('d-m-Y h:i:sa');

		$file_name = $_FILES['file']['name'];
		$file_size =$_FILES['file']['size'];
		$file_tmp =$_FILES['file']['tmp_name'];
		$file_type=$_FILES['file']['type'];
		$file_ext=strtolower(end(explode('.',$_FILES['file']['name'])));
		$extensions= array("jpeg","jpg","png");
		
		if(in_array($file_ext, $extensions) === false){
			$err = "Extension not allowed, please choose a JPEG or PNG file.";
		}

		if(empty($err)){
			$newImageName = uniqid().".png";

		 $insert = mysqli_query($link, "INSERT INTO   kyc  (document_type, document_image,email,date) VALUES ('$document','$newImageName','$email', '$date' ) ");

			move_uploaded_file($file_tmp, "./upload/".$newImageName);
			$msg = "Kyc sent for approver";
		}
	}

	
?>





<div class="appHeader" style="background-color:#161129">
        <div class="left">
            <a href="#" class="headerButton" data-bs-toggle="modal" data-bs-target="#sidebarPanel"> <i class="fas fa-bars text-white"></i> </a>
        </div>
        <div class="pageTitle text-white">
            Account Status
        </div>
        <div class="right">
				<a href="Notifications.php" class="headerButton"> <i class="fas fa-bell text-white"></i> <span class="badge badge-danger">0</span> </a>
				<a href="logout.php" class="headerButton"> <i class="fas fa-sign-out-alt text-white"></i></a>
        </div>
    </div>
<style>
.wallet-card-section:before {
   
    background: #000000 !important;}
body.dark-mode .appHeader {
    border-bottom-color: #000000 !important;
}
path {
    color: #f8f9fa;
}

.appBottomMenu .item.active .icon, .appBottomMenu .item.active ion-icon, .appBottomMenu .item.active strong {
color:white !important;}

.appHeader {
    background-color: #000000 !important;
}
div#appCapsule {
    background-color: white;
    color: black;
}
ul.listview.image-listview.text.inset {
    background: #f8f9fa;
    box-shadow: 0 1px 19px 0 #dcdce9;
}
.in {
    color: black;
}
body.dark-mode {
    background: white;
    color: black;
}
.card {
    background-color: white !important;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 9%);
}
label.label {
    color: black !important;
}
select.form-control {
    color: #000000 !important;
}
input.form-control {
    color: #000000 !important;
}
textarea.form-control {
    color: #000000 !important;
}


<?php

	if($err != ""){
		echo customAlert('error', $err);
		// echo pageRedirect('3', 'status.php');
	}

	if ($msg != "") {
		echo customAlert('success', $msg);
		echo pageRedirect('3', 'index.php');
	}

?>




</style>

<div id="appCapsule">
	<!-- ref link -->
	<div class="section">
		
		<div class="row mt-2">
						<div class="col-lg-5">
				<div class="card">
					<div class="card-body">
						<p>In order to receive and send funds with your
							quantumledgerfinance.com account, the law requires us to collect identifying information on our clients and keep it up to date.</p>
						<p>
							quantumledgerfinance.com follows the regulations as required for KYC Verification. All data uploaded by customers are fully ecrypted and will never be shared with third-parties.</p>
					</div>
					<div class="card-footer" align="center">
						<div class="card-footer-content text-muted">
							<form method="post" enctype="multipart/form-data" action="status.php">
								<div class="form-row">
									<div class="col-md-4 mb-3">
										<select class="form-control text-success" name="document" required>
											<option value="">Upload Docume...</option>
											<option value="Passport">Passport</option>
											<option value="Driving License">Driving License</option>
											<option value="Identity Card">Identity Card</option>
										</select>
									</div>
									<div class="col-md-6 mb-3">
										<input type="file" class="form-control" id="name" name="file">
									</div>
									<div class="col-md-2 mb-3">
										<input type="submit" name="upload_document" value="Upload" class="btn btn-success">
									</div>
									<small>Files Allowed: Jpg, png, gif, pdf, jpeg</small>
								</div>
							</form>
						</div>
					</div>
				</div>
			</div>
			<div class="col-lg-7">
				<div class="card">
					<div class="card-body">
						<p>In order to combat fraud and follow required rules and regulations,
						quantumledgerfinance.com partnered up with JUMIO, a U.S company that provides REAL-TIME end-to-end identity verification in over 200 countries.</p>

						<p>The verification process may take a few days. During this process and once verification is complete you won't be able to edit your name on your payments profile.</p>
						<h4 class="card-title">Tips on submitting documents:</h4>
						<ul>
							<li style="list-style-type: square;"> Capture the entire document including all four corners. </li>
							<li style="list-style-type: square;"> Your image must be readable, in focus, and free of reflections and glare. </li>
							<li style="list-style-type: square;"> Incomplete or obstructed documents or dark or blurry photos won't be accepted.</li>
							<li style="list-style-type: square;"> To prevent abuse, we allow a limited number of verification attempts. </li>
							<li style="list-style-type: square;"> Uploading documents or photos other than what is requested may result in account suspension. </li>
						</ul>

					</div>
				</div>
			</div>
		</div>

	</div>
	<!-- ref link -->
</div>
<!-- .app-footer -->

<style>
.sidebar-balance {
    background: #000000;
}.action-group {
    background: #000000;
}.modal-body.p-0 {
    background: white;
}ul.listview.flush.transparent.image-listview {
    background: white;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 9%);
}body.dark-mode .image-listview>li a.item {
    color: #000000 !important;
}.icon-box.bg-primary {
    background: #000000 !important;
}span.badge.badge-primary {
    background: #000000 !important;
}



</style>

<?php
    include 'footer.php';
?>