query("Select * from qr_karaliste where qrText = '$aranan' and ipaddress = '$IpAddress' and logdate = '$qrdate' "); // TABLO İSMİ, WHERE ŞARTI, LİMİT, ORDER $ipkaralisteRow = $db->row(); $karalisteRowID = $ipkaralisteRow->ID; $karalisteSecurity = $ipkaralisteRow->security; $karalisteHit = $ipkaralisteRow->hit; if($karalisteSecurity > 0) { $korumagir = 1; } } else { $korumagir = 1; } if($korumagir == 1) { // kara-listede varsa $recaptcha = $_POST['g-recaptcha-response']; if (empty($recaptcha)) { echo 'Güvenlik Bölümünü Boş Geçmeyin.

'; exit; } if (!empty($recaptcha)) { $google_url = "https://www.google.com/recaptcha/api/siteverify"; $secret = '6Leqia8UAAAAAIVHeMbYTThKQQ5-PgKeB5k5ZouJ'; //kullanıcının ip adresi $ip = $_SERVER['REMOTE_ADDR']; //istek adresini oluşturuyoruz $url = $google_url . "?secret=" . $secret . "&response=" . $recaptcha . "&remoteip=" . $ip; $res = curlKullan($url); $res = json_decode($res, true); //echo $url; //print_r($res); //işlem başarılıysa çalışacak kısım if (!$res['success']) { echo 'Güvenlik Bölümünü Lütfen Doğru şekilde doldurun.

'; exit; } else { $db->query("Select * from qr_karaliste where qrText = '$aranan' and ipaddress = '$IpAddress' and logdate = '$qrdate' "); // TABLO İSMİ, WHERE ŞARTI, LİMİT, ORDER $ipkaraliste = $db->count(); $ipkaralisteResult = $db->row(); $ipkaralisteHit = $ipkaralisteResult->hit; if($ipkaraliste != 0) { // kara listede yoksa $dogrulama_basarili = 1; } if($ipkaralisteHit > '2') { // Captha geçilmiş ama kara listede sms girmesi için güvenlik arttır. $guvenlik = 2; $phone=Temizleme($_REQUEST["phone"]); $phoneCode=Temizleme($_REQUEST["phoneCode"]); if($type == 2) { $db->query("Select * from qr_session where phone = '$phone' and qrText = '$aranan' and ipaddress = '$IpAddress' and logdate = '$qrdate' "); // TABLO İSMİ, WHERE ŞARTI, LİMİT, ORDER } else { $db->query("Select * from qr_karaliste where phone = '$phone' and phoneCode = '$phoneCode' and qrText = '$aranan' and ipaddress = '$IpAddress' and logdate = '$qrdate' "); // TABLO İSMİ, WHERE ŞARTI, LİMİT, ORDER } $smskodliste = $db->count(); if($smskodliste != 0) { // phone ve phoneCode doğru demektir. if($type != 2) { // phoneCode boşalt $db->query("Update qr_karaliste set phoneCode='' where phone = '$phone' and qrText='$aranan' and logdate='$qrdate' and ipaddress = '$IpAddress'"); } $dogrulama_basarili = 1; } else { $dogrulama_basarili = 0; } } //echo $dogrulama_basarili; if($ipkaraliste != 0) { // kara listede ise - kara listeden başarılı captcha yapmış demektir hit sayıcaz $db->query("Update qr_karaliste set hit=hit+1 where qrText='$aranan' and logdate='$qrdate' and ipaddress = '$IpAddress'"); } } } } else { $dogrulama_basarili = 1; } if($type == 2 && $dogrulama_basarili == 1) { $db->select('project', array('qrText' => $aranan,'status' => 0), 1, 'ID DESC'); // TABLO İSMİ, WHERE ŞARTI, LİMİT, ORDER $project_row = $db->row(); $projectID = $project_row->ID; $qrSecurityBayi = $project_row->qrSecurityBayi; if($qrSecurityBayi == 1) { // kısıtlı olan $phone=Temizleme($_REQUEST["phone"]); $phoneCode=Temizleme($_REQUEST["phoneCode"]); $db->query("Select * from qr_session where phone = '$phone' and qrText = '$aranan' and status='0' "); // TABLO İSMİ, WHERE ŞARTI, LİMİT, ORDER $smskodliste = $db->count(); if($smskodliste != 0) { // status ve phone ve phoneCode doğru demektir o zaman yonlendirilsin. // phoneCode boşalt $db->query("Update qr_session set status='1' where phone = '$phone' and qrText='$aranan' "); $dogrulama_basarili = 1; } else { $dogrulama_basarili = 0; } } } } $db->select('project', array('qrText' => $aranan,'status' => 0,), 1, 'ID DESC'); // TABLO İSMİ, WHERE ŞARTI, LİMİT, ORDER $say = $db->count(); if($say != 0) { // yok if (!empty($_SERVER['HTTP_CLIENT_IP'])) { $IpAddress = $_SERVER['HTTP_CLIENT_IP']; } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { $IpAddress = $_SERVER['HTTP_X_FORWARDED_FOR']; } else { $IpAddress = $_SERVER['REMOTE_ADDR']; } //$IpAddress = $_SERVER['REMOTE_ADDR']; $qrdate = date("Y-m-d"); $db->select('project', array('qrText' => $aranan,'status' => 0,), 1, 'ID DESC'); // TABLO İSMİ, WHERE ŞARTI, LİMİT, ORDER $project_row = $db->row(); $projectID = $project_row->ID; $qrSecurity = $project_row->qrSecurity; $qrSecurityBayi = $project_row->qrSecurityBayi; if($qrSecurity == 1) { // kısıtlama olan çağırılıyorsa $db->select('project_log', array('qrText' => $aranan,'ipaddress' => "$IpAddress",'logdate' => "$qrdate"), 1, 'ID DESC'); // qr,ip,date eşleşen $project_log = $db->row(); $kisitli_hit = $project_log->hit; if($kisitli_hit > 0) { // 1'den büyüksa $guvenlik = 1; $db->query("Select * from qr_karaliste where qrText = '$aranan' and ipaddress = '$IpAddress' and logdate = '$qrdate' "); // TABLO İSMİ, WHERE ŞARTI, LİMİT, ORDER $ipkaraliste = $db->count(); if($ipkaraliste == 0) { // Kara listeye ekleniyor. $db->insert( 'qr_karaliste', array( 'qrText' => $aranan, 'ipaddress' => $IpAddress, 'logdate' => $qrdate, 'useragent' => $user_agent, 'hit' => 0, ) ); } } } // Bugünün tarihini alalım $currentDateTime = date('Y-m-d H:i:s'); $db->query("Select SUM(hit) as toplamhit from project_log where qrText = '$aranan' and ipaddress = '$IpAddress' and logdatetime >= NOW() - INTERVAL 2 MINUTE "); // TABLO İSMİ, WHERE ŞARTI, LİMİT, ORDER $twominute_sorgu = $db->result(); $twominute_sorgu_say = intval($twominute_sorgu[0]->toplamhit); $guvenlik = 0; $db->query("Select * from qr_karaliste where qrText = '$aranan' and ipaddress = '$IpAddress' and logdate = '$qrdate' "); // TABLO İSMİ, WHERE ŞARTI, LİMİT, ORDER $ipkaraliste = $db->count(); $db->query("Select * from qr_karaliste where qrText = '$aranan' and ipaddress = '$IpAddress' and logdate = '$qrdate' "); // TABLO İSMİ, WHERE ŞARTI, LİMİT, ORDER $ipkaralisteResult = $db->row(); $ipkaralisteHit = $ipkaralisteResult->hit; if($twominute_sorgu_say > '5') { // 2 dakika içinde 5 kereden fazla geldiyse $guvenlik = 1; } if($ipkaraliste != 0) { // kara listede varsa $guvenlik = 1; } if($ipkaralisteHit > '2') { // Captha geçilmiş ama kara listede sms girmesi için güvenlik arttır. $guvenlik = 2; } //echo $ipkaraliste; if($dogrulama_basarili != 1) { if($guvenlik == 1 || $guvenlik == 2 || $qrSecurityBayi == 1) { ?> QR PROJECT

LÜTFEN GİRİŞİNİZİ DOĞRULAYINIZ

Başında 0 olmadan 5**** şeklinde 10 hane olarak yazınız.
query("Update qr_karaliste set security=1 where qrText = '$aranan' and ipaddress = '$IpAddress' and logdate = '$qrdate' "); } ?>
Başında 0 olmadan 5**** şeklinde 10 hane olarak yazınız.
insert( 'qr_karaliste', array( 'qrText' => $aranan, 'ipaddress' => $IpAddress, 'logdate' => $qrdate, 'useragent' => $user_agent, 'hit' => 0, ) ); } exit; } } $qrText = $project_row->qrText; $qrHedef = Temizleme_geri($project_row->qrHedef); $qrdatetime = date("Y-m-d H:i") . ':00'; $user_agent = $_SERVER['HTTP_USER_AGENT']; $filtre_arr = array(); $filtre_arr[] = "qrText = '$qrText'"; $filtre_arr[] = "logdate = '$qrdate'"; $filtre_arr[] = "ipaddress = '$IpAddress'"; $db->select('project_log', $filtre_arr, 1, 'ID DESC'); // TABLO İSMİ, WHERE ŞARTI, LİMİT, ORDER $log_say = $db->count(); if($log_say != '0') { if($qrSecurity == 1 || $qrSecurityBayi == 1) { // kısıtlama olan çağırılıyorsa $db->select('qr_karaliste', array('qrText' => $aranan,'ipaddress' => "$IpAddress",'logdate' => "$qrdate"), 1, 'ID DESC'); // qr,ip,date eşleşen $kara_liste_say = $db->count(); if($kara_liste_say == 0) { // karalisteye girmediyse say $db->query("Update project_log set hit=hit+1 where qrText='$qrText' and logdatetime='$qrdatetime' and ipaddress = '$IpAddress'"); } } else { $db->query("Update project_log set hit=hit+1 where qrText='$qrText' and logdatetime='$qrdatetime' and ipaddress = '$IpAddress'"); } } else { $db->insert( 'project_log', array( 'projectID' => $projectID, 'qrText' => $qrText, 'ipaddress' => $IpAddress, 'hit' => 1, 'logdate' => $qrdate, 'logdatetime' => $qrdatetime, 'useragent' => $user_agent, ) ); } header("Location: $qrHedef"); exit; } ?>