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.226.96.202


Current Path : /var/www/html/cuk/orms_wait/admin/src/
Upload File :
Current File : //var/www/html/cuk/orms_wait/admin/src/printapp_sum_old_10072019.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->from_app = trim($this->aobj_context->mobj_data["from_app"]);
			$this->to_app = trim($this->aobj_context->mobj_data["to_app"]);
			$this->subject = trim($this->aobj_context->mobj_data["subject"]);
			$this->post = trim($this->aobj_context->mobj_data["post"]);
			
			
			$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'];
		}
		 
		 
		function Header()
		{


		}	
		function Footer()
		{
		 	
			//$this->SetY(-10);
			//$this->pdf->SetFont('Times','B',8);
			//$this->Cell(100,6,'Printed   : IP Address : '.$this->ip." Date ".$this->current_date.'','0','0','C');                                                                 Page No. ".$this->PageNo(),'0',0,'L')
		}
	 
	 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()
		{
			

			$lquery = "select pd.fuserid, pd.fappno,p.fname,c.fcatdespn,d.fdescpn,ugper, ug,bed, 
			bedper, pgper,pg, phd,phdper,pd.facatcode,
			medper, med,mphil,mphilper, jrep, netp, sletp,fexp,fexpphd,phdtch
			from mascat c,mascourse d, perdetl p, postdet pd
			left outer join(select qd.fuserid, qd.fappno,qd.fpercentage as ugper, sum(ifnull(qd.fpoints,0)) as ug from qualdetl qd where qd.fenttype = 'bachelor' group by qd.fuserid) as qdtab
			on pd.fuserid = qdtab.fuserid  
			left outer join(select qd.fuserid, qd.fappno,qd.fpercentage as pgper, sum(ifnull(qd.fpoints,0)) as pg from qualdetl qd where qd.fenttype = 'masters' group by qd.fuserid) as pgtab
			on pd.fuserid = pgtab.fuserid  
			left outer join(select qd.fuserid, qd.fappno,qd.fpercentage as bedper, sum(ifnull(qd.fpoints,0)) as bed from qualdetl qd where qd.fenttype = 'BEd' group by qd.fuserid) as bedtab
			on pd.fuserid = bedtab.fuserid
			left outer join(select qd.fuserid, qd.fappno,qd.fpercentage as medper, sum(ifnull(qd.fpoints,0)) as med from qualdetl qd where qd.fenttype = 'MEd' group by qd.fuserid) as medtab
			on pd.fuserid = medtab.fuserid
			left outer join(select phd.fuserid, phd.fappno,fpercent as mphilper,sum(ifnull(phd.fpoints,0)) as mphil from phddetl phd  where fenttype = 'mphil' group by phd.fuserid) as mphiltab
			on pd.fuserid = mphiltab.fuserid
			left outer join(select phd.fuserid, phd.fappno, fpercent as phdper,sum(ifnull(phd.fpoints,0)) as phd from phddetl phd where fenttype = 'phd' group by phd.fuserid) as phdtab
			on pd.fuserid = phdtab.fuserid
			left outer join(select jre.fuserid, jre.fappno, sum(ifnull(jre.fjrpoints,0)) as jrep from perdetl jre group by jre.fuserid) as jretab
			on pd.fuserid = jretab.fuserid
			left outer join(select net.fuserid, net.fappno, sum(ifnull(net.fnetpoints,0)) as netp from perdetl net group by net.fuserid) as nettab
			on pd.fuserid = nettab.fuserid
			left outer join(select slet.fuserid, slet.fappno, sum(ifnull(slet.fsletpoints,0)) as sletp from perdetl slet group by slet.fuserid) as slettab
			on pd.fuserid = slettab.fuserid
			left outer join(select teach.fuserid, teach.fappno, sum(ifnull(teach.fpoints,0)) as teach from expdetl teach where fenttype = 'teach' and ifnull(fuserid,'') <> '' and ifnull(fappno,'') <> '' group by teach.fuserid,teach.fappno) as teachtab
			on pd.fuserid = teachtab.fuserid and  pd.fappno = teachtab.fappno
			left outer join(select fexpphd.fuserid, fexpphd.fappno, sum(ifnull(fexpphd.fexp,0)) as fexpphd from expdetl fexpphd where fenttype = 'phd' and ifnull(fexpphd.fuserid,'') <> '' and ifnull(fexpphd.fappno,'') <> '' group by fexpphd.fuserid,fexpphd.fappno) as teachfexpphdptab
			on pd.fuserid = teachfexpphdptab.fuserid and  pd.fappno = teachfexpphdptab.fappno
			left outer join(select fexp.fuserid, fexp.fappno, sum(ifnull(fexp.fexp,0)) as fexp from expdetl fexp where fenttype = 'teach' and ifnull(fuserid,'') <> '' and ifnull(fappno,'') <> '' group by fexp.fuserid,fexp.fappno) as teachfexptab
			on pd.fuserid = teachfexptab.fuserid and  pd.fappno = teachfexptab.fappno
			left outer join(select phdtch.fuserid, phdtch.fappno, sum(ifnull(phdtch.fpoints,0)) as phdtch 
			from expdetl phdtch where fenttype = 'phd' and ifnull(fuserid,'') <> '' and ifnull(fappno,'') <> '' group by phdtch.fuserid) as phdtchtab
			on pd.fuserid = phdtchtab.fuserid and  pd.fappno = phdtchtab.fappno
			where pd.fappstatus = 'T' and ifnull(pd.fdegncode,'') = '{$this->post}' and p.fuserid = pd.fuserid and 
			pd.fappno between '{$this->from_app}' and '{$this->to_app}' and pd.fdegree = '{$this->subject}'
			and p.fcatcode = c.fcatid and d.fdegree = pd.fdegree
			order by  pd.fappno";
			
			$lresuls = $this->aobj_context->mobj_db->GetAll($lquery);
			//var_dump($lquery);
			
			
			if($this->post == 'A')
				$post = "Assistant Professor";
			if($this->post == 'S')
				$post = "Associate Professor";
			if($this->post == 'P')
				$post = "Professor";
			
			
			
			
			foreach($lresuls as $lresuls)
			{
				
			$this->pdf->AddPage("P");
			$this->pdf->SetFont('Times','B',11);
			
			$sql = "select catII.fuserid, catII.fappno, sum(ifnull(catII.fselfscore,0)) as catII 
			from tleact catII where fenttype = 'cat2' and ifnull(fuserid,'') <> '' and ifnull(fappno,'') <> '' and fappno = '{$lresuls['fappno']}' group by catII.fuserid,fenttype";
			$res = $this->aobj_context->mobj_db->GetRow($sql);
			$cat11 = $res['catII'];
		
			
			$this->pdf->cell(180,6,"Central University of Karnataka, Kalaburagi","0",1,"C");
			$this->pdf->SetFont('Times','B',7);
			$this->pdf->cell(180,4,"SCRUTINY COMMITTEE SUMMRY SHEET","0",1,"C");
			$this->pdf->cell(180,4,$post,"0",1,"C");
			$this->pdf->cell(60,5,"Name of the Applicant","1",0,"L");
			$this->pdf->cell(30,5,"Application No.","1",0,"L");
			$this->pdf->cell(30,5,"Subject","1",0,"L");
			$this->pdf->cell(45,5,"Post Applied/Section Category","1",0,"L");
			$this->pdf->cell(25,5,"UR/SC/ ST/OBC","1",1,"L");
			//$this->pdf->cell(25,5,"PWD","1",1,"L");
			$this->pdf->cell(60,5,"".$lresuls['fname'],"1",0,"L");
			$this->pdf->cell(30,5,"".$lresuls['fappno'],"1",0,"L");
			$this->pdf->cell(30,5,"".$lresuls['fdescpn'],"1",0,"L");
			$this->pdf->cell(45,5,"".$lresuls['facatcode'],"1",0,"L");
			$this->pdf->cell(25,5,"".$lresuls['fcatdespn'],"1",1,"L");
			//$this->pdf->cell(25,5,"","1",1,"L"); 
			 
			$this->pdf->Ln(2);
				
			$IIE = '';
			if($lresuls['rgshp'] != '' || $lresuls['rclhp'] != '') 
				$IIE = ($lresuls['rgshp']+$lresuls['rclhp']);
	
	
			if($this->post == 'S')
			{	
				if($IIE >60)
					$IIE = 60;
			}
			if($this->post == 'P')
			{	
				if($IIE >80)
					$IIE = 80;
			}
			
			$total = ($cat11+$lresuls['rcphd']+$lresuls['rcotj']+$lresuls['rphp']+$lresuls['rcphp']+$lresuls['rcophp']+$lresuls['rghp']+$lresuls['rgphp']+$IIE+$lresuls['rcdehp']);
					
				
			$this->pdf->cell(180,4,"MINIMUM QUALIFICATION (REQUIREMENTS)","0",1,"C");
			$this->pdf->SetFont('Times','B',7);
			$this->pdf->cell(180,4,$post,"0",1,"C");
			if($this->post == 'A')
			{	
				$this->pdf->SetFont('Times','B',9);	
				$this->pdf->cell(30,5,"Sl. No.","1",0,"L");
				$this->pdf->cell(65,5,"Course","1",0,"L");
				$this->pdf->cell(30,5,"Yes / No ","1",0,"L");
				$this->pdf->cell(65,5,"Remarks","1",1,"L");
				
				$this->pdf->cell(30,2,"1.","LRT",0,"C");
				$this->pdf->cell(65,2,"PG Degree (55% marks)","LRT",0,"L");
				$this->pdf->cell(30,2,"","LRT",0,"L");
				$this->pdf->cell(65,2,"","LRT",1,"L");
				
				$this->pdf->cell(30,2,"","LRB",0,"C");
				$this->pdf->cell(65,2,"(5% relaxation to SC/ST/OBC/PWD)","LRB",0,"L");
				$this->pdf->cell(30,2,"","LRB",0,"L");
				$this->pdf->cell(65,2,"","LRB",1,"L");

				$this->pdf->cell(30,5,"2.","1",0,"C");
				$this->pdf->cell(65,5,"Ph.D. with course work","1",0,"L");
				$this->pdf->cell(30,5,"","1",0,"L");
				$this->pdf->cell(65,5,"","1",1,"L");
				
				$this->pdf->cell(30,5,"3.","1",0,"C");
				$this->pdf->cell(65,5,"Ph.D. before 2009 with UGC norms","1",0,"L");
				$this->pdf->cell(30,5,"","1",0,"L");
				$this->pdf->cell(65,5,"","1",1,"L");
				
				$this->pdf->cell(30,5,"4.","1",0,"C");
				$this->pdf->cell(65,5,"NET/SLET","1",0,"L");
				$this->pdf->cell(30,5,"","1",0,"L");
				$this->pdf->cell(65,5,"","1",1,"L");

				$this->pdf->cell(30,4,"5.","LRT",0,"C");
				$this->pdf->cell(65,4,"Any Other :","LRT",0,"L");
				$this->pdf->cell(30,4,"","LRT",0,"L");
				$this->pdf->cell(65,4,"","LRT",1,"L");
				
				$this->pdf->cell(30,4,"","LR",0,"C");
				$this->pdf->cell(65,4,"A.","LR",0,"L");
				$this->pdf->cell(30,4,"","LR",0,"L");
				$this->pdf->cell(65,4,"","LR",1,"L");
				
				$this->pdf->cell(30,4,"","LR",0,"C");
				$this->pdf->cell(65,4,"B","LR",0,"L");
				$this->pdf->cell(30,4,"","LR",0,"L");
				$this->pdf->cell(65,4,"","LR",1,"L");
				
				$this->pdf->cell(30,4,"","LRB",0,"C");
				$this->pdf->cell(65,4,"C","LRB",0,"L");
				$this->pdf->cell(30,4,"","LRB",0,"L");
				$this->pdf->cell(65,4,"","LRB",1,"L");
			}
			else
			{
				
				$this->pdf->SetFont('Times','B',9);	
				$this->pdf->cell(30,5,"Sl. No.","1",0,"L");
				$this->pdf->cell(65,5,"Minimum Criteria ","1",0,"L");
				$this->pdf->cell(30,5,"Screening Marks","1",0,"L");
				$this->pdf->cell(65,5,"Remarks","1",1,"L");
				
				$this->pdf->cell(30,2,"1.","LRT",0,"C");
				
				if($this->post == 'S')
					$this->pdf->cell(65,2,"Min. of 8 years of  Teaching Experience ","LRT",0,"L");
				else
					$this->pdf->cell(65,2,"Min. of 10 years of  Teaching Experience ","LRT",0,"L");
				
				$this->pdf->cell(30,2,"","LRT",0,"L");
				$this->pdf->cell(65,2,"","LRT",1,"L");
				
				$this->pdf->cell(30,2,"","LR",0,"C");
				$this->pdf->cell(65,2,"in relevant subject as per the appointment","LR",0,"L");
				$this->pdf->cell(30,2,"","LR",0,"L");
				$this->pdf->cell(65,2,"","LR",1,"L");
				
				$this->pdf->cell(30,2,"","LRB",0,"C");
				$this->pdf->cell(65,2,"order(FT Teach Experience)","LRB",0,"L");
				$this->pdf->cell(30,2,round($lresuls['fexp'],1).'(Years)',"LRB",0,"L");
				$this->pdf->cell(65,2,"","LRB",1,"L");
				
				$this->pdf->cell(30,2,"2.","LRT",0,"C");
				if($this->post == 'S')
					$this->pdf->cell(65,2,"Consolidate API Score Minimum 300 Points ","LRT",0,"L");
				else
					$this->pdf->cell(65,2,"Consolidate API Score Minimum 400 Points ","LRT",0,"L");
				$this->pdf->cell(30,2,$total,"LRT",0,"L");
				$this->pdf->cell(65,2,"","LRT",1,"L");
				
				$this->pdf->cell(30,2,"","LRB",0,"C");
				$this->pdf->cell(65,2,"From Cat-II and III of APIs (cumulative)","LRB",0,"L");
				$this->pdf->cell(30,2,"","LRB",0,"L");
				$this->pdf->cell(65,2,"","LRB",1,"L");
				
				$this->pdf->cell(30,5,"3.","1",0,"C");
				$this->pdf->cell(65,5,"Ph.D Degree in the relevant subject (Yes / No)","1",0,"L");
				$this->pdf->cell(30,5,"","1",0,"L");
				$this->pdf->cell(65,5,"","1",1,"L");
				
				$this->pdf->cell(30,5,"4.","LRT",0,"C");
				$this->pdf->cell(65,5,"Application Forwarded Through Proper ","LRT",0,"L");
				$this->pdf->cell(30,5,"","LRT",0,"L");
				$this->pdf->cell(65,5,"","LRT",1,"L");
				
				$this->pdf->cell(30,2,"","LRB",0,"C");
				$this->pdf->cell(65,2,"Channel (Yes / No)","LRB",0,"L");
				$this->pdf->cell(30,2,"","LRB",0,"L");
				$this->pdf->cell(65,2,"","LRB",1,"L");				
				
			}
			if($this->post != 'A')
			{	
				$this->pdf->Ln(2);
				$this->pdf->cell(180,4,"API Summary Points","0",1,"C"); 
				$this->pdf->cell(13,5,"Cat-II","1",0,"C");
				$this->pdf->cell(13,5,"III A","1",0,"C");
				$this->pdf->cell(13,5,"III B","1",0,"C");
				$this->pdf->cell(13,5,"III C(i)","1",0,"C");
				$this->pdf->cell(13,5,"III C(ii)","1",0,"C");
				$this->pdf->cell(13,5,"III C(iii)","1",0,"C");
				$this->pdf->cell(13,5,"III D(i)","1",0,"C");
				$this->pdf->cell(13,5,"III D(ii)","1",0,"C");
				$this->pdf->cell(13,5,"III E(i)","1",0,"C");
				$this->pdf->cell(13,5,"III E(ii)","1",0,"C");
				$this->pdf->cell(20,5,"III E","1",0,"C");
				$this->pdf->cell(13,5,"III F","1",0,"C");
				$this->pdf->cell(13,5,"Total","1",0,"C");
				$this->pdf->cell(13,5,"40%","1",1,"C");
				
				$percentage = ($total*0.4);
				
				if($this->post == 'S')
				{	
					if($IIE >60)
						$IIE = 60;
				}
				if($this->post == 'P')
				{	
					if($IIE >80)
						$IIE = 80;
				}
				$this->pdf->cell(13,5,$cat11,"1",0,"C");
				$this->pdf->cell(13,5,$lresuls['rcphd'],"1",0,"C");
				$this->pdf->cell(13,5,$lresuls['rcotj'],"1",0,"C");
				$this->pdf->cell(13,5,$lresuls['rphp'],"1",0,"C");
				$this->pdf->cell(13,5,$lresuls['rcphp'],"1",0,"C");
				$this->pdf->cell(13,5,$lresuls['rcophp'],"1",0,"C");
				$this->pdf->cell(13,5,$lresuls['rghp'],"1",0,"C");
				$this->pdf->cell(13,5,$lresuls['rgphp'],"1",0,"C");
				$this->pdf->cell(13,5,$lresuls['rgshp'],"1",0,"C");
				$this->pdf->cell(13,5,$lresuls['rclhp'],"1",0,"C");
				$this->pdf->cell(20,5,$IIE,"1",0,"C");
				$this->pdf->cell(13,5,$lresuls['rcdehp'],"1",0,"C");
				$this->pdf->cell(13,5,$total,"1",0,"C");
				$this->pdf->cell(13,5,$percentage,"1",1,"C");
			}


			$this->pdf->Ln(2);
			$this->pdf->cell(180,4,"ACADEMIC QUALIFICATION","0",1,"C");
			$this->pdf->cell(20,5,"SL. No.","1",0,"C");
			$this->pdf->cell(50,5,"Acad. Qualification","1",0,"C");
			$this->pdf->cell(30,5,"%","1",0,"C");
			$this->pdf->cell(30,5,"Screening Marks","1",0,"C");
			$this->pdf->cell(60,5,"Remarks","1",1,"C");

			$this->pdf->cell(20,5,"1","1",0,"C");
			$this->pdf->cell(50,5,"UG","1",0,"L");
			$this->pdf->cell(30,5,$lresuls['ugper'],"1",0,"C");
			$this->pdf->cell(30,5,$lresuls['ug'],"1",0,"C");
			$this->pdf->cell(60,5,"","1",1,"C");
				
			$this->pdf->cell(20,5,"2","1",0,"C");
			$this->pdf->cell(50,5,"B.Ed.","1",0,"L");
			$this->pdf->cell(30,5,$lresuls['bedper'],"1",0,"C");
			$this->pdf->cell(30,5,$lresuls['bed'],"1",0,"C");
			$this->pdf->cell(60,5,"","1",1,"C");

			$this->pdf->cell(20,5,"3","1",0,"C");
			$this->pdf->cell(50,5,"PG","1",0,"L");
			$this->pdf->cell(30,5,$lresuls['pgper'],"1",0,"C");
			$this->pdf->cell(30,5,$lresuls['pg'],"1",0,"C");
			$this->pdf->cell(60,5,"","1",1,"C");

			$this->pdf->cell(20,5,"4","1",0,"C");
			$this->pdf->cell(50,5,"M.Ed.","1",0,"L");
			$this->pdf->cell(30,5,$lresuls['medper'],"1",0,"C");
			$this->pdf->cell(30,5,$lresuls['med'],"1",0,"C");
			$this->pdf->cell(60,5,"","1",1,"C");
			
			$this->pdf->cell(20,5,"5","1",0,"C");
			$this->pdf->cell(50,5,"M.Phil.","1",0,"L");
			$this->pdf->cell(30,5,$lresuls['mphilper'],"1",0,"C");
			$this->pdf->cell(30,5,$lresuls['mphil'],"1",0,"C");
			$this->pdf->cell(60,5,"","1",1,"C");

			$this->pdf->cell(20,5,"6","1",0,"C");
			$this->pdf->cell(50,5,"Ph.D.","1",0,"L");
			$this->pdf->cell(30,5,$lresuls['phdper'],"1",0,"C");
			$this->pdf->cell(30,5,$lresuls['phd'],"1",0,"C");
			$this->pdf->cell(60,5,"","1",1,"C");

			
			if($this->post == 'A')
			{		
				$this->pdf->cell(20,5,"6","1",0,"C");
				$this->pdf->cell(50,5,"NET-JRF","1",0,"L");
				$this->pdf->cell(30,5,"","1",0,"C");
				$this->pdf->cell(30,5,$lresuls['jrep'],"1",0,"C");
				$this->pdf->cell(60,5,"","1",1,"C");

				$this->pdf->cell(20,5,"8","1",0,"C");
				$this->pdf->cell(50,5,"NET","1",0,"L");
				$this->pdf->cell(30,5,"","1",0,"C");
				$this->pdf->cell(30,5,$lresuls['netp'],"1",0,"C");
				$this->pdf->cell(60,5,"","1",1,"C");
				
				$this->pdf->cell(20,5,"9","1",0,"C");
				$this->pdf->cell(50,5,"SLET","1",0,"L");
				$this->pdf->cell(30,5,"","1",0,"C");
				$this->pdf->cell(30,5,$lresuls['sletp'],"1",0,"C");
				$this->pdf->cell(60,5,"","1",1,"C"); 

				$this->pdf->cell(20,5,"10","1",0,"C");
				$this->pdf->cell(50,5,"Total","1",0,"L");
				$this->pdf->cell(30,5,"","1",0,"C");
				$this->pdf->cell(30,5,$lresuls['education'],"1",0,"C");
				$this->pdf->cell(60,5,"","1",1,"C");

				$this->pdf->cell(20,5,"11","1",0,"C");
				$this->pdf->cell(50,5,"FT Teach Experience","1",0,"L");
				$this->pdf->cell(30,5,"","1",0,"C");
				$this->pdf->cell(30,5,"","1",0,"C");
				$this->pdf->cell(60,5,"","1",1,"C");

				$this->pdf->cell(20,5,"12","1",0,"C");
				$this->pdf->cell(50,5,"FT Post Ph.D.","1",0,"L");
				$this->pdf->cell(30,5,"","1",0,"C");
				$this->pdf->cell(30,5,"","1",0,"C");
				$this->pdf->cell(60,5,"","1",1,"C");
				
				$this->pdf->cell(20,5,"13","1",0,"C");
				$this->pdf->cell(50,5,"Total","1",0,"L");
				$this->pdf->cell(30,5,"","1",0,"C");
				$this->pdf->cell(30,5,"","1",0,"C");
				$this->pdf->cell(60,5,"","1",1,"C");

			}else
			{
				 
				$this->pdf->cell(20,5,"7","1",0,"C");
				$this->pdf->cell(50,5,"D.Lit./D.Sc. or equivalent","1",0,"L");
				$this->pdf->cell(20,5,"13","1",0,"C");
				$this->pdf->cell(30,5,"","1",0,"C");
				$this->pdf->cell(30,5,"","1",0,"C");
				$this->pdf->cell(40,5,"","1",1,"C");
				//fexp,,
				$years = "";
				if($lresuls['fexpphd'] != '')
					$years = "(Years)";
				
				$this->pdf->cell(20,5,"8","LRT",0,"C");
				$this->pdf->cell(50,5,"FT Post Ph.D. (1 Point each per 4","LRT",0,"L");
				$this->pdf->cell(20,5,"10","LRT",0,"C");
				$this->pdf->cell(30,5,round($lresuls['fexpphd'],1)."{$years}","LRT",0,"C");
				$this->pdf->cell(30,5,'',"LRT",0,"C");
				$this->pdf->cell(40,5,"","LRT",1,"C");
				
				$this->pdf->cell(20,5,"","LRB",0,"C");
				$this->pdf->cell(50,5,"months to a maximum of 10 marks)","LRB",0,"L");
				$this->pdf->cell(20,5,"","LRB",0,"C");
				$this->pdf->cell(30,5,"","LRB",0,"C");
				$this->pdf->cell(30,5,"","LRB",0,"C");
				$this->pdf->cell(40,5,"","LRB",1,"C");
				
				//FT Teach Experience (beyond minimum requirements 8 years/10 years teaching 
				$years = "";
				if($lresuls['fexp'] != '')
					$years = "(Years)";
				
				$this->pdf->cell(20,5,"9","LRT",0,"C");
				$this->pdf->cell(50,5,"FT Teach Experience (beyond","LRT",0,"L");
				$this->pdf->cell(20,5,"10","LRT",0,"C");
				$this->pdf->cell(30,5,round($lresuls['fexp'],1)."{$years}","LRT",0,"C");
				$this->pdf->cell(30,5,'',"LRT",0,"C");
				$this->pdf->cell(40,5,"","LRT",1,"C");
				
				$this->pdf->cell(20,5,"","LR",0,"C");
				$this->pdf->cell(50,5,"minimum requirements 8 years/10 years","LR",0,"L");
				$this->pdf->cell(20,5,"","LR",0,"C");
				$this->pdf->cell(30,5,"","LR",0,"C");
				$this->pdf->cell(30,5,"","LR",0,"C");
				$this->pdf->cell(40,5,"","LR",1,"C");
				
				$this->pdf->cell(20,5,"","LR",0,"C");
				$this->pdf->cell(50,5,"teaching experience as applicable.)","LR",0,"L");
				$this->pdf->cell(20,5,"","LR",0,"C");
				$this->pdf->cell(30,5,"","LR",0,"C");
				$this->pdf->cell(30,5,"","LR",0,"C");
				$this->pdf->cell(40,5,"","LR",1,"C");
				
				$this->pdf->cell(20,5,"","LRB",0,"C");
				$this->pdf->cell(50,5," 1 point per year","LRB",0,"L");
				$this->pdf->cell(20,5,"","LRB",0,"C");
				$this->pdf->cell(30,5,"","LRB",0,"C");
				$this->pdf->cell(30,5,"","LRB",0,"C");
				$this->pdf->cell(40,5,"","LRB",1,"C");
				
				
				$this->pdf->cell(20,5,"10","1",0,"C");
				$this->pdf->cell(50,5,"Total (20%)","1",0,"L");
				$this->pdf->cell(20,5,"75","1",0,"C");
				$this->pdf->cell(30,5,"","1",0,"C");
				$this->pdf->cell(30,5,"","1",0,"C");
				$this->pdf->cell(40,5,"","1",1,"C");
			}		

			$appno = $lresuls['fappno'];
			$userid = $lresuls['fuserid'];

			$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 = '{$userid}'";
				$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 = '{$userid}'";
				
				$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 = '{$userid}'";
				
				$results99 = $this->aobj_context->mobj_db->GetRow($query99);

				$mphil = $results99['mphil'];
				$phd = $results99['phd'];
				
				$query = "select p.*,c.fcatcode as fcatcode 
						from perdetl p 
						inner join mascat c on p.fcatcode = c.fcatid
						where p.fuserid = '{$userid}' 
						group by p.fuserid";
						
			$resultsper = $this->aobj_context->mobj_db->GetRow($query);

				$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',10);
			$this->pdf->Cell(170,3,"Academic / Research Score","",1,"C");
			$this->pdf->SetFont('Times','B',8);

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

			
			$edusum = $lresuls['education'];
			if($lresuls['education'] > 47)
					$edusum = 47;	
				
			$rechsum = $lresuls['rechapi'];
		
			if($lresuls['rechapi'] > 33.00)
					$rechsum = 33;
			$teach = $lresuls['teach'];
			$phdtch = $lresuls['phdtch'];
			$teachsum = (float)$teach+(float)$phdtch;
			if($teachsum > 20)
				$teachsum = 20;
			$atotal = $teachsum+$rechsum+$edusum;
			$this->pdf->Ln(2);
			$this->pdf->cell(190,6,"SUMMARY OF POINTS","1",1,"C");
			$this->pdf->cell(130,6,"Criteria","1",0,"L");
			$this->pdf->cell(30,6,"Maximum Points","1",0,"C");
			$this->pdf->cell(30,6,"Points Obtained","1",1,"C");

			if($this->post == 'A')
			{	
				$this->pdf->cell(130,6,"Academic Qualifications","1",0,"L");
				$this->pdf->cell(30,6,"80","1",0,"C");
				$this->pdf->cell(30,6,"","1",1,"C");	
			
				$this->pdf->cell(130,6,"Research Publications","1",0,"L");
				$this->pdf->cell(30,6,"10","1",0,"C");
				$this->pdf->cell(30,6,"","1",1,"C");	

				$this->pdf->cell(130,6,"Teaching Experience","1",0,"L");
				$this->pdf->cell(30,6,"10","1",0,"C");
				$this->pdf->cell(30,6,"","1",1,"C");	
				
				$this->pdf->cell(130,6,"Total","1",0,"L");
				$this->pdf->cell(30,6,"100","1",0,"C");
				$this->pdf->cell(30,6,"","1",1,"C");		
				
			}else
			{
				$this->pdf->cell(130,6,"Academic Qualifications (20%)","1",0,"L");
				$this->pdf->cell(30,6,"75(20%)","1",0,"C");
				$this->pdf->cell(30,6,'',"1",1,"C");	
				$total = ($total*0.4);
				$this->pdf->cell(130,6,"Research Performance Based on API Score and Quality of Publications (40%)","1",0,"L");
				if($this->post == 'S')
					$this->pdf->cell(30,6,"300(40%)","1",0,"C");
				else
					$this->pdf->cell(30,6,"400(40%)","1",0,"C");
				
				$this->pdf->cell(30,6,$percentage,"1",1,"C");	
				
				$this->pdf->cell(130,6,"Total","1",0,"L");
				$this->pdf->cell(30,6,"","1",0,"C");
				$this->pdf->cell(30,6,"","1",1,"C");
				
			}	
			$this->pdf->cell(190,5,"Scrutiny Committee Observations/Recommendations","0",1,"C");
			$this->pdf->cell(100,5,"Observations/Recommendations","1",0,"L");
			$this->pdf->cell(90,5,"Remarks","1",1,"L");
			$this->pdf->cell(100,5," Application not in prescribed format/incomplete/No proof ","LRT",0,"L");
			$this->pdf->cell(90,5,"","LRT",1,"L");
			$this->pdf->cell(100,5," produced for claims made or experience/Does not possess ","LR",0,"L");
			$this->pdf->cell(90,5,"","LR",1,"L");
			$this->pdf->cell(100,5," prescribed minimum qualifications or requirements.","LRB",0,"L");
			$this->pdf->cell(90,5,"","LRB",1,"L");
			$this->pdf->cell(100,5,"Not to be called for Interview","1",0,"L");
			$this->pdf->cell(90,5,"","1",1,"L");
			$this->pdf->cell(100,5,"May be called for Interview","1",0,"L");
			$this->pdf->cell(90,5,"","1",1,"L");
			$this->pdf->cell(190,5,"Name and Signature of the Scrutiny Committee","0",1,"C"); 
			$this->pdf->cell(100,7,"1","0",0,"L"); 
			$this->pdf->cell(90,7,"2","0",1,"L"); 
			$this->pdf->cell(100,7,"3","0",0,"L"); 
				
			
		}
		}
		// teach,phdtch
		
		function SendOutput()
		{
			$this->pdf->Output("Application_{$this->app_no}.pdf","D");
		}
		
		 
}
function Printapplicationsum($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();
}

?>