session_start(); include "admin/lib.php"; /** Validate captcha */ if (!empty($_REQUEST['captcha'])) { if (empty($_SESSION['captcha']) || trim(strtolower($_REQUEST['captcha'])) != $_SESSION['captcha']) { $captcha_message = "Palabra clave Captcha incorrecto"; $style = "background-color: #FF606C"; } else { /** Validate captcha */ if ($submit == "Enviar") { $fecha=date("Y/m/d"); $fechas=date("d/m/Y"); $mailheaders = "Return-Path: $from\n"; $mailheaders .= "From: $email\n"; //$mailheaders = "From: $from\n"; $mailheaders .= "Reply-To: $email\n"; $mailheaders .= "Cc: \n"; $mailheaders .= "BCc: gustavo@apunto-web.com\n"; $mailheaders .= "X-Mailer:Apunto Web\n"; $msg_body = "================================================\nDatos del que Envia\n================================================\n\n"; $msg_body.= "Fecha: ".$fechas."\n"; $msg_body.= "Motivo: ".$motivo."\n"; $msg_body.= "Sitio: www.apuntoweb.com\n"; $msg_body.= "Nombre: ".$nombre."\n"; $msg_body.= "Teléfono: ".$telefono."\n"; $msg_body.= "Ciudad: ".$ciudad."\n"; $msg_body.= "Email: ".$email."\n"; $msg_body.= "País: ".$pais."\n"; $msg_body.= "Mensaje: ".$mensaje."\n\n"; $msg_body.= "================================================\n"; $msg_body.= "Este mensaje fue enviado desde IP: ".$REMOTE_ADDR."\n Con un sistema operativo: ".$_SERVER['HTTP_USER_AGENT']."\n"; $msg_body.= "\n================================================\n"; //mail("info@apuntoweb.com,apuntoweb@gmail.com", "Fomulario de Contactos desde Sitio Web de Portal Guarani", $msg_body, $mailheaders); $to="info@apuntoweb.com"; $subject="Fomulario de Contactos desde Sitio Web de Apunto Web - ". date("d/m/Y"); $body = $msg_body; //$body = eregi_replace("[\]",'',$body); $headers = 'From: info@apuntoweb.com'."\r\n"; $headers .= "Content-type: text/html\r\n"; $c = mail($to, $subject, $body, $headers); $mensaje=addslashes($mensaje); $q="INSERT INTO contacto VALUES('','$fecha','$motivo','$nombre','$telefono','$ciudad','$email','$pais','$mensaje')"; mysql_query($q) or die(mysql_error()); print ' '; exit(); } /** Validate captcha */ } $request_captcha = htmlspecialchars($_REQUEST['captcha']); unset($_SESSION['captcha']); } /** Validate captcha */ ?>