/*require_once( getenv("DOCUMENT_ROOT") . '/_lib/bd/usuarios.php');
$link = mysqli_pconnect(BD_SERVIDOR,BD_USUARIO, BD_CLAVE);
mysqli_select_db(BD_NOMBRE, $link);
$_date = date("Y-m-d");
$nombre = ucwords(strtolower($_REQUEST['nombre']));
$apellido = ucwords(strtolower($_REQUEST['apellido']));
$email = $_REQUEST['email'];
$genero = $_REQUEST['genero'];
$bday = $_REQUEST['bday'];
$bmonth = $_REQUEST['bmonth'];
$ciudad = $_REQUEST['ciudad'];
$pais = $_REQUEST['pais'];
$ip_inscripcion = $_SERVER['REMOTE_ADDR'];
$consulta="INSERT INTO users (ID, first_name, last_name, email, gender, bmonth, bday, ciudad, pais, boletin, enabled, date, ip_inscripcion ) VALUES ( NULL, '$nombre', '$apellido', '$email', '$genero', '$bmonth', '$bday', '$ciudad', '$pais', '1', '0', '$_date', '$ip_inscripcion' )" ;
$resultado = mysqli_query($consulta, $link) ;
*/
include(getenv("DOCUMENT_ROOT") . "/_lib/api/conexion.php");
$datos_usuario = array();
$datos_usuario["nombre"] = ucwords(strtolower($_REQUEST['nombre']));
$datos_usuario["apellido"] = ucwords(strtolower($_REQUEST['apellido']));
$datos_usuario["email"] = $_REQUEST['email'];
$datos_usuario["genero"] = $_REQUEST['genero'];
$datos_usuario["telefono"] = $_REQUEST['celular'];
$datos_usuario["cumpleanos_dia"] = $_REQUEST['bday'];
$datos_usuario["cumpleanos_mes"] = $_REQUEST['bmonth'];
$datos_usuario["ciudad"] = $_REQUEST['ciudad'];
$datos_usuario["pais"] = (isset($_REQUEST['pais'])?$_REQUEST['pais']:"");
$datos_usuario["ip_inscripcion"] = $_SERVER['REMOTE_ADDR'];
$datos_usuario["rd"] = (isset($_REQUEST['rd'])?$_REQUEST['rd']:"0");
if(isset($_REQUEST['token'])){
$datos_usuario['token'] = $_REQUEST['token'];
}
echo new_api_enviar_datos("bienvenida_boletin",$datos_usuario);
?>