<?php

require("includes/check_auth_user.php");
require("includes/dbconnect.php");
include ('includes/function.php');

//$formname = 'Annexure 2 ';
$maindb = 'visamain';
$trandb = 'visatran';

$file = 'undertaking_pdf.php';
$formname = "Undertaking";
//$keyfld = "vouchno";
//$source = "CP";
$zdb = $_SESSION["zdbyear_" . $dbname];
$zroot = $_SESSION["zdir"];
mysqli_select_db($conn, $zdb);
$mht = 'height:20px;';

$admin = $_SESSION["admin_" . $dbname];
$myvouch = $_REQUEST["myvouch"];
$visano = $_REQUEST["visano"];
$paxname = $_REQUEST["paxname"];

$getcomp = mysqli_query($conn, "SELECT * FROM $zroot.`company` WHERE `code`= '1'")or die(mysqli_error($conn));
$comp = mysqli_fetch_array($getcomp);

require("library/fpdf/fpdf.php");

class pdf extends fpdf {

    function Footer() {

//Position at 1.5 cm from bottom
        $this->SetY(-15);

//Arial italic 8
        $this->SetFont('Arial', 'I', 8);
//Page number
//        $this->Cell(0, 10, 'Page ' . $this->PageNo() . '/{nb}', 0, 0, 'C');
    }
}

//browse('udar');

$pdf = new pdf('P', 'mm', 'A4');

$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetFont('Arial', '', 14);
$pdf->SetTextColor(0, 0, 0);
$pdf->Image('images/license.jpg', 33, 5, +150);
$pdf->Ln(100);
$pdf->Cell(10, 6, "", 0, 0, 'L');
$pdf->SetFont('Arial', 'B', 14);
// $pdf->Image('images/water.jpg', 33, 120, +150);
$pdf->Cell(180, 10, "U N D E R T A K I N G", 0, 0, 'C');

$pdf->Ln(20);
$pdf->SetFont('Arial', '', 13);
$pdf->Cell(20, 6, "", 0, 0, 'L');
$pdf->Cell(90, 6, "We $comp[pname] undertake that the driving  license,", 0, 0, 'L');
$pdf->Ln(10);
$pdf->Cell(20, 6, "", 0, 0, 'L');
$pdf->Cell(90, 6, "for   $paxname   number   ($visano )    is  genuine and we", 0, 0, 'L');
// $pdf->Cell(20, 6, "$paxname", 'B', 0, 'L');
$pdf->Ln(10);
$pdf->Cell(20, 6, "", 0, 0, 'L');
$pdf->Cell(90, 6, "have  done  the  test  for  the  same.  We  take full  responsibilty  if  the", 0, 0, 'L');
$pdf->Ln(10);
$pdf->Cell(20, 6, "", 0, 0, 'L');
$pdf->Cell(40, 6, "license  is  forged.", 0, 0, 'L');
$pdf->Ln(30);
$pdf->Cell(20, 6, "", 0, 0, 'L');
$pdf->Cell(110, 6, "Stamp", 0, 0, 'L');
$pdf->Cell(100, 6, "Signature", 0, 0, 'L');

ob_end_clean();
$pdf->Output("Annexure I Normal-" . $paxname     . ".pdf", "I");
?>
         
