File: /home/clavospa/public_html/new.davidlachapelleamor.com/controller/procesa.php
<?php
include dirname(__FILE__, 2) . "/controller/config.php";
parse_str($_REQUEST['data'], $exit);
$action = (!empty($exit['action'])) ? $exit['action'] : '';
$nombre = (!empty($exit['nombre'])) ? $exit['nombre'] : '';
$apellidos = (!empty($exit['apellidos'])) ? $exit['apellidos'] : '';
$oficina = (!empty($exit['oficina'])) ? $exit['oficina'] : '';
$celular = (!empty($exit['celular'])) ? $exit['celular'] : '';
$email = (!empty($exit['email'])) ? $exit['email'] : '';
$medio = (!empty($exit['medio'])) ? $exit['medio'] : '';
$pais = (!empty($exit['pais'])) ? $exit['pais'] : '';
$tipoMedio = (!empty($exit['tipoMedio'])) ? $exit['tipoMedio'] : '';
$cantidad = (!empty($exit['cantidad'])) ? $exit['cantidad'] : '';
$resolucion = (!empty($exit['resolucion'])) ? $exit['resolucion'] : '';
$tiempos = (!empty($exit['tiempos'])) ? $exit['tiempos'] : '';
$enlaces = (!empty($exit['enlaces'])) ? $exit['enlaces'] : '';
$trabajo = (!empty($exit['trabajo'])) ? $exit['trabajo'] : '';
$persona = (!empty($exit['persona'])) ? $exit['persona'] : '';
$conferencia = (!empty($exit['conferencia'])) ? $exit['conferencia'] : '';
$prensa = (!empty($exit['prensa'])) ? $exit['prensa'] : '';
$exclusiva = (!empty($exit['exclusiva'])) ? $exit['exclusiva'] : '';
$conferencia = (!empty($exit['conferencia'])) ? $exit['conferencia'] : '';
$firma = (!empty($exit['firma'])) ? $exit['firma'] : '';
$evento = (!empty($exit['evento'])) ? $exit['evento'] : '';
$json = [];
$email = 'rrppmedia@212productions.tv';
#$email = 'rsolorio001@gmail.com';
if($action == 1){
$estilo = "style='border: 1px solid black; border-collapse: collapse; padding:3px;'";
$detalle = (!empty($trabajo)) ? 'Imágenes de su trabajo<br>' : '';
$detalle .= (!empty($persona)) ? 'Retrato de su persona<br>' : '';
$detalle .= (!empty($conferencia)) ? 'Imagen oficial de la conferencia<br>' : '';
$html = "<h2>SOLICITUD DE IMAGENES</h2><br>
<table width='100%' $estilo>
<tr>
<td $estilo width='25%'><b>Nombre</b></td>
<td $estilo>$nombre $apellidos</td>
</tr>
<tr>
<td $estilo width='25%'><b>Telefono de Oficina</b></td>
<td $estilo>$oficina</td>
</tr>
<tr>
<td $estilo width='25%'><b>Celular</b></td>
<td $estilo>$celular</td>
</tr>
<tr>
<td $estilo width='25%'><b>Correo Electrónico</b></td>
<td $estilo>$email</td>
</tr>
<tr>
<td $estilo width='25%'><b>Nombre del medio</b></td>
<td $estilo>$medio</td>
</tr>
<tr>
<td $estilo width='25%'><b>País</b></td>
<td $estilo>$pais</td>
</tr>
<tr>
<td $estilo width='25%'><b>Tipo de medio</b></td>
<td $estilo>$tipoMedio</td>
</tr>
<tr>
<td $estilo width='25%'><b>Cantidad de imágenes que desea publicar</b></td>
<td $estilo>$cantidad</td>
</tr>
<tr>
<td $estilo width='25%'><b>Resolución de las imágenes</b></td>
<td $estilo>$resolucion</td>
</tr>
<tr>
<td $estilo width='25%'><b>¿Algún detalle con respecto a las imágenes que está solicitando? Cuéntanos qué tipo de fotos te gustaría, y si solicitas retratos, imagen del evento u otro</b></td>
<td $estilo>$detalle</td>
</tr>
<tr>
<td $estilo width='25%'><b>Tiempos en que planea su publicación</b></td>
<td $estilo>$tiempos</td>
</tr>
<tr>
<td $estilo width='25%'><b>¡Permítanos conocer su medio! Anote algunos enlaces que pueda proporcionarnos para conocerlo mejor</b></td>
<td $estilo>$enlaces</td>
</tr>
</table>
";
error_log($html, 3, dirname(__FILE__, 2) ."/logs/SOLICITUDES_" . date('Ymd') . ".html" );
$mail = new sendMail();
$mail ->enviaMail($email, $html, 'SOLICITUD DE IMAGENES');
$json = '{ "error": 200 }';
}
if($action == 2){
$estilo = "style='border: 1px solid black; border-collapse: collapse; padding:3px;'";
$event = '';
$event .= (!empty($prensa)) ? 'Rueda de prensa<br>' : '';
$event .= (!empty($exclusiva)) ? 'Visita Guiada exclusiva para medios<br>' : '';
$event .= (!empty($conferencia)) ? 'Conferencia (Artist Talk)<br>' : '';
$event .= (!empty($firma)) ? 'Firma de libros (Book Signing)<br>' : '';
$event .= (!empty($evento)) ? 'Evento de apertura (Oppening event)<br>' : '';
$html = "<h2>ACREDITACIONES</h2><br>
<table width='100%' $estilo>
<tr>
<td $estilo width='25%'><b>Nombre</b></td>
<td $estilo>$nombre $apellidos</td>
</tr>
<tr>
<td $estilo width='25%'><b>Telefono de Oficina</b></td>
<td $estilo>$oficina</td>
</tr>
<tr>
<td $estilo width='25%'><b>Celular</b></td>
<td $estilo>$celular</td>
</tr>
<tr>
<td $estilo width='25%'><b>Correo Electrónico</b></td>
<td $estilo>$email</td>
</tr>
<tr>
<td $estilo width='25%'><b>Nombre del medio</b></td>
<td $estilo>$medio</td>
</tr>
<tr>
<td $estilo width='25%'><b>País</b></td>
<td $estilo>$pais</td>
</tr>
<tr>
<td $estilo width='25%'><b>Tipo de medio</b></td>
<td $estilo>$tipoMedio</td>
</tr>
<tr>
<td $estilo width='25%'><b>Por favor seleccione el evento que desea cubrir</b></td>
<td $estilo>$event</td>
</tr>
<tr>
<td $estilo width='25%'><b>Tiempos en que planea su publicación</b></td>
<td $estilo>$tiempos</td>
</tr>
<tr>
<td $estilo width='25%'><b>¡Permítanos conocer su medio! Anote algunos enlaces que pueda proporcionarnos para conocerlo mejor</b></td>
<td $estilo>$enlaces</td>
</tr>
</table>";
error_log($html, 3, dirname(__FILE__, 2) ."/logs/ACREDITACIONES_" . date('Ymd') . ".html" );
$mail = new sendMail();
$mail ->enviaMail($email, $html, 'Acreditaciones');
$json = '{ "error": 200 }';
}
echo $json;
?>