hola ke tal, como estan?
quisiera pedir su ayuda una ves maz
es ke pues, kier sacar unos datos ke insertan en la base de datos y no me sale en el pdf,
solamente me salen las que ya estan en la base, como, el nombre, numero, telefono, etc
y poes lo que es unidad, descripcion, total subtotal, etc, no salen. y pues kisiera saber si ay un codigo para llamar a estos que son los que recien inserttan?
ake esta el codigo ke tengo asta aorita para el pdf.
Código php:
Ver original<?php require_once('Connections/facturas.php'); ?>
<?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ?
intval($theValue) : "NULL"; break;
case "double":
$theValue = ($theValue != "") ?
"'" . doubleval($theValue) . "'" : "NULL"; break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
?><?php
require_once('Connections/facturas.php');
require('pdfclass/class.ezpdf.php');?>
<?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ?
intval($theValue) : "NULL"; break;
case "double":
$theValue = ($theValue != "") ?
"'" . doubleval($theValue) . "'" : "NULL"; break;
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$colname_fact = "-1";
if (isset($_GET['id'])) { }
$query_fact = sprintf("SELECT * FROM cliente_fac WHERE id = %s ORDER BY nom_clien ASC", GetSQLValueString
($colname_fact, "int"));
$colname_Recordset1 = "-1";
if (isset($_GET['id'])) { $colname_Recordset1 = $_GET['id'];
}
$query_Recordset1 = sprintf("SELECT * FROM variables WHERE id = %s ORDER BY id DESC", GetSQLValueString
($colname_Recordset1, "int"));
$x2=$row_fact['nom_clien'];
$x3=$row_fact['dom_clien'];
$x4=$row_fact['ciud_clien'];
$x5=$row_fact['tel_clien'];
$x6=$row_fact['rfc_clien'];
$x7=$row_fact['no_clien'];
$x8=$row_Recordset1['fac_dia'];
$x9=$row_Recordset1['fac_mes'];
$x10=$row_Recordset1['fac_fecha'];
$x11=$row_Recordset1['fac_cantidad'];
$x12=$row_Recordset1['fac_unidad'];
$x13=$row_Recordset1['fac_desc'];
$x14=$row_Recordset1['fac_p_unitario'];
$x15=$row_Recordset1['fac_importe'];
$x16=$row_Recordset1['fac_impcletra'];
$pdf =& new Cezpdf();
$pdf->selectFont('includes/pdfclass/fonts/Helvetica.afm');
$pdf->addJpegFromFile('facturacarpi.jpg',25,50,550);
$pdf->ezSetY(660);
$pdf->ezText(" ".$x2." ".$x8." ".$x9." ".$x10);
$pdf->ezSetY(655);
$pdf->ezSetY(640);
$pdf->ezText(" ".$x3);
$pdf->ezSetY(620);
$pdf->ezText(" ".$x4);
$pdf->ezSetY(604);
$pdf->ezText(" ".$x5." ".$x6." ".$x7);
$pdf->ezSetY(540);
$pdf->ezText(" ".$x12." ".$x12." ".$x13." ".$x14." ".$x15);
$pdf->ezStream();
?>
gracias por su ayuda, se les agradece