PNG IHDR x sBIT|d pHYs + tEXtSoftware www.inkscape.org< ,tEXtComment
<?php
?>
<!DOCTYPE html>
<html lang="en">
<title>Admin Login</title>
<?php
include "inc/process.php";
include "inc/connection.php";
?>
<head>
<title>Register-Admin</title>
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<meta content="<?php echo $info["description"]; ?>" name="description">
<meta content="" name="keywords">
<!-- Favicons -->
<link href="assets/img/favicon.png" rel="icon">
<link href="assets/img/apple-touch-icon.png" rel="apple-touch-icon">
<!-- Google Fonts -->
<link href="https://fonts.gstatic.com" rel="preconnect">
<link
href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i|Nunito:300,300i,400,400i,600,600i,700,700i|Poppins:300,300i,400,400i,500,500i,600,600i,700,700i"
rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<!-- Vendor CSS Files -->
<link href="assets/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="assets/vendor/bootstrap-icons/bootstrap-icons.css" rel="stylesheet">
<link href="assets/vendor/boxicons/css/boxicons.min.css" rel="stylesheet">
<link href="assets/vendor/quill/quill.snow.css" rel="stylesheet">
<link href="assets/vendor/quill/quill.bubble.css" rel="stylesheet">
<link href="assets/vendor/remixicon/remixicon.css" rel="stylesheet">
<link href="assets/vendor/simple-datatables/style.css" rel="stylesheet">
<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.js"></script>
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
<!-- Template Main CSS File -->
<link href="assets/css/style.css" rel="stylesheet">
<style>
body {
background-image: url('assets/img/bg.png');
background-size: cover;
background-position: absolute;
background-repeat: no-repeat;
}
</style>
<?php
$SQL= "SELECT * FROM web ";
$query = mysqli_query($connection, $SQL);
$info=mysqli_fetch_assoc($query);
$sql= "SELECT * FROM user";
$query = mysqli_query($connection, $sql);
$core=mysqli_fetch_assoc($query);
$id= $core["email"];
if(empty($id)){
echo "";
}else{
?>
<script>
alert("Oops... You have already created an account!");
window.location.href = "login.php";
</script>
<?php
}
?>
</head>
<body>
<main>
<div class="container">
<section
class="section register min-vh-100 d-flex flex-column align-items-center justify-content-center py-4">
<div class="container">
<div class="row justify-content-center">
<div class="col-lg-4 col-md-6 d-flex flex-column align-items-center justify-content-center">
<div class="d-flex justify-content-center py-4">
<a href="index.html" class="logo d-flex align-items-center w-auto">
<img src="" alt="">
<span class="d-none d-lg-block">D-Resume</span>
</a>
</div><!-- End Logo -->
<div class="card mb-3">
<div class="card-body">
<div class="pt-4 pb-2">
<h4 class="card-title text-center pb-0 fs-4 text-primary">Create Admin
Account
</h4>
<p class="text-center small">Enter your information to create admin accout
</p>
</div>
<form class="row g-3 needs-validation" action="" method="POST" novalidate>
<div class="col-12">
<label for="yourUsername" class="form-label">Your Name</label>
<div class="input-group has-validation">
<input type="text" name="name" class="form-control" id="yourUsername"
required>
<div class="invalid-feedback">Please enter your Name.</div>
</div>
</div>
<div class="col-12">
<label for="yourUsername" class="form-label">Email</label>
<div class="input-group has-validation">
<span class="input-group-text" id="inputGroupPrepend">@</span>
<input type="text" name="email" class="form-control" id="yourUsername"
required>
<div class="invalid-feedback">Please enter your username.</div>
</div>
</div>
<div class="col-12">
<label for="yourPassword" class="form-label">Password</label>
<input type="password" name="password" class="form-control"
id="yourPassword" required>
<div class="invalid-feedback">Please enter your password!</div>
</div>
<div class="col-12">
<div class="form-check">
<input class="form-check-input" type="checkbox" name="remember"
value="true" id="rememberMe">
<label class="form-check-label" for="rememberMe">Remember me</label>
</div>
</div>
<div class="col-12">
<button class="btn btn-success w-100" name="register"
type="submit">Register</button>
</div>
<div class="col-12">
<p class="small mb-0">Already have an account? <a href="login.php">Login
your account</a></p>
</div>
</form>
</div>
</div>
<?php
require "inc/connection.php";
if(isset($_POST["register"])){
echo var_dump ($_POST);
$name =$_POST["name"];
$email =$_POST["email"];
$password =$_POST["password"];
$encrpt_password = md5($password);
// insert data to base
$sql ="INSERT INTO user (name, email, password) VALUES ('$name', '$email', '$encrpt_password')" ;
$query= mysqli_query($connection, $sql) or die("insert failed");
// insert user id to order tables
$sql = "SELECT * FROM user WHERE email='$email' ";
$query= mysqli_query($connection, $sql);
$result=mysqli_fetch_assoc($query);
if($result){
$id = $result["id"];
//insert to web table
$sql ="INSERT INTO web (user_id) VALUES ('$id')" ;
$query= mysqli_query($connection, $sql) ;
//insert to about table
$sql ="INSERT INTO about (user_id) VALUES ('$id')" ;
$query= mysqli_query($connection, $sql) ;
//notification
$sql= "UPDATE `notify` SET `content` = 'Welcome to D-resume Cpanel, kindly update your information to setup your website'";
$query_notify= mysqli_query($connection, $sql);
// send welcome mail
$subject = "D-resume registration success full";
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
$to = "$email";
$message = "
<html>
<body>
<h4>Thanks for purchasing and installing D-resume website script.</h4>
<br>
<p> welcome onboard, kindly login to your dashoad with your email and registered password to complete you wesite setup. <br> if you encounter any challange in the process kinly send a mail to the developer at Support@destineddigitals.com or call +234 810 086 2257.
</p>
</body>
</html>
";
//Always set content-type when sending HTML email
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
$from= "support@destineddigitals.com";
//More headers
$headers .= 'From: <$from>' . "\r\n";
$headers .= 'Cc:$copy ' . "\r\n";
mail($to,$subject,$message,$headers);
?>
<script>
swal({
title: " Acount created!",
text: "registration successfull!!",
icon: "success",
button: "Ok",
type: "success",
timer: "6000",
}).then(function() {
window.location = "index.php";
});
</script>
<?php
}
}
?>
</div>
<div class="credits text-center text-sm">
<p>© 2022-<?php echo date("Y");?> Destined Digital Concept. All rights reserved.</p>
</div>
</div>
</div>
</section>
</div>
</main><!-- End #main -->
<a href="#" class="back-to-top d-flex align-items-center justify-content-center"><i
class="bi bi-arrow-up-short"></i></a>
<!-- Vendor JS Files -->
<script src="assets/vendor/apexcharts/apexcharts.min.js"></script>
<script src="assets/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="assets/vendor/chart.js/chart.min.js"></script>
<script src="assets/vendor/echarts/echarts.min.js"></script>
<script src="assets/vendor/quill/quill.min.js"></script>
<script src="assets/vendor/simple-datatables/simple-datatables.js"></script>
<script src="assets/vendor/tinymce/tinymce.min.js"></script>
<script src="assets/vendor/php-email-form/validate.js"></script>
<!-- Template Main JS File -->
<script src="assets/js/main.js"></script>
</body>
</html>
b IDATxytVսϓ22 A@IR:hCiZ[v*E:WũZA ^dQeQ @ !jZ'>gsV仿$|?g)&x-E