0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 3.12.71.166


Current Path : /var/www/html/kswu/orms/src/
Upload File :
Current File : /var/www/html/kswu/orms/src/printapp_det.php

<?php
$main_src=substr($_SERVER['SCRIPT_FILENAME'],0,strlen($_SERVER['SCRIPT_FILENAME'])-7);
$pdf_writer_class =$main_src."/tcpdf/tcpdf.php";
require_once($pdf_writer_class);
include_once("stringspliter.php");	
class certificate_print  extends TCPDF
{
		function DefaultConstructor($aobj_context)
		{
			$this->aobj_context=$aobj_context;
			$this->pdf=  new TCPDF();
			$this->pdf=$this;
			$this->app_no=trim($this->aobj_context->mobj_data["app_no"]);
			$this->ip=$_SERVER["REMOTE_ADDR"];
			$get_date="select now() as now_date,fuserid from postdet where fappno = '{$this->app_no}'";
			$obj=$this->aobj_context->mobj_db->GetRow($get_date);
			$this->current_date=$obj[now_date];	
			$this->fuserid=$obj[fuserid]; 
			$cource = substr($this->app_no,-3);
			$get_date="select fdescpn as dept from mascourse where fdegree = '{$cource}'";
			$result = $this->aobj_context->mobj_db->GetRow($get_date);
			$this->dept = $result['dept'];
			$this->post = substr($this->app_no,-4,1);
		}
		 
		 
		function Header()
		{


		}	
		function Footer()
		{
		 
			$this->SetY(-20);
			$this->pdf->SetFont('Times','B',8);
			$this->Cell(100,6,'Printed   : IP Address : '.$this->ip." Date ".$this->current_date."                                                                 Page No. ".$this->PageNo(),'0',0,'L');
			//$this->Cell(140,6,"Page No. ".$this->PageNo(),'0',1,'R');
			//$this->Cell(50,6,'Page 1 of 1',0,1,'R');
		}
	 
	 function formcolldata()
	 {
		$get_coll_name="select concat(FUNIVNAME,', ',FTOWN) as 'college_name',FTOWN,
				FUNIVADD1 as 'state',FLOGOPATH as pdf_logo_path From control";
		$lobj_get_coll_name=$this->aobj_context->mobj_db->GetRow($get_coll_name);
		$this->college_name=$lobj_get_coll_name['college_name'];
		$this->s_state=$lobj_get_coll_name['state'];
		$this->FTOWN=$lobj_get_coll_name['FTOWN'];
		$this->pdf_logo_path=$lobj_get_coll_name['pdf_logo_path'];	
	 }
	 
		function GetQry()
		{
			$get_data="SELECT s.FNAME,DATE_FORMAT(s.FDATE,'%d/%m/%Y') AS FDATE,d.FDESCPN,s.FPHOTO,
						s.FAPPNO,s.FDEGREE,s.FQUALEXAM,s.FBOARDNAME,
						s.FBOARDADDRESS,s.FQAULEXAMREGNO,s.FPASSYEAR
				FROM student s inner join degree d on d.FDEGREE=s.FDEGREE WHERE s.FAPPNO='{$this->app_no}'";
				$lobj_get_data= $this->aobj_context->mobj_db->GetRow($get_data);
			// echo $get_data
			 $this->FNAME=$lobj_get_data['FNAME'];
			 $this->FDATE=$lobj_get_data['FDATE'];
			 $this->FDEGREE=$lobj_get_data['FDEGREE'];
			 $this->FQUALEXAM=$lobj_get_data['FQUALEXAM'];
			 $this->FBOARDNAME=$lobj_get_data['FBOARDNAME'];
			 $this->FBOARDADDRESS=$lobj_get_data['FBOARDADDRESS'];
			 $this->FQAULEXAMREGNO=$lobj_get_data['FQAULEXAMREGNO'];
			 $this->FPASSYEAR=$lobj_get_data['FPASSYEAR'];
			 $this->FCOURSE=$lobj_get_data['FDESCPN'];
			 $this->FPHOTO=$lobj_get_data['FPHOTO'];
			$this->full_photo_path=trim($this->aobj_context->main_src."/". $this->FPHOTO);		 
		}
		
		function formData()
		{
			$this->pdf->SetMargins(10,12,10);		
			$this->pdf->AddPage("P");
			$img_path=$this->aobj_context->main_src.$this->photo_path;
			if(!empty($this->photo_path) && file_exists($img_path)) 
			{						 
				$this->pdf->Image($img_path,166,100,50);
			}	
			if(!empty($this->pdf_logo_path))
			{
				$img_logo_path=$this->aobj_context->main_src.$this->pdf_logo_path;
				$this->pdf->Image($img_logo_path,10,10,180,30);
			}
			$this->pdf->Ln(20);
			
			$h =6;
			if($this->call_type=="Other")
			$this->pdf->setY(25);
			$this->pdf->SetFont('Times','B',12);
			//$this->pdf->AddPage("P");
			//$this->pdf->cell(185,6,$this->college_name,"0",1,"C");
			//$this->pdf->cell(180,6,$this->FTOWN,"0",1,"C");
			if($this->post == 'A')
			{	
				$post = "Assistant Professor";
				$employment = "AWU/HRM/2017-18/3082/2018";
			}	
			if($this->post == 'S')
			{	
				$post = "Associate Professor";
				$employment = "AWU/HRM/2017-18/308/2018";
			}
			if($this->post == 'P')
			{	
				$post = "Professor";
				$employment = "AWU/HRM/2017-18/308/2018";
			}
			
			$this->pdf->SetFont('Times','B',8);
			$this->pdf->cell(180,7, $this->s_state,"0",1,"C");
			$this->pdf->SetFont('Times','B',14);
			   
			$this->pdf->cell(180,7,"Employment Notification : ".$employment,"0",1,"C");
			$this->pdf->cell(180,7,"Post Applied : ".$post,"0",1,"C");
			$this->pdf->cell(180,7,"Department: ".$this->dept,"0",1,"C");
			
			$this->pdf->SetFont('Times','B',13);
			$this->pdf->cell(180,6,"Application No.".$this->app_no,"0",1,"L");
			$query = "select p.*,c.fcatcode as fcatcode,c.fcatid 
						from perdetl p 
						inner join mascat c on p.fcatcode = c.fcatid
						where p.fuserid = '{$this->fuserid}' 
						group by p.fuserid";
			
			$resultsper = $this->aobj_context->mobj_db->GetRow($query);
			
			
			
			$sql = "SELECT p.fuserid,s.fname,p.fappno,p.fvacancies,if('{$post}' = 'ASSISTANT PROFESSOR',ifnull(c.famount,0),ifnull(c.fpamount,0)) as famount
			  FROM perdetl s INNER JOIN mascat c ON s.fcatcode  = c.fcatid
			  INNER JOIN postdet p ON s.fuserid = p.fuserid
			  where p.fuserid = '{$this->fuserid}' and p.fappno = '{$this->app_no}'";
			$res  = $this->aobj_context->mobj_db->getRow($sql);
			
			$famountpay = $res[famount];
			$fcatid = $resultsper['fcatid'];
			
			$this->pdf->Cell(155,$h,"Personal Details","1",1,"C");
			$this->pdf->SetFont('Times','',10);
			
			$query = "select * from upload where fuserid = '{$this->fuserid}' and fappno = '{$this->app_no}' and ftype = 'photo'";
			$results = $this->aobj_context->mobj_db->GetRow($query);
			$fpath = $results['fpath'];
			$query = "select * from upload where fuserid = '{$this->fuserid}' and fappno = '{$this->app_no}' and ftype = 'signature'";
			$results = $this->aobj_context->mobj_db->GetRow($query);
			$signature = $results['fpath'];
			//var_dump($query);
			if($fpath != '')
			{	
				$this->pdf->Image($fpath,168,67,20,20);
			}
			if($signature != '')
			{	
				$this->pdf->Image($signature,168,88,30,10);
			}
			$namearr = str_splitf($resultsper[fname],40);
			$this->pdf->Cell(30,3,"Name ","1",0,"L");
			$this->pdf->Cell(125,3,$resultsper[fname],"1",1,"L");
			
			$this->pdf->Cell(30,3,"Date of Birth","1",0,"L");
			$this->pdf->Cell(125,3,$resultsper[fdob],"1",1,"L");
			
			$this->pdf->Cell(30,$h,"Age","1",0,"L");
			$this->pdf->Cell(55,$h,$resultsper[fage],"1",0,"L");
			$this->pdf->Cell(30,$h,"Place of Birth","1",0,"L");
			$this->pdf->Cell(40,$h,$resultsper[fbirthplace],"1",1,"L");
			
			$this->pdf->Cell(30,$h,"Father`s Name","1",0,"L");
			$this->pdf->Cell(55,$h,$resultsper[ffatname],"1",0,"L");
			$this->pdf->Cell(30,$h,"Nationality","1",0,"L");
			$this->pdf->Cell(40,$h,$resultsper[fnational],"1",1,"L");
			
			$this->pdf->Cell(30,$h,"Mother`s Name","1",0,"L");
			$this->pdf->Cell(55,$h,$resultsper[fmotname],"1",0,"L");
			$this->pdf->Cell(30,$h,"Religion","1",0,"L");
			$this->pdf->Cell(40,$h,$resultsper[freligion],"1",1,"L");
			
			$this->pdf->Cell(30,$h,"Gender","1",0,"L");
			$this->pdf->Cell(30,$h,$resultsper[fgender],"1",0,"L");
			$this->pdf->Cell(30,$h,"Category","1",0,"L");
			$this->pdf->Cell(40,$h,$resultsper[fcatcode],"1",0,"L");
			$this->pdf->Cell(30,$h,"Marital Status","1",0,"L");
			$this->pdf->Cell(30,$h,$resultsper[fmarstatus],"1",1,"L");
			
			$this->pdf->Cell(30,$h,"Email","1",0,"L");
			$this->pdf->Cell(40,$h,$resultsper['femailid'],"1",0,"L");
			$this->pdf->Cell(20,$h,"Phone No.","1",0,"L");
			$this->pdf->Cell(40,$h,$resultsper[fphone],"1",0,"L");
			$this->pdf->Cell(30,$h,"Mobile No.","1",0,"L");
			$this->pdf->Cell(30,$h,$resultsper[fmobile],"1",1,"L");
			
			if($resultsper['fph'] == 'T')
				$value = 'Yes';
			else
				$value = 'No';
			
			   
			$this->pdf->Cell(60,$h,"Are you physically challenged?","1",0,"L");
			$this->pdf->Cell(40,$h,$value,"1",0,"L");
			$this->pdf->Cell(40,$h,"Aadhar No.","1",0,"L");
			$this->pdf->Cell(50,$h,$resultsper[faadhar],"1",1,"L");
			if($resultsper['fph'] == 'T')
			{
				$this->pdf->Cell(40,$h,"Type of Disability","1",0,"L");
				$this->pdf->Cell(60,$h,$resultsper['fphtype'],"1",0,"L");
				$this->pdf->Cell(40,$h,"Percentage of disability ","1",0,"L");
				$this->pdf->Cell(50,$h,$resultsper[fphper],"1",1,"L");
			}	
				
			
			
			$comadd = $resultsper['fcomadd1'].' '.$resultsper['fcomadd2'].' '.$resultsper['fcomadd3'].' '.$resultsper['fcomadd4'];
			$peradd = $resultsper['fperadd1'].' '.$resultsper['fperadd2'].' '.$resultsper['fperadd3'].' '.$resultsper['fperadd4'];
			
			$comaddarr = str_splitf($comadd,70);
			$this->pdf->Cell(50,3,"Address for Correspondence","LRT",0,"L");
			$this->pdf->Cell(140,3,$comaddarr[0],"LRT",1,"L");
			$this->pdf->Cell(50,3,"","LRB",0,"L");
			$this->pdf->Cell(140,3,$comaddarr[1],"LRB",1,"L");
			
			$peraddarr = str_splitf($peradd,70);
			$this->pdf->Cell(50,3,"Permanent Address ","LRT",0,"L");
			$this->pdf->Cell(140,3,$peraddarr[0],"LRT",1,"L");
			$this->pdf->Cell(50,3,"","LRB",0,"L");
			$this->pdf->Cell(140,3,$peraddarr[1],"LRB",1,"L");
			
			
			$this->pdf->SetFont('Times','B',10);
			$this->pdf->Cell(190,$h,"Languages Known","1",1,"C");
			$this->pdf->SetFont('Times','',10);
			$this->pdf->Cell(70,$h,"Language","1",0,"C");
			$this->pdf->Cell(40,$h,"Write","1",0,"C");
			$this->pdf->Cell(40,$h,"Read","1",0,"C");
			$this->pdf->Cell(40,$h,"Spoken","1",1,"C");
			$query1 = "select GROUP_CONCAT(DISTINCT flanguage,'->',fwrite,'->',fread,'->',fspoken) AS lang 
						from  languagedetl 
						where fuserid = '{$this->fuserid}' 
						group by fuserid";
						
			$resultsper1 = $this->aobj_context->mobj_db->GetRow($query1);
			$lan = $resultsper1['lang'];
			$lang = explode(',',$lan);
			foreach($lang as $value)
			{
				$lang = explode('->',$value);
				$this->pdf->Cell(70,$h,$lang[0],"1",0,"L");
				$this->pdf->Cell(40,$h,$lang[1],"1",0,"C");
				$this->pdf->Cell(40,$h,$lang[2],"1",0,"C");
				$this->pdf->Cell(40,$h,$lang[3],"1",1,"C");
			}
			$this->pdf->Ln(4);
			$this->pdf->SetFont('Times','B',11);
			$this->pdf->Cell(190,5,"Educational Details","1",1,"C");
			//$this->pdf->SetFont('Times','',10);
			$this->pdf->Cell(20,3,"Degree","LRT",0,"L");
			$this->pdf->Cell(30,3,"Name of the Board","LRT",0,"L");
			$this->pdf->Cell(20,3,"Year","LRT",0,"L");
			$this->pdf->Cell(20,3,"Max. Marks","LRT",0,"L");
			$this->pdf->Cell(20,3,"Sec. Marks","LRT",0,"L");
			$this->pdf->Cell(20,3,"Percentage","LRT",0,"L");
			$this->pdf->Cell(30,3,"Division","LRT",0,"L");
			$this->pdf->Cell(30,3,"Subject","LRT",1,"L");
			
			$this->pdf->Cell(20,3,"","LRB",0,"L");
			$this->pdf->Cell(30,3,"/ University","LRB",0,"L");
			$this->pdf->Cell(20,3,"","LRB",0,"L");
			$this->pdf->Cell(20,3,"","LRB",0,"L");
			$this->pdf->Cell(20,3,"","LRB",0,"L");
			$this->pdf->Cell(20,3,"/ CGPA","LRB",0,"L");
			$this->pdf->Cell(30,3,"","LRB",0,"L");
			$this->pdf->Cell(30,3,"Studied","LRB",1,"L");
			
			$query2 = "select * from qualdetl where fuserid = '{$this->fuserid}' order by fenttype";
			$results2 = $this->aobj_context->mobj_db->GetAll($query2);
			$eh = 127; 
			$x=$this->pdf->GetY();
			$this->pdf->SetFont('Times','',9);
			foreach($results2 as $value)
			{
				$this->pdf->Cell(20,30,$value[fdegree],"1",0,"L");
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();				
				$this->pdf->writeHTMLCell(30,30,$y,$x, $value['funivname'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(20,30,$y,$x, $value['fyear'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
				
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(20,30,$y,$x, $value['fmaxmarks']  , 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
				
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(20,30,$y,$x, $value['fsecmarks'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
				
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(20,30,$y,$x, $value['fpercentage'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
				
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(30,30,$y,$x, $value['fdivision'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(30,30,$y,$x, $value['fsubjects'], 1, 1, $fill=false, $reseth=true, $align='', $autopadding=true);				
				
			}
			$this->pdf->Ln(3);
			$this->pdf->SetFont('Times','B',9);
			$this->pdf->Cell(20,3,"Degree","LRT",0,"L");
			$this->pdf->Cell(30,3,"Date of Registration","LRT",0,"L");
			$this->pdf->Cell(20,3,"Date of","LRT",0,"L");
			$this->pdf->Cell(20,3,"Date of ","LRT",0,"L");
			$this->pdf->Cell(30,3,"University","LRT",0,"L");
			$this->pdf->Cell(50,3,"Thesis / ","LRT",0,"L");
			$this->pdf->Cell(20,3,"Overall % ","LRT",1,"L");
			
			$this->pdf->Cell(20,3,"","LRB",0,"L");
			$this->pdf->Cell(30,3," / Admission","LRB",0,"L");
			$this->pdf->Cell(20,3,"Submission","LRB",0,"L");
			$this->pdf->Cell(20,3,"Award","LRB",0,"L");
			$this->pdf->Cell(30,3,"/ Institute","LRB",0,"L");
			$this->pdf->Cell(50,3,"Dissertation Title","LRB",0,"L");
			$this->pdf->Cell(20,3,"","LRB",1,"L");
			$this->pdf->SetFont('Times','',9);
			$query2  = "SELECT fdegree, date_format(fdor,'%d/%m/%Y') as fdor,date_format(fdos,'%d/%m/%Y') as fdos,
				date_format(fdoa,'%d/%m/%Y') as fdoa,funivname,ftitle,fmarkstype,fpercent,fenttype FROM phddetl 
			   where fuserid = '{$this->fuserid}' order by fenttype";
			$results2 = $this->aobj_context->mobj_db->GetAll($query2);

			$x=$this->pdf->GetY();
			foreach($results2 as $value)
			{
				$this->pdf->Cell(20,30,$value[fdegree],"1",0,"L");				
				$this->pdf->Cell(30,30,$value[fdor],"1",0,"L");
				$this->pdf->Cell(20,30,$value[fdos],"1",0,"L");
				$this->pdf->Cell(20,30,$value[fdoa],"1",0,"L");
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(30,30,$y,$x, $value['funivname'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
				
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(50,30,$y,$x, $value['ftitle'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
				
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(20,30,$y,$x, $value['fpercent'], 1, 1, $fill=false, $reseth=true, $align='', $autopadding=true);
									
			}	
			$this->pdf->SetFont('Times','B',9);
			$this->pdf->Ln(3);
			$this->pdf->Cell(30,$h,"Details of JRF ","LRT",0,"L");
			$this->pdf->Cell(70,$h,"NET Subject","LRT",0,"L");
			$this->pdf->Cell(30,$h,"Certificate No.","LRT",0,"L");
			$this->pdf->Cell(20,$h,"Year of ","LRT",0,"L");
			$this->pdf->Cell(40,$h,"State","LRT",1,"L");
			
			$this->pdf->Cell(30,$h,"/NET / SLET","LRB",0,"L");
			$this->pdf->Cell(70,$h,"","LRB",0,"L");
			$this->pdf->Cell(30,$h,"/ Roll No.","LRB",0,"L");
			$this->pdf->Cell(20,$h,"Passing","LRB",0,"L");
			$this->pdf->Cell(40,$h,"","LRB",1,"L");
			
			$this->pdf->SetFont('Times','',9);
			$this->pdf->Cell(30,$h,"NET - JRF","1",0,"L");
			$this->pdf->Cell(70,$h,$resultsper['fjrfsub'],"1",0,"L");
			$this->pdf->Cell(30,$h,$resultsper['fjrfcertno'],"1",0,"L");
			$this->pdf->Cell(20,$h,$resultsper['fjrfpassmth'],"1",0,"L");
			$this->pdf->Cell(40,$h,$resultsper['fjrstate'],"1",1,"L");
			
			$this->pdf->Cell(30,$h,"NET","1",0,"L");
			$this->pdf->Cell(70,$h,$resultsper['fnetsub'],"1",0,"L");
			$this->pdf->Cell(30,$h,$resultsper['fnetcertno'],"1",0,"L");
			$this->pdf->Cell(20,$h,$resultsper['fnetpassmth'],"1",0,"L");
			$this->pdf->Cell(40,$h,$resultsper['fnetstate'],"1",1,"L");
			
			$this->pdf->Cell(30,$h,"SELET","1",0,"L");
			$this->pdf->Cell(70,$h,$resultsper['fsletsub'],"1",0,"L");
			$this->pdf->Cell(30,$h,$resultsper['fsletcertno'],"1",0,"L");
			$this->pdf->Cell(20,$h,$resultsper['fsletpassmth'],"1",0,"L");
			$this->pdf->Cell(40,$h,$resultsper['fsletstate'],"1",1,"L");
			
			$this->pdf->Cell(30,$h,"PDF","1",0,"L");
			$this->pdf->Cell(70,$h,$resultsper['FPDFSUB'],"1",0,"L");
			$this->pdf->Cell(30,$h,$resultsper['FPDFCERTNO'],"1",0,"L");
			$this->pdf->Cell(20,$h,$resultsper['FPDFPASSMTH'],"1",0,"L");
			$this->pdf->Cell(40,$h,$resultsper['FPDFSTATE'],"1",1,"L");
			
			$this->pdf->Ln(4);
			$this->pdf->SetFont('Times','B',10);
			$this->pdf->Cell(190,5,"3.1 Full-time Teaching Experience","1",1,"C");
			$this->pdf->SetFont('Times','B',9);
			$this->pdf->Cell(30,2,"Name of University ","LRT",0,"L");
			$this->pdf->Cell(20,2,"Designation","LRT",0,"L");
			$this->pdf->Cell(20,2,"Status","LRT",0,"L");
			$this->pdf->Cell(20,2,"Pay Scale / ","LRT",0,"L");
			$this->pdf->Cell(20,2,"From","LRT",0,"L");
			$this->pdf->Cell(20,2,"To","LRT",0,"L");
			$this->pdf->Cell(20,2,"Effective ","LRT",0,"L");
			$this->pdf->Cell(20,2,"Points","LRT",0,"L");
			$this->pdf->Cell(20,2,"Enclosure No.","LRT",1,"L");
			
			$this->pdf->Cell(30,2,"/ College / Institute ","LR",0,"L");
			$this->pdf->Cell(20,2,"","LR",0,"L");
			$this->pdf->Cell(20,2,"","LR",0,"L");
			$this->pdf->Cell(20,2,"Consolidated","LR",0,"L");
			$this->pdf->Cell(20,2,"","LR",0,"L");
			$this->pdf->Cell(20,2,"","LR",0,"L");
			$this->pdf->Cell(20,2,"Time Period ","LR",0,"L");
			$this->pdf->Cell(20,2,"","LR",0,"L");
			$this->pdf->Cell(20,2,"","LR",1,"L");
			
			$this->pdf->Cell(30,2,"/ Organization","LR",0,"L");
			$this->pdf->Cell(20,2,"","LR",0,"L");
			$this->pdf->Cell(20,2,"","LR",0,"L");
			$this->pdf->Cell(20,2,"Consolidated","LR",0,"L");
			$this->pdf->Cell(20,2,"","LR",0,"L");
			$this->pdf->Cell(20,2,"","LR",0,"L");
			$this->pdf->Cell(20,2,"(Excluding 2 years","LR",0,"L");
			$this->pdf->Cell(20,2,"","LR",0,"L");
			$this->pdf->Cell(20,2,"","LR",1,"L");
			
			
			$this->pdf->Cell(30,2,"","LRB",0,"L");
			$this->pdf->Cell(20,2,"","LRB",0,"L");
			$this->pdf->Cell(20,2,"","LRB",0,"L");
			$this->pdf->Cell(20,2,"","LRB",0,"L");
			$this->pdf->Cell(20,2,"","LRB",0,"L");
			$this->pdf->Cell(20,2,"of Residency Period)","LRB",0,"L");
			$this->pdf->Cell(20,2,"","LRB",0,"L");
			$this->pdf->Cell(20,2,"","LRB",0,"L");
			$this->pdf->Cell(20,2,"","LRB",1,"L");
			
			$query2 = "select * from expdetl where fuserid = '{$this->fuserid}' and fappno = '{$this->app_no}' and fenttype = 'teach' order by fenttype";
			$results2 = $this->aobj_context->mobj_db->GetAll($query2);
			$this->pdf->SetFont('Times','',9);
			foreach($results2 as $value)
			{
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(30,30,$y,$x, $value['funivname'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(20,30,$y,$x, $value['fdegncode'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);								
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(20,30,$y,$x, $value['fstatus'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(20,30,$y,$x, $value['fpayscale'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);				
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(20,30,$y,$x, $value[ffromdate], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);				
				
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(20,30,$y,$x, $value[ftodate], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);				
			
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(20,30,$y,$x, $value[fexp], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);				
				
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(20,30,$y,$x, $value[fpoints], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);				
				
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(20,30,$y,$x, $value[fenclosureno], 1, 1, $fill=false, $reseth=true, $align='', $autopadding=true);				
			}
			
			
			$this->pdf->Ln(4);
			$this->pdf->SetFont('Times','B',10);
			$this->pdf->SetFont('Times','B',10);
			$this->pdf->Cell(190,5,"3.2 Full-time Post-Ph.D. Research Experience","1",1,"C");
			$this->pdf->SetFont('Times','B',9);
			$this->pdf->Cell(30,3,"Name of University ","LRT",0,"L");
			$this->pdf->Cell(30,3,"Designation","LRT",0,"L");
			$this->pdf->Cell(30,3,"Pay Scale / ","LRT",0,"L");
			$this->pdf->Cell(20,3,"From","LRT",0,"L");
			$this->pdf->Cell(20,3,"To","LRT",0,"L");
			$this->pdf->Cell(20,3,"Time Period","LRT",0,"L");
			$this->pdf->Cell(20,3,"Points","LRT",0,"L");
			$this->pdf->Cell(20,3,"Enclosure No.","LRT",1,"L");
			
			$this->pdf->Cell(30,3,"/ College / Institute ","LRB",0,"L");
			$this->pdf->Cell(30,3,"","LRB",0,"L");
			$this->pdf->Cell(30,3,"Consolidated Salary","LRB",0,"L");
			$this->pdf->Cell(20,3,"","LRB",0,"L");
			$this->pdf->Cell(20,3,"","LRB",0,"L");
			$this->pdf->Cell(20,3,"","LRB",0,"L");
			$this->pdf->Cell(20,3,"","LRB",1,"L");
			
			$query2 = "select * from expdetl where fuserid = '{$this->fuserid}' and fappno = '{$this->app_no}' and fenttype = 'phd' order by fenttype";
			$results2 = $this->aobj_context->mobj_db->GetAll($query2);
			$this->pdf->SetFont('Times','',9);
			foreach($results2 as $value)
			{
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(30,30,$y,$x, $value['funivname'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(30,30,$y,$x, $value['fdegncode'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);								
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(30,30,$y,$x, $value['fpayscale'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
				$this->pdf->Cell(20,30,$value[ffromdate],"1",0,"L");
				$this->pdf->Cell(20,30,$value[ftodate],"1",0,"L");
				$this->pdf->Cell(20,30,$value[fexp],"1",0,"L");
				$this->pdf->Cell(20,30,$value[fpoints],"1",0,"L");
				$this->pdf->Cell(20,30,$value[fenclosureno],"1",1,"L");
			}
			
			$query2 = "select * from expdetl where fuserid = '{$this->fuserid}' and fappno = '{$this->app_no}' and fenttype = 'present' order by fenttype";
			$results2 = $this->aobj_context->mobj_db->GetRow($query2);
			$this->pdf->SetFont('Times','B',10);
			$this->pdf->Ln(4);
			$this->pdf->Cell(190,5,"3.3 Present Employment Details","1",1,"C");
			$this->pdf->SetFont('Times','B',9);
			$this->pdf->Cell(77,$h,"Organization Name","1",0,"L");
			$this->pdf->Cell(50,$h,"Position Held","1",0,"L");
			$this->pdf->Cell(33,$h,"Date of Appointment","1",0,"L");
			$this->pdf->Cell(30,$h,"Present Status","1",1,"L");
			$this->pdf->SetFont('Times','',9);
			$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
			$this->pdf->writeHTMLCell(77,20,$y,$x, $results2[funivname], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(50,20,$y,$x,$results2[fdegncode], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);								
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(33,20,$y,$x, $results2[ffromdate], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(30,20,$y,$x, $results2[fstatus], 1, $ln=1, $fill=false, $reseth=true, $align='', $autopadding=true);
				
			/* $this->pdf->Cell(77,$h,$results2[funivname],"1",0,"L");
			$this->pdf->Cell(50,$h,$results2[fdegncode],"1",0,"L");
			$this->pdf->Cell(33,$h,$results2[ffromdate],"1",0,"L");
			$this->pdf->Cell(30,$h,$results2[fstatus],"1",1,"L"); */
			
			

			if($this->post == 'P' || $this->post == 'S')			
			{	
			$query4 = "select * from tleact where fuserid = '{$this->fuserid}' and fappno = '{$this->app_no}' ORDER BY fenttype,factivity";
			$results4 = $this->aobj_context->mobj_db->GetAll($query4);
			
			$this->pdf->Ln(4);
			$this->pdf->SetFont('Times','B',10);
			$this->pdf->Cell(190,5,"CATEGORY I - TEACHING, LEARNING AND EVALUATION RELATED ACTIVITIES","1",1,"C");
			$this->pdf->Cell(130,3,"Nature of Activity","1",0,"L");
			$this->pdf->Cell(20,3,"Max. Score","1",0,"L");
			$this->pdf->Cell(20,3,"","1",0,"L");
			$this->pdf->Cell(20,3,"Self Score","1",1,"L");
			$this->pdf->SetFont('Times','',9);
			$cat11 ="a. Direct Teaching (Actual Hours Spent ÷ 7.75)*";
			$cat12 ="b.Examination duties (question paper setting, Invigilation, evaluation of answer scripts) as per allotment(Actual Hours Spent ÷ 10)*";
			$cat13 ="c.Innovative Teaching - learning methodologies, updating of subject contents/courses, mentoring etc.(Actual Hours Spent ÷ 10)*";
			
			$cat21 ="a. Student related co-curricular, extension and field based activities.
				Discipline related co-curricular activities (e.g. remedial classes, career counselling, study visit, student seminar and other events).
				Other co-curricular activities (Cultural, Sports, NSS, NCC etc).
				Extension and dissemination activities (public /popular lectures/talks/seminars etc.)";
			$cat22 ="b.Contribution to corporate life and management of the department and institution through participation in academic and administrative committees and responsibilities. Administrative responsibility (including as Dean/ Principal /Chairperson/Convener/Teacher-in-charge/similar other duties that require regular office hrs for its discharge).
				Participation in Board of Studies, Academic and Administrative Committees";
			$cat23 ="c. Professional Development activities (such as participation in seminars, conferences, short term training courses, industrial experience, talks, lectures in refresher / faculty development courses, dissemination and general articles and any other contribution)";
			
			$first = true;
			foreach($results4 as $value)
			{
				if($value['fenttype'] == 'cat1')
				{	
					if($value['factivity'] == 'a')
					{	
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(130,10,$y,$x, $cat11, 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(20,10,$y,$x, $value['fmaxscore'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(20,10,$y,$x, $value['fspent'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(20,10,$y,$x, $value['fselfscore'], 1, 1, $fill=false, $reseth=true, $align='', $autopadding=true);
					}
					if($value['factivity'] == 'b')
					{	
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(130,10,$y,$x, $cat12, 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(20,10,$y,$x, $value['fmaxscore'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(20,10,$y,$x, $value['fspent'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(20,10,$y,$x, $value['fselfscore'], 1, 1, $fill=false, $reseth=true, $align='', $autopadding=true);
					}
					
					if($value['factivity'] == 'c')
					{	
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(130,10,$y,$x, $cat13, 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(20,10,$y,$x, $value['fmaxscore'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(20,10,$y,$x, $value['fspent'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(20,10,$y,$x, $value['fselfscore'], 1, 1, $fill=false, $reseth=true, $align='', $autopadding=true);
					}
					
				}
				if($value['fenttype'] == 'cat2')
				{
					if($first)
					{	
						$this->pdf->Ln(4);
						$this->pdf->SetFont('Times','B',10);
						$this->pdf->Cell(190,5,"CATEGORY II - PROFESSIONAL DEVELOPMENT,CO-CURRICULAR AND EXTENSION ACTIVITIES","1",1,"C");
						$this->pdf->SetFont('Times','',9);
						$this->pdf->Cell(130,3,"Nature of Activity","LRT",0,"L");
						$this->pdf->Cell(20,3,"Max. Score","LRT",0,"L");
						$this->pdf->Cell(20,3,"Actual Hours ","LRT",0,"L");
						$this->pdf->Cell(20,3,"Self Score","LRT",1,"L");
						$this->pdf->Cell(130,3,"","LRB",0,"L");
						$this->pdf->Cell(20,3,"Max. Score","LRB",0,"L");
						$this->pdf->Cell(20,3,"Spent ÷ 10","LRB",0,"L");
						$this->pdf->Cell(20,3,"","LRB",1,"L");
						$first  = false;
					}
					
					if($value['factivity'] == 'a')
					{	
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(130,30,$y,$x, $cat21, 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(20,30,$y,$x, $value['fmaxscore'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(20,30,$y,$x, $value['fspent'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(20,30,$y,$x, $value['fselfscore'], 1, 1, $fill=false, $reseth=true, $align='', $autopadding=true);
					}
					if($value['factivity'] == 'b')
					{	
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(130,30,$y,$x, $cat22, 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(20,30,$y,$x, $value['fmaxscore'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(20,30,$y,$x, $value['fspent'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(20,30,$y,$x, $value['fselfscore'], 1, 1, $fill=false, $reseth=true, $align='', $autopadding=true);
					}
					if($value['factivity'] == 'c')
					{	
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(130,30,$y,$x, $cat23, 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(20,30,$y,$x, $value['fmaxscore'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(20,30,$y,$x, $value['fspent'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(20,30,$y,$x, $value['fselfscore'], 1, 1, $fill=false, $reseth=true, $align='', $autopadding=true);
					}
					
				}	
				
			}	
			

			}
			
			$query = "select fenttype,fslno,fpublication,r1.freasonname as fpublicationname, ftitle,fjournalname,fyear,
					fvolno,fpageno,fissnno,frefereed,r2.freasonname as ffauthorname, fauthor,fpoints,fimpfact,fjournalno,fenclosureno,fautaddrs
					from researchexp 
					left join reason r1 on researchexp.fpublication = r1.freasoncode
					left join reason r2 on researchexp.fauthor = r2.freasoncode
					where fuserid = '{$this->fuserid}' and fappno = '{$this->app_no}' and fenttype = 'rcphd'
					order by fenttype desc";
			$results = $this->aobj_context->mobj_db->GetAll($query);
			
			$query2 = "select fenttype,fslno,fpublication,r1.freasonname as fpublicationname, ftitle,fjournalname,fyear,
					fvolno,fpageno,fissnno,frefereed,r2.freasonname as ffauthorname, fauthor,fpoints,fimpfact,fjournalno,fenclosureno,fautaddrs
					from researchexp 
					left join reason r1 on researchexp.fpublication = r1.freasoncode
					left join reason r2 on researchexp.fauthor = r2.freasoncode
					where fuserid = '{$this->fuserid}' and fappno = '{$this->app_no}' and fenttype = 'rcoth'
					order by fenttype desc";
			$results2 = $this->aobj_context->mobj_db->GetAll($query2);
			
			$query3 ="select fenttype,fslno,fpublication,r1.freasonname as fpublicationname, ftitle,fjournalname,fyear,
					 fvolno,fpageno,fissnno,frefereed,r2.freasonname as ffauthorname, fauthor,fpoints,fimpfact,fjournalno,fenclosureno,fautaddrs
					from researchexp 
					left join reason r1 on researchexp.fpublication = r1.freasoncode
					left join reason r2 on researchexp.fauthor = r2.freasoncode
					where fuserid = '{$this->fuserid}' and fappno = '{$this->app_no}' and fenttype = 'rcotj'
					order by fenttype desc";
			$results3 = $this->aobj_context->mobj_db->GetAll($query3);	
			
			$this->pdf->Ln(4);
			$this->pdf->SetFont('Times','B',10);
			$this->pdf->Cell(190,5,"III (A-1) Research Papers Published (Listed in UGC website)","1",1,"C");
			$this->pdf->SetFont('Times','B',9);
			$this->pdf->Cell(20,3,"Publication","LRT",0,"L");
			$this->pdf->Cell(20,3,"Title of","LRT",0,"L");
			$this->pdf->Cell(20,3,"Journal","LRT",0,"L");
			$this->pdf->Cell(10,3,"Year","LRT",0,"L");
			$this->pdf->Cell(10,3,"Vol.","LRT",0,"L");
			$this->pdf->Cell(10,3,"Page","LRT",0,"L");
			$this->pdf->Cell(20,3,"ISSN /","LRT",0,"L");
			$this->pdf->Cell(23,3,"Journal No.","LRT",0,"L");
			$this->pdf->Cell(20,3,"Author","LRT",0,"L");
			$this->pdf->Cell(13,3,"Impact","LRT",0,"L");
			$this->pdf->Cell(9,3,"Points","LRT",0,"L");
			$this->pdf->Cell(15,3,"Enclosure","LRT",1,"L");
			
			$this->pdf->Cell(20,3,"Type","LRB",0,"L");
			$this->pdf->Cell(20,3,"the Paper","LRB",0,"L");
			$this->pdf->Cell(20,3,"Name","LRB",0,"L");  
			$this->pdf->Cell(10,3,"","LRB",0,"L");
			$this->pdf->Cell(10,3,"No.","LRB",0,"L");
			$this->pdf->Cell(10,3,"No.","LRB",0,"L");
			$this->pdf->Cell(20,3,"ISBN No.","LRB",0,"L");
			$this->pdf->Cell(23,3,"Given By UGC",'LRB',0,"L");
			$this->pdf->Cell(20,3,"","LRB",0,"L");
			$this->pdf->Cell(13,3,"Factors","LRB",0,"L");
			$this->pdf->Cell(9,3,"","LRB",0,"L");
			$this->pdf->Cell(15,3,"No.","LRB",1,"L");
			$this->pdf->SetFont('Times','',9);
			foreach($results as $value)
			{
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(20,75,$y,$x, $value['fpublicationname'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(20,75,$y,$x, $value['ftitle'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);								
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(20,75,$y,$x, $value['fjournalname'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
				
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(10,75,$y,$x, $value['fyear'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
				
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(10,75,$y,$x, $value['fvolno'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
				 
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(10,75,$y,$x, $value['fpageno'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
				 
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(20,75,$y,$x, $value['fissnno'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
				
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(23,75,$y,$x, $value['fjournalno'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
				
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(20,75,$y,$x, $value['ffauthorname'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
				
				
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(13,75,$y,$x, $value['fimpfact'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
				
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(9,75,$y,$x, $value['fpoints'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
				
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(15,75,$y,$x, $value['fenclosureno'], 1, 1, $fill=false, $reseth=true, $align='', $autopadding=true);
			}
		
			
			$this->pdf->Ln(4);
			$this->pdf->SetFont('Times','B',10);
			$this->pdf->Cell(190,5,"III (B) Publications Other than journal articles (books, chapters in books)","1",1,"C");
			$this->pdf->SetFont('Times','B',9);
			$this->pdf->Cell(26,3,"Publication","LRT",0,"L");
			$this->pdf->Cell(26,3,"Title of","LRT",0,"L");
			$this->pdf->Cell(20,3,"Title of","LRT",0,"L");
			$this->pdf->Cell(10,3,"Year","LRT",0,"L");
			$this->pdf->Cell(10,3,"Page","LRT",0,"L");
			$this->pdf->Cell(20,3,"ISSN /","LRT",0,"L");
			$this->pdf->Cell(30,3,"Publisher Details","LRT",0,"L");
			$this->pdf->Cell(21,3,"Author","LRT",0,"L");
			$this->pdf->Cell(10,3,"Points","LRT",0,"L");
			$this->pdf->Cell(17,3,"Enclosure","LRT",1,"L");
			
			$this->pdf->Cell(26,3,"Type","LRB",0,"L");
			$this->pdf->Cell(26,3,"the Book","LRB",0,"L");
			$this->pdf->Cell(20,3,"the Paper","LRB",0,"L");
			$this->pdf->Cell(10,3,"","LRB",0,"L");
			$this->pdf->Cell(10,3,"No.","LRB",0,"L");
			$this->pdf->Cell(20,3,"ISBN No.","LRB",0,"L");
			$this->pdf->Cell(30,3,"& Address",'LRB',0,"L");
			$this->pdf->Cell(21,3,"","LRB",0,"L");
			$this->pdf->Cell(10,3,"","LRB",0,"L");
			$this->pdf->Cell(17,3,"No.","LRB",1,"L");
			$this->pdf->SetFont('Times','',9);
			foreach($results3 as $value)
			{
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(26,40,$y,$x, $value['fpublicationname'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(26,40,$y,$x, $value['ftitle'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);								
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(20,40,$y,$x, $value['fjournalname'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
				
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(10,40,$y,$x, $value['fyear'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
			
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(10,40,$y,$x, $value['fpageno'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
				 
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(20,40,$y,$x, $value['fissnno'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
				
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(30,40,$y,$x, $value['fautaddrs'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
				
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(21,40,$y,$x, $value['ffauthorname'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
				
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(10,40,$y,$x, $value['fpoints'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
				
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(17,40,$y,$x, $value['fenclosureno'], 1, 10, $fill=false, $reseth=true, $align='', $autopadding=true);
			}
			
			$this->pdf->Ln(4);
			
			$this->pdf->SetFont('Times','B',10);
			$this->pdf->Cell(190,5,"III (A-2) Research Papers Published (Not Listed in UGC website)","1",1,"C");
			$this->pdf->SetFont('Times','B',9);
			$this->pdf->Cell(30,3,"Publication","LRT",0,"L");
			$this->pdf->Cell(30,3,"Title of","LRT",0,"L");
			$this->pdf->Cell(30,3,"Journal","LRT",0,"L");
			$this->pdf->Cell(10,3,"Year","LRT",0,"L");
			$this->pdf->Cell(12,3,"Vol.","LRT",0,"L");
			$this->pdf->Cell(12,3,"Page","LRT",0,"L");
			$this->pdf->Cell(20,3,"ISSN /","LRT",0,"L");
			$this->pdf->Cell(30,3,"Author","LRT",0,"L");
			$this->pdf->Cell(16,3,"Enclosure","LRT",1,"L");
			
			$this->pdf->Cell(30,3,"Type","LRB",0,"L");
			$this->pdf->Cell(30,3,"the Paper","LRB",0,"L");
			$this->pdf->Cell(30,3,"Name","LRB",0,"L");
			$this->pdf->Cell(10,3,"","LRB",0,"L");
			$this->pdf->Cell(12,3,"No.","LRB",0,"L");
			$this->pdf->Cell(12,3,"No.","LRB",0,"L");
			$this->pdf->Cell(20,3,"ISBN No.","LRB",0,"L");
			$this->pdf->Cell(30,3,"","LRB",0,"L");
			$this->pdf->Cell(16,3,"No.","LRB",1,"L");
			$this->pdf->SetFont('Times','',9);
			foreach($results2 as $value)
			{
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(30,30,$y,$x, $value['fpublicationname'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(30,30,$y,$x, $value['ftitle'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);								
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(30,30,$y,$x, $value['fjournalname'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
				
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(10,30,$y,$x, $value['fyear'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
				
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(12,30,$y,$x, $value['fvolno'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
				 
				
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(12,30,$y,$x, $value['fpageno'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
				 
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(20,30,$y,$x, $value['fissnno'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
				
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(30,30,$y,$x, $value['ffauthorname'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
				
				$x=$this->pdf->GetY();
				$y=$this->pdf->GetX();
				$this->pdf->writeHTMLCell(16,30,$y,$x, $value['fenclosureno'], 1, 1, $fill=false, $reseth=true, $align='', $autopadding=true);
			}
	
			//III (C) i. Sponsered projects
			if($this->post == 'P' || $this->post == 'S')
			{	
			$query5 ="select fslno,ffaculty,r1.freasonname as ffacultyname, ftitle,fagency,fperiod,famount,fpoints,fenclosureno,fenttype,r2.freasonname as flevelname
				from rcprojct 
				left join reason r1 on rcprojct.ffaculty = r1.freasoncode
				left join reason r2 on rcprojct.flevel = r2.freasoncode
				where fuserid = '{$this->fuserid}' and fappno = '{$this->app_no}'";
			$results5 = $this->aobj_context->mobj_db->GetAll($query5);
			$first = true;
			$second = true;
			$third = true;
			foreach($results5 as $value)
			{
				if($value['fenttype'] == 'rcspon')
				{	
					if($first)
					{	
						$this->pdf->Ln(4);
						$this->pdf->SetFont('Times','B',10);
						$this->pdf->Cell(190,5,"III (C) i. Sponsored projects","1",1,"C");
						$this->pdf->SetFont('Times','B',9);
						$this->pdf->Cell(30,$h,"Faculty","1",0,"L");
						$this->pdf->Cell(40,$h,"Title of the Project","1",0,"L");
						$this->pdf->Cell(40,$h,"Funding Agency / Agency","1",0,"L");
						$this->pdf->Cell(20,$h,"Period","1",0,"L");
						$this->pdf->Cell(20,$h,"Amount","1",0,"L");
						$this->pdf->Cell(20,$h,"Points","1",0,"L");
						$this->pdf->Cell(20,$h,"Enclosure No.","1",1,"L");
						$first  = false;
					}
						$this->pdf->SetFont('Times','',9);	
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(30,20,$y,$x, $value['ffacultyname'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(40,20,$y,$x, $value['ftitle'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(40,20,$y,$x, $value['fagency'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(20,20,$y,$x, $value['fperiod'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(20,20,$y,$x, $value['famount'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(20,20,$y,$x, $value['fpoints'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(20,20,$y,$x, $value['fenclosureno'], 1, 1, $fill=false, $reseth=true, $align='', $autopadding=true);		
					
				}
				if($value['fenttype'] == 'rccons')
				{
					if($second)
					{	
						$this->pdf->Ln(4);
						$this->pdf->SetFont('Times','B',10);
						$this->pdf->Cell(190,5,"III (C) ii. Consultancy projects","1",1,"C");
						$this->pdf->SetFont('Times','B',9);
						$this->pdf->Cell(30,$h,"Faculty","1",0,"L");
						$this->pdf->Cell(40,$h,"Title of the Project","1",0,"L");
						$this->pdf->Cell(40,$h,"Funding Agency / Agency","1",0,"L");
						$this->pdf->Cell(20,$h,"Period","1",0,"L");
						$this->pdf->Cell(20,$h,"Amount","1",0,"L");
						$this->pdf->Cell(20,$h,"Points","1",0,"L");
						$this->pdf->Cell(20,$h,"Enclosure No.","1",1,"L");
						$second  = false;
					}
					$this->pdf->SetFont('Times','',9);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(30,20,$y,$x, $value['ffacultyname'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(40,20,$y,$x, $value['ftitle'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(40,20,$y,$x, $value['fagency'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(20,20,$y,$x, $value['fperiod'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(20,20,$y,$x, $value['famount'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(20,20,$y,$x, $value['fpoints'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(20,20,$y,$x, $value['fenclosureno'], 1, 1, $fill=false, $reseth=true, $align='', $autopadding=true);		

				}
				if($value['fenttype'] == 'rcpout')
				{
					if($third)
					{	
						$this->pdf->SetFont('Times','B',10);
						$this->pdf->Ln(4);
						$this->pdf->Cell(190,$h,"III (C) iii. Projects Outcome / Outputs","1",1,"C");
						$this->pdf->SetFont('Times','B',9);
						$this->pdf->Cell(53,$h,"Policy Document","1",0,"L");
						$this->pdf->Cell(40,$h,"Title of the Outcomes","1",0,"L");
						$this->pdf->Cell(40,$h,"Funding Agency / Agency","1",0,"L");
						$this->pdf->Cell(25,$h,"Level","1",0,"L");
						$this->pdf->Cell(10,$h,"Points","1",0,"L");
						$this->pdf->Cell(22,$h,"Enclosure No.","1",1,"L");
						$third  = false;
					}
					$this->pdf->SetFont('Times','',9);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(53,20,$y,$x, $value['ffaculty'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(40,20,$y,$x, $value['ftitle'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(40,20,$y,$x, $value['fagency'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(25,20,$y,$x, $value['flevelname'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
				
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(10,20,$y,$x, $value['fpoints'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(22,20,$y,$x, $value['fenclosureno'], 1, 1, $fill=false, $reseth=true, $align='', $autopadding=true);		

				}
			}
			//rechguid
			
			$query6 ="select fslno,fuserid,fappno,fname,facademic,flevel,fawareded,fpoints,fenclosureno,fenttype,
				r1.freasonname as fawarededname,r2.freasonname as flevelname
				from rechguid
				left join reason r1 on rechguid.fawareded = r1.freasoncode	
				left join reason r2 on rechguid.flevel = r2.freasoncode
				where fuserid = '{$this->fuserid}' and fappno = '{$this->app_no}'";
			$results6 = $this->aobj_context->mobj_db->GetAll($query6);
			$first = true;
			$second = true;
			$third = true;
			
			foreach($results6 as $value)
			{
				if($value[fenttype] == 'rcgm')
				{
					if($first)
					{$this->pdf->SetFont('Times','B',10);
						$this->pdf->Ln(4);
						$this->pdf->Cell(190,$h,"III (D) i. Research Guidance - M.Phil.","1",1,"C");
						$this->pdf->SetFont('Times','B',9);
						$this->pdf->Cell(70,$h,"No. of students","1",0,"L");
						$this->pdf->Cell(60,$h,"Points","1",0,"L");
						$this->pdf->Cell(60,$h,"Enclosure No.","1",1,"L");
						$first = false;
					}	
						$this->pdf->SetFont('Times','',9);
						$this->pdf->Cell(70,$h,$value[fnostud],"1",0,"L");
						$this->pdf->Cell(60,$h,$value[fpoints],"1",0,"L");
						$this->pdf->Cell(60,$h,$value[fenclosureno],"1",1,"L");
				}
					
				if($value[fenttype] == 'rcgp')
				{
					if($second)
					{
						$this->pdf->Ln(4);
						$this->pdf->SetFont('Times','B',10);
						$this->pdf->Cell(190,$h,"III (D) ii. Research Guidance - Ph.D","1",1,"C");
						$this->pdf->SetFont('Times','B',9);
						$this->pdf->Cell(70,$h,"Awareded / Submitted","1",0,"L");
						$this->pdf->Cell(40,$h,"No of students","1",0,"L");
						$this->pdf->Cell(40,$h,"Points","1",0,"L");
						$this->pdf->Cell(40,$h,"Enclosure No.","1",1,"L");
						$second = false;
					}
						$this->pdf->SetFont('Times','',9);
						$this->pdf->Cell(70,$h,$value[fawarededname],"1",0,"L");
						$this->pdf->Cell(40,$h,$value[fnostud],"1",0,"L");
						$this->pdf->Cell(40,$h,$value[fpoints],"1",0,"L");
						$this->pdf->Cell(40,$h,$value[fenclosureno],"1",1,"L");
				}

				if($value[fenttype] == 'rcfs')
				{
					if($third)
					{
						$this->pdf->Ln(4);
						$this->pdf->SetFont('Times','B',10);
						$this->pdf->Cell(190,$h,"III (E) i. Fellowships, Awards, and Invited lectures delivered in conferences / seminars","1",1,"C");
						$this->pdf->SetFont('Times','B',9);
						$this->pdf->Cell(55,$h,"Name of the award","1",0,"L");
						$this->pdf->Cell(58,$h,"Academic body / association","1",0,"L");
						$this->pdf->Cell(20,$h,"Type","1",0,"L");
						$this->pdf->Cell(25,$h,"Level","1",0,"L");
						$this->pdf->Cell(10,$h,"Points","1",0,"L");
						$this->pdf->Cell(22,$h,"Enclosure No.","1",1,"L");
						$third = false; 
					}
					$this->pdf->SetFont('Times','',9);
						/* $this->pdf->Cell(55,$h,$value[fname],"1",0,"L");
						$this->pdf->Cell(58,$h,$value[facademic],"1",0,"L");
						$this->pdf->Cell(20,$h,$value[fawarededname],"1",0,"L");
						$this->pdf->Cell(25,$h,$value[flevelname],"1",0,"L");
						$this->pdf->Cell(10,$h,$value[fpoints],"1",0,"L");
						$this->pdf->Cell(22,$h,$value[fenclosureno],"1",1,"L"); */
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(55,20,$y,$x, $value[fname], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(58,20,$y,$x, $value[facademic], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(20,20,$y,$x, $value[fawarededname], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(25,20,$y,$x, $value[flevelname], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(10,20,$y,$x, $value[fpoints], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(22,20,$y,$x, $value[fenclosureno], 1, $ln=1, $fill=false, $reseth=true, $align='', $autopadding=true);
						
				}
				
			}
			
		$query7 ="select fslno,fuserid,fappno,ftitle,fsubmitted,forganized,flevel,fdate,ftype,fpoints,fenclosureno,
				r1.freasonname as ftypename,r2.freasonname as flevelname,fnom,fenttype
				from rclecture
				left join reason r1 on rclecture.ftype = r1.freasoncode
				left join reason r2 on rclecture.flevel = r2.freasoncode
				where fuserid = '{$this->fuserid}' and fappno = '{$this->app_no}'";
			$results7 = $this->aobj_context->mobj_db->GetAll($query7);
			$first = true;
			$second = true;
		foreach($results7 as $value)
		{
			if($value[fenttype] == 'rcil')
			{
				if($first)
				{
					$this->pdf->Ln(4);
						$this->pdf->SetFont('Times','B',10);
						$this->pdf->Cell(190,$h,"III (E) ii. Invited lectures / papers","1",1,"C");
						$this->pdf->SetFont('Times','B',9);
						$this->pdf->Cell(30,3,"Title of the lecture","LRT",0,"L");
						$this->pdf->Cell(30,3,"Title of the conference","LRT",0,"L");
						$this->pdf->Cell(30,3,"Organized By","LRT",0,"L");
						$this->pdf->Cell(25,3,"Date","LRT",0,"L");
						$this->pdf->Cell(20,3,"Type","LRT",0,"L");
						$this->pdf->Cell(25,3,"Level","LRT",0,"L");
						$this->pdf->Cell(10,3,"Points","LRT",0,"L");
						$this->pdf->Cell(20,3,"Enclosure","LRT",1,"L");
						
						$this->pdf->Cell(30,3,"/ Academic session","LRB",0,"L");
						$this->pdf->Cell(30,3,"/ Seminar","LRB",0,"L");
						$this->pdf->Cell(30,3,"","LRB",0,"L");
						$this->pdf->Cell(25,3,"","LRB",0,"L");
						$this->pdf->Cell(20,3,"","LRB",0,"L");
						$this->pdf->Cell(25,3,"","LRB",0,"L");
						$this->pdf->Cell(10,3,"","LRB",0,"L");
						$this->pdf->Cell(20,3,"No.","LRB",1,"L");
				
					$first = false;
				}
						$this->pdf->SetFont('Times','',9);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(30,30,$y,$x, $value['ftitle'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(30,30,$y,$x, $value['fsubmitted'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(30,30,$y,$x, $value['forganized'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(25,30,$y,$x, $value['fdate'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
					
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(20,30,$y,$x, $value['ftypename'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(25,30,$y,$x, $value['flevelname'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(10,30,$y,$x, $value['fpoints'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(20,30,$y,$x, $value['fenclosureno'], 1, 1, $fill=false, $reseth=true, $align='', $autopadding=true);		
				
			}

			if($value[fenttype] == 'rcde')
			{
				if($second)
				{
					$this->pdf->Ln(4);
					$this->pdf->SetFont('Times','B',10);
						$this->pdf->Cell(190,$h,"III (F) Development of e-learning delivery process / material","1",1,"C");
						$this->pdf->SetFont('Times','B',9);
						$this->pdf->Cell(70,$h,"Title of module","LRT",0,"L");
						$this->pdf->Cell(70,$h,"Recognized by / Submitted at / Delivered at","LRT",0,"L");
						$this->pdf->Cell(18,$h,"No. of","LRT",0,"L");
						$this->pdf->Cell(10,$h,"Points","LRT",0,"L");
						$this->pdf->Cell(22,$h,"Enclosure No.","LRT",1,"L");
						$this->pdf->Cell(70,$h,"","LRB",0,"L");
						$this->pdf->Cell(70,$h,"","LRB",0,"L");
						$this->pdf->Cell(18,$h,"Modules","LRB",0,"L");
						$this->pdf->Cell(10,$h,"","LRB",0,"L");
						$this->pdf->Cell(22,$h,"","LRB",1,"L");
						$second = false;
				}
						$this->pdf->SetFont('Times','',9);
							$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(70,20,$y,$x, $value[ftitle], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(70,20,$y,$x, $value[fsubmitted], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(18,20,$y,$x, $value[fnom], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(10,20,$y,$x, $value[fpoints], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(22,20,$y,$x, $value[fenclosureno], 1, $ln=1, $fill=false, $reseth=true, $align='', $autopadding=true);
						
						
						/* this->pdf->Cell(70,$h,$value[ftitle],"1",0,"L");
						$this->pdf->Cell(70,$h,$value[fsubmitted],"1",0,"L");
						$this->pdf->Cell(18,$h,$value[fnom],"1",0,"L");
						$this->pdf->Cell(10,$h,$value[fpoints],"1",0,"L");
						$this->pdf->Cell(22,$h,$value[fenclosureno],"1",1,"L"); */
			}			
				
				
			}
			}
			$query8 ="select * from otherdet
				where fuserid = '{$this->fuserid}' and fappno = '{$this->app_no}'";
			$results8 = $this->aobj_context->mobj_db->GetRow($query8);
			$a1 = "Have you ever been punished for Gender / Caste related offences or convicted by a court of law? If yes, give details.";
			$a2 = "Were you at any time declared medically unfit or asked to submit your resignation or discharged or dismissed? If yes, give details";
			$a3 = "Do you have any criminal case pending against you in a court of law? If yes, give details.";
						$this->pdf->Ln(4);
						$this->pdf->SetFont('Times','B',10);
						$this->pdf->Cell(190,$h,"Other Details","1",1,"C");
						$this->pdf->SetFont('Times','B',9);
						$this->pdf->Cell(130,$h,"Name","1",0,"L");
						$this->pdf->Cell(20,$h,"Yes / No","1",0,"L");
						$this->pdf->Cell(40,$h,"Details","1",1,"L");
						$this->pdf->SetFont('Times','',9);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(130,10,$y,$x, $a1, 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(20,10,$y,$x, $results8['FPUNISHEDGC'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(40,10,$y,$x, $results8['FPUNISHEDNAME'], 1, 1, $fill=false, $reseth=true, $align='', $autopadding=true);
						
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(130,10,$y,$x, $a2, 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(20,10,$y,$x, $results8['FUNFIT'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(40,10,$y,$x, $results8['FUNFITNAME'], 1, 1, $fill=false, $reseth=true, $align='', $autopadding=true);
						
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(130,10,$y,$x, $a3, 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(20,10,$y,$x, $results8['FCRIMINAL'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(40,10,$y,$x, $results8['FCRIMINALNAME'], 1, 1, $fill=false, $reseth=true, $align='', $autopadding=true);
						
						
						$this->pdf->Ln(4);
						$this->pdf->Cell(190,$h,"Other Activities / Reponsibilities(if any not more than 500 words)","1",1,"C");
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(190,20,$y,$x, $results8['FANYDET'], 1, 1, $fill=false, $reseth=true, $align='', $autopadding=true);
						
						$this->pdf->Ln(4);
						$this->pdf->Cell(190,$h,"Two References familiar with your academic work","1",1,"C");
						$this->pdf->Cell(35,3,"Full Name","LRT",0,"L");
						$this->pdf->Cell(35,3,"Institutional Affiliation","LRT",0,"L");
						$this->pdf->Cell(30,3,"Designation","LRT",0,"L");
						$this->pdf->Cell(30,3,"Address","LRT",0,"L");
						$this->pdf->Cell(30,3,"Mobile / Phone No.","LRT",0,"L");
						$this->pdf->Cell(30,3,"Email","LRT",1,"L");
						
						$this->pdf->Cell(35,3,"","LRB",0,"L");
						$this->pdf->Cell(35,3,"(Present/Former)","LRB",0,"L");
						$this->pdf->Cell(30,3,"","LRB",0,"L");
						$this->pdf->Cell(30,3,"","LRB",0,"L");
						$this->pdf->Cell(30,3,"","LRB",0,"L");
						$this->pdf->Cell(30,3,"","LRB",1,"L");
						
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(35,30,$y,$x, $results8['FREFNAME1'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(35,30,$y,$x, $results8['FREFINST1'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(30,30,$y,$x, $results8['FREFDESG1'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(30,30,$y,$x, $results8['FREFADD1'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(30,30,$y,$x, $results8['FREFMOBILE1'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(30,30,$y,$x, $results8['FREFEMAIL1'], 1, 1, $fill=false, $reseth=true, $align='', $autopadding=true);
						
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(35,30,$y,$x, $results8['FREFNAME2'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(35,30,$y,$x, $results8['FREFINST2'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(30,30,$y,$x, $results8['FREFDESG2'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(30,30,$y,$x, $results8['FREFADD2'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(30,30,$y,$x, $results8['FREFMOBILE2'], 1, $ln=0, $fill=false, $reseth=true, $align='', $autopadding=true);
						$x=$this->pdf->GetY();
						$y=$this->pdf->GetX();
						$this->pdf->writeHTMLCell(30,30,$y,$x, $results8['FREFEMAIL2'], 1, 1, $fill=false, $reseth=true, $align='', $autopadding=true);
						
						$query8 = "select * upload where fuserid = '{$this->fuserid}' and fappno = '{$this->app_no}' and ftype = 'noc'";
						$results8 = $this->aobj_context->mobj_db->GetRow($query8);
						if($results8)
							$noc = 'Yes';
						else
							$noc = 'No';
						$this->pdf->Ln(4);
						$this->pdf->Cell(190,$h,"No Objection Certificate","1",1,"C");
						$this->pdf->Cell(160,7,"No Objection Certificate(if Applicable)","1",0,"L");
						$this->pdf->Cell(30,7,'',"1",1,"L");
						
						$this->pdf->Ln(4);
						
						$query8   = "select * from postdet where fuserid = '{$this->fuserid}' 
								   and fappno = '{$this->app_no}'";
						$results8 = $this->aobj_context->mobj_db->GetRow($query8);
						
					
						if($results8['fpaymentremarks'] != '')
						{	
							$this->pdf->Cell(190,$h,"Payment Details","1",1,"C");
							$this->pdf->Cell(30,7,"Amount ","1",0,"L");
							$this->pdf->Cell(160,7,$famountpay,"1",1,"L");
							$this->pdf->Cell(30,7,"Transaction Id","1",0,"L");
							$this->pdf->Cell(160,7,$results8[ftranid],"1",1,"L");
							$this->pdf->Cell(30,7,"Payment Date ","1",o,"L");
							$this->pdf->Cell(160,7,$results8[fpaymentdate],"1",1,"L");
						}
						
						$this->pdf->SetFont('Times','B',14);
						$this->pdf->Cell(195,7,"Declaration","0",1,"C");
						$this->pdf->SetFont('Times','',10);
						$str = "I,".$resultsper[fname]." son/daughter of ".$resultsper[ffatname]."hereby declare that all the entries made by me in this application are true and correct to the best of my knowledge. If anything is found false or incorrect at any stage, my candidature / appointment may be cancelled by the University without any reason thereof.";
						
						$this->pdf->Multicell(195,4,$str,"0","L");
						$this->pdf->SetFont('Times','B',13);
						$this->pdf->Cell(40,7,"Date","0",0,"L");
						$this->pdf->Cell(140,7," Signature of the applicant","0",1,"R");
						$this->pdf->Ln(4);
						$this->pdf->Cell(40,7,"Place","0",0,"L");
						$this->pdf->Cell(140,7,"(Name in Capital letter)","0",1,"R");						
		
						
						
						
		
		}
		 
		
		function SendOutput()
		{
			$this->pdf->Output("Application_{$this->app_no}.pdf","D");
		}
		
		 
}
function Printapplication($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$class_obj=new certificate_print();
// $class_obj->AliasNbPages();
$class_obj->DefaultConstructor($aobj_context);
$class_obj->formcolldata();
$class_obj->GetQry();
$class_obj->formData();

$class_obj->SendOutput();
}

?>