-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathActivationCode.php
43 lines (38 loc) · 1.11 KB
/
ActivationCode.php
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
<?php
require_once("Config/database.php");
require_once("Config/function.php");
if(isset($_GET["AktivasyonKodu"])){
$GelenAktivasyonKodu = Guvenlik($_GET["AktivasyonKodu"]);
}else{
$GelenAktivasyonKodu = "";
}
if(isset($_GET["Email"])){
$GelenEmail = Guvenlik($_GET["Email"]);
}else{
$GelenEmail = "";
}
if(($GelenAktivasyonKodu!="") and ($GelenEmail!="")){
$KontrolSorgusu = $VeritabaniBaglantim->prepare("SELECT * FROM uyeler WHERE EmailAdresi = ? AND AktivasyonKodu = ? AND Durumu = ?");
$KontrolSorgusu->execute([$GelenEmail, $GelenAktivasyonKodu, 0]);
$KullaniciSayisi = $KontrolSorgusu->rowCount();
if($KullaniciSayisi>0){
$UyeGuncellemeSorgusu = $VeritabaniBaglantim->prepare("UPDATE uyeler SET Durumu = 1");
$UyeGuncellemeSorgusu->execute();
$Kontrol = $UyeGuncellemeSorgusu->rowCount();
if($Kontrol>0){
header("Location:index.php?RC=0");
exit();
}else{
header("Location:" . $SiteLinki);
exit();
}
}else{
header("Location:" . $SiteLinki);
exit();
}
}else{
header("Location:" . $SiteLinki);
exit();
}
$VeritabaniBaglantisi = null;
?>