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.117.184.125
<?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");
require_once("/var/www/html/aws/aws-autoloader.php");
use Aws\S3\S3Client;
use Aws\S3\Exception\S3Exception;
ini_set('max_execution_time', 300);
ini_set("memory_limit","500M");
class ra_invigilators_dairy extends TCPDF
{
function DefaultConstructor($aobj_context)
{
session_start();
$this->aobj_context=$aobj_context;
$this->pdf= new TCPDF();
$this->pdf=$this;
$this->collcode=$_SESSION['collcode'];
$this->funivcode=$_SESSION['FUNIVCODE'];
$this->degcode=trim($this->aobj_context->mobj_data["degree"]);
$this->sem=trim($this->aobj_context->mobj_data["semesterr"]);
$this->subjectt=trim($this->aobj_context->mobj_data["subjectt"]);
$this->iath=trim($this->aobj_context->mobj_data["iath"]);
$this->iapr=trim($this->aobj_context->mobj_data["iapr"]);
$this->iacomb=trim($this->aobj_context->mobj_data["iacomb"]);
$this->attth=trim($this->aobj_context->mobj_data["attth"]);
$this->attpr=trim($this->aobj_context->mobj_data["attpr"]);
$this->attcomb=trim($this->aobj_context->mobj_data["attcomb"]);
$this->ip=$_SERVER["REMOTE_ADDR"];
$get_date="select now() as now_date";
$obj=$this->aobj_context->mobj_db->GetRow($get_date);
$this->current_date=$obj['now_date'];
$this->type=trim($this->aobj_context->mobj_data["type"]);
$this->headeractive = true;
$this->startPageGroup();
}
function Header()
{
$img_logo_path=$this->aobj_context->main_src.'/'.$this->aobj_context->mobj_data["db"].'/'.$this->pdf_logo_path;
$this->pdf->Image($img_logo_path,10,10,25,25);
$this->pdf->SetFont('Times','B',15);
$this->pdf->cell(0,3,$this->FUNIVNAME."","0",1,"C");
$this->pdf->SetFont('Times','B',8);
$this->pdf->cell(0,6, $this->s_state,"0",1,"C");
$this->pdf->SetFont('Times','B',12);
$this->pdf->cell(0,6, "College : $this->FCOLLCODE - ".$this->college_details,"0",1,"C");
$this->pdf->SetFont('Times','B',12);
$this->pdf->Cell(0,7,"Attendance and IA Shortage List","0",1,"C");
$this->pdf->Cell(0,5,$this->degree_name,"0",1,"C");
$this->pdf->Cell(0,5,$this->exam_name,"0",1,"C");
$this->pdf->Cell(0,5,$this->subname_name,"0",1,"C");
$this->pdf->Cell(0,5,'Percentage Less Than (IA) - Th.: '.$this->iath.' Pr.: '.$this->iapr.' Comb.: '.$this->iacomb,"0",1,"C");
$this->pdf->Cell(0,5,'Percentage Less Than(Attendance) - Th.: '.$this->attth.' Pr.: '.$this->attpr.' Comb.: '.$this->attcomb,"0",1,"C");
}
function Footer()
{
$this->SetY(-15);
$this->pdf->SetFont('Times','B',8);
//$this->Cell(140,6,'Entered : IP Address : '.$this->ip_address." Date ".$this->created_date,'0',0,'L');
$this->Cell(0,6,'Printed : IP Address : '.$this->ip." Date ".$this->current_date,'0',0,'L');
// $this->Cell(50,6,'Page '.$this->PageNo().' of {nb}',0,1,'R');
$this->Cell(0, 6,'Page ' .$this->PageNo().'', 0, 1, 'R');
}
function formcolldata($aobj_context)
{
$get_coll_name="select FUNIVNAME as 'FUNIVNAME',FUNIVCODE,FREGROLL,
FUNIVADD1 as 'state', pdf_logo_path From control";
$lobj_get_coll_name=$this->aobj_context->mobj_db->GetRow($get_coll_name);
$this->FUNIVNAME=$lobj_get_coll_name['FUNIVNAME'];
$this->s_state=$lobj_get_coll_name['state'];
$this->f_year=$lobj_get_coll_name['f_year'];
$this->FREGROLL=$lobj_get_coll_name['FREGROLL'];
$this->pdf_logo_path=$lobj_get_coll_name['pdf_logo_path'];
$this->funivcode=$lobj_get_coll_name['FUNIVCODE'];
$get_data="SELECT c.FCOLLCODE,
CONCAT(c.FCOLLCODE, ' - ', c.FCOLLNAME,', ',c.FTOWN) AS FCOLLNAME FROM college c
where c.FCOLLCODE='{$this->collcode}'";
$obj_student=$this->aobj_context->mobj_db->GetRow($get_data);
$this->college_details = $obj_student['FCOLLNAME'];
$this->FCOLLCODE = $obj_student['FCOLLCODE'];
$this->degree_details = " College : {$this->FCOLLNAME}";
$get_data="SELECT s.fsubcode,s.fsubname
from subject s
where s.fdegree='{$this->degcode}'
and s.fexamno = '{$this->sem}'
and s.fsubcode = '{$this->subjectt}'";
$subdata=$this->aobj_context->mobj_db->GetRow($get_data);
$this->subname_name = $subdata['fsubcode'].' - '.$subdata['fsubname'];
$get_data="SELECT d.fdegree,d.fdescpn,d.fexamname,d.fexamdate
from degree d
where d.fdegree='{$this->degcode}'
and d.fexamno = '{$this->sem}'";
$degdata=$this->aobj_context->mobj_db->GetRow($get_data);
$this->degree_name = $degdata['fdegree'].' - '.$degdata['fdescpn'];
$this->exam_name = $degdata['fexamname'].' '.$degdata['fexamdate'];
}
function writepdf($aobj_context){
$pdf=$this->pdf;
$query = "delete from attshortlist where fcollcode = '{$this->collcode}'
and fdegree = '{$this->degcode}'
and fexamno = '{$this->sem}'
and left(fsubcode,4) = '{$this->subjectt}'";
$res2 = $aobj_context->mobj_db->Execute($query);
$qery = "insert ignore into attshortlist(fcollcode,fdegree, fexamno,fsubcode,fregno, fyear, fexamtype)
select fcollcode,fdegree, fexamno,left(fsubcode,4),fregno, fyear, fexamtype from attend where fcollcode = '{$this->collcode}'
and fdegree = '{$this->degcode}'
and fexamno = '{$this->sem}'
and left(fsubcode,4) = '{$this->subjectt}'";
$res2 = $aobj_context->mobj_db->Execute($qery);
if(strtoupper($this->attth) != 'NA')
{
$query = "update attshortlist s,(select a.fcollcode,a.fdegree,a.fexamno,s.fsubcode,a.fregno,a.fyear,a.fexamtype,
concat(sum(ifnull(IFNULL(FJANA,0)+IFNULL(FFEBA,0)+IFNULL(FMARA,0)+IFNULL(FAPRA,0)+
IFNULL(FMAYA,0)+IFNULL(FJUNA,0)+IFNULL(FJULA,0)+IFNULL(FAUGA,0)+IFNULL(FSEPA,0)+IFNULL(FOCTA,0)+IFNULL(FNOVA,0)+IFNULL(FDECA,0)+IFNULL(FOVERALL_SEMA,0),0)),' / ',
sum(ifnull(IFNULL(FJANC,0)+IFNULL(FFEBC,0)+IFNULL(FMARC,0)+IFNULL(FAPRC,0)+IFNULL(FMAYC,0)+IFNULL(FJUNC,0)+IFNULL(FJULC,0)+IFNULL(FAUGC,0)+IFNULL(FSEPC,0)+IFNULL(FOCTC,0)+IFNULL(FNOVC,0)+IFNULL(FDECC,0)+IFNULL(FOVERALL_SEMC,0),0)) ) as fatt,
ROUND(sum(ifnull(IFNULL(FJANA,0)+IFNULL(FFEBA,0)+IFNULL(FMARA,0)+IFNULL(FAPRA,0)+IFNULL(FMAYA,0)+IFNULL(FJUNA,0)+IFNULL(FJULA,0)+IFNULL(FAUGA,0)+IFNULL(FSEPA,0)+IFNULL(FOCTA,0)+IFNULL(FNOVA,0)+IFNULL(FDECA,0)+IFNULL(FOVERALL_SEMA,0),0))
/sum(ifnull(IFNULL(FJANC,0)+IFNULL(FFEBC,0)+IFNULL(FMARC,0)+IFNULL(FAPRC,0)+IFNULL(FMAYC,0)+IFNULL(FJUNC,0)+IFNULL(FJULC,0)+IFNULL(FAUGC,0)+IFNULL(FSEPC,0)+IFNULL(FOCTC,0)+IFNULL(FNOVC,0)+IFNULL(FDECC,0)+IFNULL(FOVERALL_SEMC,0),0))*100) as fper,
'Att' as fremarks,now()
from attend a inner join subject s on a.fdegree = s.fdegree
and a.fexamno = s.fexamno and a.fsubcode = s.fcsubcode
where a.fdegree = '{$this->degcode}'
and a.fexamno = '{$this->sem}'
and s.FTHEORY = 'T'
and s.FINTASS = 'F'
and s.FRETAIN = 'F'
and a.fcollcode = '{$this->collcode}'
and left(a.fsubcode,4) = '{$this->subjectt}'
group by a.fcollcode,a.fdegree,a.fexamno,s.fsubcode,a.fregno) a
set s.fthatt = a.fatt, s.fthper = a.fper
where a.fregno = s.fregno
and a.fdegree = s.fdegree
and a.fsubcode = s.fsubcode";
//var_dump($query);
$res3 = $aobj_context->mobj_db->Execute($query);
//having ifnull(fper,0)<{$this->attth}
}
if( strtoupper($this->attpr) != 'NA')
{
$query = "
update attshortlist s,(select a.fcollcode,a.fdegree,a.fexamno,s.fsubcode,a.fregno,a.fyear,a.fexamtype,
concat(sum(ifnull(IFNULL(FJANA,0)+IFNULL(FFEBA,0)+IFNULL(FMARA,0)+IFNULL(FAPRA,0)+
IFNULL(FMAYA,0)+IFNULL(FJUNA,0)+IFNULL(FJULA,0)+IFNULL(FAUGA,0)+IFNULL(FSEPA,0)+IFNULL(FOCTA,0)+IFNULL(FNOVA,0)+IFNULL(FDECA,0)+IFNULL(FOVERALL_SEMA,0),0)),' / ',
sum(ifnull(IFNULL(FJANC,0)+IFNULL(FFEBC,0)+IFNULL(FMARC,0)+IFNULL(FAPRC,0)+IFNULL(FMAYC,0)+IFNULL(FJUNC,0)+IFNULL(FJULC,0)+IFNULL(FAUGC,0)+IFNULL(FSEPC,0)+IFNULL(FOCTC,0)+IFNULL(FNOVC,0)+IFNULL(FDECC,0)+IFNULL(FOVERALL_SEMC,0),0)) ) as fatt,
ROUND(sum(ifnull(IFNULL(FJANA,0)+IFNULL(FFEBA,0)+IFNULL(FMARA,0)+IFNULL(FAPRA,0)+IFNULL(FMAYA,0)+IFNULL(FJUNA,0)+IFNULL(FJULA,0)+IFNULL(FAUGA,0)+IFNULL(FSEPA,0)+IFNULL(FOCTA,0)+IFNULL(FNOVA,0)+IFNULL(FDECA,0)+IFNULL(FOVERALL_SEMA,0),0))
/sum(ifnull(IFNULL(FJANC,0)+IFNULL(FFEBC,0)+IFNULL(FMARC,0)+IFNULL(FAPRC,0)+IFNULL(FMAYC,0)+IFNULL(FJUNC,0)+IFNULL(FJULC,0)+IFNULL(FAUGC,0)+IFNULL(FSEPC,0)+IFNULL(FOCTC,0)+IFNULL(FNOVC,0)+IFNULL(FDECC,0)+IFNULL(FOVERALL_SEMC,0),0))*100) as fper,
'Att' as fremarks,now()
from attend a inner join subject s on a.fdegree = s.fdegree
and a.fexamno = s.fexamno and a.fsubcode = s.fcsubcode
where a.fdegree = '{$this->degcode}'
and a.fexamno = '{$this->sem}'
and s.FTHEORY = 'F'
and s.FINTASS = 'F'
and s.FRETAIN = 'F'
and a.fcollcode = '{$this->collcode}'
and left(a.fsubcode,4) = '{$this->subjectt}'
group by a.fcollcode,a.fdegree,a.fexamno,s.fsubcode,a.fregno) a
set s.fpratt = a.fatt, s.fprper = a.fper
where a.fregno = s.fregno
and a.fdegree = s.fdegree
and a.fsubcode = s.fsubcode";
//var_dump($query);
$res3 = $aobj_context->mobj_db->Execute($query);
//having ifnull(fper,0)<{$this->attpr}
}
if( strtoupper($this->attcomb) != 'NA')
{
$query = "update attshortlist s,
(select a.fcollcode,a.fdegree,a.fexamno,s.fsubcode,a.fregno,a.fyear,a.fexamtype,
concat(sum(ifnull(IFNULL(FJANA,0)+IFNULL(FFEBA,0)+IFNULL(FMARA,0)+IFNULL(FAPRA,0)+
IFNULL(FMAYA,0)+IFNULL(FJUNA,0)+IFNULL(FJULA,0)+IFNULL(FAUGA,0)+IFNULL(FSEPA,0)+IFNULL(FOCTA,0)+IFNULL(FNOVA,0)+IFNULL(FDECA,0)+IFNULL(FOVERALL_SEMA,0),0)),' / ',
sum(ifnull(IFNULL(FJANC,0)+IFNULL(FFEBC,0)+IFNULL(FMARC,0)+IFNULL(FAPRC,0)+IFNULL(FMAYC,0)+IFNULL(FJUNC,0)+IFNULL(FJULC,0)+IFNULL(FAUGC,0)+IFNULL(FSEPC,0)+IFNULL(FOCTC,0)+IFNULL(FNOVC,0)+IFNULL(FDECC,0)+IFNULL(FOVERALL_SEMC,0),0)) ) as fatt,
ROUND(sum(ifnull(IFNULL(FJANA,0)+IFNULL(FFEBA,0)+IFNULL(FMARA,0)+IFNULL(FAPRA,0)+IFNULL(FMAYA,0)+IFNULL(FJUNA,0)+IFNULL(FJULA,0)+IFNULL(FAUGA,0)+IFNULL(FSEPA,0)+IFNULL(FOCTA,0)+IFNULL(FNOVA,0)+IFNULL(FDECA,0)+IFNULL(FOVERALL_SEMA,0),0))
/sum(ifnull(IFNULL(FJANC,0)+IFNULL(FFEBC,0)+IFNULL(FMARC,0)+IFNULL(FAPRC,0)+IFNULL(FMAYC,0)+IFNULL(FJUNC,0)+IFNULL(FJULC,0)+IFNULL(FAUGC,0)+IFNULL(FSEPC,0)+IFNULL(FOCTC,0)+IFNULL(FNOVC,0)+IFNULL(FDECC,0)+IFNULL(FOVERALL_SEMC,0),0))*100) as fper,
'Att' as fremarks,now()
from attend a inner join subject s on a.fdegree = s.fdegree
and a.fexamno = s.fexamno and a.fsubcode = s.fcsubcode
where a.fdegree = '{$this->degcode}'
and a.fexamno = '{$this->sem}'
and a.fcollcode = '{$this->collcode}'
and left(a.fsubcode,4) = '{$this->subjectt}'
group by a.fcollcode,a.fdegree,a.fexamno,s.fsubcode,a.fregno) a
set s.fatt = a.fatt, s.fper = a.fper
where a.fregno = s.fregno
and a.fdegree = s.fdegree
and a.fsubcode = s.fsubcode";
$res3 = $aobj_context->mobj_db->Execute($query);
}
$query = "delete from iashortlist where fcollcode = '{$this->collcode}'
and fdegree = '{$this->degcode}'
and fexamno = '{$this->sem}'
and left(fsubcode,4) = '{$this->subjectt}'";
$res1 = $aobj_context->mobj_db->Execute($query);
$qery = "insert ignore into iashortlist(fcollcode,fdegree, fexamno,fsubcode,fregno, fyear, fexamtype)
select fcollcode,fdegree, fexamno,left(fsubcode,4),fregno, fyear, fexamtype from marks
where fcollcode = '{$this->collcode}'
and fdegree = '{$this->degcode}'
and fexamno = '{$this->sem}'
and left(fsubcode,4) = '{$this->subjectt}'";
$res2 = $aobj_context->mobj_db->Execute($qery);
if( strtoupper($this->iath) != 'NA')
{
$query = "update iashortlist s,
(select m.fcollcode,m.fdegree,m.fexamno,s.fsubcode,m.fregno,m.fyear,m.fexamtype,
concat(sum( if(ifnull(fmarks,'-1') <= '0',0,fmarks)),' / ',sum(fsmaxmarks)) as fmarks,
round(sum( if(ifnull(fmarks,'-1') <= '0',0,fmarks))/sum(fsmaxmarks)*100) as fper,
'IA Shortage' as fremarks,now()
from marks m inner join subject s on m.fdegree = s.fdegree
and m.fexamno = s.fexamno and m.fsubcode = s.fcsubcode
where m.fcollcode = '{$this->collcode}'
and m.fexamno = '{$this->sem}'
and m.fdegree = '{$this->degcode}'
and left(m.fsubcode,4) = '{$this->subjectt}'
and s.FTHEORY = 'T'
and s.FINTASS = 'T'
and s.FRETAIN = 'T'
group by m.fcollcode,m.fdegree,m.fexamno,s.fsubcode,m.fregno) a
set s.fthmarks = a.fmarks, s.fthper = a.fper
where a.fregno = s.fregno
and a.fdegree = s.fdegree
and a.fsubcode = s.fsubcode";
$res = $aobj_context->mobj_db->Execute($query);
//var_dump($query);
//having round(sum( if(ifnull(fmarks,'-1') = '-1',0,fmarks))/sum(fsmaxmarks)*100)<{$this->iath}
}
if( strtoupper($this->iapr) != 'NA')
{
$query = "update iashortlist s,
(select m.fcollcode,m.fdegree,m.fexamno,s.fsubcode,m.fregno,m.fyear,m.fexamtype,
concat(sum( if(ifnull(fmarks,'-1') <= '0',0,fmarks)),' / ',sum(fsmaxmarks)) as fmarks,
round(sum( if(ifnull(fmarks,'-1') <= '0',0,fmarks))/sum(fsmaxmarks)*100) as fper,
'IA Shortage' as fremarks,now()
from marks m inner join subject s on m.fdegree = s.fdegree
and m.fexamno = s.fexamno and m.fsubcode = s.fcsubcode
where m.fcollcode = '{$this->collcode}'
and m.fexamno = '{$this->sem}'
and m.fdegree = '{$this->degcode}'
and left(m.fsubcode,4) = '{$this->subjectt}'
and s.FTHEORY = 'F'
and s.FINTASS = 'T'
and s.FRETAIN = 'T'
group by m.fcollcode,m.fdegree,m.fexamno,s.fsubcode,m.fregno) a
set s.fprmarks = a.fmarks, s.fprper = a.fper
where a.fregno = s.fregno
and a.fdegree = s.fdegree
and a.fsubcode = s.fsubcode";
$res = $aobj_context->mobj_db->Execute($query);
//var_dump($query);
//having round(sum( if(ifnull(fmarks,'-1') = '-1',0,fmarks))/sum(fsmaxmarks)*100)<{$this->iapr}
}
if( strtoupper($this->iacomb) != 'NA')
{
$query = "update iashortlist s,
(select m.fcollcode,m.fdegree,m.fexamno,s.fsubcode,m.fregno,m.fyear,m.fexamtype,
concat(sum( if(ifnull(fmarks,'-1') <= '0',0,fmarks)),' / ',sum(fsmaxmarks)) as fmarks,
round(sum( if(ifnull(fmarks,'-1') <= '0',0,fmarks))/sum(fsmaxmarks)*100) as fper,
'IA Shortage' as fremarks,now()
from marks m inner join subject s on m.fdegree = s.fdegree
and m.fexamno = s.fexamno and m.fsubcode = s.fcsubcode
where m.fcollcode = '{$this->collcode}'
and m.fexamno = '{$this->sem}'
and m.fdegree = '{$this->degcode}'
and left(m.fsubcode,4) = '{$this->subjectt}'
and s.FINTASS = 'T'
and s.FRETAIN = 'T'
group by m.fcollcode,m.fdegree,m.fexamno,s.fsubcode,m.fregno) a
set s.fmarks = a.fmarks, s.fper = a.fper
where a.fregno = s.fregno
and a.fdegree = s.fdegree
and a.fsubcode = s.fsubcode";
$res = $aobj_context->mobj_db->Execute($query);
//having round(sum( if(ifnull(fmarks,'-1') = '-1',0,fmarks))/sum(fsmaxmarks)*100)<{$this->iacomb}
}
// $delete = "delete from attshort_report
// where fcollcode = '{$this->collcode}'
// and fdegree = '{$this->degcode}'
// and fexamno = '{$this->sem}'
// and left(fsubcode,4) = '{$this->subjectt}'";
// $res = $aobj_context->mobj_db->Execute($delete);
// $query = "INSERT ignore INTO attshort_report (fcollcode, fdegree, fexamno, fsubcode, fregno,
// fthia, fthiaper,fpria,fprper,fia,fiaper, fyear, fexamtype)
// select fcollcode, fdegree, fexamno, fsubcode, fregno,
// fthmarks, fthper,fprmarks,fprper,fia,fiaper, fyear, fexamtype
// from iashortlist
// where fdegree = '{$this->degcode}' and fcollcode = '{$this->collcode}'
// and fexamno = '{$this->sem}'
// and left(fsubcode,4) = '{$this->subjectt}'";
// $res = $aobj_context->mobj_db->Execute($query);
// $query = " INSERT ignore INTO attshort_report (fcollcode, fdegree, fexamno, fsubcode, fregno, fthatt, fthattper,
// fpratt,fprattper,fatt,fattper,fyear, fexamtype)
// select fcollcode, fdegree, fexamno, fsubcode, fregno,
// fthatt, fthper,fpratt,fprper,fatt,fper, fyear, fexamtype from attshortlist
// where fdegree = '{$this->degcode}' and fcollcode = '{$this->collcode}' and fexamno = '{$this->sem}'
// and left(fsubcode,4) = '{$this->subjectt}'";
// $res = $aobj_context->mobj_db->Execute($query);
// $query = "select st.fregno,st.fname,
// ifnull(a.fthatt,'-') as fthatt,
// ifnull(fthattper,'-') as fthattper,
// ifnull(a.fpratt,'-') as fpratt,
// ifnull(fprattper,'-') as fprattper,
// ifnull(a.fatt,'-') as fatt,
// ifnull(fattper,'-') as fattper,
// ifnull(fthia,'-') as fthia,
// ifnull(fthiaper,'-') as fthiaper,
// ifnull(fpria,'-') as fpria,
// ifnull(fprper,'-') as fprper,
// ifnull(fia,'-') as fia,
// ifnull(fiaper,'-') as fiaper
// from attshort_report a
// inner join student st on a.fregno = st.fregno
// where a.fdegree = '{$this->degcode}'
// and a.fexamno = '{$this->sem}'
// and a.fcollcode = '{$this->collcode}'
// and left(a.fsubcode,4) = '{$this->subjectt}'";
// //var_dump($query);
// $res9 = $aobj_context->mobj_db->GetAll($query);
$query = "select st.fregno,st.fname,fthatt,
fthper,fpratt,fprper,fatt,fper
from attshortlist a
inner join student st on a.fregno = st.fregno
where a.fdegree = '{$this->degcode}'
and a.fexamno = '{$this->sem}'
and a.fcollcode = '{$this->collcode}'
and left(a.fsubcode,4) = '{$this->subjectt}'";
$res9 = $aobj_context->mobj_db->GetAll($query);
$query = "select st.fregno,st.fname,
fthmarks, fthper,fprmarks,fprper,fmarks,fper
from iashortlist a
inner join student st on a.fregno = st.fregno
where a.fdegree = '{$this->degcode}'
and a.fexamno = '{$this->sem}'
and a.fcollcode = '{$this->collcode}'
and left(a.fsubcode,4) = '{$this->subjectt}'";
$res10 = $aobj_context->mobj_db->GetAll($query);
$this->pdf->AddPage("L");
//var_dump($this->y);
$this->pdf->Ln(45);
$i = 1;
$this->pdf->SetFont('Times','B',10);
$this->pdf->cell(10,4, "Sl.","LRT",0,"C");
$this->pdf->cell(30,4, $this->FREGROLL,"LRT",0,"C");
$this->pdf->cell(70,4, "Name","LRT",0,"C");
$this->pdf->cell(20,4,'Th.',"LRT",0,"C");
$this->pdf->cell(20,4,'Th.',"LRT",0,"C");
$this->pdf->cell(20,4,'Pr.',"LRT",0,"C");
$this->pdf->cell(20,4,'Pr.',"LRT",0,"C");
if(strtoupper($this->attcomb) != 'NA')
{
$this->pdf->cell(20,4,'Comb.',"LRT",0,"C");
$this->pdf->cell(20,4,'Comb.',"LRT",0,"C");
}
$this->pdf->cell(20,4,'Elig?',"LRT",0,"C");
$this->pdf->cell(25,4, "Student","LRT",1,"C");
$this->pdf->cell(10,4, "No.","LRB",0,"C");
$this->pdf->cell(30,4, "","LRB",0,"C");
$this->pdf->cell(70,4, "","LRB",0,"C");
$this->pdf->cell(20,4,'Att.',"LRB",0,"C");
$this->pdf->cell(20,4,'Per.',"LRB",0,"C");
$this->pdf->cell(20,4,'Att.',"LRB",0,"C");
$this->pdf->cell(20,4,'Per.',"LRB",0,"C");
if(strtoupper($this->attcomb) != 'NA')
{
$this->pdf->cell(20,4,'Att.',"LRB",0,"C");
$this->pdf->cell(20,4,'Per.',"LRB",0,"C");
}
$this->pdf->cell(20,4,'',"LRB",0,"C");
$this->pdf->cell(25,4, "Signature","LRB",1,"C");
$this->pdf->SetFont('Times','',10);
foreach($res9 as $val)
{
$fatt = "";
$fia = "";
// if(strtoupper($this->attth) != 'NA')
// {
// if($val['fthatt'] != '-')
// $fatt .= "Th.: ".$val['fthatt'].' Th. Per.: '.$val['fthattper']."; ";
// }
// if(strtoupper($this->attpr) != 'NA')
// {
// if($val['fpratt'] != '-')
// $fatt .= "Pr.: ".$val['fpratt'].' Pr. Per.: '.$val['fprattper']."; ";
// }
// if(strtoupper($this->attcomb) != 'NA')
// {
// if($val['fatt'] != '-')
// $fatt .= "Pr.: ".$val['fatt'].' Pr. Per.: '.$val['fattper']."; ";
// }
// if(strtoupper($this->iath) != 'NA')
// {
// if($val['fthia'] != '-')
// $fia .= "Th.: ".$val['fthia'].' Th. Per.: '.$val['fthiaper']."; ";
// }
// if(strtoupper($this->iapr) != 'NA')
// {
// if($val['fpria'] != '-')
// $fia .= "Pr.: ".$val['fpria'].' Pr. Per.: '.$val['fprper']."; ";
// }
// if(strtoupper($this->iacomb) != 'NA')
// {
// if($val['fia'] != '-')
// $fia .= "Comb.: ".$val['fia'].' Comb. Per.: '.$val['fiaper']."; ";
// }
$this->pdf->cell(10,6, $i,"1",0,"C");
$this->pdf->cell(30,6, $val['fregno'],"1",0,"C");
$this->pdf->cell(70,6, $val['fname'],"1",0,"L");
$this->pdf->cell(20,6, $val['fthatt'],"1",0,"C");
$this->pdf->cell(20,6, $val['fthper'],"1",0,"C");
$this->pdf->cell(20,6, $val['fpratt'],"1",0,"C");
$this->pdf->cell(20,6, $val['fprper'],"1",0,"C");
if(strtoupper($this->attcomb) != 'NA')
{
$this->pdf->cell(20,6, $val['fatt'],"1",0,"C");
$this->pdf->cell(20,6, $val['fper'],"1",0,"C");
}
$elible = '';
if(strtoupper($this->attth) != 'NA')
{
if($val['fthper'] != '')
{
if($val['fthper'] <$this->attth)
$elible = 'NE';
}
}
if(strtoupper($this->attpr) != 'NA')
{
if($val['fprper'] != '')
{
if($val['fprper'] <$this->attpr)
$elible = 'NE';
}
}
if(strtoupper($this->attcomb) != 'NA')
{
if($val['fper'] != '')
{
if($val['fper'] <$this->attcomb)
$elible = 'NE';
}
}
$this->pdf->cell(20,6, $elible,"1",0,"C");
$this->pdf->cell(25,6, "","1",1,"C");
if($this->pdf->getY() >170)
{
$this->pdf->AddPage("L");
//var_dump($this->y);
$this->pdf->Ln(45);
$this->pdf->SetFont('Times','B',10);
$this->pdf->cell(10,4, "Sl.","LRT",0,"C");
$this->pdf->cell(30,4, $this->FREGROLL,"LRT",0,"C");
$this->pdf->cell(70,4, "Name","LRT",0,"C");
$this->pdf->cell(20,4,'Th.',"LRT",0,"C");
$this->pdf->cell(20,4,'Th.',"LRT",0,"C");
$this->pdf->cell(20,4,'Pr.',"LRT",0,"C");
$this->pdf->cell(20,4,'Pr.',"LRT",0,"C");
if(strtoupper($this->attcomb) != 'NA')
{
$this->pdf->cell(20,4,'Comb.',"LRT",0,"C");
$this->pdf->cell(20,4,'Comb.',"LRT",0,"C");
}
$this->pdf->cell(20,4,'Elig?',"LRT",0,"C");
$this->pdf->cell(25,4, "Student","LRT",1,"C");
$this->pdf->cell(10,4, "No.","LRB",0,"C");
$this->pdf->cell(30,4, "","LRB",0,"C");
$this->pdf->cell(70,4, "","LRB",0,"C");
$this->pdf->cell(20,4,'Att.',"LRB",0,"C");
$this->pdf->cell(20,4,'Per.',"LRB",0,"C");
$this->pdf->cell(20,4,'Att.',"LRB",0,"C");
$this->pdf->cell(20,4,'Per.',"LRB",0,"C");
if(strtoupper($this->attcomb) != 'NA')
{
$this->pdf->cell(20,4,'Att.',"LRB",0,"C");
$this->pdf->cell(20,4,'Per.',"LRB",0,"C");
}
$this->pdf->cell(20,4,'',"LRB",0,"C");
$this->pdf->cell(25,4, "Signature","LRB",1,"C");
$this->pdf->SetFont('Times','',10);
}
$i++;
}
$this->pdf->AddPage("L");
//var_dump($this->y);
$this->pdf->Ln(45);
$i = 1;
$this->pdf->SetFont('Times','B',10);
$this->pdf->cell(10,4, "Sl.","LRT",0,"C");
$this->pdf->cell(30,4, $this->FREGROLL,"LRT",0,"C");
$this->pdf->cell(70,4, "Name","LRT",0,"C");
$this->pdf->cell(20,4,'Th.',"LRT",0,"C");
$this->pdf->cell(20,4,'Th.',"LRT",0,"C");
$this->pdf->cell(20,4,'Pr.',"LRT",0,"C");
$this->pdf->cell(20,4,'Pr.',"LRT",0,"C");
if(strtoupper($this->iacomb) != 'NA')
{
$this->pdf->cell(20,4,'IA Comb.',"LRT",0,"C");
$this->pdf->cell(20,4,'IA Comb.',"LRT",0,"C");
}
$this->pdf->cell(20,4,'Elig?',"LRT",0,"C");
$this->pdf->cell(25,4, "Student","LRT",1,"C");
$this->pdf->cell(10,4, "No.","LRB",0,"C");
$this->pdf->cell(30,4, "","LRB",0,"C");
$this->pdf->cell(70,4, "","LRB",0,"C");
$this->pdf->cell(20,4,'IA',"LRB",0,"C");
$this->pdf->cell(20,4,'IA Per.',"LRB",0,"C");
$this->pdf->cell(20,4,'IA',"LRB",0,"C");
$this->pdf->cell(20,4,'IA Per.',"LRB",0,"C");
if(strtoupper($this->iacomb) != 'NA')
{
$this->pdf->cell(20,4,'',"LRB",0,"C");
$this->pdf->cell(20,4,'Per.',"LRB",0,"C");
}
$this->pdf->cell(20,4,'',"LRB",0,"C");
$this->pdf->cell(25,4, "Signature","LRB",1,"C");
$this->pdf->SetFont('Times','',10);
foreach($res10 as $val)
{
$fatt = "";
$fia = "";
$this->pdf->cell(10,6, $i,"1",0,"C");
$this->pdf->cell(30,6, $val['fregno'],"1",0,"C");
$this->pdf->cell(70,6, $val['fname'],"1",0,"L");
$this->pdf->cell(20,6, $val['fthmarks'],"1",0,"C");
$this->pdf->cell(20,6, $val['fthper'],"1",0,"C");
$this->pdf->cell(20,6, $val['fprmarks'],"1",0,"C");
$this->pdf->cell(20,6, $val['fprper'],"1",0,"C");
if(strtoupper($this->iacomb) != 'NA')
{
$this->pdf->cell(20,6, $val['fmarks'],"1",0,"C");
$this->pdf->cell(20,6, $val['fper'],"1",0,"C");
}
$elible = '';
if(strtoupper($this->iath) != 'NA')
{
if($val['fthper'] != '')
{
if($val['fthper'] <$this->iath)
$elible = 'NE';
}
}
if(strtoupper($this->iapr) != 'NA')
{
if($val['fprper'] != '')
{
if($val['fprper'] <$this->iapr)
$elible = 'NE';
}
}
if(strtoupper($this->iacomb) != 'NA')
{
if($val['fper'] != '')
{
if($val['fper'] <$this->iacomb)
$elible = 'NE';
}
}
$this->pdf->cell(20,6, $elible,"1",0,"C");
$this->pdf->cell(25,6, "","1",1,"C");
if($this->pdf->getY() >170)
{
$this->pdf->AddPage("L");
//var_dump($this->y);
$this->pdf->Ln(45);
$this->pdf->SetFont('Times','B',10);
$this->pdf->cell(10,4, "Sl.","LRT",0,"C");
$this->pdf->cell(30,4, $this->FREGROLL,"LRT",0,"C");
$this->pdf->cell(70,4, "Name","LRT",0,"C");
$this->pdf->cell(20,4,'Th.',"LRT",0,"C");
$this->pdf->cell(20,4,'Th.',"LRT",0,"C");
$this->pdf->cell(20,4,'Pr.',"LRT",0,"C");
$this->pdf->cell(20,4,'Pr.',"LRT",0,"C");
if(strtoupper($this->iacomb) != 'NA')
{
$this->pdf->cell(20,4,'IA Comb.',"LRT",0,"C");
$this->pdf->cell(20,4,'IA Comb.',"LRT",0,"C");
}
$this->pdf->cell(20,4,'Elig?',"LRT",0,"C");
$this->pdf->cell(25,4, "Student","LRT",1,"C");
$this->pdf->cell(10,4, "No.","LRB",0,"C");
$this->pdf->cell(30,4, "","LRB",0,"C");
$this->pdf->cell(70,4, "","LRB",0,"C");
$this->pdf->cell(20,4,'IA',"LRB",0,"C");
$this->pdf->cell(20,4,'IA Per.',"LRB",0,"C");
$this->pdf->cell(20,4,'IA',"LRB",0,"C");
$this->pdf->cell(20,4,'IA Per.',"LRB",0,"C");
if(strtoupper($this->iacomb) != 'NA')
{
$this->pdf->cell(20,4,'',"LRB",0,"C");
$this->pdf->cell(20,4,'Per.',"LRB",0,"C");
}
$this->pdf->cell(20,4,'',"LRB",0,"C");
$this->pdf->cell(25,4, "Signature","LRB",1,"C");
$this->pdf->SetFont('Times','',10);
}
$i++;
}
}
function SendOutput()
{
$this->pdf->Output("Attendance_CIE_Eligiblity.pdf","I");
}
}
function excelShortlistReport($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
// if($_SESSION['usrtype'] == '17'){
// echo "please contact admin";
// return;
// }
$degcode = trim($aobj_context->mobj_data["degree"]);
$sem = trim($aobj_context->mobj_data["sem"]);
$section = trim($aobj_context->mobj_data["section"]);
$collcode = $_SESSION['collcode'];
$class_obj=new ra_invigilators_dairy();
$class_obj->DefaultConstructor($aobj_context);
$class_obj->formcolldata($aobj_context);
$class_obj->writepdf($aobj_context);
$class_obj->SendOutput();
}
?>
|