$data['PrivateKey'], 'response' => $_POST['g-recaptcha-response'], 'remoteip' => $_SERVER['REMOTE_ADDR'] ) ); $resp = json_decode(curl_exec($ch)); curl_close($ch); } } if(!$post['username']){ $data['Error']='Your username can not be empty.'; }elseif(!$post['password']){ $data['Error']='Your password can not be empty.'; }elseif(!is_member_active($post['username'])){ $data['Error']='This member was not found in the system. Or is inactive, banned or closed.'; }elseif(!is_member_found($post['username'], $post['password'])){ $data['Error']='You have entered a wrong username or password.'; }elseif($data['UseRecaptcha'] && !$resp->success) { $data['Error']='Enter Correct Captcha'; }else{ unset($_SESSION['attempts']); $_SESSION['uid']=get_member_id($post['username'], $post['password']); $_SESSION['login']=true; set_last_access($post['username']); save_remote_ip((int)$_SESSION['uid'], $_SERVER["REMOTE_ADDR"]); header("Location:{$data['Host']}/members/index.htm"); echo('ACCESS DENIED.'); exit; } (int)$_SESSION['attempts']++; }else{ unset($_SESSION['attempts']); $data['CantLogin']=true; } } $data['attempts']=$_SESSION['attempts'];} ############################################################################### display('members'); ############################################################################### ?>