<?php
####################################################################################
$to = "office@libertrans.ro";

$nume = str_ireplace(array('"', "'"), '', (stripslashes ( strip_tags ($_POST['nume']))));
$email = str_ireplace(array('"', "'"), '', (stripslashes ( strip_tags ($_POST['email']))));
$phone = str_ireplace(array('"', "'"), '', (stripslashes ( strip_tags ($_POST['phone']))));
$oras = str_ireplace(array('"', "'"), '', (stripslashes ( strip_tags ($_POST['oras']))));
$detalii = stripslashes ( strip_tags ($_POST['detalii']));
$cod_securitate = str_ireplace(array('"', "'"), '', (stripslashes ( strip_tags ($_POST['cod_securitate']))));

if(($nume != "")or($email != "")or($phone != "")or($oras != "")or($detalii != "")){
if($cod_securitate == "10" ){
if(eregi("@", $email)){
		
	####### dont edit the code after this line! ###################################
	$subject = 'Email de la site !!! Parteneriat';
	$from = $_POST['email'];
	$content = "<B>Nume si prenume:</B>&nbsp;&nbsp;" . $_POST['name'] ."<br><B>Email:</B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;". $_POST['email'] ."<br><B>Telefon:</B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;". $_POST['phone'] ."<br><B>Oras:</B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;". $_POST['oras'] ."<BR><BR><B>Detalii :</B>&nbsp;&nbsp;" . $_POST['detalii'] ;

	mail($to , $subject, $content, "From: $from \n" ."MIME-Version: 1.0\n" . "Content-type: text/html; charset=iso-8859-1");
	echo "<script>alert('Email trimis . Va multumim !')</script>";
	}else{
		echo "<script>alert('Adresa de email nu este corecta !')</script>";
		echo "<script>location.replace('index.php?pagina=parteneri')</script>";
	}
	}else{
		echo "<script>alert('Codul de securitate nu este corect !')</script>";
		echo "<script>location.replace('index.php?pagina=parteneri')</script>";
	}
}else{
	echo "<script>alert('Email esuat ! Mesajul nu este complet !')</script>";
}
echo "<script>location.replace('index.php?pagina=parteneri')</script>";
?>  