Parašė Poker· 2008 Bal. 23 13:04:03
#1
Dar nemačiau jog kas pristatytu toki moda,tai pasidalinsiu aš.Modas nera mano kurtas.Modo tikslas yra toks:kai kiekvienas narys suves neteisinga pass ,modas logins vartotojo Varda IP adresa,laika(kada bandė prisijunkt)
>>>>>Diegimas<<<<<
1 Imetame aplankala y infusions direktorija
2 Atsidartome maincore.php ir susirandame:
redirect(BASEDIR."setuser.php?error=3");
Dedame šita koda:
// -- START RECORD BAD LOGIN -- \\
if(file_exists(INFUSIONS."bad_login/admin.php")){
$result = dbquery("INSERT INTO ".$db_prefix."bad_login VALUES('', '".USER_IP."', '".time()."', '".$_POST['user_name']."')");
$check = dbquery("SELECT * FROM ".$db_prefix."bad_login WHERE login_ip='".USER_IP."'");
$cdata = dbarray($check);
if(dbrows($check) >= 10){
$blacklist_ip = USER_IP;
$blacklist_email = "";
$blacklist_reason = "10 failures @ login";
$list = dbquery("INSERT INTO ".$db_prefix."blacklist VALUES('', '$blacklist_ip', '$blacklist_email', '$blacklist_reason')");
}
}
// -- END RECORD BAD LOGIN -- \\
Bendras vaizdas ,kaip viskas turi atrodyt:
redirect(BASEDIR."setuser.php?error=2", "script");
}
} else {
// -- START RECORD BAD LOGIN -- \\
if(file_exists(INFUSIONS."bad_login/admin.php")){
$result = dbquery("INSERT INTO ".$db_prefix."bad_login VALUES('', '".USER_IP."', '".time()."', '".$_POST['user_name']."')");
$check = dbquery("SELECT * FROM ".$db_prefix."bad_login WHERE login_ip='".USER_IP."'");
$cdata = dbarray($check);
if(dbrows($check) >= 10){
$blacklist_ip = USER_IP;
$blacklist_email = "";
$blacklist_reason = "10 failures @ login";
$list = dbquery("INSERT INTO ".$db_prefix."blacklist VALUES('', '$blacklist_ip', '$blacklist_email', '$blacklist_reason')");
}
}
// -- END RECORD BAD LOGIN -- \\
redirect(BASEDIR."setuser.php?error=3");
}
}
Tikiuosi kam nors pravers ;]
Redagavo kiskiss· 2008 Bal. 23 13:04:04