prepare($query); $stmt->execute(); $pedidos = $stmt->fetchAll(PDO::FETCH_ASSOC); $filename = "masivo_shalom"; if ($type === 'terrestre') $filename .= "_terrestre"; if ($type === 'aereo') $filename .= "_aereo"; $filename .= ".xls"; header('Content-Type: application/vnd.ms-excel; charset=utf-8'); header('Content-Disposition: attachment; filename="' . $filename . '"'); header('Pragma: no-cache'); header('Expires: 0'); $output = '
'; $output .= '| DESTINATARIO (DOC) | '; $output .= 'TELF. DESTINATARIO | '; $output .= 'CONTACTO (DOC) | '; $output .= 'TELF. CONTACTO | '; $output .= 'NRO GRR | '; $output .= 'ORIGEN | '; $output .= 'DESTINO | '; $output .= '
|---|---|---|---|---|---|---|
| ' . $dni . ' | '; // Solo el número de DNI con formato texto $output .= '' . $celular . ' | '; // Teléfono con formato texto $output .= ''; // Contacto vacío $output .= ' | '; // Telf Contacto vacío $output .= ' | '; // NRO GRR vacío $output .= ' | AV MEXICO CO | '; // ORIGEN fijo $output .= '' . $destino . ' | '; // Destino $output .= '