����JFIF���������
1#@!#!123s
D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
nc6d095
/
www
/
student
/
Filename :
verify.php
back
Copy
<?php session_start(); require('../admin/inc/config.php'); define ('TITLE', 'Account Verification'); $verified = false; if(isset($_GET['u']) && isset($_GET['token'])){ $studentID = $_GET['u']; $token = $_GET['token']; $acctStatus = getDBValNoID('account_tokens',"user='$studentID'",'status'); $tokenId = getDBValNoID('account_tokens',"user='$studentID'",'id'); $staffRow = getRows('students',"*","studentID='$studentID'"); $staffData = mysqli_fetch_array($staffRow); if($acctStatus == 'Unverified'){ if(isset($_GET['d']) && $_GET['d'] == 'verify'){ $uAT = changeStatus('account_tokens','Verified',$tokenId); $uTM = changeStatus('students','active',$staffData['id']); if($uAT && $uTM){ $smsg = "Your account has been verified and activated successfully. You can login to your account below"; $verified = true; } else{ $emsg = 'Something went wrong. Try again later'; } } } else{ $verified = true; } }else{ exit(); } include("../admin/inc/head.php"); ?> <body class="vh-100"> <div class="authincation h-100"> <div class="container h-100"> <div class="row justify-content-center h-100 align-items-center"> <div class="col-md-6"> <div class="authincation-content"> <div class="row no-gutters"> <div class="col-xl-12"> <div class="auth-form"> <div class="d-flex justify-content-center"> <?php include("../admin/inc/alerts.php"); ?> </div> <div class="text-center mb-3 pb-3 border-bottom"> <img src="<?= $mainRoot; ?>assets/img/hscs/brand/logo.png" width="220" alt=""> </div> <?php if($verified): ?> <div class="text-center"> <h4 class="mb-1">Hi <?= $staffData['fName'] ?>,</h4> <p class="lead mb-5">Your account has been verified. Kindly login using the credentials in your mailbox via the link below</p> <a href="<?= $studentRoot ?>login" class="btn btn-outline-primary rounded-pill">Login</a> </div> <?php else: ?> <div class="text-center"> <h4 class="mb-1">Hi <?= $staffData['fName'] ?>,</h4> <p class="lead mb-5">Kindly click the button below to verify your account</p> <a href="<?= $studentRoot ?>verify?u=<?= $studentID ?>&token=<?= $token ?>&d=verify" class="btn btn-outline-primary rounded-pill">Verify</a> </div> <?php endif ?> </div> </div> </div> </div> </div> </div> </div> </div> <?php include("../admin/inc/foot.php"); ?>