Compare commits
2 Commits
ef540e70b3
...
fcaa554c44
Author | SHA1 | Date | |
---|---|---|---|
![]() |
fcaa554c44 | ||
![]() |
8aa00724a9 |
@ -79,11 +79,11 @@ function send_mail ( $to, $from, $subject, $msg, $bcc = NULL, $att = NULL, $att_
|
|||||||
if ( $att ) {
|
if ( $att ) {
|
||||||
$separator = md5( time());
|
$separator = md5( time());
|
||||||
$att_f = chunk_split( base64_encode( $att ));
|
$att_f = chunk_split( base64_encode( $att ));
|
||||||
|
|
||||||
$headers .= "MIME-Version: 1.0\n";
|
$headers .= "MIME-Version: 1.0\n";
|
||||||
$headers .= "Content-Type: multipart/mixed; boundary=\"".$separator."\"\n";
|
$headers .= "Content-Type: multipart/mixed; boundary=\"".$separator."\"\n";
|
||||||
$headers .= "Content-Transfer-Encoding: 7bit";
|
$headers .= "Content-Transfer-Encoding: 7bit";
|
||||||
|
|
||||||
// message
|
// message
|
||||||
$message = "This is a MIME encoded message.\n\n";
|
$message = "This is a MIME encoded message.\n\n";
|
||||||
|
|
||||||
@ -92,10 +92,10 @@ function send_mail ( $to, $from, $subject, $msg, $bcc = NULL, $att = NULL, $att_
|
|||||||
$message .= "Content-Type: text/plain; charset=\"UTF-8\"\n";
|
$message .= "Content-Type: text/plain; charset=\"UTF-8\"\n";
|
||||||
$message .= "Content-Transfer-Encoding: 8bit\n\n";
|
$message .= "Content-Transfer-Encoding: 8bit\n\n";
|
||||||
$message .= $msg."\n";
|
$message .= $msg."\n";
|
||||||
|
|
||||||
// attachment
|
// attachment
|
||||||
$message .= "--".$separator."\n";
|
$message .= "--".$separator."\n";
|
||||||
$message .= "Content-Type: $att_type; name=\"$att_name\"\n";
|
$message .= "Content-Type: $att_type; name=\"$att_name\"\n";
|
||||||
$message .= "Content-Transfer-Encoding: base64\n";
|
$message .= "Content-Transfer-Encoding: base64\n";
|
||||||
$message .= "Content-Disposition: attachment\n\n";
|
$message .= "Content-Disposition: attachment\n\n";
|
||||||
$message .= $att_f."\n";
|
$message .= $att_f."\n";
|
||||||
@ -107,7 +107,7 @@ function send_mail ( $to, $from, $subject, $msg, $bcc = NULL, $att = NULL, $att_
|
|||||||
$headers .= "Content-Transfer-Encoding: 8bit";
|
$headers .= "Content-Transfer-Encoding: 8bit";
|
||||||
$message = $msg;
|
$message = $msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
return mail( $to, $subject, $message, $headers );
|
return mail( $to, $subject, $message, $headers );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -228,7 +228,10 @@ if ($_POST['subcd'] == "y") {
|
|||||||
|
|
||||||
$test = send_mail ("contact@fsfe.org", $_POST['firstname'] . " " . $_POST['lastname'] . " <" . $_POST['mail'] . ">", $subject, $msg, NULL, file_get_contents($outfile), "application/vnd.oasis.opendocument.text", "letter.odt");
|
$test = send_mail ("contact@fsfe.org", $_POST['firstname'] . " " . $_POST['lastname'] . " <" . $_POST['mail'] . ">", $subject, $msg, NULL, file_get_contents($outfile), "application/vnd.oasis.opendocument.text", "letter.odt");
|
||||||
|
|
||||||
if (isset($_POST['donate']) && ($_POST['donate'] > 0)) {
|
/**
|
||||||
|
* Only process donations starting from 10 euro.
|
||||||
|
*/
|
||||||
|
if (isset($_POST['donate']) && ((int) $_POST['donate']) > 10) {
|
||||||
relay_donation($_POST['donationID']);
|
relay_donation($_POST['donationID']);
|
||||||
} else {
|
} else {
|
||||||
header("Location: http://fsfe.org/contribute/spreadtheword-orderthanks.$lang.html");
|
header("Location: http://fsfe.org/contribute/spreadtheword-orderthanks.$lang.html");
|
||||||
|
@ -20,18 +20,15 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
form.addEventListener('submit', function (event) {
|
form.addEventListener('submit', function (event) {
|
||||||
var value = donationAmountInput.value;
|
var value = donationAmountInput.value.trim();
|
||||||
|
|
||||||
if (value) {
|
if (value !== '') {
|
||||||
var parsedValue = parseInt(value, 10);
|
var parsedValue = parseInt(value, 10);
|
||||||
|
|
||||||
if (parsedValue < 10) {
|
if (parsedValue > 0 && parsedValue < 10) {
|
||||||
setDonateError();
|
setDonateError();
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
setDonateError();
|
|
||||||
event.preventDefault();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
})();
|
})();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user