2015-05 29 08:20:56
Nuevo(20107,1)
Caso :202
2015-05 29 08:20:56
cargar datos del sujeto(,,s,79,202)
select s.*, m.nombre as nom_muni, c.nom_cat,fec_caso
from wf_caso_79 w
inner join core_sujetoverificacion s on w.id=202 AND s.id =w.core_sujetoverificacion_id
inner join plan_municipio m on s.plan_municipio_id=m.id
inner join core_sujetocategoria c on s.core_sujetocategoria_id=c.id
2015-05 29 08:20:56
tabla dat adic
select tabla from core_sujetoverificaciontipo where id=1
2015-05 29 08:20:56
tabla :persona
SELECT * FROM persona where id=20107
CasoSeguimiento :367
EjecutarTarea_158() Datos ingreso id_comp1121
91
ValidarUsuario(158):1
EjecutarPaso_288: form:93 , caso=202 id_comp 1121
Mostrar form
fin 2015-05-29 08:20:56
/******************************************************************************************************/
2015-05-29 08:20:57TraerCaso(202,79,)
CargarCaso :202
2015-05 29 08:20:57
CargarDatos: Caso :202
cargar datos de ejecucion de los ultimos pasos
select p.*,b.wf_tarea_id as tarea_id,
u.apellido||' '||u.nombre|| ': '||u.cargo as usr_ejec
from
(select max(id) as id, wf_caso_79_seguimiento_id,wf_paso_id from wf_caso_79_pasos a1 group by wf_caso_79_seguimiento_id,wf_paso_id order by id
)a
inner join wf_caso_79_pasos p using(id,wf_caso_79_seguimiento_id)
inner join ( select max(id) as wf_caso_79_seguimiento_id,wf_caso_79_id,wf_tarea_id from wf_caso_79_seguimiento where wf_caso_79_id =? group by wf_caso_79_id,wf_tarea_id order by wf_caso_79_id,wf_caso_79_seguimiento_id ) b using(wf_caso_79_seguimiento_id)
left join usuarios u using(core_usuario_id)
Error :
cargar datos de ejecucion de las tareas (las ultimas si el proceso tiene ciclos)
select a.*, u.apellido||' '||u.nombre|| ': '||u.cargo as usr_asig , ur.apellido||' '||ur.nombre|| ': '||ur.cargo as usr_resol from
wf_caso_79_seguimiento a
inner join (
select max(b0.id) as id,b0.wf_caso_79_id,b0.wf_tarea_id from wf_caso_79_seguimiento b0 where b0.wf_caso_79_id =? group by b0.wf_caso_79_id,b0.wf_tarea_id order by wf_caso_79_id,id
) b using(id)
left join usuarios u using(core_usuario_id)
left join usuarios ur on ur.core_usuario_id=core_usuario_id_resol
{"0":"367","id":"367","1":"202","wf_caso_79_id":"202","2":"158","wf_tarea_id":"158","3":null,"core_usuario_id":null,"4":"2015-05-29 08:20:56","fec_asig":"2015-05-29 08:20:56","5":null,"core_usuario_id_resol":null,"6":null,"fec_resol":null,"7":"158","wf_tarea_id_sig":"158","8":null,"usr_asig":null,"9":null,"usr_resol":null}
2015-05 29 08:20:57
cargar datos del sujeto(,,s,79,202)
select s.*, m.nombre as nom_muni, c.nom_cat,fec_caso
from wf_caso_79 w
inner join core_sujetoverificacion s on w.id=202 AND s.id =w.core_sujetoverificacion_id
inner join plan_municipio m on s.plan_municipio_id=m.id
inner join core_sujetocategoria c on s.core_sujetocategoria_id=c.id
2015-05 29 08:20:57
tabla dat adic
select tabla from core_sujetoverificaciontipo where id=1
2015-05 29 08:20:57
tabla :persona
SELECT * FROM persona where id=20107
fin 2015-05-29 08:20:57
/******************************************************************************************************/
2015-05-29 08:21:07TraerCaso(202,79,)
CargarCaso :202
2015-05 29 08:21:07
CargarDatos: Caso :202
cargar datos de ejecucion de los ultimos pasos
select p.*,b.wf_tarea_id as tarea_id,
u.apellido||' '||u.nombre|| ': '||u.cargo as usr_ejec
from
(select max(id) as id, wf_caso_79_seguimiento_id,wf_paso_id from wf_caso_79_pasos a1 group by wf_caso_79_seguimiento_id,wf_paso_id order by id
)a
inner join wf_caso_79_pasos p using(id,wf_caso_79_seguimiento_id)
inner join ( select max(id) as wf_caso_79_seguimiento_id,wf_caso_79_id,wf_tarea_id from wf_caso_79_seguimiento where wf_caso_79_id =? group by wf_caso_79_id,wf_tarea_id order by wf_caso_79_id,wf_caso_79_seguimiento_id ) b using(wf_caso_79_seguimiento_id)
left join usuarios u using(core_usuario_id)
Error :
cargar datos de ejecucion de las tareas (las ultimas si el proceso tiene ciclos)
select a.*, u.apellido||' '||u.nombre|| ': '||u.cargo as usr_asig , ur.apellido||' '||ur.nombre|| ': '||ur.cargo as usr_resol from
wf_caso_79_seguimiento a
inner join (
select max(b0.id) as id,b0.wf_caso_79_id,b0.wf_tarea_id from wf_caso_79_seguimiento b0 where b0.wf_caso_79_id =? group by b0.wf_caso_79_id,b0.wf_tarea_id order by wf_caso_79_id,id
) b using(id)
left join usuarios u using(core_usuario_id)
left join usuarios ur on ur.core_usuario_id=core_usuario_id_resol
{"0":"367","id":"367","1":"202","wf_caso_79_id":"202","2":"158","wf_tarea_id":"158","3":null,"core_usuario_id":null,"4":"2015-05-29 08:20:56","fec_asig":"2015-05-29 08:20:56","5":null,"core_usuario_id_resol":null,"6":null,"fec_resol":null,"7":"158","wf_tarea_id_sig":"158","8":null,"usr_asig":null,"9":null,"usr_resol":null}
2015-05 29 08:21:07
cargar datos del sujeto(,,s,79,202)
select s.*, m.nombre as nom_muni, c.nom_cat,fec_caso
from wf_caso_79 w
inner join core_sujetoverificacion s on w.id=202 AND s.id =w.core_sujetoverificacion_id
inner join plan_municipio m on s.plan_municipio_id=m.id
inner join core_sujetocategoria c on s.core_sujetocategoria_id=c.id
2015-05 29 08:21:07
tabla dat adic
select tabla from core_sujetoverificaciontipo where id=1
2015-05 29 08:21:07
tabla :persona
SELECT * FROM persona where id=20107
2015-05 29 08:21:07
Continuar(s,158,288,)
EjecutarTarea_158() Datos ingreso id_comp1121
91
ValidarUsuario(158):1
EjecutarPaso_288: form:93 , caso=202 id_comp 1121
Paso::Guardar(Caso:202)
Datos a guardar:
Array
(
[wf_proceso_id] => 79
[wf_paso_id] => 288
[wf_tarea_id] => 158
[wf_caso_id] => 202
[id] => 1121
[accion] => nextPaso
[reg] => s
[rta] => n
[cod_formulario2] => 93
[id_periodo] => 2015
[obs_ingreso] =>
[cod_bloque] => 110
[oid] =>
[oid_maestro] =>
[730] => ddfds
[870] => 44
[731] => 1
[740] => 1
)
OID: 143
rta: 1 dato:143 tabla:sce.t93
CasoPaso:454
CargarDatos_288(143)
se carga 79_158_288_93_110_87044
se carga 79_158_288_93_110_7401
se carga 79_158_288_93_110_7311
se carga 79_158_288_93_110_730ddfds
SiguientePasoDe288: Funcion para ejecutar el siguiente paso
EjecutarPaso_289: corr:29 , caso=202 id_comp 1121
Mostrar corr
ob_start();
$ciud = mb_strtoupper( "{ WFSV_79 } { WFSV_80 }",'utf-8');
?>
Apreciado(a)
El presente mensaje es una notificación para el caso No
Datos generales y tipo se solicitud
nombre de liga o asociación deportiva: { 79_158_288_93_110_730 }
Personería jurídica: { 79_158_288_93_110_731 }
Representación legal: { 79_158_288_93_110_740 }
T79_158_288_93_110_740:Si
T79_158_288_93_110_731:Si
T79_158_288_93_110_730:ddfds
{ WFSV_76 }
TWFSV_76:desarrollo4@siticol.com
Solicitud registrada
Retorno :
Array
(
[ret] => inicioComponente_WF_Correo({"id":"1121","caso_id":"202","proceso_id":79,"tit":"Datos ingreso","tarea_id":158,"paso_id":289,"desc":"\r\nApreciado(a)
\r\nGERMAN SITI 3<\/strong>\r\n\r\n
El presente mensaje es una notificación para el caso No 202<\/strong> <\/p>\r\nSu solicitud del certificado de existencia y representaci\u00f3n legal fue registrada
Datos generales y tipo se solicitud
nombre de liga o asociaci\u00f3n deportiva: ddfds
Personer\u00eda jur\u00eddica: Si
Representaci\u00f3n legal: Si
<\/strong> ","url":"De click aqui para volver a enviar el correo<\/a><\/div>"});
[suc] => 1
)
fin 2015-05-29 08:21:07
/******************************************************************************************************/
2015-05-29 08:21:10TraerCaso(202,79,)
CargarCaso :202
2015-05 29 08:21:10
CargarDatos: Caso :202
cargar datos de ejecucion de los ultimos pasos
select p.*,b.wf_tarea_id as tarea_id,
u.apellido||' '||u.nombre|| ': '||u.cargo as usr_ejec
from
(select max(id) as id, wf_caso_79_seguimiento_id,wf_paso_id from wf_caso_79_pasos a1 group by wf_caso_79_seguimiento_id,wf_paso_id order by id
)a
inner join wf_caso_79_pasos p using(id,wf_caso_79_seguimiento_id)
inner join ( select max(id) as wf_caso_79_seguimiento_id,wf_caso_79_id,wf_tarea_id from wf_caso_79_seguimiento where wf_caso_79_id =? group by wf_caso_79_id,wf_tarea_id order by wf_caso_79_id,wf_caso_79_seguimiento_id ) b using(wf_caso_79_seguimiento_id)
left join usuarios u using(core_usuario_id)
{"0":"454","id":"454","1":"288","wf_paso_id":"288","2":"367","wf_caso_79_seguimiento_id":"367","3":"91","core_usuario_id":"91","4":"2015-05-29 08:21:07","fecha_ejec":"2015-05-29 08:21:07","5":"143","dato":"143","6":"sce.t93","tabla":"sce.t93","7":"158","tarea_id":"158","8":"siti 3 German: ciudadano, cargo, Gerente","usr_ejec":"siti 3 German: ciudadano, cargo, Gerente"}
CargarDatos_288(143)
se carga 79_158_288_93_110_87044
se carga 79_158_288_93_110_7401
se carga 79_158_288_93_110_7311
se carga 79_158_288_93_110_730ddfds
cargar datos de ejecucion de las tareas (las ultimas si el proceso tiene ciclos)
select a.*, u.apellido||' '||u.nombre|| ': '||u.cargo as usr_asig , ur.apellido||' '||ur.nombre|| ': '||ur.cargo as usr_resol from
wf_caso_79_seguimiento a
inner join (
select max(b0.id) as id,b0.wf_caso_79_id,b0.wf_tarea_id from wf_caso_79_seguimiento b0 where b0.wf_caso_79_id =? group by b0.wf_caso_79_id,b0.wf_tarea_id order by wf_caso_79_id,id
) b using(id)
left join usuarios u using(core_usuario_id)
left join usuarios ur on ur.core_usuario_id=core_usuario_id_resol
{"0":"367","id":"367","1":"202","wf_caso_79_id":"202","2":"158","wf_tarea_id":"158","3":null,"core_usuario_id":null,"4":"2015-05-29 08:20:56","fec_asig":"2015-05-29 08:20:56","5":null,"core_usuario_id_resol":null,"6":null,"fec_resol":null,"7":"158","wf_tarea_id_sig":"158","8":null,"usr_asig":null,"9":null,"usr_resol":null}
2015-05 29 08:21:10
cargar datos del sujeto(,,s,79,202)
select s.*, m.nombre as nom_muni, c.nom_cat,fec_caso
from wf_caso_79 w
inner join core_sujetoverificacion s on w.id=202 AND s.id =w.core_sujetoverificacion_id
inner join plan_municipio m on s.plan_municipio_id=m.id
inner join core_sujetocategoria c on s.core_sujetocategoria_id=c.id
2015-05 29 08:21:10
tabla dat adic
select tabla from core_sujetoverificaciontipo where id=1
2015-05 29 08:21:10
tabla :persona
SELECT * FROM persona where id=20107
2015-05 29 08:21:10
Continuar(s,158,289,)
EjecutarTarea_158() Datos ingreso id_comp1121
91
ValidarUsuario(158):1
EjecutarPaso_289: corr:29 , caso=202 id_comp 1121
Paso::Guardar(Caso:202)
rta: 1 dato: tabla:
CasoPaso:455
CargarDatos_289()
SiguientePasoDe289: Funcion para ejecutar el siguiente paso
Condicion Tarea : true
TerminarTarea(158,243)
Ultimo seg :367
Ultimo seg :368
EjecutarTarea_243() Generacion pin id_comp1121
91 91
ValidarUsuario(243):1
EjecutarPaso_402: docs:75 , caso=202 id_comp 1121
Mostrar docs
$tit_formato='GENERACIÓN DE PIN ';
$n= ' WFSV_79 '; $a= ' WFSV_80 ';
$nom=$n.$a;
$dir= ' WFSV_77 ';
$tel= ' WFSV_78 ';
$ced=' WFSV_81 ';
$multas= ' 84_200_358_133_157_863 ';
$interes= ' 84_200_358_133_157_864 ';
$vadd= ' 84_200_358_133_157_865 ';
$cuini= ' 84_200_358_133_157_866 ';
$ncu= ' 84_200_358_133_157_867 ';
$vcu= ' 84_200_358_133_157_868 ';
$fe= ' 84_200_358_133_157_862 ';
$t=($multas+$interes+$vadd)-($cuini+($vcu*$ncu));
$fecha=date('Y-m-d');
$f=split('-',$fecha);
if($f[1]==1)$f[1]='Enero';
if($f[1]==2)$f[1]='Febrero';
if($f[1]==3)$f[1]='Marzo';
if($f[1]==4)$f[1]='Abril';
if($f[1]==5)$f[1]='Mayo';
if($f[1]==6)$f[1]='Junio';
if($f[1]==7)$f[1]='Julio';
if($f[1]==8)$f[1]='Agosto';
if($f[1]==9)$f[1]='Septiembre';
if($f[1]==10)$f[1]='Octubre';
if($f[1]==11)$f[1]='Noviembre';
if($f[1]==12)$f[1]='Diciembre';
require_once($root.'/lib/tcpdf/config/lang/eng.php');
require_once($root.'/lib/tcpdf/tcpdf.php');
require_once($root.'/lib/num_letras.php');
//--------------------------------------------------------------------------
class MYPDF extends TCPDF {
//Page header
public function Header() {
// Logo
//echo str_replace('$root_js',$root_js,$CONFIG['CABECERA_FORMATOS_HTML']);
$image_file = K_PATH_IMAGES.'logo_alcaldia.jpg';
$htm='';
$htm2='
 |
';
$npag=$this->getAliasNbPages();
$this->writeHTMLCell($w = 0, $h = 0, $x = '', $y = '', $htm, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = 'top', $autopadding = true);
}
// Page footer
public function Footer() {
// Position at 15 mm from bottom
$this->SetY(-15);
// Set font
$this->SetFont('helvetica', 'I', 8);
// Page number
$this->Cell(0, 10, '', 0, false, 'C', 0, '', 0, false, 'T', 'M');
}
}
//--------------------------------------------------------------------------
// create new PDF document
$pdf = new MYPDF('p', 'mm', 'letter', true, 'UTF-8', false);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('Siti');
$pdf->SetTitle('GENERACIÓN DE PIN');
$pdf->SetSubject('Certificado');
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
// set default header data
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
// set header and footer fonts
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
// set margins
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
// set auto page breaks
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
$pdf->setLanguageArray($l);
// ---------------------------------------------------------
// NOTE: 2D barcode algorithms must be implemented on 2dbarcode.php class file.
// set font
$pdf->SetFont('helvetica', '', 10);
// add a page
$pdf->AddPage();
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
$fils=4;
$cols=3;
$logo_empresa=$CONFIG['LOGO_EMPRESA'];
$codigo=$root_js.'build/view/common/marco/index.php?particular=001&accion=I&proc='.$CONFIG['PROCESO_STICKER'];
$izq=10+2;$der=10;$arr=10; $abj=10;
$sxp=$fils*$cols;
$tot=$rangoF-$rangoI+1;
$pags=ceil(($tot)/$sxp);
$anchoR=216-$izq-$der;
$altoR=279-$arr-$abj;
$anchoS=$anchoR/$cols;
$margenSV=4;
$margenSH=5;
$altoS=$altoR/$fils;
$altoImg=10;
$altoText=8;
$altoC=50;
// set style for barcode
$style = array(
'border' => 2,
'vpadding' => 'auto',
'hpadding' => 'auto',
'fgcolor' => array(0,0,0),
'bgcolor' => false, //array(255,255,255)
'module_width' => 1, // width of a single module in points
'module_height' => 1 // height of a single module in points
);
$pdf->SetFont('helvetica', '', 9, '', false);
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
$s=0;$p=1;$consc=$rangoI;
$y=$arr;
$x=$izq;
// create some HTML content
ob_start();
$mes=date("F");
if ($mes=="January") $mes="Enero";
if ($mes=="February") $mes="Febrero";
if ($mes=="March") $mes="Marzo";
if ($mes=="April") $mes="Abril";
if ($mes=="May") $mes="Mayo";
if ($mes=="June") $mes="Junio";
if ($mes=="July") $mes="Julio";
if ($mes=="August") $mes="Agosto";
if ($mes=="September") $mes="Setiembre";
if ($mes=="October") $mes="Octubre";
if ($mes=="November") $mes="Noviembre";
if ($mes=="December") $mes="Diciembre";
$anio=date("Y");
$npag=$pdf->getAliasNbPages();
$lpag=convertir_a_letras($npag);
if($npag==1&&$lpag=='uno')$lpag='un';
for($i=0;$i<2;$i++){
?>
Gobernación del Departemento de Nariño |
|
PIN generado para certificado de representación legal de asociaciones y ligas deportivas |
|
Número de documento: |
echo $ced;?> |
Nombre: |
echo strtoupper($nom);?> |
Número de caso |
/*echo $caso->id;*/?> |
}
$html=ob_get_clean();
// output the HTML content
$pdf->writeHTML($html, true, false,false,false);
// reset pointer to the last page
$pdf->lastPage();
//---
//$pdf->AddPage();
ob_start();
$html=ob_get_clean();
// output the HTML content
$pdf->writeHTML($html, true, false,false,false);
// reset pointer to the last page
$pdf->lastPage();
//----
$nomdoc=md5(time()).'.pdf';
$pdf->Output($root."/tmp/".$nomdoc, 'F');
$url=$root_js.'tmp/'.$nomdoc;
TWFSV_81:999888
TWFSV_80:siti 3
TWFSV_79:German
TWFSV_78:1212323443
TWFSV_77:callae 123
Retorno :
Array
(
[ret] => inicioComponente_WF_DocSalida({"id":"1121","caso_id":"202","proceso_id":79,"tit":"Generacion pin","tarea_id":243,"paso_id":402,"desc":null,"url":"De clic aqui para descargar el archivo<\/a><\/div>"});
[suc] => 1
)
fin 2015-05-29 08:21:10
/******************************************************************************************************/
2015-05-29 08:38:28TraerCaso(202,79,)
CargarCaso :202
2015-05 29 08:38:28
CargarDatos: Caso :202
cargar datos de ejecucion de los ultimos pasos
select p.*,b.wf_tarea_id as tarea_id,
u.apellido||' '||u.nombre|| ': '||u.cargo as usr_ejec
from
(select max(id) as id, wf_caso_79_seguimiento_id,wf_paso_id from wf_caso_79_pasos a1 group by wf_caso_79_seguimiento_id,wf_paso_id order by id
)a
inner join wf_caso_79_pasos p using(id,wf_caso_79_seguimiento_id)
inner join ( select max(id) as wf_caso_79_seguimiento_id,wf_caso_79_id,wf_tarea_id from wf_caso_79_seguimiento where wf_caso_79_id =? group by wf_caso_79_id,wf_tarea_id order by wf_caso_79_id,wf_caso_79_seguimiento_id ) b using(wf_caso_79_seguimiento_id)
left join usuarios u using(core_usuario_id)
{"0":"454","id":"454","1":"288","wf_paso_id":"288","2":"367","wf_caso_79_seguimiento_id":"367","3":"91","core_usuario_id":"91","4":"2015-05-29 08:21:07","fecha_ejec":"2015-05-29 08:21:07","5":"143","dato":"143","6":"sce.t93","tabla":"sce.t93","7":"158","tarea_id":"158","8":"siti 3 German: ciudadano, cargo, Gerente","usr_ejec":"siti 3 German: ciudadano, cargo, Gerente"}
CargarDatos_288(143)
se carga 79_158_288_93_110_87044
se carga 79_158_288_93_110_7401
se carga 79_158_288_93_110_7311
se carga 79_158_288_93_110_730ddfds
{"0":"455","id":"455","1":"289","wf_paso_id":"289","2":"367","wf_caso_79_seguimiento_id":"367","3":"91","core_usuario_id":"91","4":"2015-05-29 08:21:10","fecha_ejec":"2015-05-29 08:21:10","5":null,"dato":null,"6":null,"tabla":null,"7":"158","tarea_id":"158","8":"siti 3 German: ciudadano, cargo, Gerente","usr_ejec":"siti 3 German: ciudadano, cargo, Gerente"}
CargarDatos_289()
cargar datos de ejecucion de las tareas (las ultimas si el proceso tiene ciclos)
select a.*, u.apellido||' '||u.nombre|| ': '||u.cargo as usr_asig , ur.apellido||' '||ur.nombre|| ': '||ur.cargo as usr_resol from
wf_caso_79_seguimiento a
inner join (
select max(b0.id) as id,b0.wf_caso_79_id,b0.wf_tarea_id from wf_caso_79_seguimiento b0 where b0.wf_caso_79_id =? group by b0.wf_caso_79_id,b0.wf_tarea_id order by wf_caso_79_id,id
) b using(id)
left join usuarios u using(core_usuario_id)
left join usuarios ur on ur.core_usuario_id=core_usuario_id_resol
{"0":"367","id":"367","1":"202","wf_caso_79_id":"202","2":"158","wf_tarea_id":"158","3":null,"core_usuario_id":null,"4":"2015-05-29 08:20:56","fec_asig":"2015-05-29 08:20:56","5":"91","core_usuario_id_resol":"91","6":"2015-05-29 08:21:10","fec_resol":"2015-05-29 08:21:10","7":"158","wf_tarea_id_sig":"158","8":null,"usr_asig":null,"9":"siti 3 German: ciudadano, cargo, Gerente","usr_resol":"siti 3 German: ciudadano, cargo, Gerente"}
{"0":"368","id":"368","1":"202","wf_caso_79_id":"202","2":"243","wf_tarea_id":"243","3":"91","core_usuario_id":"91","4":"2015-05-29 08:21:10","fec_asig":"2015-05-29 08:21:10","5":null,"core_usuario_id_resol":null,"6":null,"fec_resol":null,"7":"243","wf_tarea_id_sig":"243","8":"siti 3 German: ciudadano, cargo, Gerente","usr_asig":"siti 3 German: ciudadano, cargo, Gerente","9":null,"usr_resol":null}
2015-05 29 08:38:28
cargar datos del sujeto(,,s,79,202)
select s.*, m.nombre as nom_muni, c.nom_cat,fec_caso
from wf_caso_79 w
inner join core_sujetoverificacion s on w.id=202 AND s.id =w.core_sujetoverificacion_id
inner join plan_municipio m on s.plan_municipio_id=m.id
inner join core_sujetocategoria c on s.core_sujetocategoria_id=c.id
2015-05 29 08:38:28
tabla dat adic
select tabla from core_sujetoverificaciontipo where id=1
2015-05 29 08:38:28
tabla :persona
SELECT * FROM persona where id=20107
2015-05 29 08:38:28
Continuar(,243,,s)
EjecutarTarea_243() Generacion pin id_comp1124
91 91
ValidarUsuario(243):1
EjecutarPaso_402: docs:75 , caso=202 id_comp 1124
Mostrar docs
$tit_formato='GENERACIÓN DE PIN ';
$n= ' WFSV_79 '; $a= ' WFSV_80 ';
$nom=$n.$a;
$dir= ' WFSV_77 ';
$tel= ' WFSV_78 ';
$ced=' WFSV_81 ';
$fecha=date('Y-m-d');
$f=split('-',$fecha);
if($f[1]==1)$f[1]='Enero';
if($f[1]==2)$f[1]='Febrero';
if($f[1]==3)$f[1]='Marzo';
if($f[1]==4)$f[1]='Abril';
if($f[1]==5)$f[1]='Mayo';
if($f[1]==6)$f[1]='Junio';
if($f[1]==7)$f[1]='Julio';
if($f[1]==8)$f[1]='Agosto';
if($f[1]==9)$f[1]='Septiembre';
if($f[1]==10)$f[1]='Octubre';
if($f[1]==11)$f[1]='Noviembre';
if($f[1]==12)$f[1]='Diciembre';
require_once($root.'/lib/tcpdf/config/lang/eng.php');
require_once($root.'/lib/tcpdf/tcpdf.php');
require_once($root.'/lib/tcpdf/tcpdf_barcodes.php');
require_once($root.'/lib/num_letras.php');
//--------------------------------------------------------------------------
class MYPDF extends TCPDF {
//Page header
public function Header() {
// Logo
//echo str_replace('$root_js',$root_js,$CONFIG['CABECERA_FORMATOS_HTML']);
$image_file = K_PATH_IMAGES.'logo_alcaldia.jpg';
$htm='';
$htm2='
 |
';
$npag=$this->getAliasNbPages();
$this->writeHTMLCell($w = 0, $h = 0, $x = '', $y = '', $htm, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = 'top', $autopadding = true);
}
// Page footer
public function Footer() {
// Position at 15 mm from bottom
$this->SetY(-15);
// Set font
$this->SetFont('helvetica', 'I', 8);
// Page number
$this->Cell(0, 10, '', 0, false, 'C', 0, '', 0, false, 'T', 'M');
}
}
//--------------------------------------------------------------------------
// create new PDF document
$pdf = new MYPDF('p', 'mm', 'letter', true, 'UTF-8', false);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('Siti');
$pdf->SetTitle('GENERACIÓN DE PIN');
$pdf->SetSubject('Certificado');
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
// set default header data
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
// set header and footer fonts
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
// set margins
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
// set auto page breaks
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
$pdf->setLanguageArray($l);
// ---------------------------------------------------------
// NOTE: 2D barcode algorithms must be implemented on 2dbarcode.php class file.
// set font
$pdf->SetFont('helvetica', '', 10);
// add a page
$pdf->AddPage();
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
$fils=4;
$cols=3;
$logo_empresa=$CONFIG['LOGO_EMPRESA'];
$codigo=$root_js.'build/view/common/marco/index.php?particular=001&accion=I&proc='.$CONFIG['PROCESO_STICKER'];
$izq=10+2;$der=10;$arr=10; $abj=10;
$sxp=$fils*$cols;
$tot=$rangoF-$rangoI+1;
$pags=ceil(($tot)/$sxp);
$anchoR=216-$izq-$der;
$altoR=279-$arr-$abj;
$anchoS=$anchoR/$cols;
$margenSV=4;
$margenSH=5;
$altoS=$altoR/$fils;
$altoImg=10;
$altoText=8;
$altoC=50;
// set style for barcode
$style = array(
'border' => 2,
'vpadding' => 'auto',
'hpadding' => 'auto',
'fgcolor' => array(0,0,0),
'bgcolor' => false, //array(255,255,255)
'module_width' => 1, // width of a single module in points
'module_height' => 1 // height of a single module in points
);
$pdf->SetFont('helvetica', '', 9, '', false);
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
$s=0;$p=1;$consc=$rangoI;
$y=$arr;
$x=$izq;
// create some HTML content
ob_start();
$mes=date("F");
if ($mes=="January") $mes="Enero";
if ($mes=="February") $mes="Febrero";
if ($mes=="March") $mes="Marzo";
if ($mes=="April") $mes="Abril";
if ($mes=="May") $mes="Mayo";
if ($mes=="June") $mes="Junio";
if ($mes=="July") $mes="Julio";
if ($mes=="August") $mes="Agosto";
if ($mes=="September") $mes="Setiembre";
if ($mes=="October") $mes="Octubre";
if ($mes=="November") $mes="Noviembre";
if ($mes=="December") $mes="Diciembre";
$anio=date("Y");
$npag=$pdf->getAliasNbPages();
$lpag=convertir_a_letras($npag);
if($npag==1&&$lpag=='uno')$lpag='un';
for($i=0;$i<2;$i++){
?>
Gobernación del Departemento de Nariño
|
PIN generado para certificado de representación legal de asociaciones y ligas deportivas
|
Número de documento: |
echo $ced;?> |
Nombre: |
echo strtoupper($nom);?> |
Número de caso |
/*echo $caso->id;*/?> |
Código de barras
$barcodeobj = new TCPDFBarcode('0000050', 'C128');
echo $barcodeobj->getBarcodeHTML(2, 30, 'black');
?> |
}
$html=ob_get_clean();
// output the HTML content
$pdf->writeHTML($html, true, false,false,false);
// reset pointer to the last page
$pdf->lastPage();
//---
//$pdf->AddPage();
ob_start();
$html=ob_get_clean();
// output the HTML content
$pdf->writeHTML($html, true, false,false,false);
// reset pointer to the last page
$pdf->lastPage();
//----
$nomdoc=md5(time()).'.pdf';
$pdf->Output($root."/tmp/".$nomdoc, 'F');
$url=$root_js.'tmp/'.$nomdoc;
TWFSV_81:999888
TWFSV_80:siti 3
TWFSV_79:German
TWFSV_78:1212323443
TWFSV_77:callae 123
Retorno :
Array
(
[ret] => inicioComponente_WF_DocSalida({"id":"1124","caso_id":"202","proceso_id":79,"tit":"Generacion pin","tarea_id":243,"paso_id":402,"desc":null,"url":"De clic aqui para descargar el archivo<\/a><\/div>"});
[suc] => 1
)
fin 2015-05-29 08:38:28
/******************************************************************************************************/
2015-05-29 08:40:06TraerCaso(202,79,)
CargarCaso :202
2015-05 29 08:40:06
CargarDatos: Caso :202
cargar datos de ejecucion de los ultimos pasos
select p.*,b.wf_tarea_id as tarea_id,
u.apellido||' '||u.nombre|| ': '||u.cargo as usr_ejec
from
(select max(id) as id, wf_caso_79_seguimiento_id,wf_paso_id from wf_caso_79_pasos a1 group by wf_caso_79_seguimiento_id,wf_paso_id order by id
)a
inner join wf_caso_79_pasos p using(id,wf_caso_79_seguimiento_id)
inner join ( select max(id) as wf_caso_79_seguimiento_id,wf_caso_79_id,wf_tarea_id from wf_caso_79_seguimiento where wf_caso_79_id =? group by wf_caso_79_id,wf_tarea_id order by wf_caso_79_id,wf_caso_79_seguimiento_id ) b using(wf_caso_79_seguimiento_id)
left join usuarios u using(core_usuario_id)
{"0":"454","id":"454","1":"288","wf_paso_id":"288","2":"367","wf_caso_79_seguimiento_id":"367","3":"91","core_usuario_id":"91","4":"2015-05-29 08:21:07","fecha_ejec":"2015-05-29 08:21:07","5":"143","dato":"143","6":"sce.t93","tabla":"sce.t93","7":"158","tarea_id":"158","8":"siti 3 German: ciudadano, cargo, Gerente","usr_ejec":"siti 3 German: ciudadano, cargo, Gerente"}
CargarDatos_288(143)
se carga 79_158_288_93_110_87044
se carga 79_158_288_93_110_7401
se carga 79_158_288_93_110_7311
se carga 79_158_288_93_110_730ddfds
{"0":"455","id":"455","1":"289","wf_paso_id":"289","2":"367","wf_caso_79_seguimiento_id":"367","3":"91","core_usuario_id":"91","4":"2015-05-29 08:21:10","fecha_ejec":"2015-05-29 08:21:10","5":null,"dato":null,"6":null,"tabla":null,"7":"158","tarea_id":"158","8":"siti 3 German: ciudadano, cargo, Gerente","usr_ejec":"siti 3 German: ciudadano, cargo, Gerente"}
CargarDatos_289()
cargar datos de ejecucion de las tareas (las ultimas si el proceso tiene ciclos)
select a.*, u.apellido||' '||u.nombre|| ': '||u.cargo as usr_asig , ur.apellido||' '||ur.nombre|| ': '||ur.cargo as usr_resol from
wf_caso_79_seguimiento a
inner join (
select max(b0.id) as id,b0.wf_caso_79_id,b0.wf_tarea_id from wf_caso_79_seguimiento b0 where b0.wf_caso_79_id =? group by b0.wf_caso_79_id,b0.wf_tarea_id order by wf_caso_79_id,id
) b using(id)
left join usuarios u using(core_usuario_id)
left join usuarios ur on ur.core_usuario_id=core_usuario_id_resol
{"0":"367","id":"367","1":"202","wf_caso_79_id":"202","2":"158","wf_tarea_id":"158","3":null,"core_usuario_id":null,"4":"2015-05-29 08:20:56","fec_asig":"2015-05-29 08:20:56","5":"91","core_usuario_id_resol":"91","6":"2015-05-29 08:21:10","fec_resol":"2015-05-29 08:21:10","7":"158","wf_tarea_id_sig":"158","8":null,"usr_asig":null,"9":"siti 3 German: ciudadano, cargo, Gerente","usr_resol":"siti 3 German: ciudadano, cargo, Gerente"}
{"0":"368","id":"368","1":"202","wf_caso_79_id":"202","2":"243","wf_tarea_id":"243","3":"91","core_usuario_id":"91","4":"2015-05-29 08:21:10","fec_asig":"2015-05-29 08:21:10","5":null,"core_usuario_id_resol":null,"6":null,"fec_resol":null,"7":"243","wf_tarea_id_sig":"243","8":"siti 3 German: ciudadano, cargo, Gerente","usr_asig":"siti 3 German: ciudadano, cargo, Gerente","9":null,"usr_resol":null}
2015-05 29 08:40:06
cargar datos del sujeto(,,s,79,202)
select s.*, m.nombre as nom_muni, c.nom_cat,fec_caso
from wf_caso_79 w
inner join core_sujetoverificacion s on w.id=202 AND s.id =w.core_sujetoverificacion_id
inner join plan_municipio m on s.plan_municipio_id=m.id
inner join core_sujetocategoria c on s.core_sujetocategoria_id=c.id
2015-05 29 08:40:06
tabla dat adic
select tabla from core_sujetoverificaciontipo where id=1
2015-05 29 08:40:06
tabla :persona
SELECT * FROM persona where id=20107
2015-05 29 08:40:06
Continuar(,243,,s)
EjecutarTarea_243() Generacion pin id_comp1124
91 91
ValidarUsuario(243):1
EjecutarPaso_402: docs:75 , caso=202 id_comp 1124
Mostrar docs
$tit_formato='GENERACIÓN DE PIN ';
$n= ' WFSV_79 '; $a= ' WFSV_80 ';
$nom=$n.$a;
$dir= ' WFSV_77 ';
$tel= ' WFSV_78 ';
$ced=' WFSV_81 ';
$fecha=date('Y-m-d');
$f=split('-',$fecha);
if($f[1]==1)$f[1]='Enero';
if($f[1]==2)$f[1]='Febrero';
if($f[1]==3)$f[1]='Marzo';
if($f[1]==4)$f[1]='Abril';
if($f[1]==5)$f[1]='Mayo';
if($f[1]==6)$f[1]='Junio';
if($f[1]==7)$f[1]='Julio';
if($f[1]==8)$f[1]='Agosto';
if($f[1]==9)$f[1]='Septiembre';
if($f[1]==10)$f[1]='Octubre';
if($f[1]==11)$f[1]='Noviembre';
if($f[1]==12)$f[1]='Diciembre';
require_once($root.'/lib/tcpdf/config/lang/eng.php');
require_once($root.'/lib/tcpdf/tcpdf.php');
require_once($root.'/lib/tcpdf/tcpdf_barcodes.php');
require_once($root.'/lib/num_letras.php');
//--------------------------------------------------------------------------
class MYPDF extends TCPDF {
//Page header
public function Header() {
// Logo
//echo str_replace('$root_js',$root_js,$CONFIG['CABECERA_FORMATOS_HTML']);
$image_file = K_PATH_IMAGES.'logo_alcaldia.jpg';
$htm='';
$htm2='
 |
';
$npag=$this->getAliasNbPages();
$this->writeHTMLCell($w = 0, $h = 0, $x = '', $y = '', $htm, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = 'top', $autopadding = true);
}
// Page footer
public function Footer() {
// Position at 15 mm from bottom
$this->SetY(-15);
// Set font
$this->SetFont('helvetica', 'I', 8);
// Page number
$this->Cell(0, 10, '', 0, false, 'C', 0, '', 0, false, 'T', 'M');
}
}
//--------------------------------------------------------------------------
// create new PDF document
$pdf = new MYPDF('p', 'mm', 'letter', true, 'UTF-8', false);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('Siti');
$pdf->SetTitle('GENERACIÓN DE PIN');
$pdf->SetSubject('Certificado');
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
// set default header data
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
// set header and footer fonts
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
// set margins
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
// set auto page breaks
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
$pdf->setLanguageArray($l);
// ---------------------------------------------------------
// NOTE: 2D barcode algorithms must be implemented on 2dbarcode.php class file.
// set font
$pdf->SetFont('helvetica', '', 10);
// add a page
$pdf->AddPage();
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
$fils=4;
$cols=3;
$logo_empresa=$CONFIG['LOGO_EMPRESA'];
$codigo=$root_js.'build/view/common/marco/index.php?particular=001&accion=I&proc='.$CONFIG['PROCESO_STICKER'];
$izq=10+2;$der=10;$arr=10; $abj=10;
$sxp=$fils*$cols;
$tot=$rangoF-$rangoI+1;
$pags=ceil(($tot)/$sxp);
$anchoR=216-$izq-$der;
$altoR=279-$arr-$abj;
$anchoS=$anchoR/$cols;
$margenSV=4;
$margenSH=5;
$altoS=$altoR/$fils;
$altoImg=10;
$altoText=8;
$altoC=50;
// set style for barcode
$style = array(
'border' => 2,
'vpadding' => 'auto',
'hpadding' => 'auto',
'fgcolor' => array(0,0,0),
'bgcolor' => false, //array(255,255,255)
'module_width' => 1, // width of a single module in points
'module_height' => 1 // height of a single module in points
);
$pdf->SetFont('helvetica', '', 9, '', false);
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
$s=0;$p=1;$consc=$rangoI;
$y=$arr;
$x=$izq;
// create some HTML content
ob_start();
$mes=date("F");
if ($mes=="January") $mes="Enero";
if ($mes=="February") $mes="Febrero";
if ($mes=="March") $mes="Marzo";
if ($mes=="April") $mes="Abril";
if ($mes=="May") $mes="Mayo";
if ($mes=="June") $mes="Junio";
if ($mes=="July") $mes="Julio";
if ($mes=="August") $mes="Agosto";
if ($mes=="September") $mes="Setiembre";
if ($mes=="October") $mes="Octubre";
if ($mes=="November") $mes="Noviembre";
if ($mes=="December") $mes="Diciembre";
$anio=date("Y");
$npag=$pdf->getAliasNbPages();
$lpag=convertir_a_letras($npag);
if($npag==1&&$lpag=='uno')$lpag='un';
for($i=0;$i<2;$i++){
?>
Gobernación del Departemento de Nariño
|
PIN generado para certificado de representación legal de asociaciones y ligas deportivas
|
Número de documento: |
echo $ced;?> |
Nombre: |
echo strtoupper($nom);?> |
Número de caso |
echo $caso->id;?> |
Código de barras
$barcodeobj = new TCPDFBarcode('0000050', 'C128');
echo $barcodeobj->getBarcodeHTML(2, 30, 'black');
?> |
}
$html=ob_get_clean();
// output the HTML content
$pdf->writeHTML($html, true, false,false,false);
// reset pointer to the last page
$pdf->lastPage();
//---
//$pdf->AddPage();
ob_start();
$html=ob_get_clean();
// output the HTML content
$pdf->writeHTML($html, true, false,false,false);
// reset pointer to the last page
$pdf->lastPage();
//----
$nomdoc=md5(time()).'.pdf';
$pdf->Output($root."/tmp/".$nomdoc, 'F');
$url=$root_js.'tmp/'.$nomdoc;
TWFSV_81:999888
TWFSV_80:siti 3
TWFSV_79:German
TWFSV_78:1212323443
TWFSV_77:callae 123
Retorno :
Array
(
[ret] => inicioComponente_WF_DocSalida({"id":"1124","caso_id":"202","proceso_id":79,"tit":"Generacion pin","tarea_id":243,"paso_id":402,"desc":null,"url":"De clic aqui para descargar el archivo<\/a><\/div>"});
[suc] => 1
)
fin 2015-05-29 08:40:06
/******************************************************************************************************/
2015-05-29 08:42:04TraerCaso(202,79,)
CargarCaso :202
2015-05 29 08:42:04
CargarDatos: Caso :202
cargar datos de ejecucion de los ultimos pasos
select p.*,b.wf_tarea_id as tarea_id,
u.apellido||' '||u.nombre|| ': '||u.cargo as usr_ejec
from
(select max(id) as id, wf_caso_79_seguimiento_id,wf_paso_id from wf_caso_79_pasos a1 group by wf_caso_79_seguimiento_id,wf_paso_id order by id
)a
inner join wf_caso_79_pasos p using(id,wf_caso_79_seguimiento_id)
inner join ( select max(id) as wf_caso_79_seguimiento_id,wf_caso_79_id,wf_tarea_id from wf_caso_79_seguimiento where wf_caso_79_id =? group by wf_caso_79_id,wf_tarea_id order by wf_caso_79_id,wf_caso_79_seguimiento_id ) b using(wf_caso_79_seguimiento_id)
left join usuarios u using(core_usuario_id)
{"0":"454","id":"454","1":"288","wf_paso_id":"288","2":"367","wf_caso_79_seguimiento_id":"367","3":"91","core_usuario_id":"91","4":"2015-05-29 08:21:07","fecha_ejec":"2015-05-29 08:21:07","5":"143","dato":"143","6":"sce.t93","tabla":"sce.t93","7":"158","tarea_id":"158","8":"siti 3 German: ciudadano, cargo, Gerente","usr_ejec":"siti 3 German: ciudadano, cargo, Gerente"}
CargarDatos_288(143)
se carga 79_158_288_93_110_87044
se carga 79_158_288_93_110_7401
se carga 79_158_288_93_110_7311
se carga 79_158_288_93_110_730ddfds
{"0":"455","id":"455","1":"289","wf_paso_id":"289","2":"367","wf_caso_79_seguimiento_id":"367","3":"91","core_usuario_id":"91","4":"2015-05-29 08:21:10","fecha_ejec":"2015-05-29 08:21:10","5":null,"dato":null,"6":null,"tabla":null,"7":"158","tarea_id":"158","8":"siti 3 German: ciudadano, cargo, Gerente","usr_ejec":"siti 3 German: ciudadano, cargo, Gerente"}
CargarDatos_289()
cargar datos de ejecucion de las tareas (las ultimas si el proceso tiene ciclos)
select a.*, u.apellido||' '||u.nombre|| ': '||u.cargo as usr_asig , ur.apellido||' '||ur.nombre|| ': '||ur.cargo as usr_resol from
wf_caso_79_seguimiento a
inner join (
select max(b0.id) as id,b0.wf_caso_79_id,b0.wf_tarea_id from wf_caso_79_seguimiento b0 where b0.wf_caso_79_id =? group by b0.wf_caso_79_id,b0.wf_tarea_id order by wf_caso_79_id,id
) b using(id)
left join usuarios u using(core_usuario_id)
left join usuarios ur on ur.core_usuario_id=core_usuario_id_resol
{"0":"367","id":"367","1":"202","wf_caso_79_id":"202","2":"158","wf_tarea_id":"158","3":null,"core_usuario_id":null,"4":"2015-05-29 08:20:56","fec_asig":"2015-05-29 08:20:56","5":"91","core_usuario_id_resol":"91","6":"2015-05-29 08:21:10","fec_resol":"2015-05-29 08:21:10","7":"158","wf_tarea_id_sig":"158","8":null,"usr_asig":null,"9":"siti 3 German: ciudadano, cargo, Gerente","usr_resol":"siti 3 German: ciudadano, cargo, Gerente"}
{"0":"368","id":"368","1":"202","wf_caso_79_id":"202","2":"243","wf_tarea_id":"243","3":"91","core_usuario_id":"91","4":"2015-05-29 08:21:10","fec_asig":"2015-05-29 08:21:10","5":null,"core_usuario_id_resol":null,"6":null,"fec_resol":null,"7":"243","wf_tarea_id_sig":"243","8":"siti 3 German: ciudadano, cargo, Gerente","usr_asig":"siti 3 German: ciudadano, cargo, Gerente","9":null,"usr_resol":null}
2015-05 29 08:42:04
cargar datos del sujeto(,,s,79,202)
select s.*, m.nombre as nom_muni, c.nom_cat,fec_caso
from wf_caso_79 w
inner join core_sujetoverificacion s on w.id=202 AND s.id =w.core_sujetoverificacion_id
inner join plan_municipio m on s.plan_municipio_id=m.id
inner join core_sujetocategoria c on s.core_sujetocategoria_id=c.id
2015-05 29 08:42:04
tabla dat adic
select tabla from core_sujetoverificaciontipo where id=1
2015-05 29 08:42:04
tabla :persona
SELECT * FROM persona where id=20107
2015-05 29 08:42:04
Continuar(,243,,s)
EjecutarTarea_243() Generacion pin id_comp1124
91 91
ValidarUsuario(243):1
EjecutarPaso_402: docs:75 , caso=202 id_comp 1124
Mostrar docs
$tit_formato='GENERACIÓN DE PIN ';
$n= ' WFSV_79 '; $a= ' WFSV_80 ';
$nom=$n.$a;
$dir= ' WFSV_77 ';
$tel= ' WFSV_78 ';
$ced=' WFSV_81 ';
$fecha=date('Y-m-d');
$f=split('-',$fecha);
if($f[1]==1)$f[1]='Enero';
if($f[1]==2)$f[1]='Febrero';
if($f[1]==3)$f[1]='Marzo';
if($f[1]==4)$f[1]='Abril';
if($f[1]==5)$f[1]='Mayo';
if($f[1]==6)$f[1]='Junio';
if($f[1]==7)$f[1]='Julio';
if($f[1]==8)$f[1]='Agosto';
if($f[1]==9)$f[1]='Septiembre';
if($f[1]==10)$f[1]='Octubre';
if($f[1]==11)$f[1]='Noviembre';
if($f[1]==12)$f[1]='Diciembre';
require_once($root.'/lib/tcpdf/config/lang/eng.php');
require_once($root.'/lib/tcpdf/tcpdf.php');
require_once($root.'/lib/tcpdf/tcpdf_barcodes.php');
require_once($root.'/lib/num_letras.php');
//--------------------------------------------------------------------------
class MYPDF extends TCPDF {
//Page header
public function Header() {
// Logo
//echo str_replace('$root_js',$root_js,$CONFIG['CABECERA_FORMATOS_HTML']);
$image_file = K_PATH_IMAGES.'logo_alcaldia.jpg';
$htm='';
$htm2='
 |
';
$npag=$this->getAliasNbPages();
$this->writeHTMLCell($w = 0, $h = 0, $x = '', $y = '', $htm, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = 'top', $autopadding = true);
}
// Page footer
public function Footer() {
// Position at 15 mm from bottom
$this->SetY(-15);
// Set font
$this->SetFont('helvetica', 'I', 8);
// Page number
$this->Cell(0, 10, '', 0, false, 'C', 0, '', 0, false, 'T', 'M');
}
}
//--------------------------------------------------------------------------
// create new PDF document
$pdf = new MYPDF('p', 'mm', 'letter', true, 'UTF-8', false);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('Siti');
$pdf->SetTitle('GENERACIÓN DE PIN');
$pdf->SetSubject('Certificado');
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
// set default header data
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
// set header and footer fonts
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
// set margins
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
// set auto page breaks
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
$pdf->setLanguageArray($l);
// ---------------------------------------------------------
// NOTE: 2D barcode algorithms must be implemented on 2dbarcode.php class file.
// set font
$pdf->SetFont('helvetica', '', 10);
// add a page
$pdf->AddPage();
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
$fils=4;
$cols=3;
$logo_empresa=$CONFIG['LOGO_EMPRESA'];
$codigo=$root_js.'build/view/common/marco/index.php?particular=001&accion=I&proc='.$CONFIG['PROCESO_STICKER'];
$izq=10+2;$der=10;$arr=10; $abj=10;
$sxp=$fils*$cols;
$tot=$rangoF-$rangoI+1;
$pags=ceil(($tot)/$sxp);
$anchoR=216-$izq-$der;
$altoR=279-$arr-$abj;
$anchoS=$anchoR/$cols;
$margenSV=4;
$margenSH=5;
$altoS=$altoR/$fils;
$altoImg=10;
$altoText=8;
$altoC=50;
// set style for barcode
$style = array(
'border' => 2,
'vpadding' => 'auto',
'hpadding' => 'auto',
'fgcolor' => array(0,0,0),
'bgcolor' => false, //array(255,255,255)
'module_width' => 1, // width of a single module in points
'module_height' => 1 // height of a single module in points
);
$pdf->SetFont('helvetica', '', 9, '', false);
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
$s=0;$p=1;$consc=$rangoI;
$y=$arr;
$x=$izq;
// create some HTML content
ob_start();
$mes=date("F");
if ($mes=="January") $mes="Enero";
if ($mes=="February") $mes="Febrero";
if ($mes=="March") $mes="Marzo";
if ($mes=="April") $mes="Abril";
if ($mes=="May") $mes="Mayo";
if ($mes=="June") $mes="Junio";
if ($mes=="July") $mes="Julio";
if ($mes=="August") $mes="Agosto";
if ($mes=="September") $mes="Setiembre";
if ($mes=="October") $mes="Octubre";
if ($mes=="November") $mes="Noviembre";
if ($mes=="December") $mes="Diciembre";
$anio=date("Y");
$npag=$pdf->getAliasNbPages();
$lpag=convertir_a_letras($npag);
if($npag==1&&$lpag=='uno')$lpag='un';
for($i=0;$i<2;$i++){
?>
Gobernación del Departemento de Nariño
|
PIN generado para certificado de representación legal de asociaciones y ligas deportivas
|
Número de documento: |
echo $ced;?> |
Nombre: |
echo strtoupper($nom);?> |
Número de caso |
echo $id_caso;?> |
Código de barras
$barcodeobj = new TCPDFBarcode('0000050', 'C128');
echo $barcodeobj->getBarcodeHTML(2, 30, 'black');
?> |
}
$html=ob_get_clean();
// output the HTML content
$pdf->writeHTML($html, true, false,false,false);
// reset pointer to the last page
$pdf->lastPage();
//---
//$pdf->AddPage();
ob_start();
$html=ob_get_clean();
// output the HTML content
$pdf->writeHTML($html, true, false,false,false);
// reset pointer to the last page
$pdf->lastPage();
//----
$nomdoc=md5(time()).'.pdf';
$pdf->Output($root."/tmp/".$nomdoc, 'F');
$url=$root_js.'tmp/'.$nomdoc;
TWFSV_81:999888
TWFSV_80:siti 3
TWFSV_79:German
TWFSV_78:1212323443
TWFSV_77:callae 123
Retorno :
Array
(
[ret] => inicioComponente_WF_DocSalida({"id":"1124","caso_id":"202","proceso_id":79,"tit":"Generacion pin","tarea_id":243,"paso_id":402,"desc":null,"url":"De clic aqui para descargar el archivo<\/a><\/div>"});
[suc] => 1
)
fin 2015-05-29 08:42:04
/******************************************************************************************************/
2015-05-29 08:43:08TraerCaso(202,79,)
CargarCaso :202
2015-05 29 08:43:08
CargarDatos: Caso :202
cargar datos de ejecucion de los ultimos pasos
select p.*,b.wf_tarea_id as tarea_id,
u.apellido||' '||u.nombre|| ': '||u.cargo as usr_ejec
from
(select max(id) as id, wf_caso_79_seguimiento_id,wf_paso_id from wf_caso_79_pasos a1 group by wf_caso_79_seguimiento_id,wf_paso_id order by id
)a
inner join wf_caso_79_pasos p using(id,wf_caso_79_seguimiento_id)
inner join ( select max(id) as wf_caso_79_seguimiento_id,wf_caso_79_id,wf_tarea_id from wf_caso_79_seguimiento where wf_caso_79_id =? group by wf_caso_79_id,wf_tarea_id order by wf_caso_79_id,wf_caso_79_seguimiento_id ) b using(wf_caso_79_seguimiento_id)
left join usuarios u using(core_usuario_id)
{"0":"454","id":"454","1":"288","wf_paso_id":"288","2":"367","wf_caso_79_seguimiento_id":"367","3":"91","core_usuario_id":"91","4":"2015-05-29 08:21:07","fecha_ejec":"2015-05-29 08:21:07","5":"143","dato":"143","6":"sce.t93","tabla":"sce.t93","7":"158","tarea_id":"158","8":"siti 3 German: ciudadano, cargo, Gerente","usr_ejec":"siti 3 German: ciudadano, cargo, Gerente"}
CargarDatos_288(143)
se carga 79_158_288_93_110_87044
se carga 79_158_288_93_110_7401
se carga 79_158_288_93_110_7311
se carga 79_158_288_93_110_730ddfds
{"0":"455","id":"455","1":"289","wf_paso_id":"289","2":"367","wf_caso_79_seguimiento_id":"367","3":"91","core_usuario_id":"91","4":"2015-05-29 08:21:10","fecha_ejec":"2015-05-29 08:21:10","5":null,"dato":null,"6":null,"tabla":null,"7":"158","tarea_id":"158","8":"siti 3 German: ciudadano, cargo, Gerente","usr_ejec":"siti 3 German: ciudadano, cargo, Gerente"}
CargarDatos_289()
cargar datos de ejecucion de las tareas (las ultimas si el proceso tiene ciclos)
select a.*, u.apellido||' '||u.nombre|| ': '||u.cargo as usr_asig , ur.apellido||' '||ur.nombre|| ': '||ur.cargo as usr_resol from
wf_caso_79_seguimiento a
inner join (
select max(b0.id) as id,b0.wf_caso_79_id,b0.wf_tarea_id from wf_caso_79_seguimiento b0 where b0.wf_caso_79_id =? group by b0.wf_caso_79_id,b0.wf_tarea_id order by wf_caso_79_id,id
) b using(id)
left join usuarios u using(core_usuario_id)
left join usuarios ur on ur.core_usuario_id=core_usuario_id_resol
{"0":"367","id":"367","1":"202","wf_caso_79_id":"202","2":"158","wf_tarea_id":"158","3":null,"core_usuario_id":null,"4":"2015-05-29 08:20:56","fec_asig":"2015-05-29 08:20:56","5":"91","core_usuario_id_resol":"91","6":"2015-05-29 08:21:10","fec_resol":"2015-05-29 08:21:10","7":"158","wf_tarea_id_sig":"158","8":null,"usr_asig":null,"9":"siti 3 German: ciudadano, cargo, Gerente","usr_resol":"siti 3 German: ciudadano, cargo, Gerente"}
{"0":"368","id":"368","1":"202","wf_caso_79_id":"202","2":"243","wf_tarea_id":"243","3":"91","core_usuario_id":"91","4":"2015-05-29 08:21:10","fec_asig":"2015-05-29 08:21:10","5":null,"core_usuario_id_resol":null,"6":null,"fec_resol":null,"7":"243","wf_tarea_id_sig":"243","8":"siti 3 German: ciudadano, cargo, Gerente","usr_asig":"siti 3 German: ciudadano, cargo, Gerente","9":null,"usr_resol":null}
2015-05 29 08:43:08
cargar datos del sujeto(,,s,79,202)
select s.*, m.nombre as nom_muni, c.nom_cat,fec_caso
from wf_caso_79 w
inner join core_sujetoverificacion s on w.id=202 AND s.id =w.core_sujetoverificacion_id
inner join plan_municipio m on s.plan_municipio_id=m.id
inner join core_sujetocategoria c on s.core_sujetocategoria_id=c.id
2015-05 29 08:43:08
tabla dat adic
select tabla from core_sujetoverificaciontipo where id=1
2015-05 29 08:43:08
tabla :persona
SELECT * FROM persona where id=20107
2015-05 29 08:43:08
Continuar(,243,,s)
EjecutarTarea_243() Generacion pin id_comp1124
91 91
ValidarUsuario(243):1
EjecutarPaso_402: docs:75 , caso=202 id_comp 1124
Mostrar docs
$tit_formato='GENERACIÓN DE PIN ';
$n= ' WFSV_79 '; $a= ' WFSV_80 ';
$nom=$n.$a;
$dir= ' WFSV_77 ';
$tel= ' WFSV_78 ';
$ced=' WFSV_81 ';
$fecha=date('Y-m-d');
$f=split('-',$fecha);
if($f[1]==1)$f[1]='Enero';
if($f[1]==2)$f[1]='Febrero';
if($f[1]==3)$f[1]='Marzo';
if($f[1]==4)$f[1]='Abril';
if($f[1]==5)$f[1]='Mayo';
if($f[1]==6)$f[1]='Junio';
if($f[1]==7)$f[1]='Julio';
if($f[1]==8)$f[1]='Agosto';
if($f[1]==9)$f[1]='Septiembre';
if($f[1]==10)$f[1]='Octubre';
if($f[1]==11)$f[1]='Noviembre';
if($f[1]==12)$f[1]='Diciembre';
require_once($root.'/lib/tcpdf/config/lang/eng.php');
require_once($root.'/lib/tcpdf/tcpdf.php');
require_once($root.'/lib/tcpdf/tcpdf_barcodes.php');
require_once($root.'/lib/num_letras.php');
//--------------------------------------------------------------------------
class MYPDF extends TCPDF {
//Page header
public function Header() {
// Logo
//echo str_replace('$root_js',$root_js,$CONFIG['CABECERA_FORMATOS_HTML']);
$image_file = K_PATH_IMAGES.'logo_alcaldia.jpg';
$htm='';
$htm2='
 |
';
$npag=$this->getAliasNbPages();
$this->writeHTMLCell($w = 0, $h = 0, $x = '', $y = '', $htm, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = 'top', $autopadding = true);
}
// Page footer
public function Footer() {
// Position at 15 mm from bottom
$this->SetY(-15);
// Set font
$this->SetFont('helvetica', 'I', 8);
// Page number
$this->Cell(0, 10, '', 0, false, 'C', 0, '', 0, false, 'T', 'M');
}
}
//--------------------------------------------------------------------------
// create new PDF document
$pdf = new MYPDF('p', 'mm', 'letter', true, 'UTF-8', false);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('Siti');
$pdf->SetTitle('GENERACIÓN DE PIN');
$pdf->SetSubject('Certificado');
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
// set default header data
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
// set header and footer fonts
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
// set margins
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
// set auto page breaks
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
$pdf->setLanguageArray($l);
// ---------------------------------------------------------
// NOTE: 2D barcode algorithms must be implemented on 2dbarcode.php class file.
// set font
$pdf->SetFont('helvetica', '', 10);
// add a page
$pdf->AddPage();
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
$fils=4;
$cols=3;
$logo_empresa=$CONFIG['LOGO_EMPRESA'];
$codigo=$root_js.'build/view/common/marco/index.php?particular=001&accion=I&proc='.$CONFIG['PROCESO_STICKER'];
$izq=10+2;$der=10;$arr=10; $abj=10;
$sxp=$fils*$cols;
$tot=$rangoF-$rangoI+1;
$pags=ceil(($tot)/$sxp);
$anchoR=216-$izq-$der;
$altoR=279-$arr-$abj;
$anchoS=$anchoR/$cols;
$margenSV=4;
$margenSH=5;
$altoS=$altoR/$fils;
$altoImg=10;
$altoText=8;
$altoC=50;
// set style for barcode
$style = array(
'border' => 2,
'vpadding' => 'auto',
'hpadding' => 'auto',
'fgcolor' => array(0,0,0),
'bgcolor' => false, //array(255,255,255)
'module_width' => 1, // width of a single module in points
'module_height' => 1 // height of a single module in points
);
$pdf->SetFont('helvetica', '', 9, '', false);
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
$s=0;$p=1;$consc=$rangoI;
$y=$arr;
$x=$izq;
// create some HTML content
ob_start();
$mes=date("F");
if ($mes=="January") $mes="Enero";
if ($mes=="February") $mes="Febrero";
if ($mes=="March") $mes="Marzo";
if ($mes=="April") $mes="Abril";
if ($mes=="May") $mes="Mayo";
if ($mes=="June") $mes="Junio";
if ($mes=="July") $mes="Julio";
if ($mes=="August") $mes="Agosto";
if ($mes=="September") $mes="Setiembre";
if ($mes=="October") $mes="Octubre";
if ($mes=="November") $mes="Noviembre";
if ($mes=="December") $mes="Diciembre";
$anio=date("Y");
$npag=$pdf->getAliasNbPages();
$lpag=convertir_a_letras($npag);
if($npag==1&&$lpag=='uno')$lpag='un';
for($i=0;$i<2;$i++){
?>
Gobernación del Departemento de Nariño
|
PIN generado para certificado de representación legal de asociaciones y ligas deportivas
|
Número de documento: |
echo $ced;?> |
Nombre: |
echo strtoupper($nom);?> |
Número de caso |
echo $id_caso;?> |
Código de barras
$barcodeobj = new TCPDFBarcode("'".$id_caso."'", 'C128');
echo $barcodeobj->getBarcodeHTML(2, 30, 'black');
?> |
}
$html=ob_get_clean();
// output the HTML content
$pdf->writeHTML($html, true, false,false,false);
// reset pointer to the last page
$pdf->lastPage();
//---
//$pdf->AddPage();
ob_start();
$html=ob_get_clean();
// output the HTML content
$pdf->writeHTML($html, true, false,false,false);
// reset pointer to the last page
$pdf->lastPage();
//----
$nomdoc=md5(time()).'.pdf';
$pdf->Output($root."/tmp/".$nomdoc, 'F');
$url=$root_js.'tmp/'.$nomdoc;
TWFSV_81:999888
TWFSV_80:siti 3
TWFSV_79:German
TWFSV_78:1212323443
TWFSV_77:callae 123
Retorno :
Array
(
[ret] => inicioComponente_WF_DocSalida({"id":"1124","caso_id":"202","proceso_id":79,"tit":"Generacion pin","tarea_id":243,"paso_id":402,"desc":null,"url":"De clic aqui para descargar el archivo<\/a><\/div>"});
[suc] => 1
)
fin 2015-05-29 08:43:09
/******************************************************************************************************/
2015-05-29 08:46:26TraerCaso(202,79,)
CargarCaso :202
2015-05 29 08:46:26
CargarDatos: Caso :202
cargar datos de ejecucion de los ultimos pasos
select p.*,b.wf_tarea_id as tarea_id,
u.apellido||' '||u.nombre|| ': '||u.cargo as usr_ejec
from
(select max(id) as id, wf_caso_79_seguimiento_id,wf_paso_id from wf_caso_79_pasos a1 group by wf_caso_79_seguimiento_id,wf_paso_id order by id
)a
inner join wf_caso_79_pasos p using(id,wf_caso_79_seguimiento_id)
inner join ( select max(id) as wf_caso_79_seguimiento_id,wf_caso_79_id,wf_tarea_id from wf_caso_79_seguimiento where wf_caso_79_id =? group by wf_caso_79_id,wf_tarea_id order by wf_caso_79_id,wf_caso_79_seguimiento_id ) b using(wf_caso_79_seguimiento_id)
left join usuarios u using(core_usuario_id)
{"0":"454","id":"454","1":"288","wf_paso_id":"288","2":"367","wf_caso_79_seguimiento_id":"367","3":"91","core_usuario_id":"91","4":"2015-05-29 08:21:07","fecha_ejec":"2015-05-29 08:21:07","5":"143","dato":"143","6":"sce.t93","tabla":"sce.t93","7":"158","tarea_id":"158","8":"siti 3 German: ciudadano, cargo, Gerente","usr_ejec":"siti 3 German: ciudadano, cargo, Gerente"}
CargarDatos_288(143)
se carga 79_158_288_93_110_87044
se carga 79_158_288_93_110_7401
se carga 79_158_288_93_110_7311
se carga 79_158_288_93_110_730ddfds
{"0":"455","id":"455","1":"289","wf_paso_id":"289","2":"367","wf_caso_79_seguimiento_id":"367","3":"91","core_usuario_id":"91","4":"2015-05-29 08:21:10","fecha_ejec":"2015-05-29 08:21:10","5":null,"dato":null,"6":null,"tabla":null,"7":"158","tarea_id":"158","8":"siti 3 German: ciudadano, cargo, Gerente","usr_ejec":"siti 3 German: ciudadano, cargo, Gerente"}
CargarDatos_289()
cargar datos de ejecucion de las tareas (las ultimas si el proceso tiene ciclos)
select a.*, u.apellido||' '||u.nombre|| ': '||u.cargo as usr_asig , ur.apellido||' '||ur.nombre|| ': '||ur.cargo as usr_resol from
wf_caso_79_seguimiento a
inner join (
select max(b0.id) as id,b0.wf_caso_79_id,b0.wf_tarea_id from wf_caso_79_seguimiento b0 where b0.wf_caso_79_id =? group by b0.wf_caso_79_id,b0.wf_tarea_id order by wf_caso_79_id,id
) b using(id)
left join usuarios u using(core_usuario_id)
left join usuarios ur on ur.core_usuario_id=core_usuario_id_resol
{"0":"367","id":"367","1":"202","wf_caso_79_id":"202","2":"158","wf_tarea_id":"158","3":null,"core_usuario_id":null,"4":"2015-05-29 08:20:56","fec_asig":"2015-05-29 08:20:56","5":"91","core_usuario_id_resol":"91","6":"2015-05-29 08:21:10","fec_resol":"2015-05-29 08:21:10","7":"158","wf_tarea_id_sig":"158","8":null,"usr_asig":null,"9":"siti 3 German: ciudadano, cargo, Gerente","usr_resol":"siti 3 German: ciudadano, cargo, Gerente"}
{"0":"368","id":"368","1":"202","wf_caso_79_id":"202","2":"243","wf_tarea_id":"243","3":"91","core_usuario_id":"91","4":"2015-05-29 08:21:10","fec_asig":"2015-05-29 08:21:10","5":null,"core_usuario_id_resol":null,"6":null,"fec_resol":null,"7":"243","wf_tarea_id_sig":"243","8":"siti 3 German: ciudadano, cargo, Gerente","usr_asig":"siti 3 German: ciudadano, cargo, Gerente","9":null,"usr_resol":null}
2015-05 29 08:46:26
cargar datos del sujeto(,,s,79,202)
select s.*, m.nombre as nom_muni, c.nom_cat,fec_caso
from wf_caso_79 w
inner join core_sujetoverificacion s on w.id=202 AND s.id =w.core_sujetoverificacion_id
inner join plan_municipio m on s.plan_municipio_id=m.id
inner join core_sujetocategoria c on s.core_sujetocategoria_id=c.id
2015-05 29 08:46:26
tabla dat adic
select tabla from core_sujetoverificaciontipo where id=1
2015-05 29 08:46:26
tabla :persona
SELECT * FROM persona where id=20107
2015-05 29 08:46:26
Continuar(,243,,s)
EjecutarTarea_243() Generacion pin id_comp1124
91 91
ValidarUsuario(243):1
EjecutarPaso_402: docs:75 , caso=202 id_comp 1124
Mostrar docs
$tit_formato='GENERACIÓN DE PIN ';
$n= ' WFSV_79 '; $a= ' WFSV_80 ';
$nom=$n.$a;
$dir= ' WFSV_77 ';
$tel= ' WFSV_78 ';
$ced=' WFSV_81 ';
$fecha=date('Y-m-d');
$f=split('-',$fecha);
if($f[1]==1)$f[1]='Enero';
if($f[1]==2)$f[1]='Febrero';
if($f[1]==3)$f[1]='Marzo';
if($f[1]==4)$f[1]='Abril';
if($f[1]==5)$f[1]='Mayo';
if($f[1]==6)$f[1]='Junio';
if($f[1]==7)$f[1]='Julio';
if($f[1]==8)$f[1]='Agosto';
if($f[1]==9)$f[1]='Septiembre';
if($f[1]==10)$f[1]='Octubre';
if($f[1]==11)$f[1]='Noviembre';
if($f[1]==12)$f[1]='Diciembre';
require_once($root.'/lib/tcpdf/config/lang/eng.php');
require_once($root.'/lib/tcpdf/tcpdf.php');
require_once($root.'/lib/tcpdf/tcpdf_barcodes.php');
require_once($root.'/lib/num_letras.php');
//--------------------------------------------------------------------------
class MYPDF extends TCPDF {
//Page header
public function Header() {
// Logo
//echo str_replace('$root_js',$root_js,$CONFIG['CABECERA_FORMATOS_HTML']);
$image_file = K_PATH_IMAGES.'logo_alcaldia.jpg';
$htm='';
$htm2='
 |
';
$npag=$this->getAliasNbPages();
$this->writeHTMLCell($w = 0, $h = 0, $x = '', $y = '', $htm, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = 'top', $autopadding = true);
}
// Page footer
public function Footer() {
// Position at 15 mm from bottom
$this->SetY(-15);
// Set font
$this->SetFont('helvetica', 'I', 8);
// Page number
$this->Cell(0, 10, '', 0, false, 'C', 0, '', 0, false, 'T', 'M');
}
}
//--------------------------------------------------------------------------
// create new PDF document
$pdf = new MYPDF('p', 'mm', 'letter', true, 'UTF-8', false);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('Siti');
$pdf->SetTitle('GENERACIÓN DE PIN');
$pdf->SetSubject('Certificado');
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
// set default header data
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
// set header and footer fonts
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
// set margins
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
// set auto page breaks
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
$pdf->setLanguageArray($l);
// ---------------------------------------------------------
// NOTE: 2D barcode algorithms must be implemented on 2dbarcode.php class file.
// set font
$pdf->SetFont('helvetica', '', 10);
// add a page
$pdf->AddPage();
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
$fils=4;
$cols=3;
$logo_empresa=$CONFIG['LOGO_EMPRESA'];
$codigo=$root_js.'build/view/common/marco/index.php?particular=001&accion=I&proc='.$CONFIG['PROCESO_STICKER'];
$izq=10+2;$der=10;$arr=10; $abj=10;
$sxp=$fils*$cols;
$tot=$rangoF-$rangoI+1;
$pags=ceil(($tot)/$sxp);
$anchoR=216-$izq-$der;
$altoR=279-$arr-$abj;
$anchoS=$anchoR/$cols;
$margenSV=4;
$margenSH=5;
$altoS=$altoR/$fils;
$altoImg=10;
$altoText=8;
$altoC=50;
// set style for barcode
$style = array(
'border' => 2,
'vpadding' => 'auto',
'hpadding' => 'auto',
'fgcolor' => array(0,0,0),
'bgcolor' => false, //array(255,255,255)
'module_width' => 1, // width of a single module in points
'module_height' => 1 // height of a single module in points
);
$pdf->SetFont('helvetica', '', 9, '', false);
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
$s=0;$p=1;$consc=$rangoI;
$y=$arr;
$x=$izq;
// create some HTML content
ob_start();
$mes=date("F");
if ($mes=="January") $mes="Enero";
if ($mes=="February") $mes="Febrero";
if ($mes=="March") $mes="Marzo";
if ($mes=="April") $mes="Abril";
if ($mes=="May") $mes="Mayo";
if ($mes=="June") $mes="Junio";
if ($mes=="July") $mes="Julio";
if ($mes=="August") $mes="Agosto";
if ($mes=="September") $mes="Setiembre";
if ($mes=="October") $mes="Octubre";
if ($mes=="November") $mes="Noviembre";
if ($mes=="December") $mes="Diciembre";
$anio=date("Y");
$npag=$pdf->getAliasNbPages();
$lpag=convertir_a_letras($npag);
if($npag==1&&$lpag=='uno')$lpag='un';
for($i=0;$i<2;$i++){
?>
Gobernación del Departemento de Nariño
|
PIN generado para certificado de representación legal de asociaciones y ligas deportivas
|
Número de documento: |
echo $ced;?> |
Nombre: |
echo strtoupper($nom);?> |
Número de caso |
echo $id_caso;?> |
Código de barras
$barcodeobj = new TCPDFBarcode($id_caso, 'C128');
echo "".$barcodeobj->getBarcodeHTML(2, 30, 'black')." ";
?> |
}
$html=ob_get_clean();
// output the HTML content
$pdf->writeHTML($html, true, false,false,false);
// reset pointer to the last page
$pdf->lastPage();
//---
//$pdf->AddPage();
ob_start();
$html=ob_get_clean();
// output the HTML content
$pdf->writeHTML($html, true, false,false,false);
// reset pointer to the last page
$pdf->lastPage();
//----
$nomdoc=md5(time()).'.pdf';
$pdf->Output($root."/tmp/".$nomdoc, 'F');
$url=$root_js.'tmp/'.$nomdoc;
TWFSV_81:999888
TWFSV_80:siti 3
TWFSV_79:German
TWFSV_78:1212323443
TWFSV_77:callae 123
Retorno :
Array
(
[ret] => inicioComponente_WF_DocSalida({"id":"1124","caso_id":"202","proceso_id":79,"tit":"Generacion pin","tarea_id":243,"paso_id":402,"desc":null,"url":"De clic aqui para descargar el archivo<\/a><\/div>"});
[suc] => 1
)
fin 2015-05-29 08:46:27
/******************************************************************************************************/
2015-05-29 08:48:59TraerCaso(202,79,)
CargarCaso :202
2015-05 29 08:48:59
CargarDatos: Caso :202
cargar datos de ejecucion de los ultimos pasos
select p.*,b.wf_tarea_id as tarea_id,
u.apellido||' '||u.nombre|| ': '||u.cargo as usr_ejec
from
(select max(id) as id, wf_caso_79_seguimiento_id,wf_paso_id from wf_caso_79_pasos a1 group by wf_caso_79_seguimiento_id,wf_paso_id order by id
)a
inner join wf_caso_79_pasos p using(id,wf_caso_79_seguimiento_id)
inner join ( select max(id) as wf_caso_79_seguimiento_id,wf_caso_79_id,wf_tarea_id from wf_caso_79_seguimiento where wf_caso_79_id =? group by wf_caso_79_id,wf_tarea_id order by wf_caso_79_id,wf_caso_79_seguimiento_id ) b using(wf_caso_79_seguimiento_id)
left join usuarios u using(core_usuario_id)
{"0":"454","id":"454","1":"288","wf_paso_id":"288","2":"367","wf_caso_79_seguimiento_id":"367","3":"91","core_usuario_id":"91","4":"2015-05-29 08:21:07","fecha_ejec":"2015-05-29 08:21:07","5":"143","dato":"143","6":"sce.t93","tabla":"sce.t93","7":"158","tarea_id":"158","8":"siti 3 German: ciudadano, cargo, Gerente","usr_ejec":"siti 3 German: ciudadano, cargo, Gerente"}
CargarDatos_288(143)
se carga 79_158_288_93_110_87044
se carga 79_158_288_93_110_7401
se carga 79_158_288_93_110_7311
se carga 79_158_288_93_110_730ddfds
{"0":"455","id":"455","1":"289","wf_paso_id":"289","2":"367","wf_caso_79_seguimiento_id":"367","3":"91","core_usuario_id":"91","4":"2015-05-29 08:21:10","fecha_ejec":"2015-05-29 08:21:10","5":null,"dato":null,"6":null,"tabla":null,"7":"158","tarea_id":"158","8":"siti 3 German: ciudadano, cargo, Gerente","usr_ejec":"siti 3 German: ciudadano, cargo, Gerente"}
CargarDatos_289()
cargar datos de ejecucion de las tareas (las ultimas si el proceso tiene ciclos)
select a.*, u.apellido||' '||u.nombre|| ': '||u.cargo as usr_asig , ur.apellido||' '||ur.nombre|| ': '||ur.cargo as usr_resol from
wf_caso_79_seguimiento a
inner join (
select max(b0.id) as id,b0.wf_caso_79_id,b0.wf_tarea_id from wf_caso_79_seguimiento b0 where b0.wf_caso_79_id =? group by b0.wf_caso_79_id,b0.wf_tarea_id order by wf_caso_79_id,id
) b using(id)
left join usuarios u using(core_usuario_id)
left join usuarios ur on ur.core_usuario_id=core_usuario_id_resol
{"0":"367","id":"367","1":"202","wf_caso_79_id":"202","2":"158","wf_tarea_id":"158","3":null,"core_usuario_id":null,"4":"2015-05-29 08:20:56","fec_asig":"2015-05-29 08:20:56","5":"91","core_usuario_id_resol":"91","6":"2015-05-29 08:21:10","fec_resol":"2015-05-29 08:21:10","7":"158","wf_tarea_id_sig":"158","8":null,"usr_asig":null,"9":"siti 3 German: ciudadano, cargo, Gerente","usr_resol":"siti 3 German: ciudadano, cargo, Gerente"}
{"0":"368","id":"368","1":"202","wf_caso_79_id":"202","2":"243","wf_tarea_id":"243","3":"91","core_usuario_id":"91","4":"2015-05-29 08:21:10","fec_asig":"2015-05-29 08:21:10","5":null,"core_usuario_id_resol":null,"6":null,"fec_resol":null,"7":"243","wf_tarea_id_sig":"243","8":"siti 3 German: ciudadano, cargo, Gerente","usr_asig":"siti 3 German: ciudadano, cargo, Gerente","9":null,"usr_resol":null}
2015-05 29 08:48:59
cargar datos del sujeto(,,s,79,202)
select s.*, m.nombre as nom_muni, c.nom_cat,fec_caso
from wf_caso_79 w
inner join core_sujetoverificacion s on w.id=202 AND s.id =w.core_sujetoverificacion_id
inner join plan_municipio m on s.plan_municipio_id=m.id
inner join core_sujetocategoria c on s.core_sujetocategoria_id=c.id
2015-05 29 08:48:59
tabla dat adic
select tabla from core_sujetoverificaciontipo where id=1
2015-05 29 08:48:59
tabla :persona
SELECT * FROM persona where id=20107
2015-05 29 08:48:59
Continuar(,243,,s)
EjecutarTarea_243() Generacion pin id_comp1124
91 91
ValidarUsuario(243):1
EjecutarPaso_402: docs:75 , caso=202 id_comp 1124
Mostrar docs
$tit_formato='GENERACIÓN DE PIN ';
$n= ' WFSV_79 '; $a= ' WFSV_80 ';
$nom=$n.$a;
$dir= ' WFSV_77 ';
$tel= ' WFSV_78 ';
$ced=' WFSV_81 ';
$fecha=date('Y-m-d');
$f=split('-',$fecha);
if($f[1]==1)$f[1]='Enero';
if($f[1]==2)$f[1]='Febrero';
if($f[1]==3)$f[1]='Marzo';
if($f[1]==4)$f[1]='Abril';
if($f[1]==5)$f[1]='Mayo';
if($f[1]==6)$f[1]='Junio';
if($f[1]==7)$f[1]='Julio';
if($f[1]==8)$f[1]='Agosto';
if($f[1]==9)$f[1]='Septiembre';
if($f[1]==10)$f[1]='Octubre';
if($f[1]==11)$f[1]='Noviembre';
if($f[1]==12)$f[1]='Diciembre';
require_once($root.'/lib/tcpdf/config/lang/eng.php');
require_once($root.'/lib/tcpdf/tcpdf.php');
require_once($root.'/lib/tcpdf/tcpdf_barcodes.php');
require_once($root.'/lib/num_letras.php');
//--------------------------------------------------------------------------
class MYPDF extends TCPDF {
//Page header
public function Header() {
// Logo
//echo str_replace('$root_js',$root_js,$CONFIG['CABECERA_FORMATOS_HTML']);
$image_file = K_PATH_IMAGES.'logo_alcaldia.jpg';
$htm='';
$htm2='
 |
';
$npag=$this->getAliasNbPages();
$this->writeHTMLCell($w = 0, $h = 0, $x = '', $y = '', $htm, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = 'top', $autopadding = true);
}
// Page footer
public function Footer() {
// Position at 15 mm from bottom
$this->SetY(-15);
// Set font
$this->SetFont('helvetica', 'I', 8);
// Page number
$this->Cell(0, 10, '', 0, false, 'C', 0, '', 0, false, 'T', 'M');
}
}
//--------------------------------------------------------------------------
// create new PDF document
$pdf = new MYPDF('p', 'mm', 'letter', true, 'UTF-8', false);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('Siti');
$pdf->SetTitle('GENERACIÓN DE PIN');
$pdf->SetSubject('Certificado');
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
// set default header data
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
// set header and footer fonts
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
// set margins
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
// set auto page breaks
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
$pdf->setLanguageArray($l);
// ---------------------------------------------------------
// NOTE: 2D barcode algorithms must be implemented on 2dbarcode.php class file.
// set font
$pdf->SetFont('helvetica', '', 10);
// add a page
$pdf->AddPage();
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
$fils=4;
$cols=3;
$logo_empresa=$CONFIG['LOGO_EMPRESA'];
$codigo=$root_js.'build/view/common/marco/index.php?particular=001&accion=I&proc='.$CONFIG['PROCESO_STICKER'];
$izq=10+2;$der=10;$arr=10; $abj=10;
$sxp=$fils*$cols;
$tot=$rangoF-$rangoI+1;
$pags=ceil(($tot)/$sxp);
$anchoR=216-$izq-$der;
$altoR=279-$arr-$abj;
$anchoS=$anchoR/$cols;
$margenSV=4;
$margenSH=5;
$altoS=$altoR/$fils;
$altoImg=10;
$altoText=8;
$altoC=50;
// set style for barcode
$style = array(
'border' => 2,
'vpadding' => 'auto',
'hpadding' => 'auto',
'fgcolor' => array(0,0,0),
'bgcolor' => false, //array(255,255,255)
'module_width' => 1, // width of a single module in points
'module_height' => 1 // height of a single module in points
);
$pdf->SetFont('helvetica', '', 9, '', false);
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
$s=0;$p=1;$consc=$rangoI;
$y=$arr;
$x=$izq;
// create some HTML content
ob_start();
$mes=date("F");
if ($mes=="January") $mes="Enero";
if ($mes=="February") $mes="Febrero";
if ($mes=="March") $mes="Marzo";
if ($mes=="April") $mes="Abril";
if ($mes=="May") $mes="Mayo";
if ($mes=="June") $mes="Junio";
if ($mes=="July") $mes="Julio";
if ($mes=="August") $mes="Agosto";
if ($mes=="September") $mes="Setiembre";
if ($mes=="October") $mes="Octubre";
if ($mes=="November") $mes="Noviembre";
if ($mes=="December") $mes="Diciembre";
$anio=date("Y");
$npag=$pdf->getAliasNbPages();
$lpag=convertir_a_letras($npag);
if($npag==1&&$lpag=='uno')$lpag='un';
for($i=0;$i<2;$i++){
?>
Gobernación del Departemento de Nariño
|
PIN generado para certificado de representación legal de asociaciones y ligas deportivas
|
Número de documento: |
echo $ced;?> |
Nombre: |
echo strtoupper($nom);?> |
Número de caso |
echo $id_caso;?> |
Código de barras
$barcodeobj = new TCPDFBarcode($id_caso, 'C128');
//echo $barcodeobj->getBarcodeHTML(2, 30, 'black');
echo $barcodeobj->getBarcodePNG(2, 30, array(0,0,0));
?> |
}
$html=ob_get_clean();
// output the HTML content
$pdf->writeHTML($html, true, false,false,false);
// reset pointer to the last page
$pdf->lastPage();
//---
//$pdf->AddPage();
ob_start();
$html=ob_get_clean();
// output the HTML content
$pdf->writeHTML($html, true, false,false,false);
// reset pointer to the last page
$pdf->lastPage();
//----
$nomdoc=md5(time()).'.pdf';
$pdf->Output($root."/tmp/".$nomdoc, 'F');
$url=$root_js.'tmp/'.$nomdoc;
TWFSV_81:999888
TWFSV_80:siti 3
TWFSV_79:German
TWFSV_78:1212323443
TWFSV_77:callae 123
Retorno :
Array
(
[ret] => inicioComponente_WF_DocSalida({"id":"1124","caso_id":"202","proceso_id":79,"tit":"Generacion pin","tarea_id":243,"paso_id":402,"desc":null,"url":"De clic aqui para descargar el archivo<\/a><\/div>"});
[suc] => 1
)
fin 2015-05-29 08:49:00
/******************************************************************************************************/
2015-05-29 09:28:35TraerCaso(202,79,)
CargarCaso :202
2015-05 29 09:28:35
CargarDatos: Caso :202
cargar datos de ejecucion de los ultimos pasos
select p.*,b.wf_tarea_id as tarea_id,
u.apellido||' '||u.nombre|| ': '||u.cargo as usr_ejec
from
(select max(id) as id, wf_caso_79_seguimiento_id,wf_paso_id from wf_caso_79_pasos a1 group by wf_caso_79_seguimiento_id,wf_paso_id order by id
)a
inner join wf_caso_79_pasos p using(id,wf_caso_79_seguimiento_id)
inner join ( select max(id) as wf_caso_79_seguimiento_id,wf_caso_79_id,wf_tarea_id from wf_caso_79_seguimiento where wf_caso_79_id =? group by wf_caso_79_id,wf_tarea_id order by wf_caso_79_id,wf_caso_79_seguimiento_id ) b using(wf_caso_79_seguimiento_id)
left join usuarios u using(core_usuario_id)
{"0":"454","id":"454","1":"288","wf_paso_id":"288","2":"367","wf_caso_79_seguimiento_id":"367","3":"91","core_usuario_id":"91","4":"2015-05-29 08:21:07","fecha_ejec":"2015-05-29 08:21:07","5":"143","dato":"143","6":"sce.t93","tabla":"sce.t93","7":"158","tarea_id":"158","8":"siti 3 German: ciudadano, cargo, Gerente","usr_ejec":"siti 3 German: ciudadano, cargo, Gerente"}
CargarDatos_288(143)
se carga 79_158_288_93_110_87044
se carga 79_158_288_93_110_7401
se carga 79_158_288_93_110_7311
se carga 79_158_288_93_110_730ddfds
{"0":"455","id":"455","1":"289","wf_paso_id":"289","2":"367","wf_caso_79_seguimiento_id":"367","3":"91","core_usuario_id":"91","4":"2015-05-29 08:21:10","fecha_ejec":"2015-05-29 08:21:10","5":null,"dato":null,"6":null,"tabla":null,"7":"158","tarea_id":"158","8":"siti 3 German: ciudadano, cargo, Gerente","usr_ejec":"siti 3 German: ciudadano, cargo, Gerente"}
CargarDatos_289()
cargar datos de ejecucion de las tareas (las ultimas si el proceso tiene ciclos)
select a.*, u.apellido||' '||u.nombre|| ': '||u.cargo as usr_asig , ur.apellido||' '||ur.nombre|| ': '||ur.cargo as usr_resol from
wf_caso_79_seguimiento a
inner join (
select max(b0.id) as id,b0.wf_caso_79_id,b0.wf_tarea_id from wf_caso_79_seguimiento b0 where b0.wf_caso_79_id =? group by b0.wf_caso_79_id,b0.wf_tarea_id order by wf_caso_79_id,id
) b using(id)
left join usuarios u using(core_usuario_id)
left join usuarios ur on ur.core_usuario_id=core_usuario_id_resol
{"0":"367","id":"367","1":"202","wf_caso_79_id":"202","2":"158","wf_tarea_id":"158","3":null,"core_usuario_id":null,"4":"2015-05-29 08:20:56","fec_asig":"2015-05-29 08:20:56","5":"91","core_usuario_id_resol":"91","6":"2015-05-29 08:21:10","fec_resol":"2015-05-29 08:21:10","7":"158","wf_tarea_id_sig":"158","8":null,"usr_asig":null,"9":"siti 3 German: ciudadano, cargo, Gerente","usr_resol":"siti 3 German: ciudadano, cargo, Gerente"}
{"0":"368","id":"368","1":"202","wf_caso_79_id":"202","2":"243","wf_tarea_id":"243","3":"91","core_usuario_id":"91","4":"2015-05-29 08:21:10","fec_asig":"2015-05-29 08:21:10","5":null,"core_usuario_id_resol":null,"6":null,"fec_resol":null,"7":"243","wf_tarea_id_sig":"243","8":"siti 3 German: ciudadano, cargo, Gerente","usr_asig":"siti 3 German: ciudadano, cargo, Gerente","9":null,"usr_resol":null}
2015-05 29 09:28:35
cargar datos del sujeto(,,s,79,202)
select s.*, m.nombre as nom_muni, c.nom_cat,fec_caso
from wf_caso_79 w
inner join core_sujetoverificacion s on w.id=202 AND s.id =w.core_sujetoverificacion_id
inner join plan_municipio m on s.plan_municipio_id=m.id
inner join core_sujetocategoria c on s.core_sujetocategoria_id=c.id
2015-05 29 09:28:35
tabla dat adic
select tabla from core_sujetoverificaciontipo where id=1
2015-05 29 09:28:35
tabla :persona
SELECT * FROM persona where id=20107
2015-05 29 09:28:35
Continuar(,243,,s)
EjecutarTarea_243() Generacion pin id_comp1124
91 91
ValidarUsuario(243):1
EjecutarPaso_402: docs:75 , caso=202 id_comp 1124
Mostrar docs
$tit_formato='GENERACIÓN DE PIN ';
$n= ' WFSV_79 '; $a= ' WFSV_80 ';
$nom=$n.$a;
$dir= ' WFSV_77 ';
$tel= ' WFSV_78 ';
$ced=' WFSV_81 ';
$fecha=date('Y-m-d');
$f=split('-',$fecha);
if($f[1]==1)$f[1]='Enero';
if($f[1]==2)$f[1]='Febrero';
if($f[1]==3)$f[1]='Marzo';
if($f[1]==4)$f[1]='Abril';
if($f[1]==5)$f[1]='Mayo';
if($f[1]==6)$f[1]='Junio';
if($f[1]==7)$f[1]='Julio';
if($f[1]==8)$f[1]='Agosto';
if($f[1]==9)$f[1]='Septiembre';
if($f[1]==10)$f[1]='Octubre';
if($f[1]==11)$f[1]='Noviembre';
if($f[1]==12)$f[1]='Diciembre';
require_once($root.'/lib/tcpdf/config/lang/eng.php');
require_once($root.'/lib/tcpdf/tcpdf.php');
require_once($root.'/lib/tcpdf/tcpdf_barcodes.php');
require_once($root.'/lib/num_letras.php');
//--------------------------------------------------------------------------
class MYPDF extends TCPDF {
//Page header
public function Header() {
// Logo
//echo str_replace('$root_js',$root_js,$CONFIG['CABECERA_FORMATOS_HTML']);
$image_file = K_PATH_IMAGES.'logo_alcaldia.jpg';
$htm='';
$htm2='
 |
';
$npag=$this->getAliasNbPages();
$this->writeHTMLCell($w = 0, $h = 0, $x = '', $y = '', $htm, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = 'top', $autopadding = true);
}
// Page footer
public function Footer() {
// Position at 15 mm from bottom
$this->SetY(-15);
// Set font
$this->SetFont('helvetica', 'I', 8);
// Page number
$this->Cell(0, 10, '', 0, false, 'C', 0, '', 0, false, 'T', 'M');
}
}
//--------------------------------------------------------------------------
// create new PDF document
$pdf = new MYPDF('p', 'mm', 'letter', true, 'UTF-8', false);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('Siti');
$pdf->SetTitle('GENERACIÓN DE PIN');
$pdf->SetSubject('Certificado');
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
// set default header data
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
// set header and footer fonts
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
// set margins
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
// set auto page breaks
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
$pdf->setLanguageArray($l);
// ---------------------------------------------------------
// NOTE: 2D barcode algorithms must be implemented on 2dbarcode.php class file.
// set font
$pdf->SetFont('helvetica', '', 10);
// add a page
$pdf->AddPage();
$sql="INSERT INTO sce.validar_pin(pin, validado)VALUES (".$id_caso.", 'n');";
$con->Execute($sql);
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
$fils=4;
$cols=3;
$logo_empresa=$CONFIG['LOGO_EMPRESA'];
$codigo=$root_js.'build/view/common/marco/index.php?particular=001&accion=I&proc='.$CONFIG['PROCESO_STICKER'];
$izq=10+2;$der=10;$arr=10; $abj=10;
$sxp=$fils*$cols;
$tot=$rangoF-$rangoI+1;
$pags=ceil(($tot)/$sxp);
$anchoR=216-$izq-$der;
$altoR=279-$arr-$abj;
$anchoS=$anchoR/$cols;
$margenSV=4;
$margenSH=5;
$altoS=$altoR/$fils;
$altoImg=10;
$altoText=8;
$altoC=50;
// set style for barcode
$style = array(
'border' => 2,
'vpadding' => 'auto',
'hpadding' => 'auto',
'fgcolor' => array(0,0,0),
'bgcolor' => false, //array(255,255,255)
'module_width' => 1, // width of a single module in points
'module_height' => 1 // height of a single module in points
);
$pdf->SetFont('helvetica', '', 9, '', false);
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
$s=0;$p=1;$consc=$rangoI;
$y=$arr;
$x=$izq;
// create some HTML content
ob_start();
$mes=date("F");
if ($mes=="January") $mes="Enero";
if ($mes=="February") $mes="Febrero";
if ($mes=="March") $mes="Marzo";
if ($mes=="April") $mes="Abril";
if ($mes=="May") $mes="Mayo";
if ($mes=="June") $mes="Junio";
if ($mes=="July") $mes="Julio";
if ($mes=="August") $mes="Agosto";
if ($mes=="September") $mes="Setiembre";
if ($mes=="October") $mes="Octubre";
if ($mes=="November") $mes="Noviembre";
if ($mes=="December") $mes="Diciembre";
$anio=date("Y");
$npag=$pdf->getAliasNbPages();
$lpag=convertir_a_letras($npag);
if($npag==1&&$lpag=='uno')$lpag='un';
for($i=0;$i<2;$i++){
?>
Gobernación del Departemento de Nariño
|
PIN generado para certificado de representación legal de asociaciones y ligas deportivas
|
Número de documento: |
echo $ced;?> |
Nombre: |
echo strtoupper($nom);?> |
Número de caso |
echo $id_caso;?> |
Código de barras
$barcodeobj = new TCPDFBarcode($id_caso, 'C128');
echo $barcodeobj->getBarcodeHTML(2, 30, 'black');
//echo $barcodeobj->getBarcodePNG(2, 30, array(0,0,0));
?> |
}
$html=ob_get_clean();
// output the HTML content
$pdf->writeHTML($html, true, false,false,false);
// reset pointer to the last page
$pdf->lastPage();
//---
//$pdf->AddPage();
ob_start();
$html=ob_get_clean();
// output the HTML content
$pdf->writeHTML($html, true, false,false,false);
// reset pointer to the last page
$pdf->lastPage();
//----
$nomdoc=md5(time()).'.pdf';
$pdf->Output($root."/tmp/".$nomdoc, 'F');
$url=$root_js.'tmp/'.$nomdoc;
TWFSV_81:999888
TWFSV_80:siti 3
TWFSV_79:German
TWFSV_78:1212323443
TWFSV_77:callae 123
Retorno :
Array
(
[ret] => inicioComponente_WF_DocSalida({"id":"1124","caso_id":"202","proceso_id":79,"tit":"Generacion pin","tarea_id":243,"paso_id":402,"desc":null,"url":"De clic aqui para descargar el archivo<\/a><\/div>"});
[suc] => 1
)
fin 2015-05-29 09:28:35
/******************************************************************************************************/
2015-05-29 09:31:39TraerCaso(202,79,)
CargarCaso :202
2015-05 29 09:31:39
CargarDatos: Caso :202
cargar datos de ejecucion de los ultimos pasos
select p.*,b.wf_tarea_id as tarea_id,
u.apellido||' '||u.nombre|| ': '||u.cargo as usr_ejec
from
(select max(id) as id, wf_caso_79_seguimiento_id,wf_paso_id from wf_caso_79_pasos a1 group by wf_caso_79_seguimiento_id,wf_paso_id order by id
)a
inner join wf_caso_79_pasos p using(id,wf_caso_79_seguimiento_id)
inner join ( select max(id) as wf_caso_79_seguimiento_id,wf_caso_79_id,wf_tarea_id from wf_caso_79_seguimiento where wf_caso_79_id =? group by wf_caso_79_id,wf_tarea_id order by wf_caso_79_id,wf_caso_79_seguimiento_id ) b using(wf_caso_79_seguimiento_id)
left join usuarios u using(core_usuario_id)
{"0":"454","id":"454","1":"288","wf_paso_id":"288","2":"367","wf_caso_79_seguimiento_id":"367","3":"91","core_usuario_id":"91","4":"2015-05-29 08:21:07","fecha_ejec":"2015-05-29 08:21:07","5":"143","dato":"143","6":"sce.t93","tabla":"sce.t93","7":"158","tarea_id":"158","8":"siti 3 German: ciudadano, cargo, Gerente","usr_ejec":"siti 3 German: ciudadano, cargo, Gerente"}
CargarDatos_288(143)
se carga 79_158_288_93_110_87044
se carga 79_158_288_93_110_7401
se carga 79_158_288_93_110_7311
se carga 79_158_288_93_110_730ddfds
{"0":"455","id":"455","1":"289","wf_paso_id":"289","2":"367","wf_caso_79_seguimiento_id":"367","3":"91","core_usuario_id":"91","4":"2015-05-29 08:21:10","fecha_ejec":"2015-05-29 08:21:10","5":null,"dato":null,"6":null,"tabla":null,"7":"158","tarea_id":"158","8":"siti 3 German: ciudadano, cargo, Gerente","usr_ejec":"siti 3 German: ciudadano, cargo, Gerente"}
CargarDatos_289()
cargar datos de ejecucion de las tareas (las ultimas si el proceso tiene ciclos)
select a.*, u.apellido||' '||u.nombre|| ': '||u.cargo as usr_asig , ur.apellido||' '||ur.nombre|| ': '||ur.cargo as usr_resol from
wf_caso_79_seguimiento a
inner join (
select max(b0.id) as id,b0.wf_caso_79_id,b0.wf_tarea_id from wf_caso_79_seguimiento b0 where b0.wf_caso_79_id =? group by b0.wf_caso_79_id,b0.wf_tarea_id order by wf_caso_79_id,id
) b using(id)
left join usuarios u using(core_usuario_id)
left join usuarios ur on ur.core_usuario_id=core_usuario_id_resol
{"0":"367","id":"367","1":"202","wf_caso_79_id":"202","2":"158","wf_tarea_id":"158","3":null,"core_usuario_id":null,"4":"2015-05-29 08:20:56","fec_asig":"2015-05-29 08:20:56","5":"91","core_usuario_id_resol":"91","6":"2015-05-29 08:21:10","fec_resol":"2015-05-29 08:21:10","7":"158","wf_tarea_id_sig":"158","8":null,"usr_asig":null,"9":"siti 3 German: ciudadano, cargo, Gerente","usr_resol":"siti 3 German: ciudadano, cargo, Gerente"}
{"0":"368","id":"368","1":"202","wf_caso_79_id":"202","2":"243","wf_tarea_id":"243","3":"91","core_usuario_id":"91","4":"2015-05-29 08:21:10","fec_asig":"2015-05-29 08:21:10","5":null,"core_usuario_id_resol":null,"6":null,"fec_resol":null,"7":"243","wf_tarea_id_sig":"243","8":"siti 3 German: ciudadano, cargo, Gerente","usr_asig":"siti 3 German: ciudadano, cargo, Gerente","9":null,"usr_resol":null}
2015-05 29 09:31:39
cargar datos del sujeto(,,s,79,202)
select s.*, m.nombre as nom_muni, c.nom_cat,fec_caso
from wf_caso_79 w
inner join core_sujetoverificacion s on w.id=202 AND s.id =w.core_sujetoverificacion_id
inner join plan_municipio m on s.plan_municipio_id=m.id
inner join core_sujetocategoria c on s.core_sujetocategoria_id=c.id
2015-05 29 09:31:39
tabla dat adic
select tabla from core_sujetoverificaciontipo where id=1
2015-05 29 09:31:39
tabla :persona
SELECT * FROM persona where id=20107
2015-05 29 09:31:39
Continuar(,243,,s)
EjecutarTarea_243() Generacion pin id_comp1124
91 91
ValidarUsuario(243):1
EjecutarPaso_402: docs:75 , caso=202 id_comp 1124
Mostrar docs
$tit_formato='GENERACIÓN DE PIN ';
$n= ' WFSV_79 '; $a= ' WFSV_80 ';
$nom=$n.$a;
$dir= ' WFSV_77 ';
$tel= ' WFSV_78 ';
$ced=' WFSV_81 ';
$fecha=date('Y-m-d');
$f=split('-',$fecha);
if($f[1]==1)$f[1]='Enero';
if($f[1]==2)$f[1]='Febrero';
if($f[1]==3)$f[1]='Marzo';
if($f[1]==4)$f[1]='Abril';
if($f[1]==5)$f[1]='Mayo';
if($f[1]==6)$f[1]='Junio';
if($f[1]==7)$f[1]='Julio';
if($f[1]==8)$f[1]='Agosto';
if($f[1]==9)$f[1]='Septiembre';
if($f[1]==10)$f[1]='Octubre';
if($f[1]==11)$f[1]='Noviembre';
if($f[1]==12)$f[1]='Diciembre';
require_once($root.'/lib/tcpdf/config/lang/eng.php');
require_once($root.'/lib/tcpdf/tcpdf.php');
require_once($root.'/lib/tcpdf/tcpdf_barcodes.php');
require_once($root.'/lib/num_letras.php');
//--------------------------------------------------------------------------
class MYPDF extends TCPDF {
//Page header
public function Header() {
// Logo
//echo str_replace('$root_js',$root_js,$CONFIG['CABECERA_FORMATOS_HTML']);
$image_file = K_PATH_IMAGES.'logo_alcaldia.jpg';
$htm='';
$htm2='
 |
';
$npag=$this->getAliasNbPages();
$this->writeHTMLCell($w = 0, $h = 0, $x = '', $y = '', $htm, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = 'top', $autopadding = true);
}
// Page footer
public function Footer() {
// Position at 15 mm from bottom
$this->SetY(-15);
// Set font
$this->SetFont('helvetica', 'I', 8);
// Page number
$this->Cell(0, 10, '', 0, false, 'C', 0, '', 0, false, 'T', 'M');
}
}
//--------------------------------------------------------------------------
// create new PDF document
$pdf = new MYPDF('p', 'mm', 'letter', true, 'UTF-8', false);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('Siti');
$pdf->SetTitle('GENERACIÓN DE PIN');
$pdf->SetSubject('Certificado');
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
// set default header data
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
// set header and footer fonts
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
// set margins
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
// set auto page breaks
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
$pdf->setLanguageArray($l);
// ---------------------------------------------------------
// NOTE: 2D barcode algorithms must be implemented on 2dbarcode.php class file.
// set font
$pdf->SetFont('helvetica', '', 10);
// add a page
$pdf->AddPage();
$sql="INSERT INTO sce.validar_pin(pin, validado)VALUES (".$id_caso.", 'n');";
$con->Execute($sql);
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
$fils=4;
$cols=3;
$logo_empresa=$CONFIG['LOGO_EMPRESA'];
$codigo=$root_js.'build/view/common/marco/index.php?particular=001&accion=I&proc='.$CONFIG['PROCESO_STICKER'];
$izq=10+2;$der=10;$arr=10; $abj=10;
$sxp=$fils*$cols;
$tot=$rangoF-$rangoI+1;
$pags=ceil(($tot)/$sxp);
$anchoR=216-$izq-$der;
$altoR=279-$arr-$abj;
$anchoS=$anchoR/$cols;
$margenSV=4;
$margenSH=5;
$altoS=$altoR/$fils;
$altoImg=10;
$altoText=8;
$altoC=50;
// set style for barcode
$style = array(
'border' => 2,
'vpadding' => 'auto',
'hpadding' => 'auto',
'fgcolor' => array(0,0,0),
'bgcolor' => false, //array(255,255,255)
'module_width' => 1, // width of a single module in points
'module_height' => 1 // height of a single module in points
);
$pdf->SetFont('helvetica', '', 9, '', false);
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
$s=0;$p=1;$consc=$rangoI;
$y=$arr;
$x=$izq;
// create some HTML content
ob_start();
$mes=date("F");
if ($mes=="January") $mes="Enero";
if ($mes=="February") $mes="Febrero";
if ($mes=="March") $mes="Marzo";
if ($mes=="April") $mes="Abril";
if ($mes=="May") $mes="Mayo";
if ($mes=="June") $mes="Junio";
if ($mes=="July") $mes="Julio";
if ($mes=="August") $mes="Agosto";
if ($mes=="September") $mes="Setiembre";
if ($mes=="October") $mes="Octubre";
if ($mes=="November") $mes="Noviembre";
if ($mes=="December") $mes="Diciembre";
$anio=date("Y");
$npag=$pdf->getAliasNbPages();
$lpag=convertir_a_letras($npag);
if($npag==1&&$lpag=='uno')$lpag='un';
for($i=0;$i<2;$i++){
?>
Gobernación del Departemento de Nariño
|
PIN generado para certificado de representación legal de asociaciones y ligas deportivas
|
Número de documento: |
echo $ced;?> |
Nombre: |
echo strtoupper($nom);?> |
Número de caso |
echo $id_caso;?> |
Código de barras
$barcodeobj = new TCPDFBarcode($id_caso, 'C128');
echo $barcodeobj->getBarcodeHTML(2, 30, 'black');
//echo $barcodeobj->getBarcodePNG(2, 30, array(0,0,0));
?> |
}
$html=ob_get_clean();
// output the HTML content
$pdf->writeHTML($html, true, false,false,false);
// reset pointer to the last page
$pdf->lastPage();
//---
//$pdf->AddPage();
ob_start();
$html=ob_get_clean();
// output the HTML content
$pdf->writeHTML($html, true, false,false,false);
// reset pointer to the last page
$pdf->lastPage();
//----
$nomdoc=md5(time()).'.pdf';
$pdf->Output($root."/tmp/".$nomdoc, 'F');
$url=$root_js.'tmp/'.$nomdoc;.3
TWFSV_81:999888
TWFSV_80:siti 3
TWFSV_79:German
TWFSV_78:1212323443
TWFSV_77:callae 123
Retorno :
Array
(
[ret] => inicioComponente_WF_DocSalida({"id":"1124","caso_id":"202","proceso_id":79,"tit":"Generacion pin","tarea_id":243,"paso_id":402,"desc":null,"url":"De clic aqui para descargar el archivo<\/a><\/div>"});
[suc] => 1
)
fin 2015-05-29 09:31:39
/******************************************************************************************************/
2015-05-29 09:32:55TraerCaso(202,79,)
CargarCaso :202
2015-05 29 09:32:55
CargarDatos: Caso :202
cargar datos de ejecucion de los ultimos pasos
select p.*,b.wf_tarea_id as tarea_id,
u.apellido||' '||u.nombre|| ': '||u.cargo as usr_ejec
from
(select max(id) as id, wf_caso_79_seguimiento_id,wf_paso_id from wf_caso_79_pasos a1 group by wf_caso_79_seguimiento_id,wf_paso_id order by id
)a
inner join wf_caso_79_pasos p using(id,wf_caso_79_seguimiento_id)
inner join ( select max(id) as wf_caso_79_seguimiento_id,wf_caso_79_id,wf_tarea_id from wf_caso_79_seguimiento where wf_caso_79_id =? group by wf_caso_79_id,wf_tarea_id order by wf_caso_79_id,wf_caso_79_seguimiento_id ) b using(wf_caso_79_seguimiento_id)
left join usuarios u using(core_usuario_id)
{"0":"454","id":"454","1":"288","wf_paso_id":"288","2":"367","wf_caso_79_seguimiento_id":"367","3":"91","core_usuario_id":"91","4":"2015-05-29 08:21:07","fecha_ejec":"2015-05-29 08:21:07","5":"143","dato":"143","6":"sce.t93","tabla":"sce.t93","7":"158","tarea_id":"158","8":"siti 3 German: ciudadano, cargo, Gerente","usr_ejec":"siti 3 German: ciudadano, cargo, Gerente"}
CargarDatos_288(143)
se carga 79_158_288_93_110_87044
se carga 79_158_288_93_110_7401
se carga 79_158_288_93_110_7311
se carga 79_158_288_93_110_730ddfds
{"0":"455","id":"455","1":"289","wf_paso_id":"289","2":"367","wf_caso_79_seguimiento_id":"367","3":"91","core_usuario_id":"91","4":"2015-05-29 08:21:10","fecha_ejec":"2015-05-29 08:21:10","5":null,"dato":null,"6":null,"tabla":null,"7":"158","tarea_id":"158","8":"siti 3 German: ciudadano, cargo, Gerente","usr_ejec":"siti 3 German: ciudadano, cargo, Gerente"}
CargarDatos_289()
cargar datos de ejecucion de las tareas (las ultimas si el proceso tiene ciclos)
select a.*, u.apellido||' '||u.nombre|| ': '||u.cargo as usr_asig , ur.apellido||' '||ur.nombre|| ': '||ur.cargo as usr_resol from
wf_caso_79_seguimiento a
inner join (
select max(b0.id) as id,b0.wf_caso_79_id,b0.wf_tarea_id from wf_caso_79_seguimiento b0 where b0.wf_caso_79_id =? group by b0.wf_caso_79_id,b0.wf_tarea_id order by wf_caso_79_id,id
) b using(id)
left join usuarios u using(core_usuario_id)
left join usuarios ur on ur.core_usuario_id=core_usuario_id_resol
{"0":"367","id":"367","1":"202","wf_caso_79_id":"202","2":"158","wf_tarea_id":"158","3":null,"core_usuario_id":null,"4":"2015-05-29 08:20:56","fec_asig":"2015-05-29 08:20:56","5":"91","core_usuario_id_resol":"91","6":"2015-05-29 08:21:10","fec_resol":"2015-05-29 08:21:10","7":"158","wf_tarea_id_sig":"158","8":null,"usr_asig":null,"9":"siti 3 German: ciudadano, cargo, Gerente","usr_resol":"siti 3 German: ciudadano, cargo, Gerente"}
{"0":"368","id":"368","1":"202","wf_caso_79_id":"202","2":"243","wf_tarea_id":"243","3":"91","core_usuario_id":"91","4":"2015-05-29 08:21:10","fec_asig":"2015-05-29 08:21:10","5":null,"core_usuario_id_resol":null,"6":null,"fec_resol":null,"7":"243","wf_tarea_id_sig":"243","8":"siti 3 German: ciudadano, cargo, Gerente","usr_asig":"siti 3 German: ciudadano, cargo, Gerente","9":null,"usr_resol":null}
2015-05 29 09:32:55
cargar datos del sujeto(,,s,79,202)
select s.*, m.nombre as nom_muni, c.nom_cat,fec_caso
from wf_caso_79 w
inner join core_sujetoverificacion s on w.id=202 AND s.id =w.core_sujetoverificacion_id
inner join plan_municipio m on s.plan_municipio_id=m.id
inner join core_sujetocategoria c on s.core_sujetocategoria_id=c.id
2015-05 29 09:32:55
tabla dat adic
select tabla from core_sujetoverificaciontipo where id=1
2015-05 29 09:32:55
tabla :persona
SELECT * FROM persona where id=20107
2015-05 29 09:32:55
Continuar(,243,,s)
EjecutarTarea_243() Generacion pin id_comp1124
91 91
ValidarUsuario(243):1
EjecutarPaso_402: docs:75 , caso=202 id_comp 1124
Mostrar docs
$tit_formato='GENERACIÓN DE PIN ';
$n= ' WFSV_79 '; $a= ' WFSV_80 ';
$nom=$n.$a;
$dir= ' WFSV_77 ';
$tel= ' WFSV_78 ';
$ced=' WFSV_81 ';
$fecha=date('Y-m-d');
$f=split('-',$fecha);
if($f[1]==1)$f[1]='Enero';
if($f[1]==2)$f[1]='Febrero';
if($f[1]==3)$f[1]='Marzo';
if($f[1]==4)$f[1]='Abril';
if($f[1]==5)$f[1]='Mayo';
if($f[1]==6)$f[1]='Junio';
if($f[1]==7)$f[1]='Julio';
if($f[1]==8)$f[1]='Agosto';
if($f[1]==9)$f[1]='Septiembre';
if($f[1]==10)$f[1]='Octubre';
if($f[1]==11)$f[1]='Noviembre';
if($f[1]==12)$f[1]='Diciembre';
require_once($root.'/lib/tcpdf/config/lang/eng.php');
require_once($root.'/lib/tcpdf/tcpdf.php');
require_once($root.'/lib/tcpdf/tcpdf_barcodes.php');
require_once($root.'/lib/num_letras.php');
//--------------------------------------------------------------------------
class MYPDF extends TCPDF {
//Page header
public function Header() {
// Logo
//echo str_replace('$root_js',$root_js,$CONFIG['CABECERA_FORMATOS_HTML']);
$image_file = K_PATH_IMAGES.'logo_alcaldia.jpg';
$htm='';
$htm2='
 |
';
$npag=$this->getAliasNbPages();
$this->writeHTMLCell($w = 0, $h = 0, $x = '', $y = '', $htm, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = 'top', $autopadding = true);
}
// Page footer
public function Footer() {
// Position at 15 mm from bottom
$this->SetY(-15);
// Set font
$this->SetFont('helvetica', 'I', 8);
// Page number
$this->Cell(0, 10, '', 0, false, 'C', 0, '', 0, false, 'T', 'M');
}
}
//--------------------------------------------------------------------------
// create new PDF document
$pdf = new MYPDF('p', 'mm', 'letter', true, 'UTF-8', false);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('Siti');
$pdf->SetTitle('GENERACIÓN DE PIN');
$pdf->SetSubject('Certificado');
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
// set default header data
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
// set header and footer fonts
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
// set margins
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
// set auto page breaks
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
$pdf->setLanguageArray($l);
// ---------------------------------------------------------
// NOTE: 2D barcode algorithms must be implemented on 2dbarcode.php class file.
// set font
$pdf->SetFont('helvetica', '', 10);
// add a page
$pdf->AddPage();
$sql="INSERT INTO sce.validar_pin VALUES (".$id_caso.", 'n');";
$con->Execute($sql);
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
$fils=4;
$cols=3;
$logo_empresa=$CONFIG['LOGO_EMPRESA'];
$codigo=$root_js.'build/view/common/marco/index.php?particular=001&accion=I&proc='.$CONFIG['PROCESO_STICKER'];
$izq=10+2;$der=10;$arr=10; $abj=10;
$sxp=$fils*$cols;
$tot=$rangoF-$rangoI+1;
$pags=ceil(($tot)/$sxp);
$anchoR=216-$izq-$der;
$altoR=279-$arr-$abj;
$anchoS=$anchoR/$cols;
$margenSV=4;
$margenSH=5;
$altoS=$altoR/$fils;
$altoImg=10;
$altoText=8;
$altoC=50;
// set style for barcode
$style = array(
'border' => 2,
'vpadding' => 'auto',
'hpadding' => 'auto',
'fgcolor' => array(0,0,0),
'bgcolor' => false, //array(255,255,255)
'module_width' => 1, // width of a single module in points
'module_height' => 1 // height of a single module in points
);
$pdf->SetFont('helvetica', '', 9, '', false);
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
$s=0;$p=1;$consc=$rangoI;
$y=$arr;
$x=$izq;
// create some HTML content
ob_start();
$mes=date("F");
if ($mes=="January") $mes="Enero";
if ($mes=="February") $mes="Febrero";
if ($mes=="March") $mes="Marzo";
if ($mes=="April") $mes="Abril";
if ($mes=="May") $mes="Mayo";
if ($mes=="June") $mes="Junio";
if ($mes=="July") $mes="Julio";
if ($mes=="August") $mes="Agosto";
if ($mes=="September") $mes="Setiembre";
if ($mes=="October") $mes="Octubre";
if ($mes=="November") $mes="Noviembre";
if ($mes=="December") $mes="Diciembre";
$anio=date("Y");
$npag=$pdf->getAliasNbPages();
$lpag=convertir_a_letras($npag);
if($npag==1&&$lpag=='uno')$lpag='un';
for($i=0;$i<2;$i++){
?>
Gobernación del Departemento de Nariño
|
PIN generado para certificado de representación legal de asociaciones y ligas deportivas
|
Número de documento: |
echo $ced;?> |
Nombre: |
echo strtoupper($nom);?> |
Número de caso |
echo $id_caso;?> |
Código de barras
$barcodeobj = new TCPDFBarcode($id_caso, 'C128');
echo $barcodeobj->getBarcodeHTML(2, 30, 'black');
//echo $barcodeobj->getBarcodePNG(2, 30, array(0,0,0));
?> |
}
$html=ob_get_clean();
// output the HTML content
$pdf->writeHTML($html, true, false,false,false);
// reset pointer to the last page
$pdf->lastPage();
//---
//$pdf->AddPage();
ob_start();
$html=ob_get_clean();
// output the HTML content
$pdf->writeHTML($html, true, false,false,false);
// reset pointer to the last page
$pdf->lastPage();
//----
$nomdoc=md5(time()).'.pdf';
$pdf->Output($root."/tmp/".$nomdoc, 'F');
$url=$root_js.'tmp/'.$nomdoc;
TWFSV_81:999888
TWFSV_80:siti 3
TWFSV_79:German
TWFSV_78:1212323443
TWFSV_77:callae 123
Retorno :
Array
(
[ret] => inicioComponente_WF_DocSalida({"id":"1124","caso_id":"202","proceso_id":79,"tit":"Generacion pin","tarea_id":243,"paso_id":402,"desc":null,"url":"De clic aqui para descargar el archivo<\/a><\/div>"});
[suc] => 1
)
fin 2015-05-29 09:32:55
/******************************************************************************************************/
2015-05-29 10:51:01TraerCaso(202,79,)
CargarCaso :202
2015-05 29 10:51:01
CargarDatos: Caso :202
cargar datos de ejecucion de los ultimos pasos
select p.*,b.wf_tarea_id as tarea_id,
u.apellido||' '||u.nombre|| ': '||u.cargo as usr_ejec
from
(select max(id) as id, wf_caso_79_seguimiento_id,wf_paso_id from wf_caso_79_pasos a1 group by wf_caso_79_seguimiento_id,wf_paso_id order by id
)a
inner join wf_caso_79_pasos p using(id,wf_caso_79_seguimiento_id)
inner join ( select max(id) as wf_caso_79_seguimiento_id,wf_caso_79_id,wf_tarea_id from wf_caso_79_seguimiento where wf_caso_79_id =? group by wf_caso_79_id,wf_tarea_id order by wf_caso_79_id,wf_caso_79_seguimiento_id ) b using(wf_caso_79_seguimiento_id)
left join usuarios u using(core_usuario_id)
{"0":"454","id":"454","1":"288","wf_paso_id":"288","2":"367","wf_caso_79_seguimiento_id":"367","3":"91","core_usuario_id":"91","4":"2015-05-29 08:21:07","fecha_ejec":"2015-05-29 08:21:07","5":"143","dato":"143","6":"sce.t93","tabla":"sce.t93","7":"158","tarea_id":"158","8":"siti 3 German: ciudadano, cargo, Gerente","usr_ejec":"siti 3 German: ciudadano, cargo, Gerente"}
CargarDatos_288(143)
se carga 79_158_288_93_110_87044
se carga 79_158_288_93_110_7401
se carga 79_158_288_93_110_7311
se carga 79_158_288_93_110_730ddfds
{"0":"455","id":"455","1":"289","wf_paso_id":"289","2":"367","wf_caso_79_seguimiento_id":"367","3":"91","core_usuario_id":"91","4":"2015-05-29 08:21:10","fecha_ejec":"2015-05-29 08:21:10","5":null,"dato":null,"6":null,"tabla":null,"7":"158","tarea_id":"158","8":"siti 3 German: ciudadano, cargo, Gerente","usr_ejec":"siti 3 German: ciudadano, cargo, Gerente"}
CargarDatos_289()
cargar datos de ejecucion de las tareas (las ultimas si el proceso tiene ciclos)
select a.*, u.apellido||' '||u.nombre|| ': '||u.cargo as usr_asig , ur.apellido||' '||ur.nombre|| ': '||ur.cargo as usr_resol from
wf_caso_79_seguimiento a
inner join (
select max(b0.id) as id,b0.wf_caso_79_id,b0.wf_tarea_id from wf_caso_79_seguimiento b0 where b0.wf_caso_79_id =? group by b0.wf_caso_79_id,b0.wf_tarea_id order by wf_caso_79_id,id
) b using(id)
left join usuarios u using(core_usuario_id)
left join usuarios ur on ur.core_usuario_id=core_usuario_id_resol
{"0":"367","id":"367","1":"202","wf_caso_79_id":"202","2":"158","wf_tarea_id":"158","3":null,"core_usuario_id":null,"4":"2015-05-29 08:20:56","fec_asig":"2015-05-29 08:20:56","5":"91","core_usuario_id_resol":"91","6":"2015-05-29 08:21:10","fec_resol":"2015-05-29 08:21:10","7":"158","wf_tarea_id_sig":"158","8":null,"usr_asig":null,"9":"siti 3 German: ciudadano, cargo, Gerente","usr_resol":"siti 3 German: ciudadano, cargo, Gerente"}
{"0":"368","id":"368","1":"202","wf_caso_79_id":"202","2":"243","wf_tarea_id":"243","3":"91","core_usuario_id":"91","4":"2015-05-29 08:21:10","fec_asig":"2015-05-29 08:21:10","5":null,"core_usuario_id_resol":null,"6":null,"fec_resol":null,"7":"243","wf_tarea_id_sig":"243","8":"siti 3 German: ciudadano, cargo, Gerente","usr_asig":"siti 3 German: ciudadano, cargo, Gerente","9":null,"usr_resol":null}
2015-05 29 10:51:01
cargar datos del sujeto(,,s,79,202)
select s.*, m.nombre as nom_muni, c.nom_cat,fec_caso
from wf_caso_79 w
inner join core_sujetoverificacion s on w.id=202 AND s.id =w.core_sujetoverificacion_id
inner join plan_municipio m on s.plan_municipio_id=m.id
inner join core_sujetocategoria c on s.core_sujetocategoria_id=c.id
2015-05 29 10:51:01
tabla dat adic
select tabla from core_sujetoverificaciontipo where id=1
2015-05 29 10:51:01
tabla :persona
SELECT * FROM persona where id=20107
2015-05 29 10:51:01
Continuar(,243,,s)
EjecutarTarea_243() Generacion pin id_comp1124
91 91
ValidarUsuario(243):1
EjecutarPaso_402: docs:75 , caso=202 id_comp 1124
Mostrar docs
$tit_formato='GENERACIÓN DE PIN ';
$n= ' WFSV_79 '; $a= ' WFSV_80 ';
$nom=$n.$a;
$dir= ' WFSV_77 ';
$tel= ' WFSV_78 ';
$ced=' WFSV_81 ';
$fecha=date('Y-m-d');
$f=split('-',$fecha);
if($f[1]==1)$f[1]='Enero';
if($f[1]==2)$f[1]='Febrero';
if($f[1]==3)$f[1]='Marzo';
if($f[1]==4)$f[1]='Abril';
if($f[1]==5)$f[1]='Mayo';
if($f[1]==6)$f[1]='Junio';
if($f[1]==7)$f[1]='Julio';
if($f[1]==8)$f[1]='Agosto';
if($f[1]==9)$f[1]='Septiembre';
if($f[1]==10)$f[1]='Octubre';
if($f[1]==11)$f[1]='Noviembre';
if($f[1]==12)$f[1]='Diciembre';
require_once($root.'/lib/tcpdf/config/lang/eng.php');
require_once($root.'/lib/tcpdf/tcpdf.php');
require_once($root.'/lib/tcpdf/tcpdf_barcodes.php');
require_once($root.'/lib/num_letras.php');
//--------------------------------------------------------------------------
class MYPDF extends TCPDF {
//Page header
public function Header() {
// Logo
//echo str_replace('$root_js',$root_js,$CONFIG['CABECERA_FORMATOS_HTML']);
$image_file = K_PATH_IMAGES.'logo_alcaldia.jpg';
$htm='';
$htm2='
 |
';
$npag=$this->getAliasNbPages();
$this->writeHTMLCell($w = 0, $h = 0, $x = '', $y = '', $htm, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = 'top', $autopadding = true);
}
// Page footer
public function Footer() {
// Position at 15 mm from bottom
$this->SetY(-15);
// Set font
$this->SetFont('helvetica', 'I', 8);
// Page number
$this->Cell(0, 10, '', 0, false, 'C', 0, '', 0, false, 'T', 'M');
}
}
//--------------------------------------------------------------------------
// create new PDF document
$pdf = new MYPDF('p', 'mm', 'letter', true, 'UTF-8', false);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('Siti');
$pdf->SetTitle('GENERACIÓN DE PIN');
$pdf->SetSubject('Certificado');
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
// set default header data
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
// set header and footer fonts
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
// set margins
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
// set auto page breaks
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
$pdf->setLanguageArray($l);
// ---------------------------------------------------------
// NOTE: 2D barcode algorithms must be implemented on 2dbarcode.php class file.
// set font
$pdf->SetFont('helvetica', '', 10);
// add a page
$pdf->AddPage();
$sql="INSERT INTO sce.validar_pin VALUES (".$id_caso.", 'n',".$_SSESION['usuario_id'].");";
$con->Execute($sql);
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
$fils=4;
$cols=3;
$logo_empresa=$CONFIG['LOGO_EMPRESA'];
$codigo=$root_js.'build/view/common/marco/index.php?particular=001&accion=I&proc='.$CONFIG['PROCESO_STICKER'];
$izq=10+2;$der=10;$arr=10; $abj=10;
$sxp=$fils*$cols;
$tot=$rangoF-$rangoI+1;
$pags=ceil(($tot)/$sxp);
$anchoR=216-$izq-$der;
$altoR=279-$arr-$abj;
$anchoS=$anchoR/$cols;
$margenSV=4;
$margenSH=5;
$altoS=$altoR/$fils;
$altoImg=10;
$altoText=8;
$altoC=50;
// set style for barcode
$style = array(
'border' => 2,
'vpadding' => 'auto',
'hpadding' => 'auto',
'fgcolor' => array(0,0,0),
'bgcolor' => false, //array(255,255,255)
'module_width' => 1, // width of a single module in points
'module_height' => 1 // height of a single module in points
);
$pdf->SetFont('helvetica', '', 9, '', false);
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
$s=0;$p=1;$consc=$rangoI;
$y=$arr;
$x=$izq;
// create some HTML content
ob_start();
$mes=date("F");
if ($mes=="January") $mes="Enero";
if ($mes=="February") $mes="Febrero";
if ($mes=="March") $mes="Marzo";
if ($mes=="April") $mes="Abril";
if ($mes=="May") $mes="Mayo";
if ($mes=="June") $mes="Junio";
if ($mes=="July") $mes="Julio";
if ($mes=="August") $mes="Agosto";
if ($mes=="September") $mes="Setiembre";
if ($mes=="October") $mes="Octubre";
if ($mes=="November") $mes="Noviembre";
if ($mes=="December") $mes="Diciembre";
$anio=date("Y");
$npag=$pdf->getAliasNbPages();
$lpag=convertir_a_letras($npag);
if($npag==1&&$lpag=='uno')$lpag='un';
for($i=0;$i<2;$i++){
?>
Gobernación del Departemento de Nariño
|
PIN generado para certificado de representación legal de asociaciones y ligas deportivas
|
Número de documento: |
echo $ced;?> |
Nombre: |
echo strtoupper($nom);?> |
Número de caso |
echo $id_caso;?> |
Código de barras
$barcodeobj = new TCPDFBarcode($id_caso, 'C128');
echo $barcodeobj->getBarcodeHTML(2, 30, 'black');
//echo $barcodeobj->getBarcodePNG(2, 30, array(0,0,0));
?> |
}
$html=ob_get_clean();
// output the HTML content
$pdf->writeHTML($html, true, false,false,false);
// reset pointer to the last page
$pdf->lastPage();
//---
//$pdf->AddPage();
ob_start();
$html=ob_get_clean();
// output the HTML content
$pdf->writeHTML($html, true, false,false,false);
// reset pointer to the last page
$pdf->lastPage();
//----
$nomdoc=md5(time()).'.pdf';
$pdf->Output($root."/tmp/".$nomdoc, 'F');
$url=$root_js.'tmp/'.$nomdoc;
TWFSV_81:999888
TWFSV_80:siti 3
TWFSV_79:German
TWFSV_78:1212323443
TWFSV_77:callae 123
Retorno :
Array
(
[ret] => inicioComponente_WF_DocSalida({"id":"1124","caso_id":"202","proceso_id":79,"tit":"Generacion pin","tarea_id":243,"paso_id":402,"desc":null,"url":"De clic aqui para descargar el archivo<\/a><\/div>"});
[suc] => 1
)
fin 2015-05-29 10:51:01
/******************************************************************************************************/
2015-05-29 10:56:00TraerCaso(202,79,)
CargarCaso :202
2015-05 29 10:56:00
CargarDatos: Caso :202
cargar datos de ejecucion de los ultimos pasos
select p.*,b.wf_tarea_id as tarea_id,
u.apellido||' '||u.nombre|| ': '||u.cargo as usr_ejec
from
(select max(id) as id, wf_caso_79_seguimiento_id,wf_paso_id from wf_caso_79_pasos a1 group by wf_caso_79_seguimiento_id,wf_paso_id order by id
)a
inner join wf_caso_79_pasos p using(id,wf_caso_79_seguimiento_id)
inner join ( select max(id) as wf_caso_79_seguimiento_id,wf_caso_79_id,wf_tarea_id from wf_caso_79_seguimiento where wf_caso_79_id =? group by wf_caso_79_id,wf_tarea_id order by wf_caso_79_id,wf_caso_79_seguimiento_id ) b using(wf_caso_79_seguimiento_id)
left join usuarios u using(core_usuario_id)
{"0":"454","id":"454","1":"288","wf_paso_id":"288","2":"367","wf_caso_79_seguimiento_id":"367","3":"91","core_usuario_id":"91","4":"2015-05-29 08:21:07","fecha_ejec":"2015-05-29 08:21:07","5":"143","dato":"143","6":"sce.t93","tabla":"sce.t93","7":"158","tarea_id":"158","8":"siti 3 German: ciudadano, cargo, Gerente","usr_ejec":"siti 3 German: ciudadano, cargo, Gerente"}
CargarDatos_288(143)
se carga 79_158_288_93_110_87044
se carga 79_158_288_93_110_7401
se carga 79_158_288_93_110_7311
se carga 79_158_288_93_110_730ddfds
{"0":"455","id":"455","1":"289","wf_paso_id":"289","2":"367","wf_caso_79_seguimiento_id":"367","3":"91","core_usuario_id":"91","4":"2015-05-29 08:21:10","fecha_ejec":"2015-05-29 08:21:10","5":null,"dato":null,"6":null,"tabla":null,"7":"158","tarea_id":"158","8":"siti 3 German: ciudadano, cargo, Gerente","usr_ejec":"siti 3 German: ciudadano, cargo, Gerente"}
CargarDatos_289()
cargar datos de ejecucion de las tareas (las ultimas si el proceso tiene ciclos)
select a.*, u.apellido||' '||u.nombre|| ': '||u.cargo as usr_asig , ur.apellido||' '||ur.nombre|| ': '||ur.cargo as usr_resol from
wf_caso_79_seguimiento a
inner join (
select max(b0.id) as id,b0.wf_caso_79_id,b0.wf_tarea_id from wf_caso_79_seguimiento b0 where b0.wf_caso_79_id =? group by b0.wf_caso_79_id,b0.wf_tarea_id order by wf_caso_79_id,id
) b using(id)
left join usuarios u using(core_usuario_id)
left join usuarios ur on ur.core_usuario_id=core_usuario_id_resol
{"0":"367","id":"367","1":"202","wf_caso_79_id":"202","2":"158","wf_tarea_id":"158","3":null,"core_usuario_id":null,"4":"2015-05-29 08:20:56","fec_asig":"2015-05-29 08:20:56","5":"91","core_usuario_id_resol":"91","6":"2015-05-29 08:21:10","fec_resol":"2015-05-29 08:21:10","7":"158","wf_tarea_id_sig":"158","8":null,"usr_asig":null,"9":"siti 3 German: ciudadano, cargo, Gerente","usr_resol":"siti 3 German: ciudadano, cargo, Gerente"}
{"0":"368","id":"368","1":"202","wf_caso_79_id":"202","2":"243","wf_tarea_id":"243","3":"91","core_usuario_id":"91","4":"2015-05-29 08:21:10","fec_asig":"2015-05-29 08:21:10","5":null,"core_usuario_id_resol":null,"6":null,"fec_resol":null,"7":"243","wf_tarea_id_sig":"243","8":"siti 3 German: ciudadano, cargo, Gerente","usr_asig":"siti 3 German: ciudadano, cargo, Gerente","9":null,"usr_resol":null}
2015-05 29 10:56:00
cargar datos del sujeto(,,s,79,202)
select s.*, m.nombre as nom_muni, c.nom_cat,fec_caso
from wf_caso_79 w
inner join core_sujetoverificacion s on w.id=202 AND s.id =w.core_sujetoverificacion_id
inner join plan_municipio m on s.plan_municipio_id=m.id
inner join core_sujetocategoria c on s.core_sujetocategoria_id=c.id
2015-05 29 10:56:00
tabla dat adic
select tabla from core_sujetoverificaciontipo where id=1
2015-05 29 10:56:00
tabla :persona
SELECT * FROM persona where id=20107
2015-05 29 10:56:00
Continuar(,243,,s)
EjecutarTarea_243() Generacion pin id_comp1124
91 91
ValidarUsuario(243):1
EjecutarPaso_402: docs:75 , caso=202 id_comp 1124
Mostrar docs
$tit_formato='GENERACIÓN DE PIN ';
$n= ' WFSV_79 '; $a= ' WFSV_80 ';
$nom=$n.$a;
$dir= ' WFSV_77 ';
$tel= ' WFSV_78 ';
$ced=' WFSV_81 ';
$fecha=date('Y-m-d');
$f=split('-',$fecha);
if($f[1]==1)$f[1]='Enero';
if($f[1]==2)$f[1]='Febrero';
if($f[1]==3)$f[1]='Marzo';
if($f[1]==4)$f[1]='Abril';
if($f[1]==5)$f[1]='Mayo';
if($f[1]==6)$f[1]='Junio';
if($f[1]==7)$f[1]='Julio';
if($f[1]==8)$f[1]='Agosto';
if($f[1]==9)$f[1]='Septiembre';
if($f[1]==10)$f[1]='Octubre';
if($f[1]==11)$f[1]='Noviembre';
if($f[1]==12)$f[1]='Diciembre';
require_once($root.'/lib/tcpdf/config/lang/eng.php');
require_once($root.'/lib/tcpdf/tcpdf.php');
require_once($root.'/lib/tcpdf/tcpdf_barcodes.php');
require_once($root.'/lib/num_letras.php');
//--------------------------------------------------------------------------
class MYPDF extends TCPDF {
//Page header
public function Header() {
// Logo
//echo str_replace('$root_js',$root_js,$CONFIG['CABECERA_FORMATOS_HTML']);
$image_file = K_PATH_IMAGES.'logo_alcaldia.jpg';
$htm='';
$htm2='
 |
';
$npag=$this->getAliasNbPages();
$this->writeHTMLCell($w = 0, $h = 0, $x = '', $y = '', $htm, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = 'top', $autopadding = true);
}
// Page footer
public function Footer() {
// Position at 15 mm from bottom
$this->SetY(-15);
// Set font
$this->SetFont('helvetica', 'I', 8);
// Page number
$this->Cell(0, 10, '', 0, false, 'C', 0, '', 0, false, 'T', 'M');
}
}
//--------------------------------------------------------------------------
// create new PDF document
$pdf = new MYPDF('p', 'mm', 'letter', true, 'UTF-8', false);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('Siti');
$pdf->SetTitle('GENERACIÓN DE PIN');
$pdf->SetSubject('Certificado');
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
// set default header data
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
// set header and footer fonts
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
// set margins
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
// set auto page breaks
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
$pdf->setLanguageArray($l);
// ---------------------------------------------------------
// NOTE: 2D barcode algorithms must be implemented on 2dbarcode.php class file.
// set font
$pdf->SetFont('helvetica', '', 10);
// add a page
$pdf->AddPage();
$sql="INSERT INTO sce.validar_pin VALUES (".$id_caso.", 'n',".$ced.");";
$con->Execute($sql);
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
$fils=4;
$cols=3;
$logo_empresa=$CONFIG['LOGO_EMPRESA'];
$codigo=$root_js.'build/view/common/marco/index.php?particular=001&accion=I&proc='.$CONFIG['PROCESO_STICKER'];
$izq=10+2;$der=10;$arr=10; $abj=10;
$sxp=$fils*$cols;
$tot=$rangoF-$rangoI+1;
$pags=ceil(($tot)/$sxp);
$anchoR=216-$izq-$der;
$altoR=279-$arr-$abj;
$anchoS=$anchoR/$cols;
$margenSV=4;
$margenSH=5;
$altoS=$altoR/$fils;
$altoImg=10;
$altoText=8;
$altoC=50;
// set style for barcode
$style = array(
'border' => 2,
'vpadding' => 'auto',
'hpadding' => 'auto',
'fgcolor' => array(0,0,0),
'bgcolor' => false, //array(255,255,255)
'module_width' => 1, // width of a single module in points
'module_height' => 1 // height of a single module in points
);
$pdf->SetFont('helvetica', '', 9, '', false);
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
$s=0;$p=1;$consc=$rangoI;
$y=$arr;
$x=$izq;
// create some HTML content
ob_start();
$mes=date("F");
if ($mes=="January") $mes="Enero";
if ($mes=="February") $mes="Febrero";
if ($mes=="March") $mes="Marzo";
if ($mes=="April") $mes="Abril";
if ($mes=="May") $mes="Mayo";
if ($mes=="June") $mes="Junio";
if ($mes=="July") $mes="Julio";
if ($mes=="August") $mes="Agosto";
if ($mes=="September") $mes="Setiembre";
if ($mes=="October") $mes="Octubre";
if ($mes=="November") $mes="Noviembre";
if ($mes=="December") $mes="Diciembre";
$anio=date("Y");
$npag=$pdf->getAliasNbPages();
$lpag=convertir_a_letras($npag);
if($npag==1&&$lpag=='uno')$lpag='un';
for($i=0;$i<2;$i++){
?>
Gobernación del Departemento de Nariño
|
PIN generado para certificado de representación legal de asociaciones y ligas deportivas
|
Número de documento: |
echo $ced;?> |
Nombre: |
echo strtoupper($nom);?> |
Número de caso |
echo $id_caso;?> |
Código de barras
$barcodeobj = new TCPDFBarcode($id_caso, 'C128');
echo $barcodeobj->getBarcodeHTML(2, 30, 'black');
//echo $barcodeobj->getBarcodePNG(2, 30, array(0,0,0));
?> |
}
$html=ob_get_clean();
// output the HTML content
$pdf->writeHTML($html, true, false,false,false);
// reset pointer to the last page
$pdf->lastPage();
//---
//$pdf->AddPage();
ob_start();
$html=ob_get_clean();
// output the HTML content
$pdf->writeHTML($html, true, false,false,false);
// reset pointer to the last page
$pdf->lastPage();
//----
$nomdoc=md5(time()).'.pdf';
$pdf->Output($root."/tmp/".$nomdoc, 'F');
$url=$root_js.'tmp/'.$nomdoc;
TWFSV_81:999888
TWFSV_80:siti 3
TWFSV_79:German
TWFSV_78:1212323443
TWFSV_77:callae 123
Retorno :
Array
(
[ret] => inicioComponente_WF_DocSalida({"id":"1124","caso_id":"202","proceso_id":79,"tit":"Generacion pin","tarea_id":243,"paso_id":402,"desc":null,"url":"De clic aqui para descargar el archivo<\/a><\/div>"});
[suc] => 1
)
fin 2015-05-29 10:56:01
/******************************************************************************************************/
2015-05-29 12:02:28TraerCaso(202,79,)
CargarCaso :202
2015-05 29 12:02:28
CargarDatos: Caso :202
cargar datos de ejecucion de los ultimos pasos
select p.*,b.wf_tarea_id as tarea_id,
u.apellido||' '||u.nombre|| ': '||u.cargo as usr_ejec
from
(select max(id) as id, wf_caso_79_seguimiento_id,wf_paso_id from wf_caso_79_pasos a1 group by wf_caso_79_seguimiento_id,wf_paso_id order by id
)a
inner join wf_caso_79_pasos p using(id,wf_caso_79_seguimiento_id)
inner join ( select max(id) as wf_caso_79_seguimiento_id,wf_caso_79_id,wf_tarea_id from wf_caso_79_seguimiento where wf_caso_79_id =? group by wf_caso_79_id,wf_tarea_id order by wf_caso_79_id,wf_caso_79_seguimiento_id ) b using(wf_caso_79_seguimiento_id)
left join usuarios u using(core_usuario_id)
{"0":"454","id":"454","1":"288","wf_paso_id":"288","2":"367","wf_caso_79_seguimiento_id":"367","3":"91","core_usuario_id":"91","4":"2015-05-29 08:21:07","fecha_ejec":"2015-05-29 08:21:07","5":"143","dato":"143","6":"sce.t93","tabla":"sce.t93","7":"158","tarea_id":"158","8":"siti 3 German: ciudadano, cargo, Gerente","usr_ejec":"siti 3 German: ciudadano, cargo, Gerente"}
CargarDatos_288(143)
se carga 79_158_288_93_110_87044
se carga 79_158_288_93_110_7401
se carga 79_158_288_93_110_7311
se carga 79_158_288_93_110_730ddfds
{"0":"455","id":"455","1":"289","wf_paso_id":"289","2":"367","wf_caso_79_seguimiento_id":"367","3":"91","core_usuario_id":"91","4":"2015-05-29 08:21:10","fecha_ejec":"2015-05-29 08:21:10","5":null,"dato":null,"6":null,"tabla":null,"7":"158","tarea_id":"158","8":"siti 3 German: ciudadano, cargo, Gerente","usr_ejec":"siti 3 German: ciudadano, cargo, Gerente"}
CargarDatos_289()
cargar datos de ejecucion de las tareas (las ultimas si el proceso tiene ciclos)
select a.*, u.apellido||' '||u.nombre|| ': '||u.cargo as usr_asig , ur.apellido||' '||ur.nombre|| ': '||ur.cargo as usr_resol from
wf_caso_79_seguimiento a
inner join (
select max(b0.id) as id,b0.wf_caso_79_id,b0.wf_tarea_id from wf_caso_79_seguimiento b0 where b0.wf_caso_79_id =? group by b0.wf_caso_79_id,b0.wf_tarea_id order by wf_caso_79_id,id
) b using(id)
left join usuarios u using(core_usuario_id)
left join usuarios ur on ur.core_usuario_id=core_usuario_id_resol
{"0":"367","id":"367","1":"202","wf_caso_79_id":"202","2":"158","wf_tarea_id":"158","3":null,"core_usuario_id":null,"4":"2015-05-29 08:20:56","fec_asig":"2015-05-29 08:20:56","5":"91","core_usuario_id_resol":"91","6":"2015-05-29 08:21:10","fec_resol":"2015-05-29 08:21:10","7":"158","wf_tarea_id_sig":"158","8":null,"usr_asig":null,"9":"siti 3 German: ciudadano, cargo, Gerente","usr_resol":"siti 3 German: ciudadano, cargo, Gerente"}
{"0":"368","id":"368","1":"202","wf_caso_79_id":"202","2":"243","wf_tarea_id":"243","3":"91","core_usuario_id":"91","4":"2015-05-29 08:21:10","fec_asig":"2015-05-29 08:21:10","5":null,"core_usuario_id_resol":null,"6":null,"fec_resol":null,"7":"243","wf_tarea_id_sig":"243","8":"siti 3 German: ciudadano, cargo, Gerente","usr_asig":"siti 3 German: ciudadano, cargo, Gerente","9":null,"usr_resol":null}
2015-05 29 12:02:28
cargar datos del sujeto(,,s,79,202)
select s.*, m.nombre as nom_muni, c.nom_cat,fec_caso
from wf_caso_79 w
inner join core_sujetoverificacion s on w.id=202 AND s.id =w.core_sujetoverificacion_id
inner join plan_municipio m on s.plan_municipio_id=m.id
inner join core_sujetocategoria c on s.core_sujetocategoria_id=c.id
2015-05 29 12:02:28
tabla dat adic
select tabla from core_sujetoverificaciontipo where id=1
2015-05 29 12:02:28
tabla :persona
SELECT * FROM persona where id=20107
2015-05 29 12:02:28
Continuar(,243,,s)
EjecutarTarea_243() Generacion pin id_comp1124
91 91
ValidarUsuario(243):1
EjecutarPaso_402: docs:75 , caso=202 id_comp 1124
Mostrar docs
$tit_formato='GENERACIÓN DE PIN ';
$n= ' WFSV_79 '; $a= ' WFSV_80 ';
$nom=$n.$a;
$dir= ' WFSV_77 ';
$tel= ' WFSV_78 ';
$ced=' WFSV_81 ';
$fecha=date('Y-m-d');
$f=split('-',$fecha);
if($f[1]==1)$f[1]='Enero';
if($f[1]==2)$f[1]='Febrero';
if($f[1]==3)$f[1]='Marzo';
if($f[1]==4)$f[1]='Abril';
if($f[1]==5)$f[1]='Mayo';
if($f[1]==6)$f[1]='Junio';
if($f[1]==7)$f[1]='Julio';
if($f[1]==8)$f[1]='Agosto';
if($f[1]==9)$f[1]='Septiembre';
if($f[1]==10)$f[1]='Octubre';
if($f[1]==11)$f[1]='Noviembre';
if($f[1]==12)$f[1]='Diciembre';
require_once($root.'/lib/tcpdf/config/lang/eng.php');
require_once($root.'/lib/tcpdf/tcpdf.php');
require_once($root.'/lib/tcpdf/tcpdf_barcodes.php');
require_once($root.'/lib/num_letras.php');
//--------------------------------------------------------------------------
class MYPDF extends TCPDF {
//Page header
public function Header() {
// Logo
//echo str_replace('$root_js',$root_js,$CONFIG['CABECERA_FORMATOS_HTML']);
$image_file = K_PATH_IMAGES.'logo_alcaldia.jpg';
$htm='';
$htm2='
 |
';
$npag=$this->getAliasNbPages();
$this->writeHTMLCell($w = 0, $h = 0, $x = '', $y = '', $htm, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = 'top', $autopadding = true);
}
// Page footer
public function Footer() {
// Position at 15 mm from bottom
$this->SetY(-15);
// Set font
$this->SetFont('helvetica', 'I', 8);
// Page number
$this->Cell(0, 10, '', 0, false, 'C', 0, '', 0, false, 'T', 'M');
}
}
//--------------------------------------------------------------------------
// create new PDF document
$pdf = new MYPDF('p', 'mm', 'letter', true, 'UTF-8', false);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('Siti');
$pdf->SetTitle('GENERACIÓN DE PIN');
$pdf->SetSubject('Certificado');
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
// set default header data
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
// set header and footer fonts
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
// set margins
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
// set auto page breaks
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
$pdf->setLanguageArray($l);
// ---------------------------------------------------------
// NOTE: 2D barcode algorithms must be implemented on 2dbarcode.php class file.
// set font
$pdf->SetFont('helvetica', '', 10);
// add a page
$pdf->AddPage();
$sql="INSERT INTO sce.validar_pin VALUES (".$id_caso.", 'n',".$ced.");";
$con->Execute($sql);
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
$fils=4;
$cols=3;
$logo_empresa=$CONFIG['LOGO_EMPRESA'];
$codigo=$root_js.'build/view/common/marco/index.php?particular=001&accion=I&proc='.$CONFIG['PROCESO_STICKER'];
$izq=10+2;$der=10;$arr=10; $abj=10;
$sxp=$fils*$cols;
$tot=$rangoF-$rangoI+1;
$pags=ceil(($tot)/$sxp);
$anchoR=216-$izq-$der;
$altoR=279-$arr-$abj;
$anchoS=$anchoR/$cols;
$margenSV=4;
$margenSH=5;
$altoS=$altoR/$fils;
$altoImg=10;
$altoText=8;
$altoC=50;
// set style for barcode
$style = array(
'border' => 2,
'vpadding' => 'auto',
'hpadding' => 'auto',
'fgcolor' => array(0,0,0),
'bgcolor' => false, //array(255,255,255)
'module_width' => 1, // width of a single module in points
'module_height' => 1 // height of a single module in points
);
$pdf->SetFont('helvetica', '', 9, '', false);
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
$s=0;$p=1;$consc=$rangoI;
$y=$arr;
$x=$izq;
// create some HTML content
ob_start();
$mes=date("F");
if ($mes=="January") $mes="Enero";
if ($mes=="February") $mes="Febrero";
if ($mes=="March") $mes="Marzo";
if ($mes=="April") $mes="Abril";
if ($mes=="May") $mes="Mayo";
if ($mes=="June") $mes="Junio";
if ($mes=="July") $mes="Julio";
if ($mes=="August") $mes="Agosto";
if ($mes=="September") $mes="Setiembre";
if ($mes=="October") $mes="Octubre";
if ($mes=="November") $mes="Noviembre";
if ($mes=="December") $mes="Diciembre";
$anio=date("Y");
$npag=$pdf->getAliasNbPages();
$lpag=convertir_a_letras($npag);
if($npag==1&&$lpag=='uno')$lpag='un';
for($i=0;$i<2;$i++){
?>
Gobernación del Departemento de Nariño
|
PIN generado para certificado de representación legal de asociaciones y ligas deportivas
|
Número de documento: |
echo $ced;?> |
Nombre: |
echo strtoupper($nom);?> |
Número de caso |
echo $id_caso;?> |
Código de barras
$barcodeobj = new TCPDFBarcode($id_caso, 'C128');
echo $barcodeobj->getBarcodeHTML(2, 30, 'black');
//echo $barcodeobj->getBarcodePNG(2, 30, array(0,0,0));
?> |
}
$html=ob_get_clean();
// output the HTML content
$pdf->writeHTML($html, true, false,false,false);
// reset pointer to the last page
$pdf->lastPage();
//---
//$pdf->AddPage();
ob_start();
$html=ob_get_clean();
// output the HTML content
$pdf->writeHTML($html, true, false,false,false);
// reset pointer to the last page
$pdf->lastPage();
//----
$nomdoc=md5(time()).'.pdf';
$pdf->Output($root."/tmp/".$nomdoc, 'F');
$url=$root_js.'tmp/'.$nomdoc;
TWFSV_81:999888
TWFSV_80:siti 3
TWFSV_79:German
TWFSV_78:1212323443
TWFSV_77:callae 123
Retorno :
Array
(
[ret] => inicioComponente_WF_DocSalida({"id":"1124","caso_id":"202","proceso_id":79,"tit":"Generacion pin","tarea_id":243,"paso_id":402,"desc":null,"url":"De clic aqui para descargar el archivo<\/a><\/div>"});
[suc] => 1
)
fin 2015-05-29 12:02:28
/******************************************************************************************************/