Solves #138
- The Accessible Antispam plugin now works again when the contact form is used.
This commit is contained in:
parent
272e7ca672
commit
bce6fdf91c
@ -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);
|
||||
}
|
||||
|
||||
|
77
contact.php
77
contact.php
@ -10,14 +10,21 @@ $contactform_inputs = array(
|
||||
'content'
|
||||
);
|
||||
|
||||
/**
|
||||
* Validates the POST data and returns a validated array (key=>value) - or <code>false</code> 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();
|
||||
contact_display();
|
||||
?>
|
||||
|
@ -12,6 +12,7 @@ $lang ['contact'] = array(
|
||||
'fieldset3' => 'Poslat',
|
||||
'submit' => 'Poslat',
|
||||
'reset' => 'Resetovat',
|
||||
'loggedin' => 'Jste přihlášen 😉. <a href="' . $baseurl . 'login.php?do=logout">Odhlásit se</a> nebo na <a href="' . $baseurl . 'admin.php">administrativní oblasti</a>.'
|
||||
);
|
||||
|
||||
$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'
|
||||
);
|
||||
?>
|
@ -12,6 +12,7 @@ $lang ['contact'] = array(
|
||||
'fieldset3' => 'Send',
|
||||
'submit' => 'Send',
|
||||
'reset' => 'Nulstil',
|
||||
'loggedin' => 'Du er logget ind 😉. <a href="' . $baseurl . 'login.php?do=logout">Log ud</a> eller til <a href="' . $baseurl . 'admin.php">administrationsområdet</a>.'
|
||||
);
|
||||
|
||||
$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'
|
||||
);
|
||||
?>
|
@ -12,6 +12,7 @@ $lang ['contact'] = array(
|
||||
'fieldset3' => 'Senden',
|
||||
'submit' => 'Abschicken',
|
||||
'reset' => 'Zurücksetzen',
|
||||
'loggedin' => 'Du bist angemeldet 😉. <a href="' . $baseurl . 'login.php?do=logout">Abmelden</a> oder zum <a href="' . $baseurl . 'admin.php">Administrationsbereich</a>.'
|
||||
);
|
||||
|
||||
$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'
|
||||
);
|
||||
?>
|
@ -12,6 +12,7 @@ $lang ['contact'] = array(
|
||||
'fieldset3' => 'Αποστολή',
|
||||
'submit' => 'Αποστολή',
|
||||
'reset' => 'Ακύρωση',
|
||||
'loggedin' => 'Έχετε συνδεθεί 😉. <a href="' . $baseurl . 'login.php?do=logout">Αποσυνδεθείτε</a> ή μεταβείτε στο <a href="' . $baseurl . 'admin.php">περιοχή διαχείρισης</a>.'
|
||||
);
|
||||
|
||||
$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 => 'Το μήνυμα σας δεν μπόρεσε να σταλεί'
|
||||
);
|
||||
?>
|
@ -12,6 +12,7 @@ $lang ['contact'] = array(
|
||||
'fieldset3' => 'Send',
|
||||
'submit' => 'Send',
|
||||
'reset' => 'Reset',
|
||||
'loggedin' => 'You are logged in 😉. <a href="' . $baseurl . 'login.php?do=logout">Log out</a> or to the <a href="' . $baseurl . 'admin.php">Administration area</a>.'
|
||||
);
|
||||
|
||||
$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'
|
||||
);
|
||||
?>
|
@ -12,6 +12,7 @@ $lang ['contact'] = array(
|
||||
'fieldset3' => 'Enviar',
|
||||
'submit' => 'Enviar',
|
||||
'reset' => 'Reiniciar',
|
||||
'loggedin' => 'Ha iniciado sesión 😉. <a href="' . $baseurl . 'login.php?do=logout">Cerrar sesión</a> o al <a href="' . $baseurl . 'admin.php">área de administración</a>.'
|
||||
);
|
||||
|
||||
$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'
|
||||
);
|
||||
?>
|
@ -12,6 +12,7 @@ $lang ['contact'] = array(
|
||||
'fieldset3' => 'Envoyer',
|
||||
'submit' => 'Envoyer',
|
||||
'reset' => 'Réinitialiser',
|
||||
'loggedin' => 'Vous êtes connecté 😉. <a href="' . $baseurl . 'login.php?do=logout">Se déconnecter</a> ou accéder à <a href="' . $baseurl . 'admin.php">Espace d\'administration</a>.'
|
||||
);
|
||||
|
||||
$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'
|
||||
);
|
||||
?>
|
@ -12,6 +12,7 @@ $lang ['contact'] = array(
|
||||
'fieldset3' => 'Invia',
|
||||
'submit' => 'Invia',
|
||||
'reset' => 'Azzera',
|
||||
'loggedin' => 'Sei connesso 😉. <a href="' . $baseurl . 'login.php?do=logout">Uscire</a> o accedere <a href="' . $baseurl . 'admin.php">all\'area amministrativa</a>.'
|
||||
);
|
||||
|
||||
$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'
|
||||
);
|
||||
?>
|
@ -12,6 +12,7 @@ $lang ['contact'] = array(
|
||||
'fieldset3' => '送信',
|
||||
'submit' => '送信する',
|
||||
'reset' => 'キャンセル',
|
||||
'loggedin' => 'あなたはログインしています 😉. <a href="' . $baseurl . 'login.php?do=logout">ログアウト</a>または <a href="' . $baseurl . 'admin.php">管理エリアに移動します</a>。'
|
||||
);
|
||||
|
||||
$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 => 'メッセージを送信できませんでした。'
|
||||
);
|
||||
?>
|
||||
|
@ -14,6 +14,7 @@ $lang ['contact'] = array(
|
||||
'fieldset3' => 'Stuur',
|
||||
'submit' => 'Stuur',
|
||||
'reset' => 'Reset',
|
||||
'loggedin' => 'U bent ingelogd 😉. <a href="' . $baseurl . 'login.php?do=logout">Uitloggen</a> of naar het <a href="' . $baseurl . 'admin.php">administratiegedeelte</a>.'
|
||||
);
|
||||
|
||||
$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'
|
||||
);
|
||||
?>
|
@ -13,6 +13,7 @@ $lang ['contact'] = array(
|
||||
'fieldset3' => 'Envie',
|
||||
'submit' => 'Enviar',
|
||||
'reset' => 'Resetar',
|
||||
'loggedin' => 'Você está conectado 😉. <a href="' . $baseurl . 'login.php?do=logout">Faça logout</a> ou vá para a <a href="' . $baseurl . 'admin.php">área de administração.</a>.'
|
||||
);
|
||||
|
||||
$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'
|
||||
);
|
||||
?>
|
@ -12,6 +12,7 @@ $lang ['contact'] = array(
|
||||
'fieldset3' => 'Отправить',
|
||||
'submit' => 'Отправить',
|
||||
'reset' => 'Очистить поля',
|
||||
'loggedin' => 'Вы вошли в систему 😉. <a href="' . $baseurl . 'login.php?do=logout">Выйдите из системы</a> или перейдите в область <a href="' . $baseurl . 'admin.php">администрирования</a>.'
|
||||
);
|
||||
|
||||
$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 => 'Не удалось отправить сообщение'
|
||||
);
|
||||
?>
|
@ -12,6 +12,7 @@ $lang ['contact'] = array(
|
||||
'fieldset3' => 'Pošlji',
|
||||
'submit' => 'Pošlji',
|
||||
'reset' => 'Ponastavi',
|
||||
'loggedin' => 'Prijavljeni ste 😉. <a href="' . $baseurl . 'login.php?do=logout">Odjavi se</a> ali na <a href="' . $baseurl . 'admin.php">upravno območje</a>.'
|
||||
);
|
||||
|
||||
$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'
|
||||
);
|
||||
?>
|
||||
|
@ -1,13 +1,14 @@
|
||||
{if not $flatpress.loggedin}
|
||||
<p>{$lang.contact.descr}</p>
|
||||
|
||||
|
||||
<form id="contactform" method="post"
|
||||
action="{$smarty.const.BLOG_BASEURL}contact.php"
|
||||
enctype="multipart/form-data">
|
||||
|
||||
{include file='shared:errorlist.tpl'}
|
||||
|
||||
|
||||
<fieldset><legend>{$lang.contact.fieldset1}</legend>
|
||||
<p><label class="textlabel" for="name">{$lang.contact.name}</label><br />
|
||||
<p><label class="textlabel" for="name">{$lang.contact.name}</label><br>
|
||||
{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}
|
||||
<input type="text" name="name" id="name" class="{$class}"
|
||||
value="{$namevalue|stripslashes|wp_specialchars:true}" /></p>
|
||||
value="{$namevalue|stripslashes|wp_specialchars:true}"></p>
|
||||
|
||||
<p><label class="textlabel" for="email">{$lang.contact.email}</label><br />
|
||||
<p><label class="textlabel" for="email">{$lang.contact.email}</label><br>
|
||||
{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}
|
||||
<input type="text" name="email" id="email" class="{$class}"
|
||||
value="{$emailvalue|stripslashes|wp_specialchars:true}" /></p>
|
||||
value="{$emailvalue|stripslashes|wp_specialchars:true}"></p>
|
||||
|
||||
<p><label class="textlabel" for="url">{$lang.contact.www}</label><br />
|
||||
<p><label class="textlabel" for="url">{$lang.contact.www}</label><br>
|
||||
{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}
|
||||
<input type="text" name="url" id="url" class="{$class}"
|
||||
value="{$urlvalue|stripslashes|wp_specialchars:true}" /></p>
|
||||
|
||||
value="{$urlvalue|stripslashes|wp_specialchars:true}"></p>
|
||||
|
||||
<!-- BOF Accessible Antispam- Plugin -->{comment_form}<!-- EOF Accessible Antispam- Plugin -->
|
||||
|
||||
</fieldset>
|
||||
|
||||
|
||||
<fieldset><legend>{$lang.contact.fieldset2}</legend>
|
||||
<p><label for="content">{$lang.contact.comment}</label><br />
|
||||
<p><label for="content">{$lang.contact.comment}</label><br>
|
||||
{if isset($error) && isset($error.content) && !empty($error.content)}
|
||||
{assign var=class value="field-error"}
|
||||
{else}
|
||||
@ -69,8 +72,11 @@
|
||||
</fieldset>
|
||||
|
||||
<div class="buttonbar">
|
||||
<input type="submit" name="submit" id="submit" value="{$lang.contact.submit}" />
|
||||
<input type="reset" name="reset" id="reset" value="{$lang.contact.reset}" />
|
||||
<input type="submit" name="submit" id="submit" value="{$lang.contact.submit}">
|
||||
<input type="reset" name="reset" id="reset" value="{$lang.contact.reset}">
|
||||
</div>
|
||||
|
||||
</form>
|
||||
{else}
|
||||
<p>{$lang.contact.loggedin}</p>
|
||||
{/if}
|
||||
|
@ -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 '<p><label class="textlabel" for="aaspam">' . $lang ['plugin'] ['accessibleantispam'] ['prefix'] . ' <strong>' . $question . ' (*)</strong></label><br />
|
||||
<input type="text" name="aaspam" id="aaspam" /></p>';
|
||||
echo '<p><label class="textlabel" for="aaspam">' . $lang ['plugin'] ['accessibleantispam'] ['prefix'] . ' <strong>' . $question . ' </strong>(*)</label><br>
|
||||
<input type="text" name="aaspam" id="aaspam"></p>';
|
||||
}
|
||||
|
||||
?>
|
Loading…
x
Reference in New Issue
Block a user