-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathverifyEmail.php
More file actions
136 lines (109 loc) · 4.43 KB
/
verifyEmail.php
File metadata and controls
136 lines (109 loc) · 4.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<?php
session_start();
if(isset($_SESSION['username'])){
echo '<meta http-equiv="refresh" content="0; url=Dashboard">';
exit;
}
if(!isset($_SESSION['LANGUAGE']) || !isset($_GET['LANGUAGE']))
{
$_SESSION['LANGUAGE'] = "EN";
require("languages/".$_SESSION['LANGUAGE'].".php");
}
else {
if($_GET['LANGUAGE'] != "EN" && $_GET['LANGUAGE'] != "ES")
{
echo "hahahahahahhahahahhaha Gaaaaary deez nuts";
echo '<meta http-equiv="refresh" content="5; url=index.php?LANGUAGE=EN">';
exit;
}
$_SESSION['LANGUAGE'] = $_GET['LANGUAGE'];
require("languages/".$_SESSION['LANGUAGE'].".php");
}
require_once("database/database.php");
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title><?php echo $verifyMailTitle; ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="robots" content="index,follow" />
<meta name="Category" content="Proxy">
<meta name="description" content="<?php echo $description; ?>">
<meta name="keywords" content="<?php echo $keywords; ?>">
<meta property="og:type" content="Proxy">
<meta property="og:url" content="<?php echo $ogUrl; ?>">
<meta property="og:title" content="<?php echo $verifyMailTitle; ?>">
<meta property="og:description" content="<?php echo $description; ?>">
<meta property="og:image" content="<?php echo $ogImage; ?>">
<meta property="twitter:card" content="summary_large_image">
<meta property="twitter:url" content="<?php echo $ogUrl; ?>">
<meta property="twitter:title" content="<?php echo $verifyMailTitle; ?>">
<meta property="twitter:description" content="<?php echo $description; ?>">
<meta property="twitter:image" content="<?php echo $ogImage; ?>">
<link rel="shortcut icon" href="images/favicon.png">
<link rel="stylesheet" href="css/libs.css">
<script src="js/jquery.js"></script>
<script src="js/libs.js"></script>
<?php @include('analytics/index.php'); ?>
</head>
<body class="auth-page">
<div class="wrapper">
<div class="container-fluid user-auth">
<div class="hidden-xs col-sm-4 col-md-4 col-lg-4">
<div id="carousel-testimonials" class="carousel slide carousel-fade" data-ride="carousel" >
<div class="carousel-inner">
<div class="item active item-1">
</div>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-8 col-md-8 col-lg-8">
<a class="visible-xs" href="index.php">
<img class="img-responsive mobile-logo" src="images/Proxy-Checker-Logo.png" alt="Proxy-Checker-Logo" title="Proxy-Checker-Logo" style="width:150px;">
</a>
<div class="form-container">
<div>
<div class="row text-center">
<h2 class="title-head hidden-xs"><?php echo $registerUser10; ?></h2>
<p class="info-form"><?php echo $registerUser11; ?></p>
</div>
<form action="" method="POST">
<?php
if(isset($_POST['VerifyAccount'])){
$verifyCode = $_POST['verifyCode'];
try{
if($DatabaseConnection->query("SELECT * FROM usercodeverify WHERE verifyCode='$verifyCode' and codeUsed ='0'")->rowCount() === 1){
$getUserDetails = $DatabaseConnection->query("SELECT * FROM usercodeverify WHERE verifyCode='$verifyCode'");
$userID = $getUserDetails->fetch(PDO::FETCH_OBJ)->user_id;
$verifyEmail = $DatabaseConnection->prepare("UPDATE usercodeverify SET codeUsed ='1' WHERE verifyCode= :verifyCode ");
$verifyEmail->bindParam('verifyCode', $verifyCode, PDO::PARAM_STR);
$verifyEmail->execute();
$verifyAccount = $DatabaseConnection->prepare("UPDATE users SET verifiedEmail ='1' WHERE id= :user_id ");
$verifyAccount->bindParam('user_id', $userID, PDO::PARAM_STR);
$verifyAccount->execute();
echo '<div class="col-xs-12 text-center contact-form"><p class="output_message success">'.$registerUser12.'</p></div>';
echo "<meta http-equiv='refresh' content='3;url=Login' />";
}else{
echo '<div class="col-xs-12 text-center contact-form"><p class="output_message error">'.$registerUser13.'</p></div>';
}
}catch(PDOException $verifyError){
echo '<div class="col-xs-12 text-center contact-form"><p class="output_message error">'.$registerUser14.'</p></div>';
}
}
?>
<div class="form-group">
<input class="form-control" name="verifyCode" id="verifyCode" placeholder="<?php echo $registerUser15; ?>" type="text" autocomplete="off" required>
</div>
<div class="form-group">
<input class="btn btn-primary form-control" type="submit" name ="VerifyAccount" value="<?php echo $registerUser17; ?>">
</div>
</form>
</div>
</div>
<p class="text-center copyright-text"><?php echo $footer19; ?></p>
</div>
</div>
</div>
</body>
</html>