Commit d108dd9b authored by willy's avatar willy
Browse files

Fix contact honneypot bug

parent ffed40f0
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
<?php
// TODO give feedback
//$url = 'http://niirvana.nii'
//$url = 'http://localhost/niirvana';
//$url = 'http://niirvana.coloc';
$url = 'http://knightsofnii.com';
if(!isset($_POST['message']) ||  $_POST['message'] == '' || $_POST['firstname'] > 1 | $_POST['lastname'] > 1 ) {
        echo "mail not sent";
} else {
@@ -12,15 +15,12 @@ if(!isset($_POST['message']) || $_POST['message'] == '' || $_POST['firstname']
    if(empty($_POST['firstname']) && empty($_POST['lastname'])) {

        $to      = 'admin@knightsofnii.com';
        $subject = 'Message from the nii presentation page !';
        $subject = 'Real message from nii page !';
        $message = $_POST['message']."  ".$contact;

        $send = mail($to, $subject, $message, " Message from main server page ! (or smart bot)");
        $send = mail($to, $subject, $message, " Message from main server page ! (or very smart bot)");
        ($send ? $send = 1 : $send = 0);
        //$url = 'http://niirvana.nii'
        //$url = 'http://localhost/niirvana';
        //$url = 'http://niirvana.coloc';
        $url = 'http://knightsofnii.com';

    }
}
?>
+5 −3
Original line number Diff line number Diff line
.feedbackmail {
	width: 100%;
	color: #ffffff;
	text-align: center;
	border-radius: 9px;
}
.true {
	background-color: #4CAF50;
}
.false {
	background-color:#F44336;
	background-color: #E75B51;
}
+2 −0
Original line number Diff line number Diff line
@@ -272,9 +272,11 @@
	input[type="email"],
	select {
		line-height: 1em;
		color: #ffffff;
	}

	textarea {
		color: #ffffff;
		padding: 0.5em 0.75em;
		max-width: 100%;
		min-width: 100%;