/
reporte2.php
executable file
·84 lines (79 loc) · 2.95 KB
/
reporte2.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<?php
error_reporting(E_ALL);
set_time_limit(1800);
set_include_path('application/vendor/newezpdf/src/' . PATH_SEPARATOR . get_include_path());
//include "conexionsp.php";
include 'Cezpdf.php';
reportregistrocompleto($_GET['ide']);
function reportregistrocompleto($id){
class Creport extends Cezpdf{
function Creport($p,$o){
$this->__construct($p, $o,'none',array());
}
}
$dbh = new PDO('mysql:host=localhost;port=3306;dbname=empresas', 'root', '43vivienda', array(PDO::ATTR_PERSISTENT => false));
$idregistro_entidad =$id;
///INICIO DATOS GENERALES
mysql_query ("SET NAMES 'utf8'");
echo $sqlpin = "SELECT `pin_empresa` from empresas where `id` = '$idregistro_entidad'";
$stmtpin = $dbh->prepare($sqlpin);
$stmtpin->execute();
$regpin = $stmtpin->fetch(PDO::FETCH_ASSOC);
$pinempresa = $regpin['pin_empresa'];
//break;break;
$sql = "SELECT `Tipo de Empresa Ejecutora`, `Nombre del Proponente o Razon Social`,
`Nombre del Representante Legal`, `Carnet de Identidad`, `Direccion`, `Ciudad` from reporteemejdg where id = '$idregistro_entidad'";
//$dat = mysql_query($sql);
//$reg = @mysql_fetch_assoc($dat, MYSQL_ASSOC);
$stmt = $dbh->prepare($sql);
$stmt->execute();
$reg = $stmt->fetch(PDO::FETCH_ASSOC);
$data1 = array();
foreach ($reg as $key=>$datos) {
$data1[] = array(" "=>$key,"DATOS"=>$datos);
}
///FIN DATOS GENERALES
//print_r($data1);
//print_r($data12);
//print_r($data13);
//print_r($data2);break;
//$fecha = date("F j, Y");
//$fecha = date();
setlocale(LC_TIME,"es_ES");
$fecha = strftime("%d de %B del %Y");
$pdf = new Creport('a4','portrate');
$pdf->ezSetMargins(20,70,20,20);
$pdf->selectFont('./fonts/Helvetica');
$pdf->ezText('Registro de Datos', 20, array(
'justification' => 'center'
));
$pdf->ezText('AEVIVIENDA <c:uline>Nro</c:uline> ' . $pinempresa, 11, array(
'justification' => 'center'
));
$pdf->ezText('www.aevivienda.gob.bo <c:uline>Fecha Actual:</c:uline> ' . $fecha, 11, array(
'justification' => 'center'
));
$pdf->ezText('');
$pdf->ezText('');
$pdf->ezText('');
$pdf->ezText('');
$pdf->ezTable($data1, '', 'Datos Provenientes Durante el Registro', array(
'width' => 560,
'maxWidth' => 600,
'fontSize' => 7
));
$pdf->ezText('');
$pdf->ezText('');
$pdf->ezText('');
$pdf->ezText('1.- Imprima dos copias de este registro.', 9, array('justification' => 'left'));
$pdf->ezText('2.- Adjunte documentacion original y fotocopias simples de toda la informacion registrada en el sistema para su verificacion.', 9, array('justification' => 'left'));
$pdf->ezText('3.- Contactese con la departamental correspondiente presentar toda su docuemntacion incluido este repote.', 9, array('justification' => 'left'));
$pdf->ezText('');
/*
$pdf->ezText('Fecha: ' . $fecha, 15, array(
'justification' => 'right'
));
*/
$pdf->ezStream();
}
?>