![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
07/09/2011, 04:12
|
![Avatar de tuka_85](http://static.forosdelweb.com/customavatars/avatar343804_9.gif) | | | Fecha de Ingreso: febrero-2010 Ubicación: Santander/Huelva
Mensajes: 190
Antigüedad: 15 años Puntos: 5 | |
Respuesta: Formulario con datos que no se vean estoy con el archivo para generar el pdf pero ando un poco perdida...
Código:
<?php
include('class.ezpdf.php');
$pdf =& new Cezpdf('a4');
$pdf->selectFont('fonts/courier.afm');
$aviso = "";
$datacreator = array (
'Title'=>'Generar PDF',
'Author'=>'Marta Torre Ajo',
'Subject'=>'PDF',
'Creator'=>'[email protected]',
'Producer'=>'http://blog.martatorreajo.es'
);
$pdf->addInfo($datacreator);
if ($_POST['nombre'] != "") {
// email de destino
$email = "[email protected]";
// asunto del email
$subject = "Contacto";
// Cuerpo del mensaje
$mensaje = "---------------------------------- \n";
$mensaje.= " Contacto \n";
$mensaje.= "---------------------------------- \n";
$mensaje.= ".....:::::Datos Personales:::::.....\n";
$mensaje.= "NOMBRE: ".$_POST['nombre']."\n";
$mensaje.= "DIRECCION: ".$_POST['dire']."\n";
$mensaje.= "TELEFONO: ".$_POST['tlf']."\n";
$mensaje.= "LOCALIDAD: ".$_POST['local']."\n";
$mensaje.= "PROVINCIA: ".$_POST['prov']."\n";
$mensaje.= "---------------------------------- \n\n";
$mensaje.= ".....:::::Otros Datos:::::.....\n";
$mensaje.= "FECHA ENTRADA: ".$_POST['fechae']."\n";
$mensaje.= "TECNICO ASIGNADO: ".$_POST['tec']."\n";
$mensaje.= "IMPORTE: ".$_POST['importe']."\n";
$mensaje.= "---------------------------------- \n\n";
$mensaje.= "MODELO: ".$_POST['model']."\n";
$mensaje.= "MARCA: ".$_POST['marca']."\n";
$mensaje.= "MATRICULA: ".$_POST['matri']."\n";
$mensaje.= "---------------------------------- \n\n";
$mensaje.= "MODELO: ".$_POST['model']."\n";
$mensaje.= $_POST['mensaje']."\n\n";
$mensaje.= "---------------------------------- \n";
$mensaje.= "Enviado desde http://onubaiponline.es \n";
// headers del email
$headers = "From: ".$_POST['nombre']."\r\n";
// Enviamos el mensaje
if (mail($email, $subject, $mensaje, $headers)) {
$aviso = "Su mensaje fue enviado.";
} else {
$aviso = "Error de envío.";
}
}
$pdf->ezText("<b>Parte de Averia</b>\n",16);
$pdf->ezText("Copia Cliente");
$pdf->ezTable($mensaje,'',$options );
$pdf->$ezText($mensaje.= "NOMBRE: ".$_POST['nombre']."\n";")
$pdf->ezText("\n\n\n",10);
$pdf->ezStream();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Enviar Datos</title>
</head>
<body>
<?php if ($aviso != "") { ?>
<p><em><?php echo $aviso; ?></em></p>
<?php } ?>
</body>
</html>
|