| |
CONTACT
Str. Părintele Stăniloaie 10, Et.1, București; Tel/Fax (+4) 031.401.17.06
Pentru a ne trimite un e-mail vă rugăm să folosiți formularul de mai jos:
// CSS classes & styles
$class_txt = "style2";
$class_txt2 = "style2";
$class_inputbutton = "inputButton";
$class_inputline = "inputLine";
$class_inputfield = "inputField";
$style_inputline = "width:320px;";
$style_inputfield = "width:320px;";
// email
$target_address = "adela@direct-target.ro";
//$target_address = "ileana@tvr.ro";
$email_subject = "mesaj din site";
// error messages
$err_name = "Indrodu numele.";
$err_phone = "Introdu telefon.";
$err_msg = "Completeaza campul 'Mesaj'.";
$err_email = "Indrodu o adresa valida de email.";
// misc text
$msg_date = "Data";
$msg_company = "Compania";
$msg_name = "Nume";
$msg_address = "Adresa";
$msg_city = "Oras";
$msg_phone = "Telefon";
$msg_email = "Email";
$msg_answerby = "Reply by";
$txt_email = "Email";
$txt_phone = "Telefon";
$txt_post = "Posteaza";
$txt_send = " Trimite ";
$txt_mandatory = "obligatorii";
$msg_request = "Mesaj";
$msg_indent = 11;
// messages
$txt_thankyou = "Multumim pentru mesaj! Mesajul a fost trimis cu succes.";
$txt_error = "Au aparut urmatoarele erori:{errors}"; // {errors} is replaced by the errors that occurred
function spaces($num, $fill=" "){
$foo="";
for ($i=0; $i<$num; $i++) $foo.=$fill;
return $foo;
}
function isValidEmail($addr){
if(eregi("^[a-z0-9]+([_.-][a-z0-9]+)*@([a-z0-9]+([.-][a-z0-9]+)*)+\\.[a-z]{2,4}$", $addr))
return true;
else
return false;
}
// start form evaluation
$error="foo";
if ($_REQUEST['do']=="send"){
$error=false;
if ($_REQUEST['name']=="") $error.="» $err_name ";
//if ($_REQUEST['fon']=="") $error.="» $err_phone ";
if ($_REQUEST['message']=="") $error.="» $err_msg ";
if (!isValidEmail($_REQUEST['email'])) $error.="» $err_email ";
if ($error===false){
$message="$msg_date:".spaces($msg_indent-strlen($msg_date)).date("d M Y, H:i", time());
if ($_REQUEST['firma']) $message.="\n$msg_company:".spaces($msg_indent-strlen($msg_company)).$_REQUEST['firma'];
if ($_REQUEST['name']) $message.="\n$msg_name:".spaces($msg_indent-strlen($msg_name)).$_REQUEST['name'];
if ($_REQUEST['ort']) $message.="\n$msg_city:".spaces($msg_indent-strlen($msg_city)).$_REQUEST['ort'];
if ($_REQUEST['fon']) $message.="\n$msg_phone:".spaces($msg_indent-strlen($msg_phone)).$_REQUEST['fon'];
$message.="\n$msg_email:".spaces($msg_indent-strlen($msg_email)).$_REQUEST['email'];
$message.="\n\n$msg_request:".spaces($msg_indent-strlen($msg_request)).$_REQUEST['message'];
mail($target_address, $email_subject, $message, "From: ".$_REQUEST['email']);
echo $txt_thankyou;
}else if ($error!==false) $error=str_replace("{errors}", $error, $txt_error);
}
if ($error!==false){
if($error!="foo") echo $error;
// form
echo "\n";
echo "\n";
}
?> |

|
|
|