)/i", $_POST['comments'])) $points += 2; if (strlen($_POST['ime']) < 3) $points += 1; if (strlen($_POST['comments']) < 15 || strlen($_POST['comments'] > 1500)) $points += 2; if (preg_match("/[bcdfghjklmnpqrstvwxyz]{7,}/i", $_POST['comments'])) $points += 1; foreach($requiredFields as $field) { trim($_POST[$field]); if (!isset($_POST[$field]) || empty($_POST[$field]) && array_pop($error_msg) != "Molimo Vas da ispunite sva obavezna polja i pokušate poslati ponovo.\r\n") $error_msg[] = "Molimo Vas da ispunite sva obavezna polja i pokušate poslati ponovo."; } if (!empty($_POST['ime']) && !preg_match("/^[\p{L}\s]+$/u", stripslashes($_POST['ime']))) $error_msg[] = "Molimo Vas da ime i prezime upišete bez posebnih znakova.\r\n"; if (!empty($_POST['email']) && !preg_match('/^([a-z0-9])(([-a-z0-9._])*([a-z0-9]))*\@([a-z0-9])(([a-z0-9-])*([a-z0-9]))+' . '(\.([a-z0-9])([-a-z0-9_-])?([a-z0-9])+)+$/i', strtolower($_POST['email']))) $error_msg[] = "To nije valjana e-mail adresa.\r\n"; if (!empty($_POST['url']) && !preg_match('/^(http|https):\/\/(([A-Z0-9][A-Z0-9_-]*)(\.[A-Z0-9][A-Z0-9_-]*)+)(:(\d+))?\/?/i', $_POST['url'])) $error_msg[] = "Nevažeći URL.\r\n"; if ($error_msg == NULL && $points <= $maxPoints) { $subject = "Poruka sa odss"; $poruka = "Poruka sa odss web stranice: \n\n"; foreach ($_POST as $key => $val) { if (is_array($val)) { foreach ($val as $subval) { $poruka .= ucwords($key) . ": " . clean($subval) . "\r\n"; } } else { $poruka .= ucwords($key) . ": " . clean($val) . "\r\n"; } } if (strstr($_SERVER['SERVER_SOFTWARE'], "Win")) { $headers = "From: {$_POST['email']}\r\n"; $headers .= "Reply-To: {$_POST['email']}\r\n"; } else { $headers = "From: {$_POST['email']} <{$_POST['email']}>\r\n"; $headers .= "Reply-To: {$_POST['email']}\r\n". "MIME-Version: 1.0\r\n". "Content-type: text/plain; charset=UTF-8\r\n"; } if (mail($yourEmail,$subject,$poruka,$headers)) { if (!empty($thanksPage)) { header("Location: $thanksPage"); exit; } else { $result = 'Vaša poruka je uspješno poslana.'; $disable = true; } } else { $error_msg[] = 'Vaša poruka nije poslana. ['.$points.']'; } } else { if (empty($error_msg)) $error_msg[] = 'Vaš mail izgleda kao spam, te se ne može poslati. ['.$points.']'; } } function get_data($var) { if (isset($_POST[$var])) echo htmlspecialchars($_POST[$var]); } ?> Odvjetničko društvo Smolek & Škrinjar - kontakt

Kontakt

Odvjetničko društvo Smolek & Škrinjar d.o.o.

Trg V. Mačeka 5, HR-10000 Zagreb

Tel: +385(1) 377 10 81

Fax: +385(1) 557 60 91

E-mail:

Pošaljite poruku

GREŠKA: '. implode("
", $error_msg) . "

"; } if ($result != NULL) { echo '

'. $result . "

"; } ?>
" />
" />
" />

/>