<?php
require "db.php";
require('pdf/fpdf.php');
$pdf = new FPDF();
$pdf->AddPage();


$fbId=$_GET['id'];


$institute_website = 'http://ins.net.in';

$result="SELECT * FROM intranjob2 where id='$fbId'";

$ggwp = mysqli_query($con, $result);

$row=mysqli_fetch_assoc($ggwp);
$pdf->SetFont('Arial','B',14); 


$pdf->Image($institute_website.'/admission/upload/photo/'.$row['photo'],150,5,50,35,);// Image('image file name& location',left padding, top padding)//
$pdf->Image($institute_website.'/admission/upload/photo9/'.$row['photo9'],150,40,50,15,);



$pdf->Image('logo.png',10,10,70,24,'png');// Image('image file name& location',left padding, top padding)

$pdf->Ln(18);// PARAGRAP ln(padding top)
$pdf->Ln(18);// PARAGRAP ln(padding top)

//$pdf-> Cell(100, 5,'', 0,0,'C');//Cell(width,height,'Text',Border, New line, 'Text Align')
//$pdf-> Cell(90, 5, $institute_name, 0,1,'R');
$pdf->Ln(2);// PARAGRAP ln(padding top)
$pdf->SetFont('Arial','I',10);//SetFont(fontfamily','B'/'I'/'U',FONT SIZE)
$pdf-> Cell(120, 5, ' ', 0,0,'R');
$pdf-> Cell(70, 5, '', 0,1,'R');
//$pdf-> Cell(120, 5, ' ', 0,0,'R');
//$pdf-> Cell(70, 5, 'Email- '.$institute_email, 0,1,'R');
//$pdf-> Cell(120, 5, ' ', 0,0,'R');
//$pdf-> Cell(70, 5, 'Website- '.$institute_website, 0,1,'R');



$pdf->Ln(4);// PARAGRAP ln(padding top)

//Personal Details start//
$pdf->SetFillColor(193,229,252); // COLOR CODE 
$pdf->SetFont('Arial','B',13); //SetFont(fontfamily','B'/'I'/'U',FONT SIZE)
$pdf-> Cell(35, 6, 'Student Name: ', 0,0,'l',1);
$pdf-> Cell(105, 6, $row['fname']    , 0,0,'L',1);
$pdf-> Cell(50, 6, '', 0,1,'R',1);

$pdf->SetFont('Arial','I',11);
$pdf-> Cell(95, 6,'Date of Birth : '.$row['dob'], 0,0,'l',1);
$pdf-> Cell(95, 6,'Gender. : '.$row['gender'], 0,1,'l',1);
$pdf-> Cell(95, 6,'Caste : '.$row['caste'], 0,0,'l',1);
$pdf-> Cell(95, 6,'Nationality : '.$row['nationality'], 0,1,'l',1);
$pdf-> Cell(95, 6,'Religion : '.$row['religion'], 0,0,'l',1);
$pdf-> Cell(95, 6,'Blood Group : '.$row['bloodgroup'], 0,1,'l',1);
$pdf-> Cell(95, 6,'Aadhar No. : '.$row['saadhar'], 0,0,'l',1);
$pdf-> Cell(95, 6, '', 0,1,'l',1);
//Personal Details End//

$pdf->Ln(5);// PARAGRAP ln(padding top)
//present address start//
$pdf->SetFont('Arial','B',13);
$pdf-> Cell(95, 7, 'Present Address :', 0,0,'l',1);
$pdf-> Cell(95, 7, '', 0,1,'l',1);
$pdf->SetFont('Arial','I',11);
$pdf-> Cell(95, 6,'Vill/City : '.$row['city'], 0,0,'l',1);
$pdf-> Cell(95, 6,'P.O. : '.$row['address1'], 0,1,'l',1);
$pdf-> Cell(95, 6,'P.S. : '.$row['address2'], 0,0,'l',1);
$pdf-> Cell(95, 6,'Block : '.$row['address3'], 0,1,'l',1);
$pdf-> Cell(95, 6,'Sub.Div. : '.$row['address4'], 0,0,'l',1);
$pdf-> Cell(95, 6,'Dist. : '.$row['dist'], 0,1,'l',1);
$pdf-> Cell(95, 6,'State : '.$row['state'], 0,0,'l',1);
$pdf-> Cell(95, 6, 'Pin : '.$row['pin'], 0,1,'l',1);
//present address End//

//permanent address start//
$pdf->SetFont('Arial','B',13);
$pdf-> Cell(95, 7, 'Permanent Address :', 0,0,'l',1);
$pdf-> Cell(95, 7, '', 0,1,'l',1);
$pdf->SetFont('Arial','I',11);
$pdf-> Cell(95, 6,'Vill/City : '.$row['scity'], 0,0,'l',1);
$pdf-> Cell(95, 6,'P.O. : '.$row['saddress1'], 0,1,'l',1);
$pdf-> Cell(95, 6,'P.S. : '.$row['saddress2'], 0,0,'l',1);
$pdf-> Cell(95, 6,'Block : '.$row['saddress3'], 0,1,'l',1);
$pdf-> Cell(95, 6,'Sub.Div. : '.$row['saddress4'], 0,0,'l',1);
$pdf-> Cell(95, 6,'Dist. : '.$row['sdist'], 0,1,'l',1);
$pdf-> Cell(95, 6,'State : '.$row['sstate'], 0,0,'l',1);
$pdf-> Cell(95, 6, 'Pin : '.$row['spin'], 0,1,'l',1);
//$pdf-> Cell(70, 8, '', 0,1,'R',1);
//present address End//

$pdf->Ln(5);// PARAGRAP ln(padding top)
//Academy Details Start//
$pdf->SetFont('Arial','B',13);
$pdf-> Cell(95, 7, 'Last Academy Details :', 0,0,'l',1);
$pdf-> Cell(95, 7, '', 0,1,'l',1);
$pdf->SetFont('Arial','I',11);
$pdf-> Cell(180, 6,'Institute Name : '.$row['iname1'], 0,0,'l',1);
$pdf-> Cell(10, 6,'', 0,1,'l',1);
$pdf-> Cell(180, 6,'Address : '.$row['iaddress11'].'  '.$row['iaddress12'], 0,0,'l',1);
$pdf-> Cell(10, 6,'', 0,1,'l',1);
$pdf-> Cell(95, 6,'Class : '.$row['iclass1'], 0,0,'l',1);
$pdf-> Cell(95, 6,'Medium: '.$row['imedium1'], 0,1,'l',1);
$pdf-> Cell(95, 6,'Full Marks : '.$row['fmarks1'], 0,0,'l',1);
$pdf-> Cell(95, 6, 'Marks Obtained : '.$row['omarks1'], 0,1,'l',1);
$pdf-> Cell(95, 6, 'Percentage : '.$row['per1'].'%', 0,0,'l',1);
$pdf-> Cell(95, 6, '', 0,1,'l',1);
//Academy Details End//

$pdf->Ln(5);// PARAGRAP ln(padding top)

//Bank Details Start//
$pdf->SetFont('Arial','B',13);
$pdf-> Cell(95, 7, 'Bank Details :', 0,0,'l',1);
$pdf-> Cell(95, 7, '', 0,1,'l',1);
$pdf->SetFont('Arial','I',11);
$pdf-> Cell(180, 6,'Bank Name : '.$row['bankname'], 0,0,'l',1);
$pdf-> Cell(10, 6,'', 0,1,'l',1);
$pdf-> Cell(95, 6,'A/c No. : '.$row['bankac'], 0,0,'l',1);
$pdf-> Cell(95, 6,'IFSC Code: '.$row['bankifsc'], 0,1,'l',1);
$pdf-> Cell(95, 6,'Branch Name : '.$row['bankbranch'], 0,0,'l',1);
$pdf-> Cell(95, 6, 'Name as in Account : '.$row['bankacname'], 0,1,'l',1);
//Bank Details End//

$pdf->Ln(5);// PARAGRAP ln(padding top)

//Father Details Start//
$pdf->SetFont('Arial','B',13);
$pdf-> Cell(95, 7, 'Father Details :', 0,0,'l',1);
$pdf-> Cell(95, 7, '', 0,1,'l',1);
$pdf->SetFont('Arial','I',11);
$pdf-> Cell(180, 6,'Father Name : '.$row['mdname'], 0,0,'l',1);
$pdf-> Cell(10, 6,'', 0,1,'l',1);
$pdf-> Cell(95, 6,'Qualification : '.$row['fqualification'], 0,0,'l',1);
$pdf-> Cell(95, 6,'Occupation: '.$row['foccupation'], 0,1,'l',1);
$pdf-> Cell(95, 6,'Aadhar No. : '.$row['faadhar'], 0,0,'l',1);
$pdf-> Cell(95, 6, 'BPL No. : '.$row['fbpl'], 0,1,'l',1);
$pdf-> Cell(95, 6,'Mobile No. : '.$row['fph'], 0,0,'l',1);
$pdf-> Cell(95, 6, 'Whatsapp No. : '.$row['fwp'], 0,1,'l',1);
$pdf-> Cell(180, 6,'Address : '.$row['faddress1'].'  '.$row['faddress2'], 0,0,'l',1);
$pdf-> Cell(10, 6,'', 0,1,'l',1);
//Father Details End//

$pdf->Ln(5);// PARAGRAP ln(padding top)

//Mother Details Start//
$pdf->SetFont('Arial','B',13);
$pdf-> Cell(95, 7, 'Mother Details :', 0,0,'l',1);
$pdf-> Cell(95, 7, '', 0,1,'l',1);
$pdf->SetFont('Arial','I',11);
$pdf-> Cell(180, 6,'Mother Name : '.$row['lname'], 0,0,'l',1);
$pdf-> Cell(10, 6,'', 0,1,'l',1);
$pdf-> Cell(95, 6,'Qualification : '.$row['mqualification'], 0,0,'l',1);
$pdf-> Cell(95, 6,'Occupation: '.$row['moccupation'], 0,1,'l',1);
$pdf-> Cell(95, 6,'Aadhar No. : '.$row['maadhar'], 0,0,'l',1);
$pdf-> Cell(95, 6, 'BPL No. : '.$row['mbpl'], 0,1,'l',1);
$pdf-> Cell(95, 6,'Mobile No. : '.$row['mph'], 0,0,'l',1);
$pdf-> Cell(95, 6, 'Whatsapp No. : '.$row['mwp'], 0,1,'l',1);
$pdf-> Cell(180, 6,'Address : '.$row['maddress1'].'  '.$row['maddress2'], 0,0,'l',1);
$pdf-> Cell(10, 6,'', 0,1,'l',1);
//Mother Details End//

$pdf->Ln(5);// PARAGRAP ln(padding top)
//Exam Center & Accommodation  Start//
$pdf->SetFont('Arial','B',13);
$pdf-> Cell(95, 7, 'Exam Center & Accommodation :', 0,0,'l',1);
$pdf-> Cell(95, 7, '', 0,1,'l',1);
$pdf->SetFont('Arial','I',11);
$pdf-> Cell(180, 6,'Exam Center : '.$row['exemcenter'], 0,0,'l',1);
$pdf-> Cell(10, 6,'', 0,1,'l',1);
$pdf-> Cell(180, 6,'Accommodation : '.$row['accommodation'], 0,0,'l',1);
$pdf-> Cell(10, 6,'', 0,1,'l',1);
//Exam Center & Accommodation End//

$pdf->Ln(5);// PARAGRAP ln(padding top)
//Apply Course Name Start//
$pdf->SetFont('Arial','B',12);
$pdf-> Cell(50, 10, 'Apply Course Name :', 0,0,'l',1);
$pdf-> Cell(140, 10, $row['dept'], 0,1,'l',1);
$pdf->SetFont('Arial','I',10);
//Apply Course Name End//

$pdf->Ln(5);// PARAGRAP ln(padding top)
//Apply Date Start//
$pdf->SetFont('Arial','B',12);
$pdf-> Cell(30, 10, 'Apply Date :', 0,0,'l',1);
$pdf-> Cell(160, 10, $row['dtsubmitted'] , 0,1,'l',1);
$pdf->SetFont('Arial','I',10);
//Apply Date End//

$pdf->Ln(5);// PARAGRAP ln(padding top)



$pdf->Output();

?>