Пример #1
0
try {
    require_once "../config.php";
    require_once "../class/lib_funciones.php";
    $objConnex = new Conexionbd();
    $objFamiliar = new Familiar();
    $sql = call_user_func(array($objFamiliar, "contrato"));
    $stmt = $objConnex->stmt_init();
    if ($stmt->prepare($sql)) {
        $stmt->bind_param('i', $_GET['codigo']);
        $stmt->execute();
        $result = $stmt->get_result();
        if ($result->num_rows == 1) {
            $date = new DateTime();
            $rows = $result->fetch_object();
            $pdf = new Contrato("P", "mm", "Letter");
            $pdf->setAuthor('SSPHCM - Oficinas en Linea Falcon C.A.');
            $pdf->setTitle('CONTRATO DE POLIZA HCM - SSPHCM');
            $pdf->AliasNbPages();
            $pdf->AddPage();
            list($anio, $mes, $dia) = explode("-", $rows->fecren);
            $date->setDate((int) $anio, (int) $mes, (int) $dia);
            $fechanueva = $date->format('d/m/Y');
            $pdf->Cell(65, 5, 'Fecha de Renovacion:', 0, 0, 'C');
            $pdf->Cell(32, 5, $fechanueva, 0, 0, 'C');
            $pdf->Cell(65, 5, 'Fecha de Inscripcion:', 0, 0, 'C');
            list($anio, $mes, $dia) = explode("-", $rows->ingreso);
            $date->setDate((int) $anio, (int) $mes, (int) $dia);
            $fechanueva = $date->format('d/m/Y');
            $pdf->Cell(32, 5, $fechanueva, 0, 1, 'C');
            $pdf->Cell(35, 5, 'Cedula:', 'LT', 0);
            $cedula = str_pad($rows->cedtit, 10, "0", STR_PAD_LEFT);