function testpdf() { $this->load->library('fpdf'); $this->fpdf->FPDF('P', 'cm', 'A4'); $this->fpdf->AddPage(); //$this->fpdf->SetFont('Arial','',10); $this->fpdf->setFont('Arial', 'B', 9); $teks = "Ini hasil Laporan PDF menggunakan Library FPDF di CodeIgniter"; $this->fpdf->Cell(3, 0.5, $teks, 1, '0', 'L', true); // $this->fpdf->setFont('Arial','B',7); $this->fpdf->Text(8, 1.9, 'Jl.Zambrud I No.35 Sumur Batu - Jakarta Pusat'); $this->fpdf->Line(15.6, 2.1, 5, 2.1); $this->fpdf->Text(8, 1.9, 'Jl.Zambrud I No.35 Sumur Batu - Jakarta Pusat'); //$this->fpdf->Ln(); $this->fpdf->Output(); $this->load->library('pdf'); $pdf = new PDF(); $pdf->SetMargins(1, 1); $pdf->AddPage(); $pdf->SetFont('Arial', 'B', 14); $pdf->Cell(0, 0.5, 'Hellol Ci', 0, 1, 'C'); $pdf->Output(); /* $this->load->library('fpdf'); $this->fpdf->FPDF('P','cm','A4'); $this->fpdf->Ln(); $this->fpdf->setFont('Arial','B',9); $this->fpdf->Text(7.5,1,"DAFTAR PENJUALAN BULAN "); $this->fpdf->setFont('Arial','B',9); $this->fpdf->Text(8.3,1.5,'KOMUNITAS MUSISI INDONESIA'); $this->fpdf->setFont('Arial','B',7); $this->fpdf->Text(8,1.9,'Jl.Zambrud I No.35 Sumur Batu - Jakarta Pusat'); $this->fpdf->Line(15.6,2.1,5,2.1); $this->fpdf->ln(1.6); $this->fpdf->ln(0.3); $this->fpdf->Output(); */ }
/** * Internal function to return the cover for publishing a research * @param $sectionEditorSubmission SectionEditorSubmission * @return string path to cover created */ function &_generateCover($sectionEditorSubmission) { $journal =& Request::getJournal(); import('classes.lib.tcpdf.pdf'); import('classes.lib.tcpdf.tcpdf'); Locale::requireComponents(array(LOCALE_COMPONENT_APPLICATION_COMMON, LOCALE_COMPONENT_OJS_EDITOR, LOCALE_COMPONENT_PKP_SUBMISSION, LOCALE_COMPONENT_PKP_USER)); $pdf = new PDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false); // No header and footer for this document $pdf->SetPrintHeader(false); $pdf->SetPrintFooter(false); $pdf->SetCreator(PDF_CREATOR); $pdf->SetAuthor($journal->getJournalTitle()); // set margins $pdf->SetMargins(PDF_MARGIN_LEFT, 20, PDF_MARGIN_RIGHT); // set auto page breaks $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); // set image scale factor $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); // Right now this cover page is only in english, but the english translation keys are ready $pdf->AddPage(); $pdf->SetFont('dejavusans', 'B', 14); $pdf->MultiCell(0, 6, 'Final Technical Report', 0, 'C'); // Locale::translate('editor.finalReport') $pdf->ln(); $pdf->ln(); $pdf->MultiCell(0, 6, 'for', 0, 'C'); // Locale::translate('editor.finalReport.for') $pdf->ln(); $pdf->ln(); $pdf->MultiCell(0, 6, 'Research Project', 0, 'C'); // Locale::translate('editor.finalReport.researchProject') $pdf->ln(); $pdf->ln(); $pdf->ln(); $pdf->ln(); $abstract = $sectionEditorSubmission->getAbstractByLocale('en_US'); // Right now, considering only the english language $pdf->SetFont('dejavusans', 'B', 16); $pdf->MultiCell(0, 6, $abstract->getScientificTitle(), 0, 'C'); $pdf->ln(); $authors = $sectionEditorSubmission->getAuthors(); $coInvestigatorsString = (string) ''; $pInvestigatorsString = (string) ''; foreach ($authors as $author) { if (!$author->getPrimaryContact()) { if ($coInvestigatorsString == '') { $coInvestigatorsString = $author->getFullName() . ' (' . $author->getAffiliation() . ')'; } else { $coInvestigatorsString = $coInvestigatorsString . ', ' . $author->getFullName() . ' (' . $author->getAffiliation() . ')'; } } else { $pInvestigatorsString = $author->getFullName() . ' (' . $author->getAffiliation() . ')'; } } $pdf->SetFont('dejavusans', '', 16); $pdf->MultiCell(0, 6, 'Principal Investigator: ' . $pInvestigatorsString, 0, 'C'); // Locale::translate('user.role.primaryInvestigator') if ($coInvestigatorsString != '') { $pdf->MultiCell(0, 6, 'Co-Investigator(s): ' . $coInvestigatorsString, 0, 'C'); // Locale::translate('user.role.coinvestigator') } $pdf->ln(); $pdf->ln(); $pdf->ln(); $pdf->ln(); $pdf->SetFont('dejavusans', 'B', 16); $pdf->MultiCell(0, 6, $sectionEditorSubmission->getProposalId(), 0, 'C'); $pdf->ln(); $pdf->ln(); $decision = $sectionEditorSubmission->getLastSectionDecision(); $pdf->MultiCell(0, 0, date("F Y", strtotime($decision->getDateDecided())), 0, 'L', 0, 1, '', 250, true); $pdf->Image("public/site/images/mainlogo.png", 'C', 230, 40, '', '', false, 'C', false, 300, 'R', false, false, 0, false, false, false); $pdf->AddPage(); $pdf->SetFont('dejavusans', 'B', 14); $pdf->MultiCell(0, 6, 'Final Technical Report', 0, 'C'); // Locale::translate('editor.finalReport') $pdf->ln(); $pdf->ln(); $pdf->SetFont('dejavusans', 'B', 12); $pdf->MultiCell(0, 6, 'Disclaimer', 0, 'C'); // Locale::translate('editor.finalReport.disclaimer') $pdf->ln(); $pdf->ln(); $pdf->SetFont('dejavusans', '', 11); $pdf->writeHTMLCell(0, 6, '', '', $journal->getSetting('reportDisclaimer'), 0, 0, false, true, 'J'); $filePath = Config::getVar('files', 'files_dir') . '/articles/' . $sectionEditorSubmission->getArticleId() . '/public/'; if (!FileManager::fileExists($filePath, 'dir')) { FileManager::mkdirtree($filePath); } $pdf->Output($filePath . 'tempCover.pdf', 'F'); return $filePath; }
$this->Cell(190, 5, utf8_decode("NÚMEROS DE AUTORIZACIÓN CERCANOS A CADUCAR"), 0, 1, 'C', 0); $this->SetFont('Arial', 'B', 10); $this->Cell(90, 5, utf8_decode($fecha), 0, 0, 'R', 0); $this->Cell(40, 5, utf8_decode($_GET['fin']), 0, 1, 'C', 0); $this->Ln(5); } function Footer() { $this->SetY(-15); $this->SetFont('Arial', 'I', 8); $this->Cell(0, 10, 'Pag. ' . $this->PageNo() . '/{nb}', 0, 0, 'C'); } } $pdf = new PDF('P', 'mm', 'a4'); $pdf->AddPage(); $pdf->SetMargins(0, 0, 0, 0); $pdf->AliasNbPages(); $pdf->AddFont('Amble-Regular', '', 'Amble-Regular.php'); $pdf->SetFont('Amble-Regular', '', 10); $pdf->SetFont('Arial', 'B', 9); $pdf->SetX(5); $pdf->SetFont('Amble-Regular', '', 9); $total = 0; $sub = 0; $repetido = 0; $contador = 0; $consulta = pg_query("select id_cliente,identificacion,nombres_cli,telefono,direccion_cli from clientes"); while ($row = pg_fetch_row($consulta)) { $repetido = 0; $total = 0; $sql1 = pg_query("select id_factura_venta,num_factura,num_autorizacion,fecha_autorizacion,fecha_caducidad FROM factura_venta where id_cliente='{$row['0']}' and estado='Activo' and fecha_caducidad between '{$fecha}' and '{$_GET['fin']}'");
public function basket() { $this->start = $this->input->get('start'); $this->end = $this->input->get('end'); $this->view = ""; if (isset($_GET['view']) && $_GET['view'] != "") { $this->view = pnp::clean($_GET['view']); } $this->data->getTimeRange($this->start, $this->end, $this->view); $basket = $this->session->get("basket"); if (is_array($basket) && sizeof($basket) > 0) { foreach ($basket as $item) { # explode host::service::source $slices = explode("::", $item); if (sizeof($slices) == 2) { $this->data->buildDataStruct($slices[0], $slices[1], $this->view); } if (sizeof($slices) == 3) { $this->data->buildDataStruct($slices[0], $slices[1], $this->view, $slices[2]); } } } //echo Kohana::debug($this->data->STRUCT); /* * PDF Output */ $pdf = new PDF(); $pdf->AliasNbPages(); $pdf->SetAutoPageBreak('off'); $pdf->SetMargins(17.5, 30, 10); $pdf->AddPage(); if ($this->use_bg) { $pdf->setSourceFile($this->config->conf['background_pdf']); $tplIdx = $pdf->importPage(1, '/MediaBox'); $pdf->useTemplate($tplIdx); } $pdf->SetCreator('Created with PNP'); $pdf->SetFont('Arial', '', 10); // Title foreach ($this->data->STRUCT as $data) { if ($pdf->GetY() > 200) { $pdf->AddPage(); if ($this->use_bg) { $pdf->useTemplate($tplIdx); } } if ($data['LEVEL'] == 0) { $pdf->SetFont('Arial', '', 12); $pdf->CELL(120, 10, $data['MACRO']['DISP_HOSTNAME'] . " -- " . $data['MACRO']['DISP_SERVICEDESC'], 0, 1); $pdf->SetFont('Arial', '', 10); $pdf->CELL(120, 5, $data['TIMERANGE']['title'] . " (" . $data['TIMERANGE']['f_start'] . " - " . $data['TIMERANGE']['f_end'] . ")", 0, 1); $pdf->SetFont('Arial', '', 8); $pdf->CELL(120, 5, "Datasource " . $data["ds_name"], 0, 1); } else { $pdf->SetFont('Arial', '', 8); $pdf->CELL(120, 5, "Datasource " . $data["ds_name"], 0, 1); } $image = $this->rrdtool->doImage($data['RRD_CALL'], $out = 'PDF'); $img = $this->rrdtool->saveImage($image); $Y = $pdf->GetY(); $cell_height = $img['height'] * 0.23; $cell_width = $img['width'] * 0.23; $pdf->Image($img['file'], 17.5, $Y, $cell_width, $cell_height, 'PNG'); $pdf->CELL(120, $cell_height, '', 0, 1); unlink($img['file']); } $pdf->Output("pnp4nagios.pdf", "I"); }
if ($monto != 0 and $iddepto != "-1") { /* $sql = "SELECT * from (SELECT experienciaentidad.id_entidad as 'id', SUM(experienciaentidad.monto_contrato) as monto, empresas.nombre_proponente, empresas.nit, empresas.matricula, empresas.celular, empresas.mail, (SELECT SUM(experienciaentidad.monto_contrato) FROM experienciaentidad where experienciaentidad.id_entidad = empresas.id) as montog, (SELECT SUM(experienciaentidad.monto_contrato) FROM experienciaentidad where experienciaentidad.id_entidad = empresas.id and experienciaentidad.tipo = 1) as montoesp, (SELECT SUM(round(((to_days(`experienciaentidad`.`fecha_fin_contrato`) - to_days(`experienciaentidad`.`fecha_ini_contrato`)) / 30),2)) FROM experienciaentidad where experienciaentidad.id_entidad = empresas.id) as tiempomeses FROM experienciaentidad INNER JOIN empresas ON experienciaentidad.id_entidad = empresas.id where empresas.estado = 4 and empresas.tipo <> 9 and empresas.tipo <> 19 group by experienciaentidad.id_entidad) as tb INNER JOIN departamentosinteres on tb.id = departamentosinteres.id_empresas where departamentosinteres.id_departamentos = $iddepto and tb.monto >= $monto"; */ $sql = "SELECT * from (SELECT experienciaentidad.id_entidad as 'id', \r\n SUM(experienciaentidad.monto_contrato) as monto, empresas.nombre_proponente, empresas.nit, empresas.matricula, empresas.celular, empresas.mail,\r\n(SELECT SUM(experienciaentidad.monto_contrato) FROM experienciaentidad where experienciaentidad.id_entidad = empresas.id and experienciaentidad.fecha_ini_contrato >= '{$date10}') as montog, \r\n(SELECT SUM(experienciaentidad.monto_contrato) FROM experienciaentidad where experienciaentidad.id_entidad = empresas.id and experienciaentidad.tipo = 1 and experienciaentidad.fecha_ini_contrato >= '{$date10}') as montoesp,\r\n(SELECT SUM(round(((to_days(`experienciaentidad`.`fecha_fin_contrato`) - to_days(`experienciaentidad`.`fecha_ini_contrato`)) / 30),2)) FROM experienciaentidad where experienciaentidad.id_entidad = empresas.id) as tiempomeses,\r\n(SELECT SUM(round(((to_days(`experienciaentidad`.`fecha_fin_contrato`) - to_days(`experienciaentidad`.`fecha_ini_contrato`)) / 30),2)) FROM experienciaentidad where experienciaentidad.id_entidad = empresas.id and experienciaentidad.tipo = 1) as tiempomesesp \r\n FROM experienciaentidad INNER JOIN empresas ON experienciaentidad.id_entidad = empresas.id\r\n where empresas.estado = 4 and empresas.tipo <> 9 and empresas.tipo <> 19 group by experienciaentidad.id_entidad) as tb \r\n INNER JOIN departamentosinteres on tb.id = departamentosinteres.id_empresas\r\n where departamentosinteres.id_departamentos = {$iddepto} and tb.montog >= ({$monto}*(SELECT dato1 from busquedaempresaparametros where parametro = 'monto_exp' and activo = 'SI' LIMIT 0,1)) and \r\ntb.montoesp >= ({$monto}*(SELECT dato2 from busquedaempresaparametros where parametro = 'monto_exp' and activo = 'SI' LIMIT 0,1)) order by tb.montog DESC"; } $pdf = new PDF('P', 'mm', 'Letter'); $pdf->SetMargins(15, 10, 5); $pdf->AddPage(); $pdf->SetFont('helvetica', 'B', 14); $pdf->Ln(5); $pdf->Cell(195, 5, utf8_decode('REGISTRO DE BUSQUEDA DE EMPRESAS'), 0, FALSE, 'C'); $pdf->Ln(4); $pdf->SetFont('helvetica', '', 10); $date = date('Y-m-d H:i:s'); $pdf->Cell(195, 5, utf8_decode('USUARIO: ') . $user, 0, FALSE, 'C'); $pdf->Ln(3); $pdf->Cell(195, 6, utf8_decode('CRITERIOS DE BUSQUEDA'), 0, FALSE, 'C'); $pdf->Ln(3); $pdf->Cell(195, 7, utf8_decode('MONTO DEL PROYECTO: ') . $montodato, 0, FALSE, 'C'); $pdf->Ln(3); $pdf->Cell(195, 8, utf8_decode('UBICACION DEL PROYECTO: ') . $departamento, 0, FALSE, 'C'); $pdf->Ln(4);
public static function generate($dbh, $appID, $method = 'I') { $data = self::get($dbh, $appID); //if (strlen($socialnumber) > 20) $socialnumber = $this->decrypt($socialnumber); $socialnumber = ''; //Blank out social on forms per Maria 6/6/2013 // initiate PDF $pdf = new PDF(); $pdf->SetMargins(PDF_MARGIN_LEFT, 10, PDF_MARGIN_RIGHT); // add a page $pdf->AddPage(); $pdf->SetFont("Helvetica", "", 11); $pdf->SetXY(33, 30); $pdf->Write(5, date('m/d/Y', strtotime($data['appDate']))); $pdf->SetXY(85, 30); $pdf->Write(5, $data['jobName']); $pdf->SetXY(30, 36); $pdf->Write(5, $data['lastname']); $pdf->SetXY(110, 36); $pdf->Write(5, $data['firstname']); $pdf->SetXY(170, 36); $pdf->Write(5, $data['middlename']); $pdf->SetXY(30, 62); $pdf->Write(5, $data['address']); $pdf->SetXY(105, 62); $pdf->Write(5, $data['city']); $pdf->SetXY(162, 62); $pdf->Write(5, $data['state']); $pdf->SetXY(187, 62); $pdf->Write(5, $data['zip']); $pdf->SetXY(70, 69); $pdf->Write(5, $data['years']); $pdf->SetXY(105, 69); $pdf->Write(5, $data['phone']); $pdf->SetXY(122, 76); $pdf->Write(5, $data['email']); $pdf->SetFont("Helvetica", "", 10); $highestx = 59 + $data['highestgrade'] * 5.4; if ($data['highestgrade'] > 8) { $highestx += 19; } if ($data['highestgrade'] > 12) { $highestx += 20; } $pdf->SetXY($highestx, 152); $pdf->Write(5, 'Highest'); $pdf->SetXY(46, 175); $pdf->Write(5, $data['highschool']); $pdf->SetXY(46, 184); $pdf->Write(5, $data['highschoolloc']); $pdf->SetXY(101, 175); $pdf->Write(5, $data['highschoolyears']); $pdf->SetXY(129, 175); $pdf->Write(5, $data['coursesubject']); $pdf->SetXY(174.5, 175); $pdf->write(5, $data['coursesubjectgraduated'] == 'Yes' ? 'X' : ''); $pdf->SetXY(174.5, 184); $pdf->write(5, $data['coursesubjectgraduated'] == 'GED' ? 'X' : ''); $pdf->SetXY(46, 193); $pdf->Write(5, $data['collegeuniversity']); $pdf->SetXY(46, 202); $pdf->Write(5, $data['collegeuniversityloc']); $pdf->SetXY(101, 193); $pdf->Write(5, $data['collegeuniversityyearscompleted']); $pdf->SetXY(129, 193); $pdf->Write(5, $data['collegeuniversitycourse']); $pdf->SetXY(174.5, 191); $pdf->write(5, $data['collegegraduated'] == 'Yes' ? 'X' : ''); $pdf->SetXY(184, 194); $pdf->Write(5, $data['collegegraduatedMonth']); $pdf->SetXY(196, 194); $pdf->Write(5, $data['collegegraduatedYear']); $pdf->SetXY(174.5, 202); $pdf->write(5, $data['collegegraduated'] == 'InP' ? 'X' : ''); $pdf->SetXY(46, 210); $pdf->Write(5, $data['othercollege']); $pdf->SetXY(46, 222); $pdf->Write(5, $data['othercollegeloc']); $pdf->SetXY(101, 214); $pdf->Write(5, $data['othercollegeyears']); $pdf->SetXY(129, 210); $pdf->Write(5, $data['othercollegecourse']); $pdf->SetXY(174.5, 209); $pdf->write(5, $data['othercollegecompleted'] == 'Yes' ? 'X' : ''); $pdf->SetXY(184, 213); $pdf->Write(5, $data['othercollegecompletedMonth']); $pdf->SetXY(194, 213); $pdf->Write(5, $data['othercollegecompletedYear']); $pdf->SetXY(174.5, 219); $pdf->write(5, $data['othercollegecompleted'] == 'Pro' ? 'X' : ''); $pdf->SetXY(128, 260.5); $pdf->Write(5, $data['language']); $pdf->SetXY(163, 260.5); $pdf->write(5, $data['languagespeak'] ? 'X' : ''); $pdf->SetXY(177, 260.5); $pdf->write(5, $data['languageread'] ? 'X' : ''); $pdf->SetXY(190, 260.5); $pdf->write(5, $data['languagewrite'] ? 'X' : ''); $pdf->AddPage(); $y = 0; $pdf->SetXY(10, $y + 46); $pdf->Write(5, $data['companyname1']); $pdf->SetXY(10, $y + 55); $pdf->MultiCell(50, 10, $data['companyaddress1'], 0, 'L'); $pdf->SetXY(10, $y + 64); $pdf->Write(5, $data['companyphone1']); $pdf->SetXY(10, $y + 72); $pdf->Write(5, $data['supervisorname1']); $pdf->SetXY(60, $y + 52); $pdf->MultiCell(80, 35, $data['responsibilities1'], 0, 'L'); $pdf->SetXY(141, $y + 56); $pdf->MultiCell(60, 25, $data['reasonforleaving1'], 0, 'L'); $pdf->SetXY(160, $y + 64); $pdf->write(5, "{$data['startwages1']} -> {$data['endedwages1']}"); if ($data['maywecontact1'] == 'Yes') { $pdf->SetXY(146, $y + 73); } else { $pdf->SetXY(178, $y + 73); } $pdf->write(5, 'X'); $y = 33; $pdf->SetXY(10, $y + 46); $pdf->Write(5, $data['companyname2']); $pdf->SetXY(10, $y + 55); $pdf->MultiCell(50, 10, $data['companyaddress2'], 0, 'L'); $pdf->SetXY(10, $y + 64); $pdf->Write(5, $data['companyphone2']); $pdf->SetXY(10, $y + 72); $pdf->Write(5, $data['supervisorname2']); $pdf->SetXY(60, $y + 52); $pdf->MultiCell(80, 35, $data['responsibilities2'], 0, 'L'); $pdf->SetXY(141, $y + 56); $pdf->MultiCell(60, 25, $data['reasonforleaving2'], 0, 'L'); $pdf->SetXY(160, $y + 64); $pdf->write(5, "{$data['startwages2']} -> {$data['endedwages2']}"); if ($data['maywecontact2'] == 'Yes') { $pdf->SetXY(140, $y + 73); } else { $pdf->SetXY(178, $y + 73); } $pdf->write(5, 'X'); $y = 66.5; $pdf->SetXY(10, $y + 46); $pdf->Write(5, $data['companyname3']); $pdf->SetXY(10, $y + 55); $pdf->MultiCell(50, 10, $data['companyaddress3'], 0, 'L'); $pdf->SetXY(10, $y + 64); $pdf->Write(5, $data['companyphone3']); $pdf->SetXY(10, $y + 72); $pdf->Write(5, $data['supervisorname3']); $pdf->SetXY(60, $y + 52); $pdf->MultiCell(80, 35, $data['responsibilities3'], 0, 'L'); $pdf->SetXY(141, $y + 56); $pdf->MultiCell(60, 25, $data['reasonforleaving3'], 0, 'L'); $pdf->SetXY(160, $y + 64); $pdf->write(5, "{$data['startwages3']} -> {$data['endedwages3']}"); if ($data['maywecontact3'] == 'Yes') { $pdf->SetXY(140, $y + 73); } else { $pdf->SetXY(178, $y + 73); } $pdf->write(5, 'X'); $pdf->SetXY(44, 265); $pdf->MultiCell(95, 10, "Signed Online as {$data['signature']} from {$data['ipAddress']}", 0, 'L'); $pdf->SetXY(150, 265); $pdf->Write(5, $data['appDate']); $pdf->AddPage(); $pdf->SetXY(26, 42); $pdf->Write(5, $data['lastname']); $pdf->SetXY(101, 42); $pdf->Write(5, $data['firstname']); $pdf->SetXY(172, 42); $pdf->Write(5, substr($data['middlename'], 0, 1)); $pdf->SetXY(115, 50); $pdf->Write(5, $data['zip']); $pdf->SetXY(48, 57); $pdf->Write(5, $data['jobName']); $pdf->SetXY(48, 57); $pdf->Write(5, $data['jobName']); $filename = $data['firstname'] . '_' . $data['lastname'] . '_app.pdf'; if ($method == 'F') { $pdf->Output(__DIR__ . '../../public_html/img/pdf/' . $filename, 'F'); return 'img/pdf/' . $filename; } elseif ($method == 'I') { $pdf->Output(__DIR__ . '../../public_html/img/pdf/' . $filename, 'I'); die; } }
echo "<br><br>"; */ $name = $r1['studentbio_fname'] . " " . $r1['studentbio_lname']; // echo "name=$name"; $school = $r2['school_names_desc']; $q5 = @mysql_query("select * from studentcontact where studentcontact_id = {$r1['studentbio_id']}"); $r5 = @mysql_fetch_array($q5); $address1 = $r5['studentcontact_address1']; $address2 = $r5['studentcontact_address2']; $city = $r5['studentcontact_city']; $zip = $r5['studentcontact_zip']; $pdf = new PDF('L'); $w = array(35, 35, 35, 35, 35, 35); $pdf->Open(); $pdf->SetWidths($w); $pdf->SetMargins(50, 30); $pdf->AddPage(); $pdf->SetFillColor(255, 255, 255); $pdf->SetXY(195, 35); $pdf->SetFont('Times', 'IB', 16); $pdf->Write(1, $school); $pdf->SetFont('Times', '', 14); $pdf->Ln(); $pdf->SetXY(30, 50); $pdf->Write(1, $name); $pdf->Ln(); $pdf->SetXY(30, 55); $pdf->Write(1, $address1); $pdf->Ln(); if (!empty($address2)) { $pdf->SetXY(30, 60);
//y position: rough estimate, width, height, filetype, link: click it! //$this->Image("D:\logo.jpg", (4.5/2)-1.5, 9.8, 3, 1, "JPG","www.verizon.com"); } } /*define('DB_HOST1', 'localhost'); define('DB_NAME1', 'vbass'); define('DB_USER1','root'); define('DB_PASSWORD1',''); $con=mysql_connect(DB_HOST1,DB_USER1,DB_PASSWORD1) or die("Failed to connect to MySQL: " . mysql_error()); mysql_select_db('DB_NAME1',$con) or die("Failed to connect to MySQL: " . mysql_error());*/ //echo 'I am here'; exit; if (isset($_GET['file_name'])) { $ename = $_GET['file_name']; $pdf = new PDF("P", "in", "Letter"); $pdf->SetMargins(1.5, 1.5, 1.5); $pdf->AddPage(); $pdf->SetFont('Times', '', 12); $pdf->Ln(); $pdf->Ln(); $sql = "select e.ent_ins_name,a.line1,a.line2,a.zip_code,a.state,a.country,b.period_st_dt,\nb.period_ed_dt,b.tnx_desc,b.txn_base_amt,b.txn_qty,b.tax_amt,b.txn_amt\n From ADDRESS_HISTORY_TR a, bill_gen_det b, ent_inst_tr e, version v where \nb.ent_inst_id = e.ent_inst_id\nand e.address_id = a.address_id\nand v.ent_vr_catg = 'BL'\nand v.ver_date = (select max(ver_date) from version where ent_vr_catg ='BL')\nand e.ent_vr_nr = v.ent_vr_nr\nand e.ent_ins_name = '" . $ename . "'"; $result = mysql_query($sql); if (!$result) { printf("Error:sads %s\n", mysql_error($con)); exit; } $i = 0; while ($rows = mysql_fetch_array($result)) { $AccName = 'Account Name'; $accname = $rows[0]; $addline1 = $rows[1];
function automaticSummaryInPDF($submission) { $countryDao =& DAORegistry::getDAO('CountryDAO'); $articleDrugInfoDao =& DAORegistry::getDAO('ArticleDrugInfoDAO'); $extraFieldDAO =& DAORegistry::getDAO('ExtraFieldDAO'); $journal =& Request::getJournal(); $submitter =& $submission->getUser(); $title = $journal->getJournalTitle(); $articleTexts = $submission->getArticleTexts(); $articleTextLocales = $journal->getSupportedLocaleNames(); $secIds = $submission->getArticleSecIds(); $details = $submission->getArticleDetails(); $purposes = $submission->getArticlePurposes(); $articlePrimaryOutcomes = $submission->getArticleOutcomesByType(ARTICLE_OUTCOME_PRIMARY); $articleSecondaryOutcomes = $submission->getArticleOutcomesByType(ARTICLE_OUTCOME_SECONDARY); $coutryList = $countryDao->getCountries(); $articleDrugs = $submission->getArticleDrugs(); $pharmaClasses = $articleDrugInfoDao->getPharmaClasses(); $drugStudyClasses = $articleDrugInfoDao->getClassKeysMap(); $articleSites = $submission->getArticleSites(); $expertisesList = $extraFieldDAO->getExtraFieldsList(EXTRA_FIELD_THERAPEUTIC_AREA, EXTRA_FIELD_ACTIVE); $fundingSources = $submission->getArticleFundingSources(); $pSponsor = $submission->getArticlePrimarySponsor(); $sSponsors = $submission->getArticleSecondarySponsors(); $CROs = $submission->getArticleCROs(); $contact = $submission->getArticleContact(); Locale::requireComponents(array(LOCALE_COMPONENT_APPLICATION_COMMON, LOCALE_COMPONENT_OJS_EDITOR, LOCALE_COMPONENT_PKP_SUBMISSION, LOCALE_COMPONENT_PKP_USER)); import('classes.lib.tcpdf.pdf'); import('classes.lib.tcpdf.tcpdf'); $pdf = new PDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false); $pdf->SetCreator(PDF_CREATOR); $pdf->SetAuthor($submitter->getFullName()); $pdf->SetTitle($title); $subject = $submission->getProposalId() . ' - ' . Locale::translate('submission.summary'); $pdf->SetSubject($subject); $cell_width = 45; $cell_height = 6; // set default header data $pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE . ' 020', 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, 58, 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); $pdf->AddPage(); // Title $pdf->SetFont('Times', 'B', 15); $w = $pdf->GetStringWidth($title) + 6; $pdf->SetX((210 - $w) / 2); $pdf->Cell($w, 9, $title, 0, 1, 'C'); // sub-title $pdf->SetFont('Times', 'BI', 14); $w2 = $pdf->GetStringWidth($subject) + 6; $pdf->SetX((210 - $w2) / 2); $pdf->Cell($w2, 9, $subject, 0, 1, 'C'); // Line break $pdf->Ln(10); // Main Info $pdf->SetFont('Times', '', 12); $pdf->MultiRow(50, Locale::translate("common.proposalId"), $submission->getProposalId(), 'L'); $pdf->MultiRow(50, Locale::translate("article.title"), $submission->getScientificTitle(), 'L'); $pdf->MultiRow(50, Locale::translate("submission.submitter"), $submitter->getFullName(), 'L'); $pdf->MultiRow(50, Locale::translate("common.dateSubmitted"), $submission->getDateSubmitted(), 'L'); // Line break $pdf->Ln(10); //CT Information $pdf->SetFont('Times', 'B', 14); $pdf->Cell(190, 9, 'I' . Locale::translate('common.queue.long.articleDetails', array('id' => '')), 0, 1, 'L'); $pdf->Ln(5); $pdf->SetFont('Times', '', 12); $scientificTitle = null; foreach ($articleTexts as $atKey => $articleText) { if (!$scientificTitle) { $pdf->MultiRow(50, Locale::translate("proposal.scientificTitle"), $articleText->getScientificTitle() . ' (' . $articleTextLocales[$atKey] . ')', 'L'); $scientificTitle = true; } else { $pdf->MultiRow(50, '', $articleText->getScientificTitle() . ' (' . $articleTextLocales[$atKey] . ')', 'L'); } } $publicTitle = null; foreach ($articleTexts as $atKey => $articleText) { if (!$publicTitle) { $pdf->MultiRow(50, Locale::translate("proposal.publicTitle"), $articleText->getPublicTitle() . ' (' . $articleTextLocales[$atKey] . ')', 'L'); $publicTitle = true; } else { $pdf->MultiRow(50, '', $articleText->getPublicTitle() . ' (' . $articleTextLocales[$atKey] . ')', 'L'); } } $pdf->Ln(3); $firstSecId = null; foreach ($secIds as $secId) { if (!$firstSecId) { $pdf->MultiRow(50, Locale::translate("proposal.articleSecId"), $secId->getSecId() . ' (' . Locale::translate($secId->getTypeKey()) . ')', 'L'); $firstSecId = true; } else { $pdf->MultiRow(50, '', $secId->getSecId() . ' (' . Locale::translate($secId->getTypeKey()) . ')', 'L'); } } $pdf->Ln(3); $pdf->MultiRow(50, Locale::translate("proposal.protocolVersion"), $details->getProtocolVersion(), 'L'); $pdf->Ln(3); $pdf->MultiRow(50, Locale::translate("proposal.therapeuticArea"), $details->getRightTherapeuticAreaDisplay(), 'L'); $pdf->Ln(3); $firstICD10 = null; foreach ($details->getHealthCondDiseaseArrayToDisplay() as $healthCond) { $code = $healthCond['code']; $exactCode = $healthCond['exactCode']; if ($exactCode != '') { $code = $code . ' (' . $exactCode . ')'; } if (!$firstICD10) { $pdf->MultiRow(50, Locale::translate("proposal.icd10s"), $code, 'L'); $firstICD10 = true; } else { $pdf->MultiRow(50, '', $code, 'L'); } } $pdf->Ln(3); $firstPurpose = null; foreach ($purposes as $purpose) { if (!$firstPurpose) { $purposeTitle = Locale::translate("proposal.purposes"); $firstPurpose = true; } else { $purposeTitle = ''; } if ($purpose->getType() == ARTICLE_PURPOSE_TYPE_OBS) { $pdf->MultiRow(50, $purposeTitle, Locale::translate($purpose->getTypeKey()), 'L'); } else { $pdf->MultiRow(50, $purposeTitle, Locale::translate('proposal.purpose.type.int'), 'L'); $pdf->MultiRow(50, '', ' ' . Locale::translate('proposal.purposes.type') . ': ' . Locale::translate($purpose->getTypeKey()), 'L'); $pdf->MultiRow(50, '', ' ' . Locale::translate('proposal.purposes.ctPhase') . ': ' . Locale::translate($purpose->getCTPhaseKey()), 'L'); $pdf->MultiRow(50, '', ' ' . Locale::translate('proposal.purposes.studyDesign') . ', ' . Locale::translate('proposal.purposes.allocation') . ': ' . Locale::translate($purpose->getAllocationKey()), 'L'); $pdf->MultiRow(50, '', ' ' . Locale::translate('proposal.purposes.masking') . ': ' . Locale::translate($purpose->getMaskingKey()), 'L'); $pdf->MultiRow(50, '', ' ' . Locale::translate('proposal.purposes.control') . ': ' . Locale::translate($purpose->getControlKey()), 'L'); $pdf->MultiRow(50, '', ' ' . Locale::translate('proposal.purposes.assignment') . ': ' . Locale::translate($purpose->getAssignmentKey()), 'L'); $pdf->MultiRow(50, '', ' ' . Locale::translate('proposal.purposes.endpoint') . ': ' . Locale::translate($purpose->getEndpointKey()), 'L'); } } $pdf->Ln(3); $description = null; foreach ($articleTexts as $atKey => $articleText) { if (!$description) { $pdf->MultiRow(50, Locale::translate("proposal.description"), $articleText->getDescription() . ' (' . $articleTextLocales[$atKey] . ')', 'L'); $description = true; } else { $pdf->MultiRow(50, '', $articleText->getDescription() . ' (' . $articleTextLocales[$atKey] . ')', 'L'); } } $pdf->Ln(3); $kic = null; foreach ($articleTexts as $atKey => $articleText) { if (!$kic) { $pdf->MultiRow(50, Locale::translate("proposal.keyInclusionCriteria"), $articleText->getKeyInclusionCriteria() . ' (' . $articleTextLocales[$atKey] . ')', 'L'); $kic = true; } else { $pdf->MultiRow(50, '', $articleText->getKeyInclusionCriteria() . ' (' . $articleTextLocales[$atKey] . ')', 'L'); } } $pdf->Ln(3); $kec = null; foreach ($articleTexts as $atKey => $articleText) { if (!$kec) { $pdf->MultiRow(50, Locale::translate("proposal.keyExclusionCriteria"), $articleText->getKeyExclusionCriteria() . ' (' . $articleTextLocales[$atKey] . ')', 'L'); $kec = true; } else { $pdf->MultiRow(50, '', $articleText->getKeyExclusionCriteria() . ' (' . $articleTextLocales[$atKey] . ')', 'L'); } } $pdf->Ln(3); $firstPOutcome = null; foreach ($articlePrimaryOutcomes as $articleOutcomeLocales) { foreach ($articleOutcomeLocales as $key => $articleOutcome) { if (!$firstPOutcome) { $outcomeTitle = Locale::translate("proposal.primaryOutcomes"); $firstPOutcome = true; } else { $outcomeTitle = ''; } $pdf->MultiRow(50, $outcomeTitle, $articleOutcome->getName() . ' (' . $articleTextLocales[$key] . ')', 'L'); $pdf->MultiRow(50, '', ' ' . Locale::translate('proposal.primaryOutcome.measurement') . ': ' . $articleOutcome->getMeasurement(), 'L'); $pdf->MultiRow(50, '', ' ' . Locale::translate('proposal.primaryOutcome.timepoint') . ': ' . $articleOutcome->getTimepoint(), 'L'); $pdf->Ln(3); } } $firstSOutcome = null; foreach ($articleSecondaryOutcomes as $articleOutcomeLocales) { foreach ($articleOutcomeLocales as $key => $articleOutcome) { if (!$firstSOutcome) { $sOutcomeTitle = Locale::translate("proposal.secondaryOutcomes"); $firstSOutcome = true; } else { $sOutcomeTitle = ''; } $pdf->MultiRow(50, $sOutcomeTitle, $articleOutcome->getName() . ' (' . $articleTextLocales[$key] . ')', 'L'); $pdf->MultiRow(50, '', ' ' . Locale::translate('proposal.primaryOutcome.measurement') . ': ' . $articleOutcome->getMeasurement(), 'L'); $pdf->MultiRow(50, '', ' ' . Locale::translate('proposal.primaryOutcome.timepoint') . ': ' . $articleOutcome->getTimepoint(), 'L'); $pdf->Ln(3); } } $pdf->MultiRow(50, Locale::translate("proposal.age.minimum"), $details->getMinAgeNum() . ' ' . Locale::translate($details->getMinAgeUnitKey()), 'L'); $pdf->MultiRow(50, Locale::translate("proposal.age.maximum"), $details->getMaxAgeNum() . ' ' . Locale::translate($details->getMaxAgeUnitKey()), 'L'); $pdf->MultiRow(50, Locale::translate("proposal.sex"), Locale::translate($details->getSexKey()), 'L'); $pdf->MultiRow(50, Locale::translate("proposal.healthy"), Locale::translate($details->getYesNoKey($details->getHealthy())), 'L'); $pdf->Ln(3); $pdf->MultiRow(50, Locale::translate("proposal.localeSampleSize"), $details->getLocaleSampleSize(), 'L'); $pdf->MultiRow(50, Locale::translate("proposal.multinational") . ' ' . $journal->getLocalizedSetting('location'), Locale::translate($details->getYesNoKey($details->getMultinational())), 'L'); if ($details->getMultinational() == ARTICLE_DETAIL_YES) { foreach ($details->getIntSampleSizeArray() as $countryAndNumberArray) { $country = $countryAndNumberArray['country']; $pdf->MultiRow(50, '', ' ' . $coutryList[$country] . ': ' . $countryAndNumberArray['number'], 'L'); } } $pdf->Ln(3); $pdf->MultiRow(50, Locale::translate("proposal.expectedDate"), Locale::translate('proposal.startDate') . ': ' . $details->getStartDate() . ', ' . Locale::translate('proposal.endDate') . ': ' . $details->getEndDate(), 'L'); $pdf->Ln(3); $pdf->MultiRow(50, Locale::translate("proposal.recruitment"), Locale::translate("proposal.recruitment.status") . ': ' . Locale::translate($details->getRecruitmentStatusKey()), 'L'); $rssi = null; foreach ($articleTexts as $atKey => $articleText) { if ($articleText->getRecruitmentInfo() != '') { if (!$rssi) { $pdf->MultiRow(50, '', Locale::translate("proposal.recruitment.info") . ': ' . $articleText->getRecruitmentInfo() . ' (' . $articleTextLocales[$atKey] . ')', 'L'); $rssi = true; } else { $pdf->MultiRow(50, '', $articleText->getRecruitmentInfo() . ' (' . $articleTextLocales[$atKey] . ')', 'L'); } } } $pdf->MultiRow(50, '', Locale::translate("proposal.recruitment.adScheme") . ': ' . Locale::translate($details->getYesNoKey($details->getAdvertisingScheme())), 'L'); // Line break $pdf->Ln(10); //Drug products $pdf->SetFont('Times', 'B', 14); $pdf->Cell(190, 9, 'II' . Locale::translate('common.queue.long.articleDrugs', array('id' => '')), 0, 1, 'L'); $pdf->Ln(5); foreach ($articleDrugs as $articleDrug) { $pdf->SetFont('Times', 'BU', 12); $pdf->Cell(190, 9, $articleDrug->getName(), 0, 1, 'L'); $pdf->SetFont('Times', '', 12); $pdf->Ln(3); $pdf->MultiRow(50, Locale::translate("proposal.drugInfo.type"), Locale::translate($articleDrug->getTypeKey()), 'L'); $pdf->MultiRow(50, Locale::translate("proposal.drugInfo.name"), $articleDrug->getName(), 'L'); $pdf->MultiRow(50, Locale::translate("proposal.drugInfo.brandName"), $articleDrug->getBrandName(), 'L'); if ($articleDrug->getOtherAdministration() == 'NA') { $pdf->MultiRow(50, Locale::translate("proposal.drugInfo.administration"), Locale::translate($articleDrug->getAdministrationKey()), 'L'); } else { $pdf->MultiRow(50, Locale::translate("proposal.drugInfo.administration"), $articleDrug->getOtherAdministration(), 'L'); } if ($articleDrug->getOtherForm() == 'NA') { $pdf->MultiRow(50, Locale::translate("proposal.drugInfo.form"), Locale::translate($articleDrug->getFormKey()), 'L'); } else { $pdf->MultiRow(50, Locale::translate("proposal.drugInfo.form"), $articleDrug->getOtherForm(), 'L'); } $pdf->MultiRow(50, Locale::translate("proposal.drugInfo.strength"), $articleDrug->getStrength(), 'L'); $pdf->MultiRow(50, Locale::translate("proposal.drugInfo.storage"), Locale::translate($articleDrug->getStorageKey()), 'L'); $pdf->MultiRow(50, Locale::translate("proposal.drugInfo.pharmaClass"), $pharmaClasses[$articleDrug->getPharmaClass()], 'L'); $firstClass = false; $classIIIOrIV = false; $classesToDisplay = ''; foreach ($articleDrug->getClassesArray() as $class) { if ($class == ARTICLE_DRUG_INFO_CLASS_III || $class == ARTICLE_DRUG_INFO_CLASS_IV) { $classIIIOrIV = true; } if (!$firstClass) { $classesToDisplay = Locale::translate($drugStudyClasses[$class]); } else { $classesToDisplay = $classesToDisplay . ', ' . Locale::translate($drugStudyClasses[$class]); } $firstClass = true; } $pdf->MultiRow(50, Locale::translate("proposal.drugInfo.studyClasses"), $classesToDisplay, 'L'); if ($classIIIOrIV) { $countriesToDisplay = ''; $firstCountry = false; foreach ($articleDrug->getCountriesArray() as $country) { if (!$firstCountry) { $countriesToDisplay = $coutryList[$country]; } else { $countriesToDisplay = $countriesToDisplay . ', ' . $coutryList[$country]; } $firstCountry = true; } $pdf->MultiRow(50, '', Locale::translate("proposal.drugInfo.countries") . ': ' . $countriesToDisplay, 'L'); $pdf->MultiRow(50, '', Locale::translate("proposal.drugInfo.conditionsOfUse") . ': ' . Locale::translate($articleDrug->getDifferentConditionsOfUseKey()), 'L'); } $pdf->MultiRow(50, Locale::translate("proposal.drugInfo.cpr"), Locale::translate($articleDrug->getCPRKey()), 'L'); if ($articleDrug->getCPR() == ARTICLE_DRUG_INFO_YES) { $pdf->MultiRow(50, '', Locale::translate("proposal.drugInfo.drugRegistrationNumber") . ': ' . $articleDrug->getDrugRegistrationNumber(), 'L'); } if ($articleDrug->getImportedQuantity() != '') { $pdf->MultiRow(50, Locale::translate("proposal.drugInfo.importedQuantity"), $articleDrug->getImportedQuantity(), 'L'); } $firstManufacturer = false; foreach ($articleDrug->getManufacturers() as $manufacturer) { $manufacturerTitle = ''; if (!$firstManufacturer) { $manufacturerTitle = Locale::translate('proposal.drugInfo.manufacturers'); } $pdf->MultiRow(50, $manufacturerTitle, $manufacturer->getName(), 'L'); $pdf->MultiRow(50, '', Locale::translate('proposal.drugInfo.manufacturer.address') . ': ' . $manufacturer->getAddress(), 'L'); $firstManufacturer = true; $pdf->Ln(2); } $pdf->Ln(3); } // Line break $pdf->Ln(10); // Trial Site(s) $pdf->SetFont('Times', 'B', 14); $pdf->Cell(190, 9, 'III' . Locale::translate('common.queue.long.articleSites', array('id' => '')), 0, 1, 'L'); $pdf->Ln(5); foreach ($articleSites as $articleSite) { $trialSiteObject = $articleSite->getTrialSiteObject(); $pdf->SetFont('Times', 'BU', 12); $pdf->Cell(190, 9, $trialSiteObject->getName(), 0, 1, 'L'); $pdf->SetFont('Times', '', 12); $pdf->Ln(3); $pdf->MultiRow(50, Locale::translate("proposal.articleSite.site"), $trialSiteObject->getName(), 'L'); $pdf->MultiRow(50, '', Locale::translate('proposal.articleSite.siteAddress') . ': ' . $trialSiteObject->getAddress(), 'L'); $pdf->MultiRow(50, '', Locale::translate('proposal.articleSite.siteCity') . ': ' . $trialSiteObject->getCity(), 'L'); $pdf->MultiRow(50, '', Locale::translate('proposal.articleSite.siteRegion') . ': ' . $trialSiteObject->getRegionText(), 'L'); $pdf->MultiRow(50, '', Locale::translate('proposal.articleSite.siteLicensure') . ': ' . $trialSiteObject->getLicensure(), 'L'); $pdf->MultiRow(50, '', Locale::translate('proposal.articleSite.siteAccreditation') . ': ' . $trialSiteObject->getAccreditation(), 'L'); $pdf->Ln(2); $pdf->MultiRow(50, Locale::translate("proposal.articleSite.erc"), $articleSite->getERCName(), 'L'); $pdf->Ln(2); $pdf->MultiRow(50, Locale::translate("proposal.articleSite.authority"), $articleSite->getAuthority(), 'L'); $pdf->MultiRow(50, '', Locale::translate('proposal.articleSite.primaryPhone') . ': ' . $articleSite->getPrimaryPhone(), 'L'); if ($articleSite->getSecondaryPhone()) { $pdf->MultiRow(50, '', Locale::translate('proposal.articleSite.secondaryPhone') . ': ' . $articleSite->getSecondaryPhone(), 'L'); } if ($articleSite->getFax()) { $pdf->MultiRow(50, '', Locale::translate('proposal.articleSite.fax') . ': ' . $articleSite->getFax(), 'L'); } $pdf->MultiRow(50, '', Locale::translate('proposal.articleSite.email') . ': ' . $articleSite->getEmail(), 'L'); $pdf->Ln(2); $pdf->MultiRow(50, Locale::translate("proposal.articleSite.subjectsNumber"), $articleSite->getSubjectsNumber(), 'L'); $pdf->Ln(2); $countInvestigators = 1; foreach ($articleSite->getInvestigators() as $investigator) { $investigatorTitle = ""; if ($countInvestigators == 1) { $investigatorTitle = Locale::translate('user.role.primaryInvestigator'); } elseif ($countInvestigators == 2) { $investigatorTitle = Locale::translate('user.role.coinvestigator'); } $pdf->MultiRow(50, $investigatorTitle, $investigator->getFullName(), 'L'); $pdf->MultiRow(50, '', Locale::translate('proposal.articleSite.investigator.expertise') . ': ' . $expertisesList[$investigator->getExpertise()], 'L'); $pdf->MultiRow(50, '', Locale::translate('proposal.articleSite.investigator.iPrimaryPhone') . ': ' . $investigator->getPrimaryPhoneNumber(), 'L'); if ($investigator->getSecondaryPhoneNumber()) { $pdf->MultiRow(50, '', Locale::translate('proposal.articleSite.investigator.iSecondaryPhone') . ': ' . $investigator->getSecondaryPhoneNumber(), 'L'); } if ($investigator->getFaxNumber()) { $pdf->MultiRow(50, '', Locale::translate('proposal.articleSite.investigator.iFax') . ': ' . $investigator->getFaxNumber(), 'L'); } $pdf->MultiRow(50, '', Locale::translate('proposal.articleSite.investigator.iEmail') . ': ' . $investigator->getEmail(), 'L'); $countInvestigators++; } $pdf->Ln(3); } // Line break $pdf->Ln(10); // Sponsors $pdf->SetFont('Times', 'B', 14); $pdf->Cell(190, 9, 'IV' . Locale::translate('common.queue.long.articleSponsors', array('id' => '')), 0, 1, 'L'); $pdf->Ln(5); $pdf->SetFont('Times', '', 12); $firstFSource = false; foreach ($fundingSources as $fundingSource) { $fSourceTitle = ''; if (!$firstFSource) { $fSourceTitle = Locale::translate('proposal.articleSponsor.fundingSources'); } $institution = $fundingSource->getInstitutionObject(); $pdf->MultiRow(50, $fSourceTitle, $institution->getInstitutionName(), 'L'); $pdf->MultiRow(50, '', ' ' . Locale::translate('proposal.articleSponsor.acronym') . ': ' . $institution->getInstitutionAcronym(), 'L'); $pdf->MultiRow(50, '', ' ' . Locale::translate('proposal.articleSponsor.type') . ': ' . Locale::translate($institution->getInstitutionTypeKey()), 'L'); $pdf->MultiRow(50, '', ' ' . Locale::translate('proposal.articleSponsor.location') . ': ' . $institution->getInstitutionInternationalText(), 'L'); if ($institution->getInstitutionInternational() == INSTITUTION_INTERNATIONAL) { $pdf->MultiRow(50, '', ' ' . Locale::translate('proposal.articleSponsor.locationInternational') . ': ' . $institution->getInstitutionLocationText(), 'L'); } else { $pdf->MultiRow(50, '', ' ' . Locale::translate('proposal.articleSponsor.locationCountry') . ': ' . $institution->getInstitutionLocationText(), 'L'); } $pdf->Ln(2); $firstFSource = true; } $pdf->Ln(1); $institution = $pSponsor->getInstitutionObject(); $pdf->MultiRow(50, Locale::translate("proposal.articleSponsor.primarySponsor"), $institution->getInstitutionName(), 'L'); $pdf->MultiRow(50, '', ' ' . Locale::translate('proposal.articleSponsor.acronym') . ': ' . $institution->getInstitutionAcronym(), 'L'); $pdf->MultiRow(50, '', ' ' . Locale::translate('proposal.articleSponsor.type') . ': ' . Locale::translate($institution->getInstitutionTypeKey()), 'L'); $pdf->MultiRow(50, '', ' ' . Locale::translate('proposal.articleSponsor.location') . ': ' . $institution->getInstitutionInternationalText(), 'L'); if ($institution->getInstitutionInternational() == INSTITUTION_INTERNATIONAL) { $pdf->MultiRow(50, '', ' ' . Locale::translate('proposal.articleSponsor.locationInternational') . ': ' . $institution->getInstitutionLocationText(), 'L'); } else { $pdf->MultiRow(50, '', ' ' . Locale::translate('proposal.articleSponsor.locationCountry') . ': ' . $institution->getInstitutionLocationText(), 'L'); } $pdf->Ln(3); $firstSSponsor = false; foreach ($sSponsors as $sSponsor) { $SSponsorTitle = ''; if (!$firstSSponsor) { $SSponsorTitle = Locale::translate('proposal.articleSponsor.secondarySponsors'); } $institution = $sSponsor->getInstitutionObject(); $pdf->MultiRow(50, $SSponsorTitle, $institution->getInstitutionName(), 'L'); $pdf->MultiRow(50, '', ' ' . Locale::translate('proposal.articleSponsor.acronym') . ': ' . $institution->getInstitutionAcronym(), 'L'); $pdf->MultiRow(50, '', ' ' . Locale::translate('proposal.articleSponsor.type') . ': ' . Locale::translate($institution->getInstitutionTypeKey()), 'L'); $pdf->MultiRow(50, '', ' ' . Locale::translate('proposal.articleSponsor.location') . ': ' . $institution->getInstitutionInternationalText(), 'L'); if ($institution->getInstitutionInternational() == INSTITUTION_INTERNATIONAL) { $pdf->MultiRow(50, '', ' ' . Locale::translate('proposal.articleSponsor.locationInternational') . ': ' . $institution->getInstitutionLocationText(), 'L'); } else { $pdf->MultiRow(50, '', ' ' . Locale::translate('proposal.articleSponsor.locationCountry') . ': ' . $institution->getInstitutionLocationText(), 'L'); } $pdf->Ln(2); $firstSSponsor = true; } $pdf->Ln(1); $pdf->MultiRow(50, Locale::translate("proposal.articleSponsor.croInvolved"), Locale::translate($details->getYesNoKey($details->getCROInvolved())), 'L'); foreach ($CROs as $CRO) { $pdf->MultiRow(50, '', $CRO->getName(), 'L'); $pdf->MultiRow(50, '', Locale::translate('proposal.articleSponsor.cro.location') . ': ' . $CRO->getInternationalText(), 'L'); if ($CRO->getInternational() == CRO_INTERNATIONAL) { $pdf->MultiRow(50, '', Locale::translate('proposal.articleSponsor.locationInternational') . ': ' . $CRO->getLocationText(), 'L'); } else { $pdf->MultiRow(50, '', Locale::translate('proposal.articleSponsor.locationCountry') . ': ' . $CRO->getLocationText(), 'L'); } $pdf->MultiRow(50, '', Locale::translate('proposal.articleSponsor.cro.city') . ': ' . $CRO->getCity(), 'L'); $pdf->MultiRow(50, '', Locale::translate('proposal.articleSponsor.cro.address') . ': ' . $CRO->getAddress(), 'L'); $pdf->MultiRow(50, '', Locale::translate('proposal.articleSponsor.cro.primaryPhone') . ': ' . $CRO->getPrimaryPhone(), 'L'); if ($CRO->getSecondaryPhone()) { $pdf->MultiRow(50, '', Locale::translate('proposal.articleSponsor.cro.secondaryPhone') . ': ' . $CRO->getSecondaryPhone(), 'L'); } if ($CRO->getFax()) { $pdf->MultiRow(50, '', Locale::translate('proposal.articleSponsor.cro.fax') . ': ' . $CRO->getFax(), 'L'); } $pdf->MultiRow(50, '', Locale::translate('proposal.articleSponsor.cro.email') . ': ' . $CRO->getEmail(), 'L'); $pdf->Ln(2); } $pdf->Ln(1); // Line break $pdf->Ln(10); // Contact Information $pdf->SetFont('Times', 'B', 14); $pdf->Cell(190, 9, 'V' . Locale::translate('common.queue.long.articleContact', array('id' => '')), 0, 1, 'L'); $pdf->Ln(5); $pdf->SetFont('Times', '', 12); $pdf->MultiRow(50, Locale::translate("proposal.articleContact.pq"), $contact->getPQName(), 'L'); $pdf->MultiRow(50, '', Locale::translate("proposal.articleContact.affiliation") . ': ' . $contact->getPQAffiliation(), 'L'); $pdf->MultiRow(50, '', Locale::translate("proposal.articleContact.address") . ': ' . $contact->getPQAddress(), 'L'); $pdf->MultiRow(50, '', Locale::translate("proposal.articleContact.country") . ': ' . $coutryList[$contact->getPQCountry()], 'L'); $pdf->MultiRow(50, '', Locale::translate("proposal.articleContact.phone") . ': ' . $contact->getPQPhone(), 'L'); if ($contact->getPQFax() != '') { $pdf->MultiRow(50, '', Locale::translate("proposal.articleContact.fax") . ': ' . $contact->getPQFax(), 'L'); } $pdf->MultiRow(50, '', Locale::translate("proposal.articleContact.email") . ': ' . $contact->getPQEmail(), 'L'); $pdf->Ln(3); $pdf->MultiRow(50, Locale::translate("proposal.articleContact.sq"), $contact->getSQName(), 'L'); $pdf->MultiRow(50, '', Locale::translate("proposal.articleContact.affiliation") . ': ' . $contact->getSQAffiliation(), 'L'); $pdf->MultiRow(50, '', Locale::translate("proposal.articleContact.address") . ': ' . $contact->getSQAddress(), 'L'); $pdf->MultiRow(50, '', Locale::translate("proposal.articleContact.country") . ': ' . $coutryList[$contact->getSQCountry()], 'L'); $pdf->MultiRow(50, '', Locale::translate("proposal.articleContact.phone") . ': ' . $contact->getSQPhone(), 'L'); if ($contact->getPQFax() != '') { $pdf->MultiRow(50, '', Locale::translate("proposal.articleContact.fax") . ': ' . $contact->getSQFax(), 'L'); } $pdf->MultiRow(50, '', Locale::translate("proposal.articleContact.email") . ': ' . $contact->getSQEmail(), 'L'); $pdf->Output($submission->getProposalId() . '-' . Locale::translate('submission.summary') . '.pdf', "D"); }
$subY = $this->y; $this->SetXY($subX, $subY + $subOffset); // restore font size $this->SetFontSize($subFontSizeold); } } // --------------------------- Get current date $dt = new DateTime(); $dt = $dt->format('Y-M-d'); // --------------------------- Get current date $pdf = new PDF(); $pdf->AliasNbPages(); // Column headings $header = array('Account Title', 'Date', 'Income', 'Expense'); $pdf->SetFont('Arial', '', 9); $pdf->SetMargins(5, 5, 5); $pdf->AddPage(); $pdf->subWrite(4, 'E', '', 20); $pdf->Write(4, 'xpense'); $pdf->Ln(); $pdf->Ln(); $pdf->SetX(10); $pdf->subWrite(4, 'M', '', 20); $pdf->Write(4, 'anager'); $pdf->SetX(5); $pdf->Cell(0, 4, 'Income - Expense Report', 0, 1, 'C'); $pdf->Cell(0, 4, $ReportTitle, 0, 1, 'C'); $pdf->Cell(0, 4, "As Of: " . $dt, 0, 1, 'C'); $pdf->Cell(0, 4, '--------------------------------------------------------------------------------------------------------------------------------------------------------------------------', 0, 1, 'C'); $pdf->BasicTable($header, $decoded); $pdf->Output();
$rojos[2] = $verdes[0] + $rojos[0]; } } catch (PDOException $e) { /*$mensaje='Error al tratar de obtener información de la orden.'.$e; include $_SERVER['DOCUMENT_ROOT'].'/reportes/includes/error.html.php'; exit();*/ } $i++; } } } /**************************************************************************************************/ /********************************************* Hoja 1 *********************************************/ /**************************************************************************************************/ $pdf->AddPage(); $pdf->SetMargins(40, 0, 30); $pdf->SetLineWidth(0.1); $pdf->Ln(3); $pdf->SetFont('Arial', 'B', 14); $pdf->MultiCell(0, 6, utf8_decode("REPORTE DE EVALUACIÓN DE LOS \n NIVELES DE ILUMINACIÓN \n NOM-025-STPS-2008"), 0, 'C'); $pdf->Ln(10); $pdf->SetFont('Arial', 'B', 16); $pdf->MultiCell(0, 7, utf8_decode("ESTUDIO DE RECONOCIMIENTO Y EVALUACIÓN"), 0, 'C'); $pdf->Ln(10); $pdf->SetFont('Arial', 'B', 14); $pdf->MultiCell(0, 7, utf8_decode("Practicado en la empresa"), 0, 'C'); $pdf->Ln(10); $pdf->SetFont('Arial', 'B', 28); $pdf->MultiCell(0, 10, utf8_decode($cliente['Razon_Social']), 0, 'C'); $pdf->Ln(10); $pdf->SetFont('Arial', 'B', 24);
//faire name $this->Cell(0, 0, $faireName, 0); //faire dates $this->SetFont('Helvetica', 'B', 12); $this->SetXY(15, 36); $this->Cell(0, 0, $dates, 0); //faire logo $this->Image($badge, 153, 11, 45, 0, 'jpg'); //set font size for PDF answers $this->SetFont('Helvetica', '', 10); $this->SetXY(15, 52); } } // initiate FPDI $pdf = new PDF(); $pdf->SetMargins(15, 15, 15); $form_id = 36; $form = GFAPI::get_form($form_id); $fieldData = array(); //put fieldData in a usable array foreach ($form['fields'] as $field) { $fieldData[$field['id']] = $field; } $entries = GFAPI::get_entries($form_id); foreach ($entries as $entry) { output_data($pdf, $entry, $form, $fieldData); } ob_clean(); $pdf->Output('GSP.pdf', 'D'); //output download //$pdf->Output('doc.pdf', 'I'); //output in browser
</tr>'; $tbl .= '<tr> <td colspan="5" style="italic" border="0"> <br><br><br> <br><br> <br><br><br>. <br> <br> </td> </tr>'; $tbl .= '</table>'; $tbl2 = $tbl; $ct = $tbl . $tbl2; $p = new PDF(); // PAGE // Data $p->SetMargins(10, 10, 10, 10); $p->AddPage(); $p->setStyle('normal'); $p->SetFont('helvetica', '', '8'); $p->htmltable($ct); $filename = "report.pdf"; // ubah namafile sesuai dengan keinginanr $p->output($filename, 'F'); if (file_exists($filename)) { ?> <div id="pdf" data-options="fit:true"> It appears you don't have Adobe Reader or PDF support in this web browser. <a href="report.pdf">Click here to download the PDF</a> </div> <script type="text/javascript"> $("#pdf").panel({fit:true});
<td align=\'left\'>' . $value_urusan->kd_urusan . '</td> <td align=\'left\' colspan=26>' . $value_urusan->nm_urusan . '</td> </tr>'; $query_bidang = DB::query("SELECT\n a.tahun,\n bidang.kd_bidang,\n bidang.nm_bidang\n FROM\n tabel_dpa AS a\n INNER JOIN bidang ON bidang.kd_urusan = a.kd_urusan AND bidang.kd_bidang = a.kd_bidang\n WHERE\n CONCAT(a.kd_unit,kd_sub_unit) = {$req->skpd} AND\n a.tahun = {$req->tahun} AND \n a.kd_urusan = {$value_urusan->kd_urusan} AND\n a.kd_program > 14\n GROUP BY a.kd_urusan,a.kd_bidang"); $result_bidang = $query_bidang->fetchAll(); foreach ($result_bidang as $value_bidang) { $htmlTemplate .= '<tr> <td align=\'center\'></td> <td align=\'left\'>' . $value_urusan->kd_urusan . '.' . $value_bidang->kd_bidang . '</td> <td align=\'left\' colspan=26>' . $value_bidang->nm_bidang . '</td> </tr>'; } } /** * */ require_once 'library/lib/fpdf.inc.php'; require_once 'library/lib/pdftable.inc.php'; require_once 'library/lib/pdf.inc.php'; require_once 'library/lib/color.inc.php'; require_once 'library/lib/htmlparser.inc.php'; $p = new PDF(); $p->SetMargins(20, 10, 10); $p->AddPage(); $p->setStyle('small'); $p->text(0, 'Formulir Evaluasi Hasil Renja SKPD', 0, 'C'); $p->text(0, 'SKPD ' . Suggest::getSatker($req->skpd), 0, 'C'); $p->text(0, 'Periode Kegiatan Tahun ' . $req->tahun, 0, 'C'); $p->SetFont('helvetica', '', '5'); $p->htmltable($htmlTemplate); $p->output(NAMA_LAPORAN, 'F');
<?php if (empty($_SESSION)) { session_start(); } ini_set('error_reporting', E_ALL); require_once "../modelos/Consulta.reportes.php"; require_once "PDF.php"; if (isset($idCertificado)) { $pdf = new PDF('P', 'mm', 'letter'); $pdf->AddFont('gothic', '', 'gothic.php'); $pdf->AddFont('gothicb', 'B', 'gothicb.php'); $pdf->AliasNbPages(); $pdf->AddPage(); $pdf->SetFont('gothic', '', 13); $pdf->SetMargins(30, 30, 25); $pdf->SetAutoPageBreak(true, 0); $consulta = new Consulta(); //$id = $_GET["idCertificado"]; $id = $idCertificado; $datos = $consulta->getDatosCertificadoCartera($id); $fecha_certificado_f = explode('-', $datos[2]); $fecha_certificado_f2 = explode('-', $datos[3]); $nroCertificado = $datos[6]; $pdf->SetY(37); $pdf->Ln(6); $pdf->SetFont('gothicb', 'B', 22); $pdf->Ln(5); $titulo = "CERTIFICACIÓN"; $pdf->Cell(0, 0, utf8_decode($titulo), 0, 0, 'C'); $pdf->SetY(55);
{ $this->SetFont('angsana','I',12); $this->setXY( $x_absolute + 50 , $y_absolute + ($r*30) + 41 ); $this->MultiCell( 0 , 0 , iconv( 'UTF-8','cp874' , '- EEC โปรแกรมเครือข่ายงานบริการผู้ป่วยโรคลมชัก' ) ); }*/ function footer_() { } } $pdf = new PDF('P', 'mm', 'A4'); //ของเดิม //$pdf->Cell(0,10,'a'); $pdf->SetMargins(25, 25, 5); // เพิ่มฟอนต์ภาษาไทยเข้ามา ตัวธรรมดา กำหนด ชื่อ เป็น angsana $pdf->AddFont('angsana', '', 'angsa.php'); // เพิ่มฟอนต์ภาษาไทยเข้ามา ตัวหนา กำหนด ชื่อ เป็น angsana $pdf->AddFont('angsana', 'B', 'angsab.php'); // เพิ่มฟอนต์ภาษาไทยเข้ามา ตัวหนา กำหนด ชื่อ เป็น angsana $pdf->AddFont('angsana', 'I', 'angsai.php'); // เพิ่มฟอนต์ภาษาไทยเข้ามา ตัวหนา กำหนด ชื่อ เป็น angsana $pdf->AddFont('angsana', 'BI', 'angsaz.php'); //สร้างหน้าเอกสาร $pdf->AddPage(); //$pdf->Cell(0,10,'t'); // กำหนดฟอนต์ที่จะใช้ อังสนา ตัวธรรมดา ขนาด 12 //$pdf->SetFont('angsana','',12); // พิมพ์ข้อความลงเอกสาร //$pdf->setXY( 10, 10 );
$datos = $db->getAllRecord("select fn_get_num_secretarios( {$idEvento} , {$idAmbito} ) as id"); if ($datos != NULL) { $response = $datos; } else { $response['status'] = "info"; $response['message'] = 'No hay datos'; } echoResponse(200, $response); }); // Imprime - retorna un pdf con todas las preguntas respondidas que se le soliciten en la lista indicada $app->post('/printPreguntas', 'sessionAlive', function () use($app) { // Reporte $pdf = new PDF('L', 'mm', 'Letter'); $pdf->Open(); $pdf->AddPage(); $pdf->SetMargins(5, 3, 5); // margen, left, top y right //$pdf->Ln(03); //$pdf->SetWidths(array(65, 60, 55, 50, 20)); $pdf->SetFont('Arial', 'B', 8); $pdf->SetFillColor(85, 107, 47); $pdf->SetTextColor(0); $pdf->ln(); // $response = array(); $lisPreguntas = json_decode($app->request->getBody()); $idUser = intval($_SESSION['uid']); $lista = implode(",", $lisPreguntas); $db = new DbHandler(); $impresas = $db->get1Record("select fn_num_respuesta_print( '{$lista}' ) as cantidad"); //var_dump($impresas);
} //End if:Line 24 } //End if:Line 9 } //End if:Line 8 $pdf = new PDF($orientacion, 'mm', 'Letter'); $pdf->SetPathLogo($cfg_rpt['logo_imagen']); $pdf->Setancho_imagen($cfg_rpt['alto_imagen']); $pdf->Setalto_imagen($cfg_rpt['ancho_imagen']); $pdf->Setimagen_position_x($cfg_rpt['position_x']); $pdf->Setimagen_position_y($cfg_rpt['position_y']); $pdf->setAuthor($cfg_rpt['autor']); $pdf->setDisplayMode('real'); $pdf->setTitle("Reporte de Fiscalizacion"); $pdf->SetMargins(3, 2, 3); $pdf->AliasNbPages('Total_page'); $pdf->AddPage(); $pdf->SetFont('Arial', 'B', 11.5); $pdf->Cell(0, 0, $Title_Principal . $desc_solicitud, 0, 0, 'C'); $pdf->Ln(3); if (isset($orientacion)) { if ($orientacion == 'P') { $new_line = 6; $pdf->Cell(150); $pdf->Cell(0, 0, 'Solicitud N: ' . str_pad($obj_solicitud->getId_solicitud(), 10, "0", STR_PAD_LEFT), 0, 1, 'L'); $pdf->Ln(10); $pdf->Cell(10); // $pdf->Cell(0,0,'Estatus: '.$obj_solicitud->getStatus(),0,0,'L'); $pdf->Cell(21, 6, "Estatus: ", 0, 0, 'L'); $pdf->Cell(4, 4, '', 1, 0, 'L', 1);
$dett_pallet = GetRows("view_macchine", "pallet = '" . $_GET['pallet'] . "'", "tipo_mch", $db, 1); class PDF extends FPDF { //Page footer function Footer() { //Position at 1.5 cm from bottom $this->SetY(-15); $this->SetFont('Arial', '', 9); $this->Cell(40, 4, 'Data: ' . date('d/m/Y'), 0, '', 'L'); $this->Cell(0, 4, 'Pagina ' . $this->PageNo() . "/{nb}", 0, 0, 'C'); } } $pdf = new PDF(); $pdf->AliasNbPages(); $pdf->SetMargins(6, 15, 6); $pdf->AddPage(); // Header $pdf->SetFont('Helvetica', 'B', 14); $pdf->Cell(200, 7, 'Dettaglio Pallet: ' . $_GET['pallet'], '', '', ''); $pdf->ln(10); $pdf->SetFont('Helvetica', 'B', 10); $pdf->Cell(10, 5, '', 'B', '', 'R'); $pdf->Cell(30, 5, 'Tipo Macchina:', 'B', '', 'L'); $pdf->Cell(30, 5, 'Marca:', 'B', '', 'L'); $pdf->Cell(30, 5, 'Modello:', 'B', '', 'L'); $pdf->Cell(50, 5, 'Serial:', 'B', '', 'L'); $pdf->Cell(50, 5, 'Asset:', 'B', '', 'L'); $pdf->ln(); foreach ($dett_pallet as $key => $field) { $pdf->SetFont('Helvetica', 'B', 10);
// // You should have received a copy of the GNU General Public License // along with Moodle. If not, see <http://www.gnu.org/licenses/>. /** * letter_non_embedded certificate type * * @package mod_certificate * @copyright Mark Nelson <*****@*****.**> * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ defined('MOODLE_INTERNAL') || die; $pdf = new PDF($certificate->orientation, 'pt', 'A4', true, 'UTF-8', false); $pdf->SetAuthor('Ananda Gestión, S.L.'); $pdf->SetTitle('Certificado de Acreditación'); $pdf->SetSubject('Curso Prevención de Riesgos Laborales'); $pdf->SetMargins(75, 20, 75, true); $pdf->SetProtection(array('modify')); $pdf->setPrintHeader(false); $pdf->setPrintFooter(false); $pdf->SetAutoPageBreak(false, 0); $pdf->AddPage(); //página 1 // Define variables // Landscape if ($certificate->orientation == 'L') { $x = 28; $y = 125; $sealx = 590; $sealy = 425; $sigx = 130; $sigy = 440;
<?php ##---- PDF --- $pdf = new PDF('P', 'mm', 'A4'); //ของเดิม $pdf->SetMargins(25, 25, 5); $pdf->AddPage(); // เพิ่มฟอนต์ภาษาไทยเข้ามา ตัวธรรมดา กำหนด ชื่อ เป็น angsana $pdf->AddFont('angsana', '', 'angsa.php'); // เพิ่มฟอนต์ภาษาไทยเข้ามา ตัวหนา กำหนด ชื่อ เป็น angsana $pdf->AddFont('angsana', 'B', 'angsab.php'); // เพิ่มฟอนต์ภาษาไทยเข้ามา ตัวหนา กำหนด ชื่อ เป็น angsana $pdf->AddFont('angsana', 'I', 'angsai.php'); // เพิ่มฟอนต์ภาษาไทยเข้ามา ตัวหนา กำหนด ชื่อ เป็น angsana $pdf->AddFont('angsana', 'BI', 'angsaz.php'); $x_absolute = 25; //พิกัด X $y_absolute = 20; //พิกัด Y $r = 7; //ระยะห่าง ##-- PAGE 1 ##---- เลขหน้า ---------- $pdf->SetFont('angsana', '', 12); $pdf->setXY($x_absolute + 160, $y_absolute - 10); $pdf->MultiCell(0, 0, iconv('UTF-8', 'cp874', 'หน้า 1')); ##---- เลขหน้า ---------- ##-- head table ----- $pdf->head_table(70, 20, 25, 'b'); //($x_absolute,$y_absolute,$fontSize,$b) //หัวโปรแกรม $pdf->SetFont('angsana', 'BU', 20);
function Imprimir_Checks($codper, $codsol, $link, $swInit, $pdf) { /* echo "SELECT a.codchkser, CONCAT(c.apepatper,' ',c.apematper,', ',c.nomper) AS nombre, d.despue AS puesto, a.imgreniec, a.obsimgreniec, a.indrefpol, a.refpolchk, a.indantpol, a.indreqjud, a.indrefter, a.indrefdro, a.indimpsalpai, a.indinvpen,a.invpenchk, e.desdel, a.recchk FROM tb_chkservice AS a LEFT JOIN tb_detallesolicitud AS b ON b.codper=a.codper AND b.codsol=a.codsol LEFT JOIN tb_persona AS c ON c.codper=a.codper LEFT JOIN tb_puesto AS d ON d.codpue=b.codpue LEFT JOIN tb_delito AS e ON e.coddel=a.coddel WHERE a.codper in ($codper) AND a.codsol=$codsol";*/ /*Check Service*/ $result = mysql_query("SELECT a.codchkser,\r\n\t\t\tCONCAT(c.apepatper,' ',c.apematper,', ',c.nomper) AS nombre,\r\n\t\t\td.despue AS puesto,\r\n\t\t\ta.imgreniec,\r\n\t\t\ta.obsimgreniec,\r\n\t\t\ta.indrefpol, a.refpolchk,\r\n\t\t\ta.indantpol,\r\n\t\t\ta.indreqjud,\r\n\t\t\ta.indrefter,\r\n\t\t\ta.indrefdro,\r\n\t\t\ta.indimpsalpai,\r\n\t\t\ta.indinvpen,a.invpenchk,\r\n\t\t\ta.recchk\r\n\t\t\tFROM tb_chkservice AS a\r\n\t\t\tLEFT JOIN tb_detallesolicitud AS b ON b.codper=a.codper AND b.codsol=a.codsol\r\n\t\t\tLEFT JOIN tb_persona AS c ON c.codper=a.codper\r\n\t\t\tLEFT JOIN tb_puesto AS d ON d.codpue=b.codpue\r\n\t\t\tWHERE a.codper in ({$codper}) AND a.codsol={$codsol}", $link); if (!isset($pdf)) { $pdf = new PDF(); $pdf->AliasNbPages(); } while ($row = mysql_fetch_array($result)) { $nombre = utf8_decode($row['nombre']); $puesto = utf8_decode($row['puesto']); $imgreniec = utf8_decode($row['imgreniec']); $obs = utf8_decode($row['obsimgreniec']); $indrefpol = utf8_decode($row['indrefpol']); $refpolchk = utf8_decode($row['refpolchk']); $indantpol = utf8_decode($row['indantpol']); $indreqjud = utf8_decode($row['indreqjud']); $indrefter = utf8_decode($row['indrefter']); $indrefdro = utf8_decode($row['indrefdro']); $indimpsalpai = utf8_decode($row['indimpsalpai']); $indinvpen = utf8_decode($row['indinvpen']); $invpenchk = utf8_decode($row['invpenchk']); $delitos = mysql_query("SELECT cd.coddel,d.nomdel,d.desdel FROM tb_delito_chkservice cd\r\n LEFT JOIN tb_delito d ON cd.coddel=d.coddel\r\n where cd.codsol=" . $codsol . " and cd.codper=" . $codper); $desdel = ""; while ($fildel = mysql_fetch_array($delitos)) { $desdel = $desdel . utf8_decode($fildel['nomdel']) . " : " . utf8_decode($fildel['desdel']) . "\n\n"; } // $desdel= utf8_decode($row['desdel']); $recchk = utf8_decode($row['recchk']); $sw1 = 0; if ($indrefpol == 0) { $TXTindrefpol = 'No Registra'; } else { $TXTindrefpol = 'Si Registra'; $sw1 = 1; } if ($indantpol == 0) { $TXTindantpol = 'No Registra'; } else { $TXTindantpol = 'Si Registra'; $sw1 = 1; } if ($indreqjud == 0) { $TXTindreqjud = 'No Registra'; } else { $TXTindreqjud = 'Si Registra'; $sw1 = 1; } if ($indrefter == 0) { $TXTindrefter = 'No Registra'; } else { $TXTindrefter = 'Si Registra'; $sw1 = 1; } if ($indrefdro == 0) { $TXTindrefdro = 'No Registra'; } else { $TXTindrefdrol = 'Si Registra'; $sw1 = 1; } if ($indimpsalpai == 0) { $TXTindimpsalpai = 'No Registra'; } else { $TXTindimpsalpai = 'Si Registra'; $sw1 = 1; } $sw2 = 0; if ($indinvpen == 0) { $TXTindinvpen = 'No Registra'; } else { $TXTindinvpen = 'Si Registra'; $sw2 = 1; } //Creación del objeto de la clase heredada // $pdf=new PDF(); // $pdf->AliasNbPages(); $pdf->AddPage(); $pdf->SetDisplayMode('fullpage'); $pdf->SetMargins(20, 20, 20); $pdf->SetFont('Arial', 'BU', 14); $pdf->SetTextColor(70, 125, 25); $pdf->Cell(0, 10, 'CHECK SERVICE', 0, 1, 'C'); $pdf->Ln(2); $pdf->SetTextColor(0, 0, 0); $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(70, 7, 'CHECK IDENTIDAD', 1, 0, 'L'); $pdf->SetFont('Arial', '', 12); $pdf->Cell(0, 7, $nombre, 1, 1, 'L'); $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(70, 7, 'PUESTO AL QUE POSTULA', 1, 0, 'L'); $pdf->SetFont('Arial', '', 12); $pdf->Cell(0, 7, $puesto, 1, 1, 'L'); $pdf->Ln(2); //$pdf->Image('../files/images_dni/imagen1.png',40,null,0,130); $pdf->Image('../files/images_dni/' . $imgreniec, 40, null, 0, 130); $pdf->Ln(2); $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(0, 7, 'OBSERVACIONES', 1, 1, 'C'); $pdf->SetFont('Arial', '', 12); $pdf->MultiCell(0, 5, $obs, 1, 'J'); $pdf->Ln(2); $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(0, 7, 'CHECK DELICTIVO', 1, 1, 'C'); $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(70, 7, 'Referencia Policial:', 1, 0, 'L'); $pdf->SetFont('Arial', '', 12); if ($TXTindrefpol == 'Si Registra') { $pdf->SetFont('Arial', 'B', 12); $pdf->SetTextColor(255, 0, 0); $pdf->Cell(0, 7, $TXTindrefpol, 1, 1, 'C'); $pdf->SetTextColor(0, 0, 0); } else { $pdf->Cell(0, 7, $TXTindrefpol, 1, 1, 'C'); } $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(70, 7, 'Antecedente Policial:', 1, 0, 'L'); $pdf->SetFont('Arial', '', 12); if ($TXTindantpol == 'Si Registra') { $pdf->SetFont('Arial', 'B', 12); $pdf->SetTextColor(255, 0, 0); $pdf->Cell(0, 7, $TXTindantpol, 1, 1, 'C'); $pdf->SetTextColor(0, 0, 0); } else { $pdf->Cell(0, 7, $TXTindantpol, 1, 1, 'C'); } $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(70, 7, 'Requisitoria Judicial:', 1, 0, 'L'); $pdf->SetFont('Arial', '', 12); if ($TXTindreqjud == 'Si Registra') { $pdf->SetFont('Arial', 'B', 12); $pdf->SetTextColor(255, 0, 0); $pdf->Cell(0, 7, $TXTindreqjud, 1, 1, 'C'); $pdf->SetTextColor(0, 0, 0); } else { $pdf->Cell(0, 7, $TXTindreqjud, 1, 1, 'C'); } $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(70, 7, 'Referencia por Terrorismo', 1, 0, 'L'); $pdf->SetFont('Arial', '', 12); if ($TXTindrefter == 'Si Registra') { $pdf->SetFont('Arial', 'B', 12); $pdf->SetTextColor(255, 0, 0); $pdf->Cell(0, 7, $TXTindrefter, 1, 1, 'C'); $pdf->SetTextColor(0, 0, 0); } else { $pdf->Cell(0, 7, $TXTindrefter, 1, 1, 'C'); } $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(70, 7, 'Referencia por Drogas:', 1, 0, 'L'); $pdf->SetFont('Arial', '', 12); if ($TXTindrefdro == 'Si Registra') { $pdf->SetFont('Arial', 'B', 12); $pdf->SetTextColor(255, 0, 0); $pdf->Cell(0, 7, $TXTindrefdro, 1, 1, 'C'); $pdf->SetTextColor(0, 0, 0); } else { $pdf->Cell(0, 7, $TXTindrefdro, 1, 1, 'C'); } $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(70, 7, utf8_decode('Impedimento de salida del país:'), 1, 0, 'L'); $pdf->SetFont('Arial', '', 12); if ($TXTindimpsalpai == 'Si Registra') { $pdf->SetFont('Arial', 'B', 12); $pdf->SetTextColor(255, 0, 0); $pdf->Cell(0, 7, $TXTindimpsalpai, 1, 1, 'C'); $pdf->SetTextColor(0, 0, 0); } else { $pdf->Cell(0, 7, $TXTindimpsalpai, 1, 1, 'C'); } //$str = utf8_decode('Investigación Penal:'); $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(70, 7, utf8_decode('Investigación Penal:'), 1, 0, 'L'); $pdf->SetFont('Arial', '', 12); if ($TXTindinvpen == 'Si Registra') { $pdf->SetFont('Arial', 'B', 12); $pdf->SetTextColor(255, 0, 0); $pdf->Cell(0, 7, $TXTindinvpen, 1, 1, 'C'); $pdf->SetTextColor(0, 0, 0); } else { $pdf->Cell(0, 7, $TXTindinvpen, 1, 1, 'C'); } if ($sw1 == 1 or $sw2 == 1) { $pdf->AddPage(); $pdf->SetXY(20, 25); //$pdf->SetDisplayMode('fullpage'); //$pdf->SetMargins(20, 20,20); $pdf->SetFont('Arial', 'BU', 14); $pdf->SetTextColor(70, 125, 25); $pdf->Cell(0, 10, 'ANEXO CHECK DELICTIVO', 0, 1, 'C'); $pdf->SetTextColor(0, 0, 0); $pdf->Ln(2); if ($sw1 == 1) { $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(0, 7, 'INVESTIGACION POLICIAL', 1, 1, 'L'); $pdf->SetFont('Arial', '', 12); $pdf->MultiCell(0, 5, $refpolchk, 1, 'J'); $pdf->Ln(2); } if ($sw2 == 1) { $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(0, 7, 'INVESTIGACION PENAL', 1, 1, 'L'); $pdf->SetFont('Arial', '', 12); $pdf->MultiCell(0, 5, $invpenchk, 1, 'J'); $pdf->Ln(2); } $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(0, 7, 'DEFINICION DEL DELITO', 1, 1, 'L'); $pdf->SetFont('Arial', '', 12); $pdf->MultiCell(0, 5, $desdel, 1, 'J'); $pdf->Ln(2); $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(0, 7, 'RECOMENDACION', 1, 1, 'L'); $pdf->SetFont('Arial', '', 12); $pdf->MultiCell(0, 5, $recchk, 1, 'J'); $pdf->Ln(2); } } /*Check Familiar*/ $result = mysql_query("SELECT a.codchkser,\r\n a.nombre,\r\n p.despar AS parentesco,\r\n a.imgreniec,\r\n a.obsimgreniec,\r\n a.indrefpol, a.refpolchk,\r\n a.indantpol,\r\n a.indreqjud,\r\n a.indrefter,\r\n a.indrefdro,\r\n a.indimpsalpai,\r\n a.indinvpen,a.invpenchk,\r\n a.recchk\r\n FROM tb_chkfamiliar AS a\r\n LEFT JOIN tb_detallesolicitud AS b ON b.codper=a.codper AND b.codsol=a.codsol\r\n LEFT JOIN tb_persona AS c ON c.codper=a.codper\r\n LEFT JOIN tb_parentesco AS p ON a.codpar=p.codpar\r\n WHERE a.codper in ({$codper}) AND a.codsol={$codsol}", $link); if (!isset($pdf)) { $pdf = new PDF(); $pdf->AliasNbPages(); } while ($row = mysql_fetch_array($result)) { $codchkser = utf8_decode($row['codchkser']); $nombre = utf8_decode($row['nombre']); $parentesco = utf8_decode($row['parentesco']); $imgreniec = utf8_decode($row['imgreniec']); $obs = utf8_decode($row['obsimgreniec']); $indrefpol = utf8_decode($row['indrefpol']); $refpolchk = utf8_decode($row['refpolchk']); $indantpol = utf8_decode($row['indantpol']); $indreqjud = utf8_decode($row['indreqjud']); $indrefter = utf8_decode($row['indrefter']); $indrefdro = utf8_decode($row['indrefdro']); $indimpsalpai = utf8_decode($row['indimpsalpai']); $indinvpen = utf8_decode($row['indinvpen']); $invpenchk = utf8_decode($row['invpenchk']); $delitos = mysql_query("SELECT cd.coddel,d.nomdel,d.desdel FROM tb_chkfamilia_delito cd\r\n LEFT JOIN tb_delito d ON cd.coddel=d.coddel\r\n where cd.codchkser=" . $codchkser); $desdel = ""; while ($fildel = mysql_fetch_array($delitos)) { $desdel = $desdel . utf8_decode($fildel['nomdel']) . " : " . utf8_decode($fildel['desdel']) . "\n\n"; } //$desdel= utf8_decode($row['desdel']); $recchk = utf8_decode($row['recchk']); $sw1 = 0; if ($indrefpol == 0) { $TXTindrefpol = 'No Registra'; } else { $TXTindrefpol = 'Si Registra'; $sw1 = 1; } if ($indantpol == 0) { $TXTindantpol = 'No Registra'; } else { $TXTindantpol = 'Si Registra'; $sw1 = 1; } if ($indreqjud == 0) { $TXTindreqjud = 'No Registra'; } else { $TXTindreqjud = 'Si Registra'; $sw1 = 1; } if ($indrefter == 0) { $TXTindrefter = 'No Registra'; } else { $TXTindrefter = 'Si Registra'; $sw1 = 1; } if ($indrefdro == 0) { $TXTindrefdro = 'No Registra'; } else { $TXTindrefdrol = 'Si Registra'; $sw1 = 1; } if ($indimpsalpai == 0) { $TXTindimpsalpai = 'No Registra'; } else { $TXTindimpsalpai = 'Si Registra'; $sw1 = 1; } $sw2 = 0; if ($indinvpen == 0) { $TXTindinvpen = 'No Registra'; } else { $TXTindinvpen = 'Si Registra'; $sw2 = 1; } //Creación del objeto de la clase heredada // $pdf=new PDF(); // $pdf->AliasNbPages(); $pdf->AddPage(); $pdf->SetDisplayMode('fullpage'); $pdf->SetMargins(20, 20, 20); $pdf->SetFont('Arial', 'BU', 14); $pdf->SetTextColor(70, 125, 25); $pdf->Cell(0, 10, 'CHECK FAMILIAR', 0, 1, 'C'); $pdf->Ln(2); $pdf->SetTextColor(0, 0, 0); $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(70, 7, 'NOMBRE', 1, 0, 'L'); $pdf->SetFont('Arial', '', 12); $pdf->Cell(0, 7, $nombre, 1, 1, 'L'); $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(70, 7, 'PARENTESCO', 1, 0, 'L'); $pdf->SetFont('Arial', '', 12); $pdf->Cell(0, 7, $parentesco, 1, 1, 'L'); $pdf->Ln(2); //$pdf->Image('../files/images_dni/imagen1.png',40,null,0,130); $pdf->Image('../files/images_dni/fam/' . $imgreniec, 40, null, 0, 130); $pdf->Ln(2); $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(0, 7, 'OBSERVACIONES', 1, 1, 'C'); $pdf->SetFont('Arial', '', 12); $pdf->MultiCell(0, 5, $obs, 1, 'J'); $pdf->Ln(2); $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(0, 7, 'CHECK DELICTIVO', 1, 1, 'C'); $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(70, 7, 'Referencia Policial:', 1, 0, 'L'); $pdf->SetFont('Arial', '', 12); if ($TXTindrefpol == 'Si Registra') { $pdf->SetFont('Arial', 'B', 12); $pdf->SetTextColor(255, 0, 0); $pdf->Cell(0, 7, $TXTindrefpol, 1, 1, 'C'); $pdf->SetTextColor(0, 0, 0); } else { $pdf->Cell(0, 7, $TXTindrefpol, 1, 1, 'C'); } $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(70, 7, 'Antecedente Policial:', 1, 0, 'L'); $pdf->SetFont('Arial', '', 12); if ($TXTindantpol == 'Si Registra') { $pdf->SetFont('Arial', 'B', 12); $pdf->SetTextColor(255, 0, 0); $pdf->Cell(0, 7, $TXTindantpol, 1, 1, 'C'); $pdf->SetTextColor(0, 0, 0); } else { $pdf->Cell(0, 7, $TXTindantpol, 1, 1, 'C'); } $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(70, 7, 'Requisitoria Judicial:', 1, 0, 'L'); $pdf->SetFont('Arial', '', 12); if ($TXTindreqjud == 'Si Registra') { $pdf->SetFont('Arial', 'B', 12); $pdf->SetTextColor(255, 0, 0); $pdf->Cell(0, 7, $TXTindreqjud, 1, 1, 'C'); $pdf->SetTextColor(0, 0, 0); } else { $pdf->Cell(0, 7, $TXTindreqjud, 1, 1, 'C'); } $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(70, 7, 'Referencia por Terrorismo', 1, 0, 'L'); $pdf->SetFont('Arial', '', 12); if ($TXTindrefter == 'Si Registra') { $pdf->SetFont('Arial', 'B', 12); $pdf->SetTextColor(255, 0, 0); $pdf->Cell(0, 7, $TXTindrefter, 1, 1, 'C'); $pdf->SetTextColor(0, 0, 0); } else { $pdf->Cell(0, 7, $TXTindrefter, 1, 1, 'C'); } $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(70, 7, 'Referencia por Drogas:', 1, 0, 'L'); $pdf->SetFont('Arial', '', 12); if ($TXTindrefdro == 'Si Registra') { $pdf->SetFont('Arial', 'B', 12); $pdf->SetTextColor(255, 0, 0); $pdf->Cell(0, 7, $TXTindrefdro, 1, 1, 'C'); $pdf->SetTextColor(0, 0, 0); } else { $pdf->Cell(0, 7, $TXTindrefdro, 1, 1, 'C'); } $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(70, 7, utf8_decode('Impedimento de salida del país:'), 1, 0, 'L'); $pdf->SetFont('Arial', '', 12); if ($TXTindimpsalpai == 'Si Registra') { $pdf->SetFont('Arial', 'B', 12); $pdf->SetTextColor(255, 0, 0); $pdf->Cell(0, 7, $TXTindimpsalpai, 1, 1, 'C'); $pdf->SetTextColor(0, 0, 0); } else { $pdf->Cell(0, 7, $TXTindimpsalpai, 1, 1, 'C'); } //$str = utf8_decode('Investigación Penal:'); $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(70, 7, utf8_decode('Investigación Penal:'), 1, 0, 'L'); $pdf->SetFont('Arial', '', 12); if ($TXTindinvpen == 'Si Registra') { $pdf->SetFont('Arial', 'B', 12); $pdf->SetTextColor(255, 0, 0); $pdf->Cell(0, 7, $TXTindinvpen, 1, 1, 'C'); $pdf->SetTextColor(0, 0, 0); } else { $pdf->Cell(0, 7, $TXTindinvpen, 1, 1, 'C'); } if ($sw1 == 1 or $sw2 == 1) { $pdf->AddPage(); $pdf->SetXY(20, 25); //$pdf->SetDisplayMode('fullpage'); //$pdf->SetMargins(20, 20,20); $pdf->SetFont('Arial', 'BU', 14); $pdf->SetTextColor(70, 125, 25); $pdf->Cell(0, 10, 'ANEXO CHECK DELICTIVO', 0, 1, 'C'); $pdf->SetTextColor(0, 0, 0); $pdf->Ln(2); if ($sw1 == 1) { $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(0, 7, 'INVESTIGACION POLICIAL', 1, 1, 'L'); $pdf->SetFont('Arial', '', 12); $pdf->MultiCell(0, 5, $refpolchk, 1, 'J'); $pdf->Ln(2); } if ($sw2 == 1) { $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(0, 7, 'INVESTIGACION PENAL', 1, 1, 'L'); $pdf->SetFont('Arial', '', 12); $pdf->MultiCell(0, 5, $invpenchk, 1, 'J'); $pdf->Ln(2); } $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(0, 7, 'DEFINICION DEL DELITO', 1, 1, 'L'); $pdf->SetFont('Arial', '', 12); $pdf->MultiCell(0, 5, $desdel, 1, 'J'); $pdf->Ln(2); $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(0, 7, 'RECOMENDACION', 1, 1, 'L'); $pdf->SetFont('Arial', '', 12); $pdf->MultiCell(0, 5, $recchk, 1, 'J'); $pdf->Ln(2); } } /*Check Domiciliario*/ $result = mysql_query("SELECT a.codchkdom,\r\n\t\t\tCONCAT(c.nomper,' ',c.apepatper,' ',c.apematper) AS nombre,\r\n\t\t\tCONCAT(i.destipvia,' ',a.nomviadom,' ',a.numdom,' ',a.urbdom,' - ',h.desdist,' ',g.despro,' ',desdpto) AS domicilio,\r\n\t\t\ta.domici,\r\n\t\t\ta.perent,IF (a.codpar=6,a.otroparent,(SELECT w.despar FROM tb_parentesco AS w WHERE w.codpar=a.codpar LIMIT 1)) AS parentesco,\r\n\t\t\ta.anoresdom, a.mesresdom,\r\n\t\t\t(SELECT GROUP_CONCAT(z2.desres ORDER BY z2.codres ASC SEPARATOR ',') FROM tb_residentesdomicilio AS z1 LEFT JOIN tb_residentes AS z2 ON z1.codres=z2.codres WHERE z1.codchkdom=a.codchkdom GROUP BY z1.codchkdom) AS residecon,\r\n\t\t\td.desviv,\r\n\t\t\tIF (a.codtipviv=3,otrtipviv,(SELECT z3.destipviv FROM tb_tipovivienda AS z3 WHERE z3.codtipviv=a.codtipviv LIMIT 1)) AS tipo_vivienda,\r\n\t\t\ta.numpis, a.pisres,\r\n\t\t\tIF (a.codtipmat=4,otrmatcon,(SELECT z4.destipmat FROM tb_tipomaterial AS z4 WHERE z4.codtipmat=a.codtipmat LIMIT 1)) AS tipo_material,\r\n\t\t\te.desestcon,\r\n\t\t\ta.arever,\r\n\t\t\ta.colfac, a.numpue,a.numven, a.tipmat, a.rejpro, a.pueaccveh, a.obsinmu,\r\n\t\t\tIF (a.codzonif=8,otrzonif,(SELECT z5.deszonif FROM tb_zonificacion AS z5 WHERE z5.codzonif=a.codzonif LIMIT 1)) AS zonificacion,\r\n\t\t\tj.deszonrie,\r\n\t\t\tk.descon,\r\n\t\t\tobscon,\r\n\t\t\t(SELECT GROUP_CONCAT(z.nomimgdom ORDER BY z.numimgdom ASC SEPARATOR ',') FROM tb_imgdomicilio AS z WHERE z.codchkdom=a.codchkdom GROUP BY z.codchkdom) AS fotos\r\n\t\t\tFROM tb_chkdomicilio AS a\r\n\t\t\tLEFT JOIN tb_persona AS c ON c.codper=a.codper\r\n\t\t\tLEFT JOIN tb_vivienda AS d ON d.codviv=a.codviv\r\n\t\t\tLEFT JOIN tb_estadoconstruccion AS e ON e.codestcon=a.codestcon\r\n\t\t\tLEFT JOIN tb_departamento AS f ON f.coddpto=a.coddpto\r\n\t\t\tLEFT JOIN tb_provincia AS g ON g.coddpto=a.coddpto AND g.codpro=a.codpro\r\n\t\t\tLEFT JOIN tb_distrito AS h ON h.coddpto=a.coddpto AND h.codpro=a.codpro AND h.coddist=a.coddist\r\n\t\t\tLEFT JOIN tb_tipvias AS i ON i.codtipvia=a.codtipvia\r\n\t\t\tLEFT JOIN tb_zonariesgo AS j ON j.codzonrie=a.codzonrie\r\n\t\t\tLEFT JOIN tb_conclusion AS k ON k.codcon=a.codcon\r\n\t\t\tWHERE a.codper in ({$codper}) AND a.codsol={$codsol}", $link); if (!isset($pdf)) { $pdf = new PDF(); $pdf->AliasNbPages(); } while ($row = mysql_fetch_array($result)) { $nombre = utf8_decode($row['nombre']); $domicilio = utf8_decode($row['domicilio']); $domiciliado = utf8_decode($row['domici']); $txtdomiciliadoSI = ''; $txtdomiciliadoNO = ''; if ($domiciliado == 1) { $txtdomiciliadoSI = 'X'; } else { $txtdomiciliadoNO = 'X'; } $persona_entrevistada = utf8_decode($row['perent']); $parentesco = utf8_decode($row['parentesco']); $anoresdom = utf8_decode($row['anoresdom']); $mesresdom = utf8_decode($row['mesresdom']); $reside_con = utf8_decode($row['residecon']); $vivienda = utf8_decode($row['desviv']); $tipo_vivienda = utf8_decode($row['tipo_vivienda']); $numpis = utf8_decode($row['numpis']); $pisres = utf8_decode($row['pisres']); $tipo_material = utf8_decode($row['tipo_material']); $desestcon = utf8_decode($row['desestcon']); $arever = utf8_decode($row['arever']); $txtareverSI = ''; $txtareverNO = ''; if ($arever == 1) { $txtareverSI = 'X'; } else { $txtareverNO = 'X'; } $colfac = utf8_decode($row['colfac']); $tipmat = utf8_decode($row['tipmat']); $numpue = utf8_decode($row['numpue']); $numven = utf8_decode($row['numven']); $rejpro = utf8_decode($row['rejpro']); if ($rejpro == 1) { $txtrejpro = 'X'; } else { $txtrejpro = ''; } $pueaccveh = utf8_decode($row['pueaccveh']); if ($pueaccveh == 1) { $txtpueaccveh = 'X'; } else { $txtpueaccveh = ''; } $obsinmu = utf8_decode($row['obsinmu']); $zonificacion = utf8_decode($row['zonificacion']); $deszonrie = utf8_decode($row['deszonrie']); $descon = utf8_decode($row['descon']); $obscon = utf8_decode($row['obscon']); $fotos = explode(",", $row['fotos']); //Creación del objeto de la clase heredada //$pdf=new PDF(); //$pdf->AliasNbPages(); /* if (!isset($pdf)) { $pdf=new PDF(); $pdf->AliasNbPages(); } */ $pdf->AddPage(); $pdf->SetDisplayMode('fullpage'); $pdf->SetMargins(20, 20, 20); $pdf->SetFont('Arial', 'BU', 14); $pdf->SetTextColor(70, 125, 25); $pdf->Cell(0, 10, 'FICHA DE CHECK DOMICILIARIO', 0, 1, 'C'); $pdf->Ln(2); $pdf->SetTextColor(0, 0, 0); $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(55, 7, 'NOMBRES Y APELLIDOS', 1, 0, 'L'); $pdf->SetFont('Arial', '', 12); $pdf->Cell(0, 7, $nombre, 1, 1, 'L'); $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(55, 7, 'DIRECCION', 1, 0, 'L'); $pdf->SetFont('Arial', '', 12); $pdf->MultiCell(0, 7, $domicilio, 1, 'L'); //$pdf->Ln(2); //$pdf->Image('../files/images_dni/imagen1.png',40,null,0,130); $pdf->Ln(2); $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(35); $pdf->Cell(33, 7, 'DOMICILIADO', 0, 0, 'L'); $pdf->SetFont('Arial', '', 16); $pdf->Cell(6, 7, $txtdomiciliadoSI, 1, 0, 'C'); $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(5); $pdf->Cell(40, 7, 'NO DOMICILIADO', 0, 0, 'L'); $pdf->SetFont('Arial', '', 16); $pdf->Cell(6, 7, $txtdomiciliadoNO, 1, 1, 'C'); $pdf->Ln(2); $pdf->SetFont('Arial', 'BU', 12); $pdf->Cell(0, 7, 'I. INFORMACION PROPORCIONADA POR EL ENTREVISTADO:', 0, 1, 'L'); $pdf->Ln(2); $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(47, 7, 'Persona Entrevistada:', 1, 0, 'L'); $pdf->SetFont('Arial', '', 12); $pdf->Cell(60, 7, $persona_entrevistada, 1, 0, 'L'); $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(27, 7, 'Parentesco:', 1, 0, 'L'); $pdf->SetFont('Arial', '', 12); $pdf->Cell(0, 7, $parentesco, 1, 1, 'L'); $pdf->Ln(2); $pdf->SetFont('Arial', '', 12); $pdf->Cell(50, 7, 'Tiempo que Reside:', 0, 0, 'L'); $pdf->Cell(15, 7, utf8_decode('Años'), 0, 0, 'R'); $pdf->SetFont('Arial', '', 12); $pdf->Cell(10, 7, $anoresdom, 1, 0, 'C'); $pdf->Cell(5); $pdf->Cell(40, 7, 'Meses', 0, 0, 'R'); $pdf->SetFont('Arial', '', 12); $pdf->Cell(10, 7, $mesresdom, 1, 1, 'C'); $pdf->Ln(2); $pdf->SetFont('Arial', '', 12); $pdf->Cell(50, 7, 'Reside con:', 0, 0, 'L'); $pdf->Cell(0, 7, $reside_con, 1, 1, 'C'); $pdf->Ln(2); $pdf->SetFont('Arial', '', 12); $pdf->Cell(50, 7, 'Vivienda:', 0, 0, 'L'); $pdf->Cell(0, 7, $vivienda, 1, 1, 'C'); $pdf->Ln(2); $pdf->SetFont('Arial', 'BU', 12); $pdf->Cell(0, 7, 'II. DESCRIPCION DEL INMUEBLE:', 0, 1, 'L'); $pdf->Ln(2); $pdf->SetFont('Arial', '', 12); $pdf->Cell(50, 7, 'Tipo de Vivienda:', 0, 0, 'L'); $pdf->Cell(0, 7, $tipo_vivienda, 1, 1, 'C'); $pdf->Ln(2); $pdf->Cell(65, 7, utf8_decode('Número de Pisos:'), 0, 0, 'R'); $pdf->SetFont('Arial', '', 12); $pdf->Cell(10, 7, $numpis, 1, 0, 'C'); $pdf->Cell(5); $pdf->Cell(40, 7, 'Piso en el que reside', 0, 0, 'R'); $pdf->SetFont('Arial', '', 12); $pdf->Cell(10, 7, $pisres, 1, 1, 'C'); $pdf->Ln(2); $pdf->SetFont('Arial', '', 12); $pdf->Cell(50, 7, utf8_decode('Material de Construcción:'), 0, 0, 'L'); $pdf->Cell(0, 7, $tipo_material, 1, 1, 'C'); $pdf->Ln(2); $pdf->SetFont('Arial', '', 12); $pdf->Cell(55, 7, utf8_decode('Estado de la Construcción:'), 0, 0, 'L'); $pdf->Cell(0, 7, $desestcon, 1, 1, 'C'); $pdf->Ln(2); $pdf->SetFont('Arial', '', 12); $pdf->Cell(50, 7, 'Vivienda con Areas Verdes:', 0, 0, 'L'); $pdf->Cell(15, 7, utf8_decode('Si'), 0, 0, 'R'); $pdf->SetFont('Arial', '', 12); $pdf->Cell(10, 7, $txtareverSI, 1, 0, 'C'); $pdf->Cell(5); $pdf->Cell(40, 7, 'No', 0, 0, 'R'); $pdf->SetFont('Arial', '', 12); $pdf->Cell(10, 7, $txtareverNO, 1, 1, 'C'); $pdf->Ln(2); $pdf->SetFont('Arial', '', 12); $pdf->Cell(50, 7, utf8_decode('Color de la Fachada:'), 0, 0, 'L'); $pdf->Cell(0, 7, $colfac, 1, 1, 'C'); $pdf->Ln(2); $pdf->SetFont('Arial', '', 12); $pdf->Cell(50, 7, utf8_decode('Tipo de Material:'), 0, 0, 'L'); $pdf->Cell(0, 7, $tipmat, 1, 1, 'C'); $pdf->Ln(2); $pdf->SetFont('Arial', '', 12); $pdf->Cell(65, 7, utf8_decode('Nº Puertas de Ingreso'), 0, 0, 'R'); $pdf->SetFont('Arial', '', 12); $pdf->Cell(10, 7, $numpue, 1, 0, 'C'); $pdf->Cell(5); $pdf->Cell(40, 7, utf8_decode('Nº Ventanas'), 0, 0, 'R'); $pdf->SetFont('Arial', '', 12); $pdf->Cell(10, 7, $numven, 1, 1, 'C'); $pdf->Ln(2); $pdf->SetFont('Arial', '', 12); $pdf->Cell(65, 7, utf8_decode('Rejas de Protección'), 0, 0, 'R'); $pdf->SetFont('Arial', '', 12); $pdf->Cell(10, 7, $txtrejpro, 1, 0, 'C'); $pdf->Cell(5); $pdf->Cell(40, 7, utf8_decode('P. de Acc. Vehicular'), 0, 0, 'R'); $pdf->SetFont('Arial', '', 12); $pdf->Cell(10, 7, $txtpueaccveh, 1, 1, 'C'); $pdf->Ln(2); $pdf->SetFont('Arial', '', 12); $pdf->Cell(50, 7, utf8_decode('Observaciones:'), 0, 0, 'L'); $pdf->MultiCell(0, 5, $obsinmu, 1, 'C'); $pdf->Ln(2); $pdf->SetFont('Arial', 'BU', 12); $pdf->Cell(0, 7, 'III. DESCRIPCION DE LA ZONA:', 0, 1, 'L'); $pdf->Ln(2); $pdf->SetFont('Arial', '', 12); $pdf->Cell(50, 7, utf8_decode('Zonificación:'), 0, 0, 'L'); $pdf->Cell(0, 7, $zonificacion, 1, 1, 'C'); $pdf->Ln(2); $pdf->SetFont('Arial', '', 12); $pdf->Cell(50, 7, utf8_decode('Zona de Riesgo Delictivo:'), 0, 0, 'L'); $pdf->Cell(0, 7, $deszonrie, 1, 1, 'C'); $pdf->Ln(2); $pdf->SetFont('Arial', '', 12); $pdf->Cell(50, 7, utf8_decode('Conclusiones:'), 0, 0, 'L'); $pdf->Cell(0, 7, $descon, 1, 1, 'C'); $pdf->Ln(2); $pdf->SetFont('Arial', '', 12); $pdf->Cell(50, 7, utf8_decode('Observaciones:'), 0, 0, 'L'); $pdf->MultiCell(0, 5, $obscon, 1, 'C'); $pdf->AddPage(); $pdf->SetXY(20, 25); $pdf->SetFont('Arial', 'BU', 14); $pdf->SetTextColor(70, 125, 25); $pdf->Cell(0, 10, 'CHECK FOTOGRAFICO DE LA VIVIENDA Y ALREDEDORES', 0, 1, 'C'); $pdf->SetTextColor(0, 0, 0); $pdf->Ln(2); $pdf->SetTextColor(0, 0, 0); $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(55, 7, 'NOMBRES Y APELLIDOS', 1, 0, 'L'); $pdf->SetFont('Arial', '', 12); $pdf->Cell(0, 7, $nombre, 1, 1, 'L'); $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(55, 7, 'DIRECCION', 1, 0, 'L'); $pdf->SetFont('Arial', '', 12); $pdf->MultiCell(0, 7, $domicilio, 1, 'C'); $pdf->Ln(7); $pdf->Image("../files/images_dom/{$fotos['0']}", 40, null, 130, 100); $pdf->Ln(4); $pdf->Image("../files/images_dom/{$fotos['1']}", 40, null, 130, 100); $pdf->Ln(2); $pdf->AddPage(); $pdf->SetXY(20, 25); $pdf->SetFont('Arial', 'BU', 14); $pdf->SetTextColor(70, 125, 25); $pdf->Cell(0, 10, 'MAPA DE ZONIFICACION - CHECK DOMICILIARIO', 0, 1, 'C'); $pdf->SetTextColor(0, 0, 0); $pdf->Ln(2); $pdf->SetTextColor(0, 0, 0); $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(55, 7, 'NOMBRES Y APELLIDOS', 1, 0, 'L'); $pdf->SetFont('Arial', '', 12); $pdf->Cell(0, 7, $nombre, 1, 1, 'L'); $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(55, 7, 'DIRECCION', 1, 0, 'L'); $pdf->SetFont('Arial', '', 12); $pdf->MultiCell(0, 7, $domicilio, 1, 'L'); $pdf->Ln(10); $pdf->Image("../files/images_dom/{$fotos['2']}", 30, null, 0, 120); } /*Check laboral*/ $result = mysql_query("SELECT a.codchklab,\r\n\t\t\tCONCAT(c.apepatper,' ',c.apematper,', ',c.nomper) AS nombre,\r\n\t\t\td.despue AS puesto,\r\n\t\t\ta.nomperref,\r\n\t\t\ta.nomemp,\r\n\t\t\ta.telemp,\r\n\t\t\ta.perlab,\r\n\t\t\ta.motces,\r\n\t\t\ta.percont,\r\n\t\t\ta.carpercont,\r\n\t\t\ta.fecent,\r\n\t\t\ta.obsent,\r\n\t\t\ta.noment\r\n\t\t\tFROM tb_chklaboral AS a\r\n\t\t\tLEFT JOIN tb_detallesolicitud AS b ON b.codper=a.codper AND b.codsol=a.codsol\r\n\t\t\tLEFT JOIN tb_persona AS c ON c.codper=a.codper\r\n\t\t\tLEFT JOIN tb_puesto AS d ON d.codpue=b.codpue\r\n\t\t\tWHERE a.codper in ({$codper}) AND a.codsol={$codsol}", $link); if (!isset($pdf)) { $pdf = new PDF(); $pdf->AliasNbPages(); } $sw = 0; while ($row = mysql_fetch_array($result)) { $sw = $sw + 1; $codchklab = utf8_decode($row['codchklab']); $nombre = utf8_decode($row['nombre']); $puesto = utf8_decode($row['puesto']); $nomperref = utf8_decode($row['nomperref']); $nomemp = utf8_decode($row['nomemp']); $telemp = utf8_decode($row['telemp']); $perlab = utf8_decode($row['perlab']); $motces = utf8_decode($row['motces']); $percont = utf8_decode($row['percont']); $carpercont = utf8_decode($row['carpercont']); $fecent = utf8_decode($row['fecent']); $obsent = utf8_decode($row['obsent']); $noment = utf8_decode($row['noment']); //Creación del objeto de la clase heredada $pdf->AddPage(); $pdf->SetDisplayMode('fullpage'); $pdf->SetMargins(20, 20, 20); $pdf->SetFont('Arial', 'BU', 14); $pdf->SetTextColor(70, 125, 25); $pdf->Cell(0, 10, 'CHECK LABORAL ' . $sw, 0, 1, 'C'); $pdf->Ln(2); $pdf->SetTextColor(0, 0, 0); $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(70, 7, 'Candidato', 1, 0, 'L'); $pdf->SetFont('Arial', '', 12); $pdf->Cell(0, 7, $nombre, 1, 1, 'L'); $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(70, 7, 'Puesto al que postula', 1, 0, 'L'); $pdf->SetFont('Arial', '', 12); $pdf->Cell(0, 7, $puesto, 1, 1, 'L'); $pdf->Ln(2); $pdf->SetTextColor(0, 0, 0); $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(70, 7, 'Persona dada como referencia', 1, 0, 'L'); $pdf->SetFont('Arial', '', 12); $pdf->Cell(0, 7, $nomperref, 1, 1, 'L'); $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(70, 7, 'Empresa', 1, 0, 'L'); $pdf->SetFont('Arial', '', 12); $pdf->Cell(0, 7, $nomemp, 1, 1, 'L'); $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(70, 7, utf8_decode('Teléfono'), 1, 0, 'L'); $pdf->SetFont('Arial', '', 12); $pdf->Cell(0, 7, $telemp, 1, 1, 'L'); $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(70, 7, 'Periodo laboral', 1, 0, 'L'); $pdf->SetFont('Arial', '', 12); $pdf->Cell(0, 7, $perlab, 1, 1, 'L'); $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(70, 7, 'Motivo de Cese', 1, 0, 'L'); $pdf->SetFont('Arial', '', 12); $pdf->Cell(0, 7, $motces, 1, 1, 'L'); $qryPreguntas = "SELECT b.despre,a.respre FROM tb_respuestas AS a\r\n\t\t\t\t\t\t\t\t\tLEFT JOIN tb_preguntas AS b ON a.codpre=b.codpre\r\n\t\t\t\t\t\t\t\t\tWHERE a.codchklab={$codchklab}"; $result_qryPreguntas = mysql_query($qryPreguntas); $pdf->SetFont('Arial', 'BU', 14); $pdf->SetTextColor(0, 0, 0); $pdf->Cell(0, 10, 'CUESTIONARIO', 0, 1, 'C'); $pdf->Ln(2); $pdf->SetTextColor(0, 0, 0); $sw2 = 0; while ($row2 = mysql_fetch_array($result_qryPreguntas)) { $sw2 = $sw2 + 1; $pdf->SetFont('Arial', 'B', 12); //$pdf->Cell(70,7,utf8_decode($row2['despre']),1,1,'L'); $pdf->MultiCell(0, 5, $sw2 . ' ' . utf8_decode($row2['despre']), 1, 'L'); $pdf->SetFont('Arial', '', 12); //$pdf->Cell(0,7,utf8_decode($row2['respre']),1,1,'L'); $pdf->MultiCell(0, 5, utf8_decode($row2['respre']), 1, 'L'); $pdf->Ln(1); } $pdf->AddPage(); $pdf->Ln(2); $pdf->SetTextColor(0, 0, 0); $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(70, 7, 'Persona de contacto', 1, 0, 'L'); $pdf->SetFont('Arial', '', 12); $pdf->Cell(0, 7, $percont, 1, 1, 'L'); $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(70, 7, 'Cargo de contacto', 1, 0, 'L'); $pdf->SetFont('Arial', '', 12); $pdf->Cell(0, 7, $carpercont, 1, 1, 'L'); $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(70, 7, 'Fecha de entrevista', 1, 0, 'L'); $pdf->SetFont('Arial', '', 12); $pdf->Cell(0, 7, $fecent, 1, 1, 'L'); $pdf->Ln(2); $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(0, 7, 'Observaciones del entrevistador', 1, 1, 'L'); $pdf->SetFont('Arial', '', 12); //$pdf->Cell(0,7,$percont,1,1,'C'); $pdf->MultiCell(0, 5, utf8_decode($obsent), 1, 'J'); $pdf->Ln(2); $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(70, 7, 'Nombre del entrevistador', 1, 0, 'L'); $pdf->SetFont('Arial', '', 12); $pdf->Cell(0, 7, $noment, 1, 1, 'L'); } }
$month_["03"] = "ÁÕ¹Ò¤Á"; $month_["04"] = "àÁÉÒ¹"; $month_["05"] = "¾ÄÉÀÒ¤Á"; $month_["06"] = "ÁԶعÒ¹"; $month_["07"] = "¡Ã¡¯Ò¤Á"; $month_["08"] = "ÊÔ§ËÒ¤Á"; $month_["09"] = "¡Ñ¹ÂÒ¹"; $month_["10"] = "µØÅÒ¤Á"; $month_["11"] = "¾ÄȨԡÒ¹"; $month_["12"] = "¸Ñ¹ÇÒ¤Á"; $pdf = new PDF('L' ,'mm','A4'); $pdf->SetThaiFont(); $pdf->SetMargins(10, 10); $pdf->AddPage(); $pdf->SetFont('AngsanaNew', '', 14); if($_GET["day"] != ""){ $_GET["day"] = sprintf("%02d",$_GET["day"]); }else{ $_GET["day"]=""; } $time_zone = explode("-",$_GET["time"]); if($_GET["code"] == "¡ÒÂÀÒ¾"){ $where = " AND code not like '58%' and depart = 'PHYSI' "; }else{
$row = array('STUDENT' => $lName . ', ' . $fName . ' ' . $mName . '.', 'FEE' => ' ', 'PAYMENT' => '-' . $amount, 'DATE' => $date, 'COMMENT' => 'Refund'); array_push($records, $row); $amount = str_replace(",", "", $amount); $amount = substr($amount, 1); $paymentBal -= $amount; } else { if ($type == 'FW') { $row = array('STUDENT' => $lName . ', ' . $fName . ' ' . $mName . '.', 'FEE' => '-' . $amount, 'PAYMENT' => ' ', 'DATE' => $date, 'COMMENT' => 'Waiver ' . $comment); array_push($records, $row); $amount = str_replace(",", "", $amount); $amount = substr($amount, 1); $feeBal -= $amount; } } } } $counter++; } $row = array('STUDENT' => 'Total', 'FEE' => '$' . $feeBal, 'PAYMENT' => '$' . $paymentBal, 'DATE' => ' ', 'COMMENT' => ' '); array_push($records, $row); $tableHead = array('Student', 'Fee', 'Payment', 'Date', 'Comment'); //print_r($records); $pdf = new PDF(l); $pdf->SetFont('Arial', '', 12); $pdf->SetMargins(7, 7, 7); $pdf->AddPage(); $pdf->createReport($tableHead, $records); $pdf->Output(); } else { echo 'INVALID USER'; }
* and open the template in the editor. */ require '../Conexion.php'; class PDF extends FPDF { function Header() { $this->Image('../images/aseoblanco.jpg', 10, 8, 100); $this->SetFont('Arial', 'B', 16); $this->Cell(0, 10, 'Kardex de Clientes', 0, 0, 'C'); $this->Ln(); $this->Ln(); } } $pdf = new PDF('L', 'mm', 'A4'); $pdf->SetMargins(20, 25, 30); $pdf->SetFont('Arial', '', 10); $pdf->SetAutoPageBreak(true, 25); $pdf->AddPage(); session_start(); $productos = $_SESSION['datosclientef']; $fecha1 = $_SESSION['fecha1']; $fecha2 = $_SESSION['fecha2']; $pdf->Ln(); $aux = $salida; $pdf->SetFont('Arial', 'B', 12); $pdf->Write(6, 'Rango de fechas de : ' . $fecha1 . ' hasta :' . $fecha2); $pdf->SetFont('Arial', '', 10); $pdf->Ln(); if ($productos === true) { $consultaproductosactivos = mysql_query("SELECT cc FROM tb_usuarios WHERE estado='Activo' and tipo='Cliente'");
$this->Ln(5); $this->Line(14, $this->GetY(), 195, $this->GetY()); $this->Ln(3); $this->SetFont('Arial', 'B', '10'); $this->Cell(45, 8, 'Tags', '0', 0, 'L'); $this->SetFont('Arial', '', '9'); $tag = '#' . str_replace(",", " #", $data["tag"]); $this->MultiCell(130, 8, $tag, 0, 1, 'L'); $this->Ln(5); $this->Line(14, $this->GetY(), 195, $this->GetY()); $this->Ln(3); } function attachment($data) { foreach ($data['images'] as $images) { $filename = str_replace(" ", "%20", $images["img_name"]); $this->AddPage(); $this->Image(URL . "/public/file/files/" . $filename, 10, 14, 190); } } } $pdf = new PDF(); $pdf->SetMargins(15, 10); $pdf->AddPage(); $pdf->AliasNbPages(); $pdf->head($data); $pdf->file_detail($data); $pdf->attachment($data); ob_end_clean(); ob_start(); $pdf->Output($data['file_name'] . '.pdf', 'I');
<?php ob_end_clean(); $bullet = chr(149); $deg = chr(186); $TotDare = 0; $TotAvere = 0; $SpDare = array(1, 2, 3, 9, 7, 6, 4, 5, 10, 8); $SpAvere = array(14, 16, 20, 17, 18, 15, 42, 43, 19); global $Titolo; global $Tipo; $pdf = new PDF(); $pdf->AliasNbPages(); $pdf->SetMargins(4, 4, 4); //~ ri esegue la stessa query della ricerca $campi = $_SESSION['qpdf']['campi']; $ord = $_SESSION['qpdf']['ord']; $Risultati = GetRows("view_piano_conti", $campi, $ord, $db); if (isset($_GET['tipo']) && $_GET['tipo'] != "") { $Tipo = $_GET['tipo']; switch ($_GET['tipo']) { case "movimenti": $Titolo = "Stampa Movimenti"; $pdf->AddPage('L'); // L = landscape $pdf->SetTitle($Titolo); $pdf->SetSubject($Titolo); break; case "mastrini": $Titolo = "Stampa Mastrini"; $pdf->AddPage();
$this->Cell($w[1], 6, $row[3], 'LR', 0, 'C'); $this->Cell($w[2], 6, number_format($row[4], 2) . " " . iconv('UTF-8', 'windows-1252', '€'), 'LR', 0, 'R'); $this->Ln(); } // Closing line $this->Cell(array_sum($w), 0, '', 'T'); $this->Ln(); } } $pdf = new PDF(); // Column headings $header = array(iconv('UTF-8', 'windows-1252', 'Verkäufernummer'), 'Artikel-Nr.', 'Preis'); // Data loading $pdf->SetFont('Arial', '', 14); $pdf->AliasNbPages(); $pdf->SetMargins(25, 15, 25); $pdf->AddPage(); //Daten holen $Sql_vknr = "SELECT DISTINCT `verkaeufernummer` FROM `verkaeufe` order by `verkaeufernummer`"; $query = mysqli_query($db, $Sql_vknr); while ($VK = mysqli_fetch_assoc($query)) { if (isset($x)) { $pdf->AddPage(); } else { $x = 1; } $str = iconv('UTF-8', 'windows-1252', 'Verkäufer'); $pdf->MultiCell(0, 10, "{$str}: " . $VK['verkaeufernummer'] . "\nEinrichtung: " . $Einstellungen['Einrichtung1'], "B", "L"); $pdf->Ln(); //Verkäufe abholen $sql_verkaeufe = "SELECT * FROM `verkaeufe` WHERE `verkaeufernummer` = '" . $VK['verkaeufernummer'] . "'";
$zonificacion = utf8_decode($row['zonificacion']); $deszonrie = utf8_decode($row['deszonrie']); $descon = utf8_decode($row['descon']); $obscon = utf8_decode($row['obscon']); $fotos = explode(",", $row['fotos']); //Creación del objeto de la clase heredada //$pdf=new PDF(); //$pdf->AliasNbPages(); /* if (!isset($pdf)) { $pdf=new PDF(); $pdf->AliasNbPages(); } */ $pdf->AddPage(); $pdf->SetDisplayMode('fullpage'); $pdf->SetMargins(20, 20, 20); $pdf->SetFont('Arial', 'BU', 14); $pdf->SetTextColor(70, 125, 25); $pdf->Cell(0, 10, 'FICHA DE CHECK DOMICILIARIO', 0, 1, 'C'); $pdf->Ln(2); $pdf->SetTextColor(0, 0, 0); $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(55, 7, 'NOMBRES Y APELLIDOS', 1, 0, 'L'); $pdf->SetFont('Arial', '', 12); $pdf->Cell(0, 7, $nombre, 1, 1, 'C'); $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(55, 7, 'DIRECCION', 1, 0, 'L'); $pdf->SetFont('Arial', '', 12); $pdf->MultiCell(0, 7, $domicilio, 1, 'C'); //$pdf->Ln(2); //$pdf->Image('../files/images_dni/imagen1.png',40,null,0,130);
<?php require 'mc_indent.php'; $InterLigne = 7; $pdf = new PDF(); $pdf->AddPage(); $pdf->SetMargins(30, 10, 30); $pdf->SetFont('Arial', '', 12); $txt = "Cher Pierre"; $txtLen = $pdf->GetStringWidth($txt); $milieu = (210 - $txtLen) / 2; $pdf->SetX($milieu); $pdf->Write(5, $txt); $pdf->ln(30); $txt = "Voici venu le temps pour toi de renouveler ta licence-assurance, en effet celle-ci expire le 28/9 prochain. Tu trouveras joint à ce document le certificat d'aptitude à faire remplir par le médecin."; $pdf->MultiCell(0, $InterLigne, $txt, 0, 'J', 0, 15); $pdf->ln(10); $txt = "Je me permets de te rappeler que cette licence est obligatoire et nécessaire à la pratique de notre sport favori, tant à l'occasion de nos entraînements qu'à toutes autres manifestations auxquelles tu peux participer telles que compétitions, cours fédéraux ou visites amicales dans un autre club."; $pdf->MultiCell(0, $InterLigne, $txt, 0, 'J', 0, 15); $pdf->ln(10); $txt = "Dès lors, je te saurais gré de bien vouloir me retourner le certificat d'aptitude dûment complété par le médecin accompagné de ton paiement de 31 € ou de la preuve de celui-ci par virement bancaire. Le tout dans les plus brefs délais afin de ne pas interrompre la couverture de ladite assurance et par la même occasion de t'empêcher de participer à nos cours le temps de la régularisation. Il y va de ta sécurité."; $pdf->MultiCell(0, $InterLigne, $txt, 0, 'J', 0, 15); $pdf->ln(10); $txt = "Merci de la confiance que tu mets en notre club pour ton épanouissement sportif."; $pdf->MultiCell(0, $InterLigne, $txt, 0, 'J', 0, 15); $pdf->ln(10); $txt = "Le comité"; $pdf->MultiCell(0, $InterLigne, $txt, 0, 'R', 0); $pdf->Output();