"Nombre", "type" => "string", "required" => true); $fields[] = array("name" =>"E-mail", "type" => "email", "required" => true); $fields[] = array("name" =>"Ciudad", "type" => "string", "required" => false); $fields[] = array("name" =>"Telefono", "type" => "phone", "required" => false); $fields[] = array("name" =>"Mensaje", "type" => "string", "required" => false); /* * MENSAJES VALIDACION */ $messages['ok'] = "Los datos se enviaron correctamente, Gracias."; $messages['empty'] = "El campo {field} no debe estar vacío."; $messages['incorrect'] = "El campo {field} debe ser un valor válido."; $messages['outlimit'] = "Field {field} should be a value between {min} and {max}"; /* * VALORES E-MAIL */ $redirect = ""; $subject_title = "Formulario de Contacto"; $asunto_title = "Formulario de Contacto"; $domain = "astur.com.mx"; $to = $TEST ? $EMAIL_TEST : "ventas@astur.com.mx"; $from = "ASTUR"; $img = "http://astur.com.mx/img/logo.png"; $colorth = '#000000'; $colortd = '#000000'; $backimg = '#FFFFFF'; $subject = "$subject_title - $domain"; $email_noreply = "info@$domain"; $asunto = "$asunto_title - $domain"; $comentarios = ' Una persona ha completado su formulario de contacto con la siguiente informacin :
'; if($_POST['cmd2'] == $CMD){ $entity = $_POST[$VARIABLE_POST]; $result = validar($VARIABLE_POST,$fields,$messages,$redirect); if($result['status']){ /*if ($securimage->check($_POST['captcha_code']) == false) { die(''); }*/ // REGISTRO EN LA BASE DE DATOS DE LA FORMA function getRealIP() { if (!empty($_SERVER['HTTP_CLIENT_IP'])) return $_SERVER['HTTP_CLIENT_IP']; if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) return $_SERVER['HTTP_X_FORWARDED_FOR']; return $_SERVER['REMOTE_ADDR']; } $tabla = 'contacto'; $campos = array('nombre' => $entity['Nombre'], 'correo' => $entity['Correo'], 'telefono' => $entity['Telefono'], 'mensaje' => $entity['Mensaje'], 'inmueble_id' => (($enviar_relacionados === true)?$Inmueble->getInmuebleId():''), 'hora' => date("H:i:s"), 'getip' => getRealIP(), 'navegador' => $_SERVER['HTTP_USER_AGENT'], 'fecha' => date('Y-m-d')); $sql = "INSERT INTO $tabla SET "; foreach($campos as $campo => $valor)$sql .= "`$campo` = '$valor',"; $sql = substr($sql,0,-1); /*if(class_exists('DB')){ $db = new ProjectLibrary_SDO_Core_DB(); $db->sqlExecute($sql); }else{ $server = 'localhost'; $username = 'root'; $password = ''; $db_name = 'docitalia'; mysql_connect($server,$username,$password); mysql_select_db($db_name); mysql_query($sql); } */ /////////////////////////////////////////////////// // ALERT DE CONFIRMACION // //$_SESSION['valor'] = true; $array_clean = array_filter($_POST[$VARIABLE_POST]); $FieldsTable = genericHTMLFieldsTable($array_clean,$colorth,$colortd); $HTML = genericHTMLMail($img,$backimg,$comentarios,$FieldsTable); sendMail($HTML,$from,$to,$subject,$email_noreply,$ENVIAR_POR_SMTP); echo $result['msg']; }else{ // ASIGNACION DE VARIABLES DE VALIDACION // $empty = $result['empty']; $msg = $result['msg']; $campos = $_POST[$VARIABLE_POST]; } } ?>

Nuestra dirección

Blvd. Ávila Camacho 702, Fracc. Costa de Oro,
Boca del Río, Veracruz, Mex

Lada sin costo:

01 800 10 84 552

Teléfono:

01 (229) 923 2222