diff --git a/comments.php b/comments.php index e30c30a..821cc87 100644 --- a/comments.php +++ b/comments.php @@ -171,9 +171,9 @@ function commentform() { // utils_nocache_headers(); - // add http to url if not given + // add https to url if not given if (!empty($_POST ['url']) && strpos($_POST ['url'], 'http://') === false && strpos($_POST ['url'], 'https://') === false) - $_POST ['url'] = 'http://' . $_POST ['url']; + $_POST ['url'] = 'https://' . $_POST ['url']; // custom hook here!! if ($arr = comment_validate()) { @@ -222,7 +222,7 @@ function commentform() { $fp_config ['general'] ['title'] ), $lang ['comments'] ['mail']); - // for non-ASCII characters in the e-mail header use RFC RFC 1342 — Encodes $subject with MIME base64 via core.utils.php + // for non-ASCII characters in the e-mail header use RFC 1342 — Encodes $subject with MIME base64 via core.utils.php @utils_mail($from_mail, "{$lang['comments']['newcomment']} {$fp_config['general']['title']}", $mail); } diff --git a/contact.php b/contact.php index 4a7b698..faf3e50 100755 --- a/contact.php +++ b/contact.php @@ -10,14 +10,21 @@ $contactform_inputs = array( 'content' ); -/** - * Validates the POST data and returns a validated array (key=>value) - or false if validation failed - * - * @return boolean|array - */ -function contact_form_validate() { +// Validates the POST data +function contact_validate() { global $smarty, $contactform_inputs, $lang; + $lerr = & $lang ['contact'] ['error']; + + $r = true; + + $name = trim(htmlspecialchars(@$_POST ['name'])); + $email = isset($_POST ['email']) ? trim(htmlspecialchars($_POST ['email'])) : null; + $url = isset($_POST ['url']) ? trim(stripslashes(htmlspecialchars($_POST ['url']))) : null; + $content = isset($_POST ['content']) ? trim(addslashes($_POST ['content'])) : null; + + $errors = array(); + // if the request does not contain all input fields, it might be forged foreach ($contactform_inputs as $input) { if (!array_key_exists($input, $_POST)) { @@ -25,35 +32,32 @@ function contact_form_validate() { } } - $errors = array(); - - $name = trim(htmlspecialchars($_POST ['name'])); - $email = trim(htmlspecialchars($_POST ['email'])); - $url = trim(stripslashes(htmlspecialchars($_POST ['url']))); - $content = trim(addslashes($_POST ['content'])); - // check name - if (empty($name)) { - $errors ['name'] = $lang ['contact'] ['error'] ['name']; + if (!$name) { + $errors ['name'] = $lerr ['name']; } // check email - if (!empty($email) && !filter_var($email, FILTER_VALIDATE_EMAIL)) { - $errors ['email'] = $lang ['contact'] ['error'] ['email']; + if ($email) { + if (!filter_var($email, FILTER_VALIDATE_EMAIL)) { + $errors ['email'] = $lerr ['email']; + } } // check url - if (!empty($url) && !filter_var($url, FILTER_VALIDATE_URL)) { - $errors ['url'] = $lang ['contact'] ['error'] ['www']; + if ($url) { + if (!filter_var($url, FILTER_VALIDATE_URL)) { + $errors ['url'] = $lerr ['www']; + } } // check content - if (empty($content)) { - $errors ['content'] = $lang ['contact'] ['error'] ['content']; + if (!$content) { + $errors ['content'] = $lerr ['content']; } // assign error messages to template - if (!empty($errors)) { + if ($errors) { $smarty->assign('error', $errors); return false; } @@ -61,22 +65,28 @@ function contact_form_validate() { $arr ['version'] = system_ver(); $arr ['name'] = $name; - if (!empty($email)) { + if ($email) { ($arr ['email'] = $email); } - if (!empty($url)) { + + if ($url) { ($arr ['url'] = ($url)); } + $arr ['content'] = $content; if ($v = utils_ipget()) { $arr ['ip-address'] = $v; } - return $arr; + // check aaspam if active + if (apply_filters('comment_validate', true, $arr)) + return $arr; + else + return false; } -function contact_form() { +function contactform() { global $smarty, $lang, $fp_config, $contactform_inputs; // initial call of the contact form @@ -89,7 +99,7 @@ function contact_form() { // new form, we (re)set the session data utils_nocache_headers(); - $validationResult = contact_form_validate(); + $validationResult = contact_validate(); // if validation failed if ($validationResult === false) { @@ -98,6 +108,11 @@ function contact_form() { return; } + // add https to url if not given + if (!empty($_POST ['url']) && strpos($_POST ['url'], 'http://') === false && strpos($_POST ['url'], 'https://') === false) { + $_POST ['url'] = 'https://' . $_POST ['url']; + } + // okay, validation returned validated values // now build the mail content $msg = "{$lang['contact']['notification']['name']} \n{$validationResult['name']}\n\n"; @@ -111,7 +126,7 @@ function contact_form() { $msg .= "{$lang['contact']['notification']['content']} \n{$validationResult['content']}\n"; // send notification mail to site admin - // for non-ASCII characters in the e-mail header use RFC RFC 1342 — Encodes $subject with MIME base64 via core.utils.php + // for non-ASCII characters in the e-mail header use RFC 1342 — Encodes $subject with MIME base64 via core.utils.php $success = @utils_mail((isset($validationResult ['email']) ? $validationResult ['email'] : $fp_config ['general'] ['email']), "{$lang['contact']['notification']['subject']} {$fp_config['general']['title']}", $msg); system_seterr('contact', $success ? 1 : -1); utils_redirect(basename(__FILE__)); @@ -128,9 +143,10 @@ function contact_main() { $smarty->assign('subject', $lang ['contact'] ['head']); $smarty->assign('content', 'shared:contact.tpl'); - contact_form(); + contactform(); } + function contact_display() { global $smarty; @@ -146,4 +162,5 @@ function contact_display() { } system_init(); -contact_display(); \ No newline at end of file +contact_display(); +?> diff --git a/fp-interface/lang/cs-cz/lang.contact.php b/fp-interface/lang/cs-cz/lang.contact.php index bde8377..28fa21d 100644 --- a/fp-interface/lang/cs-cz/lang.contact.php +++ b/fp-interface/lang/cs-cz/lang.contact.php @@ -12,6 +12,7 @@ $lang ['contact'] = array( 'fieldset3' => 'Poslat', 'submit' => 'Poslat', 'reset' => 'Resetovat', + 'loggedin' => 'Jste přihlášen 😉. Odhlásit se nebo na administrativní oblasti.' ); $lang ['contact'] ['notification'] = array( @@ -19,18 +20,18 @@ $lang ['contact'] ['notification'] = array( 'email' => 'E-mail:', 'www' => 'Web:', 'content' => 'Zpráva:', - 'subject' => 'Kontakt zaslaný prostřednictvím ', + 'subject' => 'Kontakt zaslaný prostřednictvím ' ); $lang ['contact'] ['error'] = array( 'name' => 'Musíte vložit jméno', 'email' => 'Musíte vložit správný email', 'www' => 'Musíte vložit správné URL', - 'content' => 'Musíte vložit zprávu', + 'content' => 'Musíte vložit zprávu' ); $lang ['contact'] ['msgs'] = array( 1 => 'Zpráva byla úspěšně odeslána', - -1 => 'Zpráva nemohla být odeslána', + -1 => 'Zpráva nemohla být odeslána' ); ?> \ No newline at end of file diff --git a/fp-interface/lang/da-dk/lang.contact.php b/fp-interface/lang/da-dk/lang.contact.php index 79d996d..aa38ef7 100644 --- a/fp-interface/lang/da-dk/lang.contact.php +++ b/fp-interface/lang/da-dk/lang.contact.php @@ -12,6 +12,7 @@ $lang ['contact'] = array( 'fieldset3' => 'Send', 'submit' => 'Send', 'reset' => 'Nulstil', + 'loggedin' => 'Du er logget ind 😉. Log ud eller til administrationsområdet.' ); $lang ['contact'] ['notification'] = array( @@ -19,18 +20,18 @@ $lang ['contact'] ['notification'] = array( 'email' => 'E-Mail Adresse:', 'www' => 'Hjemmeside:', 'content' => 'Besked:', - 'subject' => 'Kontakt via ', + 'subject' => 'Kontakt via ' ); $lang ['contact'] ['error'] = array( 'name' => 'Indtast venligst et navn', 'email' => 'Indtast venligst en gyldig e-mailadresse', 'www' => 'Indtast venligst en gyldig URL', - 'content' => 'Skriv venligst en besked', + 'content' => 'Skriv venligst en besked' ); $lang ['contact'] ['msgs'] = array( 1 => 'Beskeden blev sendt med succes', - -1 => 'Fejl: Beskeden kunne ikke sendes', + -1 => 'Fejl: Beskeden kunne ikke sendes' ); ?> \ No newline at end of file diff --git a/fp-interface/lang/de-de/lang.contact.php b/fp-interface/lang/de-de/lang.contact.php index 152cc3a..87d638e 100644 --- a/fp-interface/lang/de-de/lang.contact.php +++ b/fp-interface/lang/de-de/lang.contact.php @@ -12,6 +12,7 @@ $lang ['contact'] = array( 'fieldset3' => 'Senden', 'submit' => 'Abschicken', 'reset' => 'Zurücksetzen', + 'loggedin' => 'Du bist angemeldet 😉. Abmelden oder zum Administrationsbereich.' ); $lang ['contact'] ['notification'] = array( @@ -19,18 +20,18 @@ $lang ['contact'] ['notification'] = array( 'email' => 'E-Mail Adresse:', 'www' => 'Website:', 'content' => 'Nachricht:', - 'subject' => 'Kontaktaufnahme über ', + 'subject' => 'Kontaktaufnahme über ' ); $lang ['contact'] ['error'] = array( 'name' => 'Bitte einen Namen eingeben', 'email' => 'Bitte eine gültige E-Mail Adresse eingeben', 'www' => 'Bitte eine gültige URL eingeben', - 'content' => 'Bitte eine Nachricht schreiben', + 'content' => 'Bitte eine Nachricht schreiben' ); $lang ['contact'] ['msgs'] = array( 1 => 'Die Nachricht wurde erfolgreich versendet', - -1 => 'Fehler: Die Nachricht konnte nicht versendet werden', + -1 => 'Fehler: Die Nachricht konnte nicht versendet werden' ); ?> \ No newline at end of file diff --git a/fp-interface/lang/el-gr/lang.contact.php b/fp-interface/lang/el-gr/lang.contact.php index c40a705..f46dc79 100644 --- a/fp-interface/lang/el-gr/lang.contact.php +++ b/fp-interface/lang/el-gr/lang.contact.php @@ -12,6 +12,7 @@ $lang ['contact'] = array( 'fieldset3' => 'Αποστολή', 'submit' => 'Αποστολή', 'reset' => 'Ακύρωση', + 'loggedin' => 'Έχετε συνδεθεί 😉. Αποσυνδεθείτε ή μεταβείτε στο περιοχή διαχείρισης.' ); $lang ['contact'] ['notification'] = array( @@ -19,18 +20,18 @@ $lang ['contact'] ['notification'] = array( 'email' => 'Ηλεκτρονικό ταχυδρομείο:', 'www' => 'Ιστοσελίδα:', 'content' => 'Μήνυμα:', - 'subject' => 'Επικοινωνία που αποστέλλεται μέσω ', + 'subject' => 'Επικοινωνία που αποστέλλεται μέσω ' ); $lang ['contact'] ['error'] = array( 'name' => 'Πρέπει να εισάγετε ένα όνομα', 'email' => 'Πρέπει να εισάγετε μια ισχύουσα ηλεκτρονική διεύθυνση', 'www' => 'Πρέπει να προσθέσετε μια ισχύουσα σελίδα', - 'content' => 'Πρέπει να εισάγετε ένα μήνυμα', + 'content' => 'Πρέπει να εισάγετε ένα μήνυμα' ); $lang ['contact'] ['msgs'] = array( 1 => 'Το μήνυμα σας εστάλη επιτυχώς', - -1 => 'Το μήνυμα σας δεν μπόρεσε να σταλεί', + -1 => 'Το μήνυμα σας δεν μπόρεσε να σταλεί' ); ?> \ No newline at end of file diff --git a/fp-interface/lang/en-us/lang.contact.php b/fp-interface/lang/en-us/lang.contact.php index bfe472b..1f5eeb1 100755 --- a/fp-interface/lang/en-us/lang.contact.php +++ b/fp-interface/lang/en-us/lang.contact.php @@ -12,6 +12,7 @@ $lang ['contact'] = array( 'fieldset3' => 'Send', 'submit' => 'Send', 'reset' => 'Reset', + 'loggedin' => 'You are logged in 😉. Log out or to the Administration area.' ); $lang ['contact'] ['notification'] = array( @@ -19,18 +20,18 @@ $lang ['contact'] ['notification'] = array( 'email' => 'Email:', 'www' => 'Web:', 'content' => 'Message:', - 'subject' => 'Contact sent through ', + 'subject' => 'Contact sent through ' ); $lang ['contact'] ['error'] = array( 'name' => 'You must enter a name', 'email' => 'You must enter a valid email', 'www' => 'You must enter a valid URL', - 'content' => 'You must enter a message', + 'content' => 'You must enter a message' ); $lang ['contact'] ['msgs'] = array( 1 => 'Message was sent successfully', - -1 => 'Message could not be sent', + -1 => 'Message could not be sent' ); ?> \ No newline at end of file diff --git a/fp-interface/lang/es-es/lang.contact.php b/fp-interface/lang/es-es/lang.contact.php index 3834b99..5e027e1 100644 --- a/fp-interface/lang/es-es/lang.contact.php +++ b/fp-interface/lang/es-es/lang.contact.php @@ -12,6 +12,7 @@ $lang ['contact'] = array( 'fieldset3' => 'Enviar', 'submit' => 'Enviar', 'reset' => 'Reiniciar', + 'loggedin' => 'Ha iniciado sesión 😉. Cerrar sesión o al área de administración.' ); $lang ['contact'] ['notification'] = array( @@ -19,18 +20,18 @@ $lang ['contact'] ['notification'] = array( 'email' => 'Correo electrónico:', 'www' => 'Web:', 'content' => 'Mensaje:', - 'subject' => 'Contacto enviado a través de ', + 'subject' => 'Contacto enviado a través de ' ); $lang['contact'] ['error'] = array( 'name' => 'Debes ingresar un nombre', 'email' => 'Debes ingresar un correo electrónico válido', 'www' => 'Debes ingresar una URL válida', - 'content' => 'Debes ingresar un mensaje', + 'content' => 'Debes ingresar un mensaje' ); $lang ['contact'] ['msgs'] = array( 1 => 'El mensaje se envió con éxito', - -1 => 'No se pudo enviar el mensaje', + -1 => 'No se pudo enviar el mensaje' ); ?> \ No newline at end of file diff --git a/fp-interface/lang/fr-fr/lang.contact.php b/fp-interface/lang/fr-fr/lang.contact.php index 6e6d5de..fa5e2e2 100644 --- a/fp-interface/lang/fr-fr/lang.contact.php +++ b/fp-interface/lang/fr-fr/lang.contact.php @@ -12,6 +12,7 @@ $lang ['contact'] = array( 'fieldset3' => 'Envoyer', 'submit' => 'Envoyer', 'reset' => 'Réinitialiser', + 'loggedin' => 'Vous êtes connecté 😉. Se déconnecter ou accéder à Espace d\'administration.' ); $lang ['contact'] ['notification'] = array( @@ -19,18 +20,18 @@ $lang ['contact'] ['notification'] = array( 'email' => 'Courriel:', 'www' => 'Web:', 'content' => 'Message:', - 'subject' => 'Contact envoyé par ', + 'subject' => 'Contact envoyé par ' ); $lang ['contact'] ['error'] = array( 'name' => 'Vous devez entrer un nom', 'email' => 'Vous devez entrer une adresse email valide', 'www' => 'Vous devez entrer une URL correcte', - 'content' => 'Vous devez écrire un message', + 'content' => 'Vous devez écrire un message' ); $lang ['contact'] ['msgs'] = array( 1 => 'Message envoyé avec succès', - -1 => 'Echec d\'envoi du message', + -1 => 'Echec d\'envoi du message' ); ?> \ No newline at end of file diff --git a/fp-interface/lang/it-it/lang.contact.php b/fp-interface/lang/it-it/lang.contact.php index cbf9fa0..cd0b571 100644 --- a/fp-interface/lang/it-it/lang.contact.php +++ b/fp-interface/lang/it-it/lang.contact.php @@ -12,6 +12,7 @@ $lang ['contact'] = array( 'fieldset3' => 'Invia', 'submit' => 'Invia', 'reset' => 'Azzera', + 'loggedin' => 'Sei connesso 😉. Uscire o accedere all\'area amministrativa.' ); $lang ['contact'] ['notification'] = array( @@ -19,18 +20,18 @@ $lang ['contact'] ['notification'] = array( 'email' => 'Email:', 'www' => 'Web:', 'content' => 'Messaggio:', - 'subject' => 'Contatto inviato tramite ', + 'subject' => 'Contatto inviato tramite ' ); $lang ['contact'] ['error'] = array( 'name' => 'Devi inserire un nome', 'email' => 'Devi inserire un indirizzo email valido', 'www' => 'Devi inserire un URL valido', - 'content' => 'Devi inserire un messaggio', + 'content' => 'Devi inserire un messaggio' ); $lang ['contact'] ['msgs'] = array( 1 => 'Il messaggio è stato inviato con successo', - -1 => 'Il messaggio non è stato inviato', + -1 => 'Il messaggio non è stato inviato' ); ?> \ No newline at end of file diff --git a/fp-interface/lang/ja-jp/lang.contact.php b/fp-interface/lang/ja-jp/lang.contact.php index 63f0ac1..4dcb360 100644 --- a/fp-interface/lang/ja-jp/lang.contact.php +++ b/fp-interface/lang/ja-jp/lang.contact.php @@ -12,6 +12,7 @@ $lang ['contact'] = array( 'fieldset3' => '送信', 'submit' => '送信する', 'reset' => 'キャンセル', + 'loggedin' => 'あなたはログインしています 😉. ログアウトまたは 管理エリアに移動します。' ); $lang ['contact'] ['notification'] = array( @@ -19,18 +20,18 @@ $lang ['contact'] ['notification'] = array( 'email' => '電子メール:', 'www' => 'ウェブ:', 'content' => 'メッセージ:', - 'subject' => 'で送信した連絡先 ', + 'subject' => 'で送信した連絡先 ' ); $lang ['contact'] ['error'] = array( 'name' => 'お名前をご記入ください。', 'email' => 'メールアドレスを正しくご記入ください。', 'www' => 'URLを正しくご記入ください。', - 'content' => 'メッセージをご記入ください。', + 'content' => 'メッセージをご記入ください。' ); $lang ['contact'] ['msgs'] = array( 1 => 'メッセージを送信しました。', - -1 => 'メッセージを送信できませんでした。', + -1 => 'メッセージを送信できませんでした。' ); ?> diff --git a/fp-interface/lang/nl-nl/lang.contact.php b/fp-interface/lang/nl-nl/lang.contact.php index b8332c5..3a00af5 100644 --- a/fp-interface/lang/nl-nl/lang.contact.php +++ b/fp-interface/lang/nl-nl/lang.contact.php @@ -14,6 +14,7 @@ $lang ['contact'] = array( 'fieldset3' => 'Stuur', 'submit' => 'Stuur', 'reset' => 'Reset', + 'loggedin' => 'U bent ingelogd 😉. Uitloggen of naar het administratiegedeelte.' ); $lang ['contact'] ['notification'] = array( @@ -21,18 +22,18 @@ $lang ['contact'] ['notification'] = array( 'email' => 'Email:', 'www' => 'Web:', 'content' => 'Boodschap:', - 'subject' => 'Contact verzonden via ', + 'subject' => 'Contact verzonden via ' ); $lang ['contact'] ['error'] = array( 'name' => 'Er dient een naam ingevuld te worden', 'email' => 'Geen geldig e-mail adres', 'www' => 'Geen geldige URL ', - 'content' => 'Het bericht mag niet blanko zijn', + 'content' => 'Het bericht mag niet blanko zijn' ); $lang ['contact'] ['msgs'] = array( 1 => 'Bericht is succesvol verstuurd', - -1 => 'Bericht kon niet verstuurd worden', + -1 => 'Bericht kon niet verstuurd worden' ); ?> \ No newline at end of file diff --git a/fp-interface/lang/pt-br/lang.contact.php b/fp-interface/lang/pt-br/lang.contact.php index 41450c6..1d2c901 100644 --- a/fp-interface/lang/pt-br/lang.contact.php +++ b/fp-interface/lang/pt-br/lang.contact.php @@ -13,6 +13,7 @@ $lang ['contact'] = array( 'fieldset3' => 'Envie', 'submit' => 'Enviar', 'reset' => 'Resetar', + 'loggedin' => 'Você está conectado 😉. Faça logout ou vá para a área de administração..' ); $lang ['contact'] ['notification'] = array( @@ -20,18 +21,18 @@ $lang ['contact'] ['notification'] = array( 'email' => 'Email:', 'www' => 'Web:', 'content' => 'Mensagem:', - 'subject' => 'Contato enviado através de ', + 'subject' => 'Contato enviado através de ' ); $lang ['contact'] ['error'] = array( 'name' => 'Você deve incluir um nome', 'email' => 'Você deve incluir um email válido', 'www' => 'Você deve incluir uma URL válida', - 'content' => 'Você deve incluir uma mensagem', + 'content' => 'Você deve incluir uma mensagem' ); $lang ['contact'] ['msgs'] = array( 1 => 'A mensagem foi enviada com sucesso', - -1 => 'A mensagem não pôde ser enviada', + -1 => 'A mensagem não pôde ser enviada' ); ?> \ No newline at end of file diff --git a/fp-interface/lang/ru-ru/lang.contact.php b/fp-interface/lang/ru-ru/lang.contact.php index fb63596..01560aa 100644 --- a/fp-interface/lang/ru-ru/lang.contact.php +++ b/fp-interface/lang/ru-ru/lang.contact.php @@ -12,6 +12,7 @@ $lang ['contact'] = array( 'fieldset3' => 'Отправить', 'submit' => 'Отправить', 'reset' => 'Очистить поля', + 'loggedin' => 'Вы вошли в систему 😉. Выйдите из системы или перейдите в область администрирования.' ); $lang ['contact'] ['notification'] = array( @@ -19,18 +20,18 @@ $lang ['contact'] ['notification'] = array( 'email' => 'Электронная почта:', 'www' => 'Веб-сайт:', 'content' => 'Сообщение:', - 'subject' => 'Контакт отправлен через ', + 'subject' => 'Контакт отправлен через ' ); $lang ['contact'] ['error'] = array( 'name' => 'Необходимо ввести имя', 'email' => 'Вы должны ввести действительный адрес электронной почты', 'www' => 'Необходимо ввести действительный URL-адрес', - 'content' => 'Необходимо ввести сообщение', + 'content' => 'Необходимо ввести сообщение' ); $lang ['contact'] ['msgs'] = array( 1 => 'Сообщение успешно отправлено', - -1 => 'Не удалось отправить сообщение', + -1 => 'Не удалось отправить сообщение' ); ?> \ No newline at end of file diff --git a/fp-interface/lang/sl-si/lang.contact.php b/fp-interface/lang/sl-si/lang.contact.php index b21b105..0c68009 100644 --- a/fp-interface/lang/sl-si/lang.contact.php +++ b/fp-interface/lang/sl-si/lang.contact.php @@ -12,6 +12,7 @@ $lang ['contact'] = array( 'fieldset3' => 'Pošlji', 'submit' => 'Pošlji', 'reset' => 'Ponastavi', + 'loggedin' => 'Prijavljeni ste 😉. Odjavi se ali na upravno območje.' ); $lang ['contact'] ['notification'] = array( @@ -19,18 +20,18 @@ $lang ['contact'] ['notification'] = array( 'email' => 'E-pošta:', 'www' => 'Spletna stran:', 'content' => 'Sporočilo:', - 'subject' => 'Stik poslan prek ', + 'subject' => 'Stik poslan prek ' ); $lang ['contact'] ['error'] = array( 'name' => 'Vnesti morate ime', 'email' => 'Vnesti morate veljaven e-poštni naslov', 'www' => 'Vnesti morate veljavno spletno stran', - 'content' => 'Vnesti morate sporočilo', + 'content' => 'Vnesti morate sporočilo' ); $lang ['contact'] ['msgs'] = array( 1 => 'Sporočilo je bilo uspešno poslano', - -1 => 'Sporočilo ni bilo mogoče poslati', + -1 => 'Sporočilo ni bilo mogoče poslati' ); ?> diff --git a/fp-interface/sharedtpls/contact.tpl b/fp-interface/sharedtpls/contact.tpl index 8717b63..95985cd 100644 --- a/fp-interface/sharedtpls/contact.tpl +++ b/fp-interface/sharedtpls/contact.tpl @@ -1,13 +1,14 @@ +{if not $flatpress.loggedin}

{$lang.contact.descr}

- +
{include file='shared:errorlist.tpl'} - +
{$lang.contact.fieldset1} -


+


{if isset($error) && isset($error.name) && !empty($error.name)} {assign var=class value="field-error"} {else} @@ -19,9 +20,9 @@ {assign var=namevalue value=""} {/if}

+ value="{$namevalue|stripslashes|wp_specialchars:true}">

-


+


{if isset($error) && isset($error.email) && !empty($error.email)} {assign var=class value="field-error"} {else} @@ -33,9 +34,9 @@ {assign var=emailvalue value=""} {/if}

+ value="{$emailvalue|stripslashes|wp_specialchars:true}">

-


+


{if isset($error) && isset($error.url) && !empty($error.url)} {assign var=class value="field-error"} {else} @@ -47,12 +48,14 @@ {assign var=urlvalue value=""} {/if}

- + value="{$urlvalue|stripslashes|wp_specialchars:true}">

+ + {comment_form} +
- +
{$lang.contact.fieldset2} -


+


{if isset($error) && isset($error.content) && !empty($error.content)} {assign var=class value="field-error"} {else} @@ -69,8 +72,11 @@

- - + +
+{else} +

{$lang.contact.loggedin}

+{/if} diff --git a/fp-plugins/accessibleantispam/plugin.accessibleantispam.php b/fp-plugins/accessibleantispam/plugin.accessibleantispam.php index e43a41c..f5d1bf9 100755 --- a/fp-plugins/accessibleantispam/plugin.accessibleantispam.php +++ b/fp-plugins/accessibleantispam/plugin.accessibleantispam.php @@ -73,8 +73,7 @@ function plugin_aaspam_comment_form() { $v1 = mt_rand(1, 10); // we rand $v2 until it differs from $v1 // (otherwise result for subtractions is zero) - while (($v2 = mt_rand(1, 10)) == $v1) - ; + while (($v2 = mt_rand(1, 10)) == $v1); // if operation is subtraction // the higher number must always come first @@ -129,8 +128,8 @@ function plugin_aaspam_comment_form() { } // echoes the question and the form part - echo '


-

'; + echo '


+

'; } ?> \ No newline at end of file