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 : 18.219.23.150


Current Path : /var/www/html/cuk/orms_wait/admin/src/
Upload File :
Current File : //var/www/html/cuk/orms_wait/admin/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";
			if($this->post == 'S')
				$post = "Associate Professor";
			if($this->post == 'P')
				$post = "Professor";

			$acd = 0;
			$teach	= 0;
			$appno = $this->app_no;
			$userid = $this->fuserid;

			

			$query90 = "select facatcode 
						from postdet  
						where fappno = '{$appno}'";
						
			$res90 = $this->aobj_context->mobj_db->GetRow($query90);

			$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 : 25/2019,Dated:05/05/2019","0",1,"C");
			$this->pdf->cell(180,7,"Post Applied : ".$post,"0",1,"C");
			$this->pdf->cell(180,7,"Department: ".$this->dept."  Applied Cat. : ".$res90['facatcode'],"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 
						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);
			
			$query99 = "select ifnull(sum(if(fenttype = 'rcphd',`fpoints`,0)),0) as cat1,
			ifnull(sum(if(fenttype = 'rcotj',`fpoints`,0)),0) as cat2,
			ifnull(sum(if(fenttype = 'rcfl',`fpoints`,0)),0) as cat2b 
			from researchexp 
			where fappno = '{$appno}' and fuserid = '{$userid}'";
			$results99 = $this->aobj_context->mobj_db->GetRow($query99);

			$cat1 = $results99['cat1'];
			$cat2 = $results99['cat2'];
			$cat2b = $results99['cat2b']; 

			$query99 = "select ifnull(sum(if(fenttype = 'rcpout',`fpoints`,0)),0) as cat5a,
			ifnull(sum(if(fenttype = 'rccons',`fpoints`,0)),0) as cat4c,
			ifnull(sum(if(fenttype = 'rcspon',`fpoints`,0)),0) as cat4b,
			ifnull(sum(if(fenttype = 'rcconslt',`fpoints`,0)),0) as cat4d
			from rcprojct 
			where fappno = '{$appno}' and fuserid = '{$userid}'";
			$results99 = $this->aobj_context->mobj_db->GetRow($query99);

			$cat5a = $results99['cat5a'];
			
		
			$cat4c = $results99['cat4c'];
			$cat4b = $results99['cat4b'];
			$cat4d = $results99['cat4d'];

			$query99 = "select 
			ifnull(sum(if(fenttype = 'rcpout' && ffaculty = 'Major Policy Document Prepared for International bodies like WHO / UNO / UNESCO / UNICEF ect. central / state / Govt. / Local Bodies',`fpoints`,0)),0) as cat5b,
			ifnull(sum(if(fenttype = 'rcpout' && ffaculty = 'Patent / Technology Transfer / Product / Process',`fpoints`,0)),0) as cat5a
			from rcprojct 
			where fappno = '{$appno}' and fuserid = '{$userid}' and fenttype = 'rcpout'";
			$results99 = $this->aobj_context->mobj_db->GetRow($query99);


			$cat5a = $results99['cat5a'];
			$cat5b = $results99['cat5b'];

			$query99 = "select ifnull(sum(if(fenttype = 'rcgm',`fpoints`,0)),0) as mphil,
			ifnull(sum(if(fenttype = 'rcgp',`fpoints`,0)),0) as cat4a,
			ifnull(sum(if(fenttype = 'rcfs',`fpoints`,0)),0) as cat5c
			from rechguid 
			where fappno = '{$appno}' and fuserid = '{$userid}'";
			$results99 = $this->aobj_context->mobj_db->GetRow($query99);

			$mphil1 = $results99['mphil'];
			$cat4a = $results99['cat4a'];
			$cat5c = $results99['cat5c'];

			$query99 = "select ifnull(sum(if(fenttype = 'rcil',`fpoints`,0)),0) as cat6,
			ifnull(sum(if(fenttype = 'rcde',`fpoints`,0)),0) as cat3,
			ifnull(sum(if(fenttype = 'rcec',`fpoints`,0)),0) as cat3d
			from rclecture 
			where fappno = '{$appno}' and fuserid = '{$userid}'";
			$results99 = $this->aobj_context->mobj_db->GetRow($query99);

			$cat6 = $results99['cat6'];
			$cat3 = $results99['cat3'];
			$cat3d = $results99['cat3d'];

			$cat2tot = $cat2+$cat2b;
			$cat3tot = $cat3+$cat3d;
			$cat4tot = $cat4b+$cat4c+$cat4d;
			if($this->post == 'A')
			{
				$query99 = "select ifnull(sum(if(fenttype = 'teach',`fpoints`,0)),0) as teach,
					ifnull(sum(if(fenttype = 'phd',`fpoints`,0)),0) as phd
					from expdetl 
					where fappno = '{$appno}' and fuserid = '{$this->fuserid}'";
				$results99 = $this->aobj_context->mobj_db->GetRow($query99);
				
				$teach1 = $results99['teach'];
				$teachphd = $results99['phd'];

				$teach = $teach1+$teachphd;

				$query99 = "select ifnull(sum(if(fenttype = 'bachelor',`fpoints`,0)),0) as bachelor,
						ifnull(sum(if(fenttype = 'masters',`fpoints`,0)),0) as masters
						from qualdetl 
						where fuserid = '{$this->fuserid}'";
				
				$results99 = $this->aobj_context->mobj_db->GetRow($query99);

				$ug = $results99['bachelor'];
				$pg = $results99['masters'];

				$query99 = "select ifnull(sum(if(fenttype = 'mphil',`fpoints`,0)),0) as mphil,
				ifnull(sum(if(fenttype = 'phd',`fpoints`,0)),0) as phd
				from phddetl 
				where fuserid = '{$this->fuserid}'";
				
				$results99 = $this->aobj_context->mobj_db->GetRow($query99);

				$mphil = $results99['mphil'];
				$phd = $results99['phd'];

				$jre = $resultsper['fjrpoints'];
				$net = $resultsper['fnetpoints'];
				$slet = $resultsper['fsletpoints'];

				$sum = $phd+$mphil;

				if($sum > 30)
					$mphil = 0;

				
				$sum2 = $slet+$net+$slet;

				if($sum2 > 7)
				{
					$jre = 0;
					$net = 0;
					$slet = 7;
				}	

				$acd = $jre+$net+$slet+$ug+$pg+$mphil+$phd;
			}	

			$tot = $cat2tot+$cat3tot+$cat4tot+$cat1+$mphil1+$cat4a+$cat5a+$cat5b+$cat5c+$cat6+$acd+$teach;


			$this->pdf->Ln(4);
			$this->pdf->SetFont('Times','B',13);
			$this->pdf->Cell(170,3,"Academic / Research Score","",1,"C");
			$this->pdf->SetFont('Times','',10);

			if($this->post == 'A')
			{
				$this->pdf->Cell(13,3,"Acd.","1",0,"C");
				$this->pdf->Cell(13,3,"Exp.","1",0,"C");
			}

			$this->pdf->Cell(15,3,"Cat-1","1",0,"C");
			$this->pdf->Cell(15,3,"Cat-2","1",0,"C");
			$this->pdf->Cell(15,3,"Cat-3","1",0,"C");
			$this->pdf->Cell(45,3,"Cat-4","1",0,"C");
			$this->pdf->Cell(45,3,"Cat-5","1",0,"C");
			$this->pdf->Cell(15,3,"Cat-6","1",0,"C");
			$this->pdf->Cell(15,3,"Total","1",1,"C");
		
			if($this->post == 'A')
			{
				$this->pdf->Cell(13,3,"","1",0,"C");
				$this->pdf->Cell(13,3,"","1",0,"C");
			}

			$this->pdf->Cell(15,3,"","LR",0,"C");
			$this->pdf->Cell(15,3,"","LR",0,"L");
			$this->pdf->Cell(15,3,"","LR",0,"L");
			$this->pdf->Cell(15,3,"Ph.D","1",0,"C");
			$this->pdf->Cell(15,3,"M.Phil","1",0,"C");
			$this->pdf->Cell(15,3,"(b),(c)&(d)","1",0,"C");
			$this->pdf->Cell(15,3,"(a)","1",0,"C");
			$this->pdf->Cell(15,3,"(b)","1",0,"C");
			$this->pdf->Cell(15,3,"(c)","1",0,"C");
			$this->pdf->Cell(15,3,"","LR",0,"L");
			$this->pdf->Cell(15,3,"","LR",1,"L");

			if($this->post == 'A')
			{
				$this->pdf->Cell(13,3,"{$acd}","1",0,"C");
				$this->pdf->Cell(13,3,"{$teach}","1",0,"C");
			}

			$this->pdf->Cell(15,3,"{$cat1}","1",0,"C");
			$this->pdf->Cell(15,3,"{$cat2tot}","1",0,"C");
			$this->pdf->Cell(15,3,"{$cat3tot}","1",0,"C");
			$this->pdf->Cell(15,3,"{$cat4a}","1",0,"C");//
			$this->pdf->Cell(15,3,"{$mphil1}","1",0,"C");
			$this->pdf->Cell(15,3,"{$cat4tot}","1",0,"C");
			$this->pdf->Cell(15,3,"{$cat5a}","1",0,"C");
			$this->pdf->Cell(15,3,"{$cat5b}","1",0,"C");
			$this->pdf->Cell(15,3,"{$cat5c}","1",0,"C");
			$this->pdf->Cell(15,3,"{$cat6}","1",0,"C");
			$this->pdf->Cell(15,3,"{$tot}","1",1,"C");
			$this->pdf->Ln(1);
			$this->pdf->cell(190,4,"Note : Score calculated by the system is provisional. Score calculated by the screening committee shall be final score.","0",1,"L");
			$this->pdf->Ln(4);

			$this->pdf->SetFont('Times','B',13);
			$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,100,20,20);
			}

			if($signature != '')
			{	
				$this->pdf->Image($signature,168,120,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['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['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['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->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);
				
		
			
				$query99 = "select sum(if(fenttype = 'rcphd',`fpoints`,0)) as cat1,
				sum(if(fenttype = 'rcotj',`fpoints`,0)) as cat2,
				sum(if(fenttype = 'rcfl',`fpoints`,0)) as cat2b 
				from researchexp 
				where fappno = '{$this->app_no}' and fuserid = '{$this->fuserid}'";
				$results99 = $this->aobj_context->mobj_db->GetRow($query99);

				$cat1 = $results99['cat1'];
				$cat2 = $results99['cat2'];
				$cat2b = $results99['cat2b']; 
	
				$query99 = "select sum(if(fenttype = 'rcpout',`fpoints`,0)) as cat5a,
				sum(if(fenttype = 'rccons',`fpoints`,0)) as cat4c,
				sum(if(fenttype = 'rcspon',`fpoints`,0)) as cat4b,
				sum(if(fenttype = 'rcconslt',`fpoints`,0)) as cat4d
				from rcprojct 
				where fappno = '{$this->app_no}' and fuserid = '{$this->fuserid}'";
				$results99 = $this->aobj_context->mobj_db->GetRow($query99);

				$cat5a = $results99['cat5a'];
				$cat4c = $results99['cat4c'];
				$cat4b = $results99['cat4b'];
				$cat4d = $results99['cat4d'];
	
				$query99 = "select sum(if(fenttype = 'rcgm',`fpoints`,0)) as mphil,
				sum(if(fenttype = 'rcgp',`fpoints`,0)) as cat4a,
				sum(if(fenttype = 'rcfs',`fpoints`,0)) as cat5c
				from rechguid 
				where fappno = '{$this->app_no}' and fuserid = '{$this->fuserid}'";
				$results99 = $this->aobj_context->mobj_db->GetRow($query99);

				$mphil = $results99['mphil'];
				$cat4a = $results99['cat4a'];
				$cat5c = $results99['cat5c'];
	
				$query99 = "select sum(if(fenttype = 'rcil',`fpoints`,0)) as cat6,
				sum(if(fenttype = 'rcde',`fpoints`,0)) as cat3,
				sum(if(fenttype = 'rcec',`fpoints`,0)) as cat3d
				from rclecture 
				where fappno = '{$this->app_no}' and fuserid = '{$this->fuserid}'";
				$results99 = $this->aobj_context->mobj_db->GetRow($query99);

				$cat6 = $results99['cat6'];
				$cat3 = $results99['cat3'];
				$cat3d = $results99['cat3d'];

				$this->pdf->Ln(4);

			$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);
			
			
			
			$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);	
			

			$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 = 'rcfl'
					order by fenttype desc";
			$results2 = $this->aobj_context->mobj_db->GetAll($query2);

			$this->pdf->Ln(4);
			$this->pdf->SetFont('Times','B',10);
			$this->pdf->Cell(190,5,"SI.No.1 / Category-1 Research Papers in Peer-Reviewed or UGC listed Journals","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,"SI.No.2 /Category -2 Publication (other than Research Papers)","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,"SI.No.2/Category-2 (b) Translation works in Indian and Foreign Languages by qualified faculties","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($results2 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);
			}
			
	
			$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;
			$fourth = 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,"SI.No.4 / Category-4: (b) Research Projects Completed","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,"SI.No.4/Category-4: (c) Research Projects Ongoing","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,"SI.No.5/ Category-5: (a) Patents","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);		

				}

				if($value['fenttype'] == 'rcconslt')
				{
					if($fourth)
					{	
						$this->pdf->Ln(4);
						$this->pdf->SetFont('Times','B',10);
						$this->pdf->Cell(190,5,"SI.No.4/Category-4: (d) Consultancy","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");
						$fourth  = 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);
				}
			}
			//rechguid
			
			$query6 ="select fslno,fuserid,fappno,fname,facademic,flevel,fawareded,fpoints,fenclosureno,fenttype,
				r1.freasonname as fawarededname,r2.freasonname as flevelname,fnostud
				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,"M.Phil / P.G Dissertation","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,"SI.No./Category-4: (a) 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,"SI.No.5/Category-5: (c) Awards / Fellowship","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;
			$third = 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,"SI.No./Category 6: * Invited lectures/Resource Person/Paper Presentation in Seminars/Conferences/Full paper in Conference Proceedings (Paper presented in Seminars/Conferences and also Published as full paper in Conference Proceedings will be counted only once)","1",1,"L");
							$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,"SI.No.3/Category-3 : Creation of ICT mediated Teaching Learning Pedagogy and content and development of new and innovative courses and curricula","1",1,"L");
							$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"); */
				}			
				
				if($value[fenttype] == 'rcec')
				{
					if($third)
					{
						$this->pdf->Ln(4);
						$this->pdf->SetFont('Times','B',10);
							$this->pdf->Cell(190,$h,"SI.No.03/Category-3: (d)E-Content","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");
							$third = 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);
							
					
				}
				
			}
			
			$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,'1500',"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();
}

?>