<?

 if($_POST['nombre']=="" || $_POST['nombre']== "null"):
  include "com.html";
 elseif ($_POST['nombre']!="" && $_POST['nombre']!= "null"):


$nombre=$_POST['nombre'];
$empresa=$_POST['ocu'];
$tel=$_POST['tel'];
$tel2=$_POST['tel2'];
$adr=$_POST['dir'];
$email=$_POST['email'];
$pais=$_POST['pais'];
$coment=$_POST['coment'];;

$myname = $nombre;
$myemail = $email;

$contactname = "Contacto";
$contactemail = "josearnau75@yahoo.com";
$other_email="bricardg@gmail.com";
$another_email="";

$subject = "Comentarios / Dudas";

$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: ".$myname." <".$myemail.">\r\n";
$headers .= "To: ".$contactname."<".$contactemail.">\r\n";
// $headers .= "Reply-To: ".$myname." <$myemail>\r\n";
$headers .= "X-Priority: 1\r\n";
$headers .= "X-MSMail-Priority: High\r\n";
$headers .= "X-Mailer: x\r\n";
$headers .= "Cc: ".$other_email."\r\n";
// $headers .= "Bcc: ".$another_email."\r\n";

$date=date("F j, Y, h:i:s A");
$IP=GETENV("REMOTE_ADDR");
$port=GETENV("REMOTE_PORT");
$lang=GETENV("HTTP_ACCEPT_LANGUAGE");
$user=GETENV("HTTP_USER_AGENT");
$ref=GETENV("HTTP_REFERER");


$Info="<center><table WIDTH=700 BORDER=1 CELLSPACING=0 CELLPADDING=0 bordercolor=#000035>
<tr><td align=center width=700><font size=2 color=\"#000002\"><b>Fecha:</b> $date <b>|||</b> <b>IP:</b> $IP : $port<br><b>Desde:</b> $ref <b>||| UA:</b> $user <b>||| Lang:</b> $lang </font></td></tr><tr><td align=center width=700>

<table width=\"91%\" border=\"0\" align=\"center\">
  <tr>
    <td nowrap width=\"20%\" ><font size=2 color=\"#567099\"><b>Nombre Completo:</b></font></td>
    <td width=\"80%\"><font size=2 color=\"#567099\"> $nombre </font></td>
  </tr>
  <tr>
    <td nowrap  ><font size=2 color=\"#567099\"><b>Ocupación:</b></font></td>
    <td><font size=2 color=\"#567099\"> $empresa </font></td>
  </tr>
   <tr>
    <td nowrap ><font size=2 color=\"#567099\"><b>Tel&eacute;fono 1:</b></font></td>
    <td><font size=2 color=\"#567099\"> $tel </font></td>
  </tr>
    <tr>
    <td nowrap ><font size=2 color=\"#567099\"><b>Tel&eacute;fono 2 (o fax):</b></font></td>
    <td><font size=2 color=\"#567099\"> $tel2 </font></td>
  </tr>
    <tr>
    <td nowrap ><font size=2 color=\"#567099\"><b>Dirección:</b></font></td>
    <td><font size=2 color=\"#567099\"> $adr </font></td>
  </tr>
  <tr>
    <td nowrap ><font size=2 color=\"#567099\"><b>E-mail:</b></font></td>
    <td valign=\"top\"><font size=2 color=\"#567099\"> $email </font></td>
  </tr>
  <tr>
    <td nowrap ><font size=2 color=\"#567099\"><b>Pa&iacute;s:</b> </font></td>
    <td><font size=2 color=\"#567099\"> $pais </font></td>
  </tr>
  <tr>
    <td valign=\"top\" nowrap ><font size=2 color=\"#567099\"><b>Comentarios / Dudas: </b></font></td>
    <td><font size=2 color=\"#567099\">$coment</font></td>
  </tr>
</table>

</td></tr></table></center><br>";


mail($contactemail, $subject, $Info, $headers);

include "comfin.html";

 else:
  include "com.html";
 endif;

?>