<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

namespace CmBundle\Controller;

use FPDF;

date_default_timezone_set('America/Mexico_City');

/**
 * Description of PDFBachillerato
 *
 * @author Omar
 */
class PDFMaestriaR extends FPDF {

//put your code here
    public $banRecibo = 0;

// Cabecera de página
    function Header() {
        if ($this->banRecibo == 0) {
            $this->Image('images/logoTec.png', -2, -3, 80, 30);
        } elseif ($this->banRecibo == 1) {
            $this->Image('images/logoTecCortado.png', 8, 5, 75, 15);
        }
    }

// Pie de página
    function Footer() {
        
    }

    public function fichaMaestriaPaginaUno($d) {
        $this->SetAutoPageBreak(true, 10);
        $this->SetFillColor(146, 208, 80);
        $this->SetDrawColor(0, 176, 8);
        $this->SetFont('', 'B', 15);
        $this->SetTextColor(0, 0, 0);
        $this->Cell(60, 10, "", 0, 0, 'C', false);
        $this->MultiCell(100, 8, "", 0, 'C', false);

        $rutaFoto = "fotos/" . $d->getCveCtl() . ".jpg";
        $nombre_fichero = $rutaFoto;
        $img = "";

        if (file_exists($nombre_fichero)) {
            $img = "fotos/" . $d->getCveCtl() . ".jpg";
            $img = "images/usuario.png";
        } else {
            $img = "images/usuario.png";
        }
        $this->Image($img, 166, 3, 40, 50);



        $this->SetXY(180, 5);
        $this->Ellipse(186, 28, 20, 25);
        $this->Image("images/elipse.png", 166, 3, 40, 50);
        $this->MultiCell(0, 30, "", 0);
        $this->Cell(150, 12, utf8_decode("SOLICITUD DE INSCRIPCIÓN PARA MAESTRÍA"), 1, 0, 'C', true);
        $this->Ln(20);
        $this->SetFont('', 'B', 12);
        $this->SetTextColor(0, 0, 0);
        $this->Cell(30, 6, "Se acredita a:", 0, 0, 'L', false);
        $this->Cell(0, 6, utf8_decode(""), 1, 0, "C", false);
        $this->SetFont('', '', 12);
        $this->Ln(8);
        $this->Cell(142, 6, utf8_decode("como estudiante de esta Institución Educativa, para cursar la maestría en"), 0, 0, 'L', false);
        $this->SetFont('', 'B', 12);
        if (strlen($d->getCveLic()->getNomLic()) > 20) {
            $this->SetFont('', '', 10);
            $this->Cell(0, 6, utf8_decode(""), 1, 0, 'C', false);
            $this->SetFont('', '', 12);
        } else {
            $this->Cell(0, 6, utf8_decode(""), 1, 0, 'C', false);
        }
        $this->SetFont('', '', 12);
        $this->Ln(8);
        $this->Cell(85, 6, utf8_decode("Se extiende el presente en Toluca, México a"), 0, 0, 'L', false);
        $this->Cell(10, 6, utf8_decode(""), 1, 0, 'C', false);
        $this->Cell(10, 6, utf8_decode("de"), 0, 0, 'C', false);
        $mesesIngles = array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');
        $mesesMexico = array('Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre');
        $mes = str_replace($mesesIngles, $mesesMexico, $d->getFecMov()->format('F'));

        $this->Cell(30, 6, utf8_decode(""), 1, 0, 'C', false);
        $this->Cell(15, 6, utf8_decode(" del 20"), 0, 0, 'R', false);
        $this->Cell(10, 6, utf8_decode(""), 1, 0, '', false);
        $this->Ln(10);
        $this->Cell(56, 6, utf8_decode("COSTO DE INSCRIPCIÓN $"), 0, 0, 'L', false);
        $this->Cell(20, 6, "", 1, 0, 'R', false);
        $this->Cell(38, 6, utf8_decode("MENSUALIDAD $"), 0, 0, 'R', false);
        $this->Cell(20, 6, "", 1, 0, 'R', false);
        $this->Cell(42, 6, utf8_decode("REINSCRIPCIÓN $"), 0, 0, 'R', false);
        $this->Cell(0, 6, "", 1, 0, 'L', false);
        $this->Ln(10);
        $this->SetFont('', 'U', 10);
        $this->Cell(0, 8, utf8_decode("NOTA: Las colegiaturas se pagan antes del 6 de cada mes, de lo contrario se cobra un recargo de $100.00 pesos."), 0, 0, 'L', false);
        $this->Ln(10);
        $this->SetFont('', 'B', 16);
        $this->SetTextColor(0, 0, 0);
        $this->Cell(0, 8, "DATOS DEL ALUMNO", 1, 0, "C", true);
        $this->Ln();
        $this->MultiCell(0, 152, "", 1, 'J', false);
        $this->SetLeftMargin(15);
        $this->SetRightMargin(15);
        $this->SetXY(15, 115);
        $this->SetFont('', '', 12);
        $this->SetTextColor(0, 0, 0);
        $this->Cell(40, 6, "Nombre del alumno:", 0, 0, "L", false);
        $this->Cell(48, 6, utf8_decode(""), "LTB", 0, "C", false);
        $this->Cell(49, 6, utf8_decode(""), "TB", 0, "C", false);
        $this->Cell(0, 6, utf8_decode(""), "RTB", 0, "C", false);
        $this->Ln();
        $this->Cell(40, 5, "", 0, 0, "C", false);
        $this->SetFont('', '', 9);
        $this->Cell(48, 5, "Apellido Paterno", 0, 0, "C", false);
        $this->Cell(49, 5, "Apellido Materno", 0, 0, "C", false);
        $this->Cell(0, 5, "Nombre (s)", 0, 0, "C", false);
        $this->Ln(8);
        $this->SetFont('', '', 12);
        $this->Cell(15, 6, "CURP: ", 0, 0, "L", false);
        $this->Cell(80, 6, utf8_decode(""), 1, 0, "C", false);
        $this->Cell(50, 6, "Fecha de Nacimiento", 0, 0, "C", false);
        if ($d->getFecNac() == null) {
            $this->Cell(10, 6, "", 1, 0, "C", false);
            $this->Cell(5, 6, " / ", 0, 0, "C", false);
            $this->Cell(10, 6, "", 1, 0, "C", false);
            $this->Cell(5, 6, " / ", 0, 0, "C", false);
            $this->Cell(0, 6, "", 1, 0, "C", false);
        } else {
            $this->Cell(10, 6, "", 1, 0, "C", false);
            $this->Cell(5, 6, " / ", 0, 0, "C", false);
            $this->Cell(10, 6, "", 1, 0, "C", false);
            $this->Cell(5, 6, " / ", 0, 0, "C", false);
            $this->Cell(0, 6, "", 1, 0, "C", false);
        }
        $this->Ln();
        $this->SetFont('', '', 9);
        $this->Cell(15, 5, "", 0, 0, "C", false);
        $this->Cell(80, 5, "", 0, 0, "C", false);
        $this->Cell(50, 5, "", 0, 0, "C", false);
        $this->Cell(10, 5, utf8_decode("Día"), 0, 0, "C", false);
        $this->Cell(5, 5, "", 0, 0, "C", false);
        $this->Cell(10, 5, utf8_decode("Mes"), 0, 0, "C", false);
        $this->Cell(5, 5, "", 0, 0, "C", false);
        $this->Cell(0, 5, utf8_decode("Año"), 0, 0, "C", false);
        $this->Ln();
        $this->SetFont('', '', 12);

        $this->Cell(12, 6, "Sexo:", 0, 0, "L", false);

        if ($d->getSexo() == 0) { // MASCULINO
            $this->Cell(22, 6, "Femenino", 0, 0, "C", false);
            $this->Cell(5, 6, utf8_decode(""), 1, 0, "C", false);
            $this->Cell(1, 6, "", 0, 0, "C", false);
            $this->Cell(22, 6, "Masculino", 0, 0, "C", false);
            $this->SetFont('ZapfDingbats', '', 12);
            $this->Cell(5, 6, "", 1, 0, "C", false);
            $this->SetFont('Arial', '', 12);
            $this->Cell(3, 6, "", 0, 0, "C", false);
        } elseif ($d->getSexo() == 1) { // FEMENINO
            $this->Cell(22, 6, "Femenino", 0, 0, "C", false);
            $this->SetFont('ZapfDingbats', '', 12);
            $this->Cell(5, 6, "", 1, 0, "C", false);
            $this->SetFont('Arial', '', 12);
            $this->Cell(1, 6, "", 0, 0, "C", false);
            $this->Cell(22, 6, "Masculino", 0, 0, "C", false);
            $this->Cell(5, 6, utf8_decode(""), 1, 0, "C", false);
            $this->Cell(3, 6, "", 0, 0, "C", false);
        }

        $this->Cell(20, 6, "Edad:", 0, 0, "R", false);
        $this->Cell(10, 6, utf8_decode($d->getEdad()), 1, 0, "C", false);
        $this->Cell(12, 6, utf8_decode("años"), 0, 0, "C", false);
        $this->Cell(3, 6, "", 0, 0, "C", false);
        $this->Cell(26, 6, utf8_decode("Nacionalidad"), 0, 0, "C", false);
        $this->Cell(0, 6, utf8_decode($d->getNacionalidad()), 1, 0, "C", false);
        $this->Ln(9);
        $this->SetFont('', '', 12);
        $this->Cell(20, 6, "Domicilio: ", 0, 0, "L", false);
        $this->Cell(130, 6, utf8_decode($d->getCalle()), 1, 0, "C", false);
        $this->Cell(10, 6, utf8_decode("No."), 0, 0, "C", false);
        $this->Cell(0, 6, $d->getNumInt(), 1, 0, "C", false);
        $this->Ln(9);
        $this->SetFont('', '', 12);
        $this->Cell(19, 6, "Colonia:", 0, 0, "L", false);
        if (strlen($d->getColLoc() > 23)) {
            $this->SetFont('', '', 10);
            $this->Cell(65, 6, utf8_decode($d->getColLoc()), 1, 0, "C", false);
            $this->SetFont('', '', 12);
        } else {
            $this->Cell(65, 6, utf8_decode($d->getColLoc()), 1, 0, "C", false);
        }
        $this->Cell(45, 6, utf8_decode("Municipio/Delegación:"), 0, 0, "C", false);
        if (strlen($d->getMunDel()) > 15) {
            $this->SetFont('', '', 9);
            $this->Cell(0, 6, utf8_decode($d->getMunDel()), 1, 0, "C", false);
            $this->SetFont('', '', 12);
        } else {
            $this->Cell(0, 6, utf8_decode($d->getMunDel()), 1, 0, "C", false);
        }
        $this->Ln(10);
        $this->SetFont('', '', 12);
        $this->Cell(45, 6, "Licenciatura Cursada:", 0, 0, "L", false);
        if (strlen($d->getLicenciatura()) > 15) {
            $this->SetFont('', '', 9);
            $this->Cell(70, 6, utf8_decode($d->getLicenciatura()), 1, 0, "C", false);
            $this->SetFont('', '', 12);
        } else {
            $this->Cell(70, 6, utf8_decode($d->getLicenciatura()), 1, 0, "C", false);
        }

        $this->Cell(40, 6, "Cedula Profesional:", 0, 0, "L", false);
        if (strlen($d->getCedula()) > 10) {
            $this->SetFont('', '', 9);
            $this->Cell(30, 6, utf8_decode($d->getCedula()), 1, 0, "C", false);
            $this->SetFont('', '', 12);
        } else {
            $this->Cell(30, 6, utf8_decode($d->getCedula()), 1, 0, "C", false);
        }
        $this->Ln(9);
        $this->Cell(70, 6, utf8_decode("Intitución educativa de procedencia:"), 0, 0, "R", false);
        if ($d->getCvePro() == null) {
            $this->Cell(0, 6, utf8_decode(""), 1, 0, "C", false);
        } else {
            $this->Cell(0, 6, utf8_decode($d->getCvePro()->getNomPlantel()), 1, 0, "C", false);
        }
        $this->Ln(9);
        $this->SetFont('', '', 12);
        $this->Cell(38, 6, utf8_decode("¿Cómo se enteró ?"), 0, 0, "L", false);
        $this->Cell(0, 6, utf8_decode($d->getComoEntero()), 1, 0, "C", false);
        $this->Ln(10);
        /* $this->Cell(38, 6, utf8_decode("LICENCIATURA:"), 0, 0, "L", false);
          $this->SetFont('', 'B', 12);
          $this->Cell(80, 6, utf8_decode($d->getCveLic()->getNomLic()), 1, 0, "L", false);
          $this->Ln(8); */

//        $this->SetFont('', 'B', 12);
//        $this->Cell(30, 6, utf8_decode("TURNO"), 0, 0, "L", false);
//        $this->SetFont('', '', 14);
//        $this->Cell(8, 6, "L", 0, 0, "R", false);
//        $dias = json_decode($d->getDiasTurno());
//        if (in_array("Lu", $dias)) {
//            $this->SetFont('ZapfDingbats', '', 12);
//            $this->Cell(5, 6, chr(51), 1, 0, "L", false);
//            $this->SetFont('Arial', '', 12);
//        } else {
//            $this->Cell(5, 6, "", 1, 0, "L", false);
//        }
//        $this->Cell(8, 6, "Ma", 0, 0, "R", false);
//        if (in_array("Ma", $dias)) {
//            $this->SetFont('ZapfDingbats', '', 12);
//            $this->Cell(5, 6, chr(51), 1, 0, "L", false);
//            $this->SetFont('Arial', '', 12);
//        } else {
//            $this->Cell(5, 6, "", 1, 0, "L", false);
//        }
//        $this->Cell(8, 6, "Mi", 0, 0, "R", false);
//        if (in_array("Mi", $dias)) {
//            $this->SetFont('ZapfDingbats', '', 12);
//            $this->Cell(5, 6, chr(51), 1, 0, "L", false);
//            $this->SetFont('Arial', '', 12);
//        } else {
//            $this->Cell(5, 6, "", 1, 0, "L", false);
//        }
//        $this->Cell(8, 6, "J", 0, 0, "R", false);
//        if (in_array("Ju", $dias)) {
//            $this->SetFont('ZapfDingbats', '', 12);
//            $this->Cell(5, 6, chr(51), 1, 0, "R", false);
//            $this->SetFont('Arial', '', 12);
//        } else {
//            $this->Cell(5, 6, "", 1, 0, "L", false);
//        }
//        $this->Cell(8, 6, "V", 0, 0, "R", false);
//        if (in_array("Vi", $dias)) {
//            $this->SetFont('ZapfDingbats', '', 12);
//            $this->Cell(5, 6, chr(51), 1, 0, "R", false);
//            $this->SetFont('Arial', '', 12);
//        } else {
//            $this->Cell(5, 6, "", 1, 0, "L", false);
//        }
//        $this->Cell(8, 6, "S", 0, 0, "R", false);
//        if (in_array("Sa", $dias)) {
//            $this->SetFont('ZapfDingbats', '', 12);
//            $this->Cell(5, 6, chr(51), 1, 0, "R", false);
//            $this->SetFont('Arial', '', 12);
//        } else {
//            $this->Cell(5, 6, "", 1, 0, "L", false);
//        }
//        $this->Cell(8, 6, "D", 0, 0, "R", false);
//        if (in_array("Do", $dias)) {
//            $this->SetFont('ZapfDingbats', '', 12);
//            $this->Cell(5, 6, chr(51), 1, 0, "R", false);
//            $this->SetFont('Arial', '', 12);
//        } else {
//            $this->Cell(5, 6, "", 1, 0, "L", false);
//        }
//        $this->Cell(30, 6, "Horario:", 0, 0, "R", false);
//        $this->Cell(0, 6, $d->getHorarioTurno()->format('H:i') . "-" . $d->getHorarioSalidaTurno()->format('H:i'), 1, 0, "L", false);

        $this->SetFont('', '', 12);
        $this->Cell(45, 6, utf8_decode("Fecha de Inscripción"), 0, 0, "L", false);
        $this->Cell(10, 6, "", 1, 0, "C", false);
        $this->Cell(5, 6, " / ", 0, 0, "C", false);
        $this->Cell(10, 6, "", 1, 0, "C", false);
        $this->Cell(5, 6, " / ", 0, 0, "C", false);
        $this->Cell(10, 6, "", 1, 0, "C", false);
        $this->SetFont('', 'B', 12);
        $this->Cell(45, 6, utf8_decode("Fecha de Ingreso:"), 0, 0, "R", false);
        $this->SetFont('', '', 12);
        $this->Cell(0, 6, "", 1, 0, "C", false);
        $this->Ln(10);
        $this->SetFont('', '', 9);
        $this->Cell(45, 5, utf8_decode(""), 0, 0, "L", false);
        $this->Cell(10, 5, utf8_decode("Día"), 0, 0, "C", false);
        $this->Cell(5, 5, "", 0, 0, "C", false);
        $this->Cell(10, 5, utf8_decode("Mes"), 0, 0, "C", false);
        $this->Cell(5, 5, "", 0, 0, "C", false);
        $this->Cell(10, 5, utf8_decode("Año"), 0, 0, "C", false);
        $this->Ln();
        $this->SetFont('', '', 12);
        $this->Cell(30, 6, utf8_decode("Teléfono Fijo:"), 0, 0, "L", false);
        $this->Cell(55, 6, utf8_decode($d->getTelefono()), 1, 0, "C", false);
        $this->Cell(45, 6, utf8_decode("Teléfono Celular"), 0, 0, "R", false);
        $this->Cell(0, 6, utf8_decode($d->getTelefonoCelular()), 1, 0, "C", false);
        $this->Ln(9);
        $this->SetFont('', '', 12);
        $this->Cell(18, 6, utf8_decode("Correo:"), 0, 0, "L", false);
        $this->Cell(75, 6, utf8_decode($d->getCorreo()), 1, 0, "C", false);
        $this->Cell(25, 6, utf8_decode("Facebook:"), 0, 0, "R", false);
        $this->Cell(0, 6, utf8_decode($d->getFacebook()), 1, 0, "C", false);
        $this->Ln(9);
        $this->SetFont('', '', 12);
        $this->Cell(50, 6, utf8_decode("Dependencia o Empresa:"), 0, 0, "L", false);
        $this->Cell(55, 6, utf8_decode($d->getDependenciaEmpresa()), 1, 0, "C", false);
        $this->Cell(15, 6, utf8_decode("Depto."), 0, 0, "R", false);
        $this->Cell(0, 6, utf8_decode($d->getDepto()), 1, 0, "C", false);
        $this->Ln(9);
        $this->SetFont('', '', 12);
        $this->Cell(32, 6, utf8_decode("Observaciones:"), 0, 0, "L", false);
        $this->Cell(0, 6, utf8_decode($d->getObservaciones()), 1, 0, "C", false);
        $this->Ln(9);
        $this->SetFont('', '', 12);
        $this->Cell(18, 6, utf8_decode("Plantel:"), 0, 0, "L", false);
        $this->Cell(80, 6, utf8_decode(""), 1, 0, "C", false);
        $this->Cell(30, 6, utf8_decode("Coordinador:"), 0, 0, "L", false);
        $this->Cell(0, 6, utf8_decode($d->getCoordinador()), 1, 0, "C", false);
    }

    public function fichaMaestriaPaginaDos($d) {
        $this->SetAutoPageBreak(true, 10);
        $this->SetFillColor(146, 208, 80);
        $this->SetDrawColor(0, 176, 8);
        $this->SetFont('', 'B', 18);
        $this->SetLeftMargin(10);
        $this->SetRightMargin(10);
        $this->SetTextColor(255, 255, 255);
        $this->Ln(15);
        $this->Cell(0, 10);
        $this->Ln();

        $this->SetFont('', 'B', 12);
        $this->SetTextColor(255, 255, 255);
        $this->Cell(97.95, 130, "", 1);
        $this->Cell(97.95, 130, "", 1);
        $this->Ln(0);
        $this->SetFont('', 'B', 9);
        $this->SetTextColor(255, 255, 255);
        $this->Cell(5, 10, "", 0, 0, 'C', false);
        $this->Cell(87.95, 10, utf8_decode("DOCUMENTACIÓN QUE RECIBE LA INSTITUCIÓN"), 1, 0, 'C', true);
        $this->Cell(5, 10, "", 0, 0, 'C', false);
        $this->Cell(5, 10, "", 0, 0, 'C', false);
        $this->Cell(87.95, 10, utf8_decode("DOCUMENTACIÓN QUE ENTREGA LA INSTITUCIÓN"), 1, 0, 'C', true);
        $this->Cell(5, 10, "", 0, 0, 'C', false);
        $this->Ln(13);
        $this->SetFont('', '', 9);
        $this->SetTextColor(0, 0, 0);
        $this->Cell(82.95, 6, utf8_decode("1.- Título (original y 2 copias)"), 0, 0, 'L', false);
        if ($d->getCerSec() == 1 & $d->getCerSecCopia() == 1) {
            $this->SetFont('ZapfDingbats', '', 12);
            $this->Cell(10, 6, "", 1, 0, 'C', false);
            $this->SetFont('Arial', '', 9);
        } elseif (($d->getCerSec() == 1 & $d->getCerSecCopia() == 0) | ($d->getCerSec() == 0 & $d->getCerSecCopia() == 1)) {
            $this->SetFont('ZapfDingbats', '', 12);
            $this->Cell(10, 6, "", 1, 0, 'C', false);
            $this->SetFont('Arial', '', 9);
        } elseif ($d->getCerSec() == 0 & $d->getCerSecCopia() == 0) {
            $this->SetFont('ZapfDingbats', '', 12);
            $this->Cell(10, 6, "", 1, 0, 'C', false);
            $this->SetFont('Arial', '', 9);
        }
        $this->Cell(5, 6, "", 0, 0, 'C', false);
        $this->Cell(82.95, 6, utf8_decode(""), 0, 0, 'C', false);
        $this->Cell(10, 6, "", 0, 0, 'C', false);
        $this->Ln(10);
        $this->Cell(82.95, 6, utf8_decode("2.- Certificado total de licenciatura (original y 2 copias)"), 0, 0, 'L', false);
        if ($d->getCerPre() == 1 & $d->getCerPreCopia() == 1) {
            $this->SetFont('ZapfDingbats', '', 12);
            $this->Cell(10, 6, "", 1, 0, 'C', false);
            $this->SetFont('Arial', '', 9);
        } elseif (($d->getCerPre() == 1 & $d->getCerPreCopia() == 0) | ($d->getCerPre() == 0 & $d->getCerPreCopia() == 1)) {
            $this->SetFont('ZapfDingbats', '', 12);
            $this->Cell(10, 6, "", 1, 0, 'C', false);
            $this->SetFont('Arial', '', 9);
        } elseif ($d->getCerPre() == 0 & $d->getCerPreCopia() == 0) {
            $this->SetFont('ZapfDingbats', '', 12);
            $this->Cell(10, 6, "", 1, 0, 'C', false);
            $this->SetFont('Arial', '', 9);
        }
        $this->Cell(5, 6, "", 0, 0, 'C', false);
        $this->SetDrawColor(0, 0, 0);
        $this->Cell(82.95, 6, utf8_decode("1.- TÍTULO DE MAESTRÍA (original)"), 0, 0, 'L', false);
        $this->SetDrawColor(0, 176, 8);
        $this->SetFont('ZapfDingbats', '', 12);
        $this->Cell(10, 6, "", 1, 0, 'C', false);
        $this->SetFont('Arial', '', 9);
        $this->Ln(10);
        $this->Cell(82.95, 6, utf8_decode("3.- Acta de Nacimiento Certificada (original y 2 copias)"), 0, 0, 'L', false);
        if ($d->getActNac() == 1 & $d->getActNacCopia() == 1) {
            $this->SetFont('ZapfDingbats', '', 12);
            $this->Cell(10, 6, "", 1, 0, 'C', false);
            $this->SetFont('Arial', '', 9);
        } elseif (($d->getActNac() == 1 & $d->getActNacCopia() == 0) | ($d->getActNac() == 0 & $d->getActNacCopia() == 1)) {
            $this->SetFont('ZapfDingbats', '', 12);
            $this->Cell(10, 6, "", 1, 0, 'C', false);
            $this->SetFont('Arial', '', 9);
        } elseif ($d->getActNac() == 0 & $d->getActNacCopia() == 0) {
            $this->SetFont('ZapfDingbats', '', 12);
            $this->Cell(10, 6, "", 1, 0, 'C', false);
            $this->SetFont('Arial', '', 9);
        }
        $this->Cell(5, 6, "", 0, 0, 'C', false);
        $this->SetDrawColor(0, 0, 0);
        $this->Cell(82.95, 6, utf8_decode("2.- CERTIFICADO TOTAL DE ESTUDIOS (original)"), 0, 0, 'L', false);
        $this->SetDrawColor(0, 176, 8);
        $this->SetFont('ZapfDingbats', '', 12);
        $this->Cell(10, 6, "", 1, 0, 'C', false);
        $this->SetFont('Arial', '', 9);
        $this->Ln(10);
        $this->Cell(82.95, 6, utf8_decode("4.- Curp validada de internet (3 copias)"), 0, 0, 'L', false);
        if ($d->getCopCurpCopia() == 1) {
            $this->SetFont('ZapfDingbats', '', 12);
            $this->Cell(10, 6, "", 1, 0, 'C', false);
            $this->SetFont('Arial', '', 9);
        } elseif ($d->getCopCurpCopia() == 0) {
            $this->SetFont('ZapfDingbats', '', 12);
            $this->Cell(10, 6, "", 1, 0, 'C', false);
            $this->SetFont('Arial', '', 9);
        }
        $this->Cell(5, 6, "", 0, 0, 'C', false);
        $this->SetDrawColor(0, 0, 0);
        $this->Cell(82.95, 6, utf8_decode("3.- ACTA DE EXAMEN PROFESIONAL (original)"), 0, 0, 'L', false);
        $this->SetDrawColor(0, 176, 8);
        $this->SetFont('ZapfDingbats', '', 12);
        $this->Cell(10, 6, "", 1, 0, 'C', false);
        $this->SetFont('Arial', '', 9);
        $this->Ln(10);
        $this->Cell(82.95, 6, utf8_decode("5.- IFE o INE (3 copias)"), 0, 0, 'L', false);
        if ($d->getCerMedCopia() == 1) {
            $this->SetFont('ZapfDingbats', '', 12);
            $this->Cell(10, 6, "", 1, 0, 'C', false);
            $this->SetFont('Arial', '', 9);
        } elseif ($d->getCerMedCopia() == 0) {
            $this->SetFont('ZapfDingbats', '', 12);
            $this->Cell(10, 6, "", 1, 0, 'C', false);
            $this->SetFont('Arial', '', 9);
        }
        $this->Cell(5, 6, "", 0, 0, 'C', false);
        $this->SetDrawColor(0, 0, 0);
        $this->Cell(82.95, 6, utf8_decode("4.- ACTA DE NACIMIENTO (certificada)"), 0, 0, 'L', false);
        $this->SetDrawColor(0, 176, 8);
        if ($d->getActNac() == 1) {
            $this->SetFont('ZapfDingbats', '', 12);
            $this->Cell(10, 6, "", 1, 0, 'C', false);
            $this->SetFont('Arial', '', 9);
        } else {
            $this->SetFont('ZapfDingbats', '', 12);
            $this->Cell(10, 6, "", 1, 0, 'C', false);
            $this->SetFont('Arial', '', 9);
        }
        $this->Ln(10);
        $this->Cell(82.95, 6, utf8_decode("6.- Cedula Profesional de Licenciatura (3 copias)"), 0, 0, 'L', false);
        if ($d->getCerMed() == 1) {
            $this->SetFont('ZapfDingbats', '', 12);
            $this->Cell(10, 6, "", 1, 0, 'C', false);
            $this->SetFont('Arial', '', 9);
        } elseif ($d->getCerMed() == 0) {
            $this->SetFont('ZapfDingbats', '', 12);
            $this->Cell(10, 6, "", 1, 0, 'C', false);
            $this->SetFont('Arial', '', 9);
        }
        $this->Cell(5, 6, "", 0, 0, 'C', false);
        $this->SetDrawColor(0, 0, 0);
        $this->Cell(82.95, 6, utf8_decode("5.- CERTIFICADO TOTAL DE LICENCIATURA"), 0, 0, 'L', false);
        $this->SetDrawColor(0, 176, 8);
        if ($d->getCerPre() == 1) {
            $this->SetFont('ZapfDingbats', '', 12);
            $this->Cell(10, 6, "", 1, 0, 'C', false);
            $this->SetFont('Arial', '', 9);
        } else {
            $this->SetFont('ZapfDingbats', '', 12);
            $this->Cell(10, 6, "", 1, 0, 'C', false);
            $this->SetFont('Arial', '', 9);
        }
        $this->Ln(10);
        $this->Cell(82.95, 6, utf8_decode("7.- Paquete de fotos de titulación (completas)"), 0, 0, 'L', false);
        if ($d->getFotInf() == 1) {
            $this->SetFont('ZapfDingbats', '', 12);
            $this->Cell(10, 6, "", 1, 0, 'C', false);
            $this->SetFont('Arial', '', 9);
        } elseif ($d->getFotInf() == 0) {
            $this->SetFont('ZapfDingbats', '', 12);
            $this->Cell(10, 6, "", 1, 0, 'C', false);
            $this->SetFont('Arial', '', 9);
        }
        $this->Cell(5, 6, "", 0, 0, 'C', false);
        $this->Cell(10, 6, "", 0, 0, 'C', false);
        $this->SetDrawColor(0, 0, 0);
        $this->Cell(72.95, 6, utf8_decode(""), 0, 0, 'C', false);
        $this->SetDrawColor(0, 176, 8);
        $this->Cell(10, 6, "", 0, 0, 'C', false);
        $this->Ln(10);
        $this->Cell(82.95, 6, utf8_decode("8.- Carta de exposición de motivos"), 0, 0, 'L', false);
        if ($d->getCopCurp() == 1) {
            $this->SetFont('ZapfDingbats', '', 12);
            $this->Cell(10, 6, "", 1, 0, 'C', false);
            $this->SetFont('Arial', '', 9);
        } elseif ($d->getCopCurp() == 0) {
            $this->SetFont('ZapfDingbats', '', 12);
            $this->Cell(10, 6, "", 1, 0, 'C', false);
            $this->SetFont('Arial', '', 9);
        }
        $this->Cell(5, 6, "", 0, 0, 'C', false);
        $this->Cell(10, 6, "", 0, 0, 'C', false);
        $this->SetDrawColor(0, 0, 0);
        $this->Cell(72.95, 6, utf8_decode(""), 0, 0, 'C', false);
        $this->SetDrawColor(0, 176, 8);
        $this->Cell(10, 6, "", 0, 0, 'C', false);
        $this->Ln(10);
        $this->Cell(82.95, 6, utf8_decode("9.- Carta de Aceptación de términos"), 0, 0, 'L', false);
        if ($d->getFotInfCopia() == 1) {
            $this->SetFont('ZapfDingbats', '', 12);
            $this->Cell(10, 6, "", 1, 0, 'C', false);
            $this->SetFont('Arial', '', 9);
        } elseif ($d->getFotInfCopia() == 0) {
            $this->SetFont('ZapfDingbats', '', 12);
            $this->Cell(10, 6, "", 1, 0, 'C', false);
            $this->SetFont('Arial', '', 9);
        }
        $this->Cell(5, 6, "", 0, 0, 'C', false);
        $this->Cell(10, 6, "", 0, 0, 'C', false);
        $this->SetDrawColor(0, 0, 0);
        $this->Cell(72.95, 6, utf8_decode(""), 0, 0, 'C', false);
        $this->SetDrawColor(0, 176, 8);
        $this->Cell(10, 6, "", 0, 0, 'C', false);
        $this->Ln();
        $this->Ln();
        $this->Ln();
        $this->SetDrawColor(0, 0, 0);
        $this->Cell(4, 5, utf8_decode(""), 0, 0, 'C', false);
        $this->Cell(40.975, 5, utf8_decode("NOMBRE Y FIRMA DEL"), "T", 0, 'C', false);
        $this->Cell(4, 5, utf8_decode(""), 0, 0, 'C', false);
        $this->Cell(4, 5, utf8_decode(""), 0, 0, 'C', false);
        $this->Cell(40.975, 5, utf8_decode("NOMBRE Y FIRMA"), "T", 0, 'C', false);
        $this->Cell(4, 5, utf8_decode(""), 0, 0, 'C', false);
        $this->Cell(10, 5, utf8_decode(""), 0, 0, 'C', false);
        $this->Cell(77.95, 5, utf8_decode("NOMBRE Y FIRMA"), "T", 0, 'C', false);
        $this->Cell(10, 5, utf8_decode(""), 0, 0, 'C', false);
        $this->Ln(4);
        $this->Cell(48.975, 5, utf8_decode("ASESOR EDUCATIVO"), 0, 0, 'C', false);
        $this->Cell(48.975, 5, utf8_decode("DEL ALUMNO"), 0, 0, 'C', false);
        $this->Cell(97.95, 5, utf8_decode("DE CONFORMIDAD"), 0, 0, 'C', false);
        $this->Ln(10);
        $this->Ln();
        $this->Ln();
        $this->Ln();
        $this->SetFont('', 'B', 12);
        $this->MultiCell(0, 5, utf8_decode("En caso de no cumplir con la documentación completa y características estrictamente requeridas en "
                        . "tiempo y forma la institución educativa no se hace responsable del trámite al igual que no habrá devolución alguna del pago "
                        . "previamente realizado."), 0, 'J', false);
        $this->Ln();
        $this->Ln();
        $this->Ln();
        $this->Cell(18, 5, "FIRMA:", 0, 0, "L", false);
        $this->Cell(45, 5, "__________________", 0, 0, "L", false);
        $this->Cell(50, 5, "NOMBRE DEL ALUMNO:", 0, 0, "L", false);
        $this->Cell(0, 5, "______________________________", 0, 0, "L", false);
        $this->Ln();
        $this->Ln();
        $this->Ln();
        $this->Ln();
        $this->Ln();
        $this->SetFont('', 'B', 12);
        $this->Cell(48.975, 5, utf8_decode("RECIBE"), 0, 0, 'C', false);
        $this->Cell(48.975, 5, utf8_decode(""), 0, 0, 'C', false);
        $this->Cell(48.975, 5, utf8_decode(""), 0, 0, 'C', false);
        $this->Cell(48.975, 5, utf8_decode("ENTREGA"), 0, 0, 'C', false);
        $this->Ln();
        $this->Ln();
        $this->Ln();
        $this->Ln();
        $this->Ln();
        $this->Cell(48.975, 5, utf8_decode("_______________________"), 0, 0, 'C', false);
        //$this->Cell(48.975, 5, utf8_decode(""), 0, 0, 'C', false);
        //$this->Cell(48.975, 5, utf8_decode(""), 0, 0, 'C', false);
        $this->Cell(97.95, 5, utf8_decode(""), 0, 0, 'C', false);
        $this->Cell(48.975, 5, utf8_decode("_______________________"), 0, 0, 'C', false);
        $this->Ln();
        $this->Cell(48.975, 5, utf8_decode("ASESOR EDUCATIVO"), 0, 0, 'C', false);
        //$this->Cell(48.975, 5, utf8_decode(""), 0, 0, 'C', false);
        //$this->Cell(48.975, 5, utf8_decode(""), 0, 0, 'C', false);
        $this->Cell(97.95, 5, utf8_decode(""), 0, 0, 'C', false);
        $this->Cell(48.975, 5, utf8_decode("CONTROL ESCOLAR"), 0, 0, 'C', false);
        $this->Ln(4);
        $this->SetFont('', 'B', 9);
        $this->Cell(48.975, 5, utf8_decode("NOMBRE Y FIRMA"), 0, 0, 'C', false);
        //$this->Cell(48.975, 5, utf8_decode(""), 0, 0, 'C', false);
        //$this->Cell(48.975, 5, utf8_decode(""), 0, 0, 'C', false);
        $this->Cell(97.95, 5, utf8_decode(""), 0, 0, 'C', false);
        $this->Cell(48.975, 5, utf8_decode("SELLO Y FIRMA"), 0, 0, 'C', false);
    }

    function Circle($x, $y, $r, $style = 'D') {
        $this->Ellipse($x, $y, $r, $r, $style);
    }

    function Ellipse($x, $y, $rx, $ry, $style = 'D') {
        if ($style == 'F')
            $op = 'f';
        elseif ($style == 'FD' || $style == 'DF')
            $op = 'B';
        else
            $op = 'S';
        $lx = 4 / 3 * (M_SQRT2 - 1) * $rx;
        $ly = 4 / 3 * (M_SQRT2 - 1) * $ry;
        $k = $this->k;
        $h = $this->h;
        $this->_out(sprintf('%.2F %.2F m %.2F %.2F %.2F %.2F %.2F %.2F c', ($x + $rx) * $k, ($h - $y) * $k, ($x + $rx) * $k, ($h - ($y - $ly)) * $k, ($x + $lx) * $k, ($h - ($y - $ry)) * $k, $x * $k, ($h - ($y - $ry)) * $k));
        $this->_out(sprintf('%.2F %.2F %.2F %.2F %.2F %.2F c', ($x - $lx) * $k, ($h - ($y - $ry)) * $k, ($x - $rx) * $k, ($h - ($y - $ly)) * $k, ($x - $rx) * $k, ($h - $y) * $k));
        $this->_out(sprintf('%.2F %.2F %.2F %.2F %.2F %.2F c', ($x - $rx) * $k, ($h - ($y + $ly)) * $k, ($x - $lx) * $k, ($h - ($y + $ry)) * $k, $x * $k, ($h - ($y + $ry)) * $k));
        $this->_out(sprintf('%.2F %.2F %.2F %.2F %.2F %.2F c %s', ($x + $lx) * $k, ($h - ($y + $ry)) * $k, ($x + $rx) * $k, ($h - ($y + $ly)) * $k, ($x + $rx) * $k, ($h - $y) * $k, $op));
    }

}
