Copyright: 2007 Eugene Orlov Version: 1.0 October 2007 Make sure the path to the library is correct. */ include("captcha.function.php5"); session_start(); // Change this to your real email address: $myemail = 'andrej.plesec@gmail.com'; // Initialising the $error variable. At the start it is 0. Each field in this form is processed, and if something is wrong (empty input, wrong email address, invalid captcha code, etc) $error is incremented. Form will stop processing if $error is > 0. $error = 0; $name_text = 'Vnesite vaše ime:'; $name = ''; $email_text = 'Vnesite vaš email:'; $email = ''; $message_text = 'Vnesite sporočilo:'; $message = ''; $captcha_text = 'Vnesite prikazano kodo:'; // This piece of code decides whether to show the form or to process it if (!isset($_POST['action']) || $_POST['action'] != 'submit') { show_form(); die; } // Ok, let's process the form else { // Checking name if (empty($_POST['name'])) { $error .= 1; $name_text = 'Vnesite vaše ime'; } else { $error .= 0; $name_text = 'Vaše ime:'; // Please note, that in 'real life' you have to do something like this with user's data: mysql_real_escape_string(strip_tags(trim($_POST['name']))); $name = strip_tags($_POST['name']); } // Checking email if (empty($_POST['email'])) { $error .= 1; $email_text = 'Vnesite vaš email:'; } elseif (!eregi('^[-!#$%&\'*+\\./0-9=?A-Z^_a-z{|}~]+'.'@'.'[-!#$%&\'*+\\/0-9=?A-Z^_a-z{|}~]+\.'.'[-!#$%&\'*+\\./0-9=?A-Z^_a-z{|}~]+$', $_POST['email'])) { $error .= 1; $email_text = 'Vnesite pravilen email:'; $email = strip_tags($_POST['email']); } else { $error .= 0; $email_text = 'Vaš email:'; $email = strip_tags($_POST['email']); } // Checking message if (empty($_POST['message'])) { $error .= 1; $message_text = 'Vnesite vaše sporočilo:'; } elseif ((strlen($_POST['message']) < 1)) { $error .= 1; $message_text = 'Vpis sporočila je obvezen!'; $message = $_POST['message']; } else { $error .= 0; $message_text = 'Vaše sporočilo:'; $message = $_POST['message']; } // Now let's check The CAPTCHA if (!captcha_verify_word()) { $error .= 1; $captcha_text = 'Napačno prepisana koda!'; } else { $error .= 0; } // If $error is > 0, we'll show the form again if ($error > 0) { show_form(); die; } else { // If everything is ok, we'll send an email $name = strip_tags(trim($_POST['name'])); $email = strip_tags(trim($_POST['email'])); $message = wordwrap(strip_tags(trim($_POST['message'])), 70); $email = 'From: '.$name.' <'.$email.'>'; $subject = 'Sporocilo iz adaptacija-kopalnic.com'; mail($myemail, $subject, $message, $email); echo ""; ?>
|


KO-
Gsm: 031 358 384
Dela opravljamo večinoma v Ljubljani in okolici, večja opravila opravljamo kjerkoli v Sloveniji in tujini
PE Ljubljana:
Vrhovci C. IV/6,
1000 Ljubljana
Sedež podjetja:
Andrej Plesec s.p.
Dolenja vas 88, 3312 Prebold