This commit is contained in:
Rico29 2018-02-13 09:18:27 +00:00 committed by GitHub
commit ce9ed32e74
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 0 deletions

12
action.php Normal file
View file

@ -0,0 +1,12 @@
<?php
if(isset($_POST['action']) && !empty($_POST['action'])) {
$action = $_POST['action'];
switch($action) {
case 'failedlogin' :
#error_log("login failed for user ".$_POST['user']." (".$_SERVER['REMOTE_ADDR']), 3, "/tmp/mes-erreurs.log");
error_log("PDNS-MANAGER : login failed for user ".$_POST['user']." (".$_SERVER['REMOTE_ADDR'].")\n", 3, "/var/log/apache2/error.log");
break;
}
}
?>

View file

@ -26,6 +26,7 @@ $(document).ready(function() {
function(data){
if(data.status == "fail") {
$('#alertLoginFailed').slideDown(600);
$.post( "action.php", { action: "failedlogin", user: $('#inputUser').val() } );
} else {
location.assign("domains.php");
}