Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- INDEX_LINKER || die();
- $sys = registry::register('sys');
- $locale = registry::register('locale');
- starting('Logowanie', 'Logowanie');
- $response = $_POST["g-recaptcha-response"];
- $url = 'https://www.google.com/recaptcha/api/siteverify';
- $data = array(
- 'secret' => '',
- 'response' => $_POST["g-recaptcha-response"]
- );
- $options = array(
- 'http' => array (
- 'content' => http_build_query($data)
- )
- );
- $context = stream_context_create($options);
- $verify = file_get_contents($url, false, $context);
- $captcha_success=json_decode($verify);
- require_once'inc/modules/_func/login.php';
- $_pass = clearstr($_POST['pass']);
- $_user = clearstr($_POST['login']);
- $_ip = $_SERVER['REMOTE_ADDR'];
- if ($_POST['login'] == "" and $_POST['pass'] == "")
- {
- viewInfo('Wprowadź dane i spróbuj ponownie!');
- }
- else
- {
- if ($captcha_success->success==false) {
- viewInfo('Weryfkacja captcha nie została potwierdzona');
- } else if ($captcha_success->success==true) {
- $_usr = getUser($_user, $_pass);
- if(mysqli_num_rows($_usr))
- {
- $r = mysqli_fetch_array($_usr);
- if($r['status'] != 'LEAVE')
- {
- if(strtotime($r['availDt']) >= time())
- {
- add_log_login(0, $_user);
- displayBan($r['id']);
- }
- else
- {
- viewInfo('Logowanie na strone jest chwilowo wyłączone');
- }
- }
- }
- }
- }
- ending();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement