<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>prueba</title>
</head>
<body>
<?php
$id_usuario = (isset($_POST['id'])) ? $_POST['id'] : 0;
$pertenece_a = (isset($_POST['empresa'])) ? $_POST['empresa'] : 0;
$estado = (isset($_POST['estado'])) ? $_POST['estado'] : 0;
/* incluimos primeramente el archivo que contiene la clase fpdf */
include ('fpdf181/fpdf.php');
/* tenemos que generar una instancia de la clase */
$pdf = new FPDF();
$pdf->AddPage();
/* seleccionamos el tipo, estilo y tamaño de la letra a utilizar */
$pdf->SetFont('Helvetica', 'B', 14);
$pdf->Write (7,if ($pertenece_a === ('Danyana Motos')){
echo '<table width="816px" border="0" cellspacing="2">
<tbody>
<tr>
<th scope="col" style="text-align:left;">
Danyana Motos / Ana Maria Correa Arcila<br>
NIT: 32.244.167-5<br>
Tel: 270-73-02<br>
Cr. 42 # 33B Sur 13
</th>
<th scope="col" width="202,5px" style="font-size:18px;">Danyana Motos</th>
</tr>
</tbody>
</table>';
}else{
echo '<table width="816px" border="0" cellspacing="2">
<tbody>
<tr>
<th scope="col" style="text-align:left;">
Correamotos / Orlando Correa<br>
NIT: 8.348.497-0<br>
Tel: 270-96-96 276-47-18<br>
Cr. 42 # 33B Sur 11
</th>
<th scope="col" width="202,5px"><img src="../img/LOGO_CORREA_MOTOS_SMALL.png" width="240" height="28,8" alt=""/></th>
</tr>
</tbody>
</table>';
},'');
$pdf->Output("prueba.pdf",'F');
echo "<script language='javascript'>window.open('prueba.pdf','_self','');</script>";//para ver el archivo pdf generado
exit;
?>
</body>
</html>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>prueba</title>
</head>
<body>
<?php
$id_usuario = (isset($_POST['id'])) ? $_POST['id'] : 0;
$pertenece_a = (isset($_POST['empresa'])) ? $_POST['empresa'] : 0;
$estado = (isset($_POST['estado'])) ? $_POST['estado'] : 0;
/* incluimos primeramente el archivo que contiene la clase fpdf */
include ('fpdf181/fpdf.php');
/* tenemos que generar una instancia de la clase */
$pdf = new FPDF();
$pdf->AddPage();
/* seleccionamos el tipo, estilo y tamaño de la letra a utilizar */
$pdf->SetFont('Helvetica', 'B', 14);
if ($pertenece_a === ('Danyana Motos')){
$contenido= '<table width="816px" border="0" cellspacing="2">
<tbody>
<tr>
<th scope="col" style="text-align:left;">
Danyana Motos / Ana Maria Correa Arcila<br>
NIT: 32.244.167-5<br>
Tel: 270-73-02<br>
Cr. 42 # 33B Sur 13
</th>
<th scope="col" width="202,5px" style="font-size:18px;">Danyana Motos</th>
</tr>
</tbody>
</table>';
}else{
$contenido= '<table width="816px" border="0" cellspacing="2">
<tbody>
<tr>
<th scope="col" style="text-align:left;">
Correamotos / Orlando Correa<br>
NIT: 8.348.497-0<br>
Tel: 270-96-96 276-47-18<br>
Cr. 42 # 33B Sur 11
</th>
<th scope="col" width="202,5px"><img src="../img/LOGO_CORREA_MOTOS_SMALL.png" width="240" height="28,8" alt=""/></th>
</tr>
</tbody>
</table>';
}
$pdf->Write (7,$contenido,'');
$pdf->Output("prueba.pdf",'F');
echo "<script language='javascript'>window.open('prueba.pdf','_self','');</script>";//para ver el archivo pdf generado
exit;
?>
</body>
</html>