Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Your IP : 3.146.178.220
<?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'];
//$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);
$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;
$lquery = "select pd.fuserid, pd.fappno,p.fname,c.fcatdespn,d.fdescpn,ugper, ug,bed, bedper, pgper,pg, phd,phdper,
medper, med,mphil,mphilper, jrep, netp, sletp, rphp, rghp, rclhp, catII,teach,phdtch,rcotj,rcphd,
ifnull(ug,0)+ifnull(phd,0)+ifnull(jrep,0)+ifnull(netp,0)+ifnull(sletp,0)+ifnull(bed,0)+ifnull(med,0)+ifnull(pg,0)+ifnull(mphil,0) as education,
ifnull(rcotj,0)+ifnull(rphp,0)+ifnull(rghp,0)+ifnull(rclhp,0)+ifnull(rcphd,0) as rechapi
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 catII.fuserid, catII.fappno, sum(ifnull(catII.fselfscore,0)) as catII from tleact catII group by catII.fuserid) as catIItab
on pd.fuserid = catIItab.fuserid and pd.fappno = catIItab.fappno
left outer join(select teach.fuserid, teach.fappno, sum(ifnull(teach.fpoints,0)) as teach from expdetl teach where fenttype = 'teach' group by teach.fuserid) as teachtab
on pd.fuserid = teachtab.fuserid and pd.fappno = teachtab.fappno
left outer join(select phdtch.fuserid, phdtch.fappno, sum(ifnull(phdtch.fpoints,0)) as phdtch from expdetl phdtch where fenttype = 'phd' group by phdtch.fuserid) as phdtchtab
on pd.fuserid = phdtchtab.fuserid and pd.fappno = phdtchtab.fappno
left outer join(select rcphd.fuserid, rcphd.fappno, sum(ifnull(rcphd.fpoints,0)) as rcphd from researchexp rcphd where fenttype = 'rcphd' group by rcphd.fuserid, rcphd.fappno) as rcphdtab
on pd.fuserid = rcphdtab.fuserid and pd.fappno = rcphdtab.fappno
left outer join(select rcotj.fuserid, rcotj.fappno, sum(ifnull(rcotj.fpoints,0)) as rcotj from researchexp rcotj where fenttype = 'rcotj' group by rcotj.fuserid, rcotj.fappno) as rcotjtab
on pd.fuserid = rcotjtab.fuserid and pd.fappno = rcotjtab.fappno
left outer join(select rp.fuserid, rp.fappno, sum(ifnull(rp.fpoints,0)) as rphp from rcprojct rp group by rp.fuserid, rp.fappno) as rptab
on pd.fuserid = rptab.fuserid and pd.fappno = rptab.fappno
left outer join(select rg.fuserid, rg.fappno, sum(ifnull(rg.fpoints,0)) as rghp from rechguid rg group by rg.fuserid, rg.fappno) as rgtab
on pd.fuserid = rgtab.fuserid and pd.fappno = rgtab.fappno
left outer join(select rcl.fuserid, rcl.fappno, sum(ifnull(rcl.fpoints,0)) as rclhp from rclecture rcl group by rcl.fuserid, rcl.fappno) as rcltab
on pd.fuserid = rcltab.fuserid and pd.fappno = rcltab.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 rechapi desc";
$lresuls = $this->aobj_context->mobj_db->GetAll($lquery);
//'5484610AEDU'
//rcphd
//rcotj
//var_dump($lquery);
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";
$this->pdf->SetFont('Times','B',8);
$this->pdf->cell(180,7, $this->s_state,"0",1,"C");
$this->pdf->SetFont('Times','B',9);
$this->pdf->cell(180,4,"SCRUTINY COMMITTEE SUMMRY SHEET","0",1,"C");
foreach($lresuls as $lresuls)
{
//var_dump($lresuls);
//$this->pdf->cell(180,7,"Assistant Professor (Regular / Backlog)".$post,"0",1,"C");
$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->setY(40);
$this->pdf->cell(180,4,"Assistant Professor (Regular / Backlog)","0",1,"C");
$this->pdf->cell(50,7,"Name of the Applicant","1",0,"L");
$this->pdf->cell(30,7,"Application No.","1",0,"L");
$this->pdf->cell(30,7,"Subject","1",0,"L");
$this->pdf->cell(30,7,"Specialization","1",0,"L");
$this->pdf->cell(25,7,"UR/SC/ ST/OBC","1",0,"L");
$this->pdf->cell(25,7,"PWD","1",1,"L");
$this->pdf->cell(50,7,"".$lresuls['fname'],"1",0,"L");
$this->pdf->cell(30,7,"".$lresuls['fappno'],"1",0,"L");
$this->pdf->cell(30,7,"".$lresuls['fdescpn'],"1",0,"L");
$this->pdf->cell(30,7,"","1",0,"L");
$this->pdf->cell(25,7,"".$lresuls['fcatdespn'],"1",0,"L");
$this->pdf->cell(25,7,"","1",1,"L");
$this->pdf->Ln(4);
$this->pdf->cell(180,4,"MINIMUM QUALIFICATION (REQUIREMENTS)","0",1,"C");
$this->pdf->SetFont('Times','B',7);
$this->pdf->cell(180,4,"Assistant Professor (Regular / Backlog)","0",1,"C");
$this->pdf->SetFont('Times','B',9);
$this->pdf->cell(30,7,"Sl. No.","1",0,"L");
$this->pdf->cell(65,7,"Course","1",0,"L");
$this->pdf->cell(30,7,"Yes / No ","1",0,"L");
$this->pdf->cell(65,7,"Remarks","1",1,"L");
$this->pdf->cell(30,7,"1.","1",0,"C");
$this->pdf->cell(65,7,"PG Degree (55% marks)","1",0,"L");
$this->pdf->cell(30,7,"","1",0,"L");
$this->pdf->cell(65,7,"","1",1,"L");
$this->pdf->cell(30,7,"2.","1",0,"C");
$this->pdf->cell(65,7,"Ph.D. with course work","1",0,"L");
$this->pdf->cell(30,7,"","1",0,"L");
$this->pdf->cell(65,7,"","1",1,"L");
$this->pdf->cell(30,7,"3.","1",0,"C");
$this->pdf->cell(65,7,"Ph.D. before 2009 with UGC norms","1",0,"L");
$this->pdf->cell(30,7,"","1",0,"L");
$this->pdf->cell(65,7,"","1",1,"L");
$this->pdf->cell(30,7,"4.","1",0,"C");
$this->pdf->cell(65,7,"NET/SLET","1",0,"L");
$this->pdf->cell(30,7,"","1",0,"L");
$this->pdf->cell(65,7,"","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");
$this->pdf->Ln(4);
$this->pdf->cell(180,4,"ACADEMIC QUALIFICATION (50%)","0",1,"C");
$this->pdf->cell(20,7,"SL. No.","1",0,"C");
$this->pdf->cell(50,7,"Acad. Qualification","1",0,"C");
$this->pdf->cell(30,7,"%","1",0,"C");
$this->pdf->cell(30,7,"Screening Marks","1",0,"C");
$this->pdf->cell(60,7,"Remarks","1",1,"C");
$this->pdf->cell(20,7,"1","1",0,"C");
$this->pdf->cell(50,7,"UG","1",0,"L");
$this->pdf->cell(30,7,$lresuls['ugper'],"1",0,"C");
$this->pdf->cell(30,7,$lresuls['ug'],"1",0,"C");
$this->pdf->cell(60,7,"","1",1,"C");
$this->pdf->cell(20,7,"2","1",0,"C");
$this->pdf->cell(50,7,"B.Ed.","1",0,"L");
$this->pdf->cell(30,7,$lresuls['bedper'],"1",0,"C");
$this->pdf->cell(30,7,$lresuls['bed'],"1",0,"C");
$this->pdf->cell(60,7,"","1",1,"C");
$this->pdf->cell(20,7,"3","1",0,"C");
$this->pdf->cell(50,7,"PG","1",0,"L");
$this->pdf->cell(30,7,$lresuls['pgper'],"1",0,"C");
$this->pdf->cell(30,7,$lresuls['pg'],"1",0,"C");
$this->pdf->cell(60,7,"","1",1,"C");
$this->pdf->cell(20,7,"4","1",0,"C");
$this->pdf->cell(50,7,"M.Ed.","1",0,"L");
$this->pdf->cell(30,7,$lresuls['medper'],"1",0,"C");
$this->pdf->cell(30,7,$lresuls['med'],"1",0,"C");
$this->pdf->cell(60,7,"","1",1,"C");
$this->pdf->cell(20,7,"5","1",0,"C");
$this->pdf->cell(50,7,"M.Phil.","1",0,"L");
$this->pdf->cell(30,7,$lresuls['mphilper'],"1",0,"C");
$this->pdf->cell(30,7,$lresuls['mphil'],"1",0,"C");
$this->pdf->cell(60,7,"","1",1,"C");
$this->pdf->cell(20,7,"6","1",0,"C");
$this->pdf->cell(50,7,"Ph.D.","1",0,"L");
$this->pdf->cell(30,7,$lresuls['phdper'],"1",0,"C");
$this->pdf->cell(30,7,$lresuls['phd'],"1",0,"C");
$this->pdf->cell(60,7,"","1",1,"C");
$this->pdf->cell(20,7,"7","1",0,"C");
$this->pdf->cell(50,7,"NET-JRF","1",0,"L");
$this->pdf->cell(30,7,"","1",0,"C");
$this->pdf->cell(30,7,$lresuls['jrep'],"1",0,"C");
$this->pdf->cell(60,7,"","1",1,"C");
$this->pdf->cell(20,7,"8","1",0,"C");
$this->pdf->cell(50,7,"NET","1",0,"L");
$this->pdf->cell(30,7,"","1",0,"C");
$this->pdf->cell(30,7,$lresuls['netp'],"1",0,"C");
$this->pdf->cell(60,7,"","1",1,"C");
$this->pdf->cell(20,7,"9","1",0,"C");
$this->pdf->cell(50,7,"SLET","1",0,"L");
$this->pdf->cell(30,7,"","1",0,"C");
$this->pdf->cell(30,7,$lresuls['sletp'],"1",0,"C");
$this->pdf->cell(60,7,"","1",1,"C");
$this->pdf->cell(20,7,"10","1",0,"C");
$this->pdf->cell(50,7,"Total","1",0,"L");
$this->pdf->cell(30,7,"","1",0,"C");
$this->pdf->cell(30,7,$lresuls['education'],"1",0,"C");
$this->pdf->cell(60,7,"","1",1,"C");
$this->pdf->cell(20,7,"11","1",0,"C");
$this->pdf->cell(50,7,"FT Teach Experience","1",0,"L");
$this->pdf->cell(30,7,"","1",0,"C");
$this->pdf->cell(30,7,$lresuls['teach'],"1",0,"C");
$this->pdf->cell(60,7,"","1",1,"C");
$this->pdf->cell(20,7,"12","1",0,"C");
$this->pdf->cell(50,7,"FT Post Ph.D.","1",0,"L");
$this->pdf->cell(30,7,"","1",0,"C");
$this->pdf->cell(30,7,$lresuls['phdtch'],"1",0,"C");
$this->pdf->cell(60,7,"","1",1,"C");
$this->pdf->cell(20,7,"13","1",0,"C");
$this->pdf->cell(50,7,"Cat-III A","1",0,"L");
$this->pdf->cell(30,7,"","1",0,"C");
$this->pdf->cell(30,7,$lresuls['rcphd'],"1",0,"C");
$this->pdf->cell(60,7,"","1",1,"C");
$this->pdf->cell(20,7,"14","1",0,"C");
$this->pdf->cell(50,7,"Cat-III B","1",0,"L");
$this->pdf->cell(30,7,"","1",0,"C");
$this->pdf->cell(30,7,$lresuls['rcotj'],"1",0,"C");
$this->pdf->cell(60,7,"","1",1,"C");
$this->pdf->cell(20,7,"15","1",0,"C");
$this->pdf->cell(50,7,"Total","1",0,"L");
$this->pdf->cell(30,7,"","1",0,"C");
$this->pdf->cell(30,7,$lresuls['rechapi'],"1",0,"C");
$this->pdf->cell(60,7,"","1",1,"C");
}
}
// 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();
}
?>
|