-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtestlog.php
50 lines (42 loc) · 1.05 KB
/
testlog.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
44
45
46
47
48
49
50
<?php
include("clogin.php");
$log = new logmein();
if($log->autologin() == true)
{
header( 'Location: .' );
}else{
if($_REQUEST['action'] == "login")
{
if(isset($_POST['rememberme']))
if($_POST['rememberme'] == "1")
$log->allowrememberme(1);
if(!$log->isloginlocked())
{
if($log->login("logon", $_REQUEST['username'], $_REQUEST['password']) == true)
{
header( 'Location: .' ) ;
}else{
header( 'Location: login' ) ;
}
}else{
require_once('php/recaptcha/recaptchalib.php');
$privatekey = "6LcIAMwSAAAAAGbMODPNAG0JtY1lpPzN5M18tSmo";
$resp = recaptcha_check_answer ($privatekey,
$_SERVER["REMOTE_ADDR"],
$_POST["recaptcha_challenge_field"],
$_POST["recaptcha_response_field"]);
if($resp->is_valid)
{
if($log->login("logon", $_REQUEST['username'], $_REQUEST['password']) == true)
{
header( 'Location: .' ) ;
}else{
header( 'Location: login' ) ;
}
}else{
header( 'Location: login' ) ;
}
}
}
}
?>