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.227.72.27
<?php
$main_src=substr($_SERVER['SCRIPT_FILENAME'],0,strlen($_SERVER['SCRIPT_FILENAME'])-7);
//$pdf_writer_class =$main_src."/tarka_pdf/fpdf.php";
ini_set('memory_limit', '1G');
ini_set('max_execution_time', '600');
$pdf_writer_class =$main_src."/tcpdf/tcpdf.php";
require_once($pdf_writer_class);
require_once("/var/www/html/aws/aws-autoloader.php");
use Aws\S3\S3Client;
use Aws\S3\Exception\S3Exception;
class ra_invigilators_dairy extends TCPDF
{
function DefaultConstructor($aobj_context)
{
session_start();
$this->aobj_context=$aobj_context;
$this->FUNIVCODE = $_SESSION['FUNIVCODE'];
$this->pdf= new TCPDF();
$this->pdf=$this;
$this->rtype = 'T';
$this->fromdate=trim($this->aobj_context->mobj_data["frm_date"]);
$this->db=trim($this->aobj_context->mobj_data["db"]);
//var_dump($this->fromdate);die();
$this->fromqpcode=trim($this->aobj_context->mobj_data["fqpcode"]);
$this->toqpcode=trim($this->aobj_context->mobj_data["tqpcode"]);
$this->session=trim($this->aobj_context->mobj_data["session"]);
$this->fexamno=trim($this->aobj_context->mobj_data["degexam"]);
$this->degree=trim($this->aobj_context->mobj_data["degree"]);
$this->rtype=trim($this->aobj_context->mobj_data["rtype"]);
//var_dump($this->rtype);
$this->fbatch = ($this->aobj_context->mobj_data["fbatch"]);
$this->room_range_from=str_pad($this->room_range_from, 3, "0", STR_PAD_LEFT);
$this->room_range_to=str_pad($this->room_range_to, 3, "0", STR_PAD_LEFT);
$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->collcode=$_SESSION['collcode'];
$this->headeractive = true;
}
function Header()
{
}
function Footer()
{
$this->SetY(-10);
$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(140,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');
}
function formcolldata()
{
$get_coll_name="select FUNIVNAME as 'FUNIVNAME',
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->pdf_logo_path=$lobj_get_coll_name['pdf_logo_path'];
$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->degree_details = " College : {$this->FCOLLNAME}";
}
function GetFullQry()
{
$get_data="SELECT cd.FHALLNO,cd.FREGNO, substring(st.FNAME,1,30) as fname1,
substring(st.FNAME,30) as fname2, st.FNAME ,m.froomname,ifnull(st.fphotopath,'') as fphotopath,t.fsubcode as fqpcode
FROM marks cd INNER JOIN subject s ON s.fdegree = cd.fdegree and s.fexamno = cd.fexamno
and s.FCSUBCODE=cd.FSUBCODE
inner join student st on st.FREGNO=cd.FREGNO
AND cd.FCOLLCODE=st.FCOLLCODE
inner join iatimetable t on cd.fcollcode = t.fcollcode
and cd.fdegree = t.fdegree and cd.fexamno = t.fexamno
and cd.fsubcode = t.fsubcode
LEFT JOIN iamasroom m ON cd.fcollcode = m.fcollcode
and cd.fdegree = m.fdegree and cd.fexamno = m.fexamno
and m.froomno = FHALLNO
WHERE cd.fcollcode='{$this->collcode}'
and s.ftheory = 'T' and ifnull(s.fintass,'') = 'T'
and ifnull(FNOQN,'') >0
and cd.fexamno = '{$this->fexamno}'
and cd.fdegree = '{$this->degree}'
and t.fsession = '{$this->session}'
and t.fdoe = date_format(str_to_date('{$this->fromdate}','%d/%m/%Y'),'%Y-%m-%d')
order by FHALLNO,t.fsubcode,cd.FREGNO";
// $get_data = "SELECT FHALLNO,cd.FREGNO, substring(st.FNAME,1,30) as fname1, substring(st.FNAME,30) as fname2, st.FNAME ,masroom.froomname,st.fphotopath,fqpcode FROM {$canddet} cd INNER JOIN {$subject} s ON s.fdegree = cd.fdegree and s.fexamno = cd.fexamno and s.FSUBCODE=cd.FSUBCODE inner join {$candsum} cs on cs.FREGNO=cd.FREGNO AND cd.FDEGREE=cs.FDEGREE AND cd.FCOLLCODE=cs.FCOLLCODE inner join student st on st.FREGNO=cd.FREGNO AND cd.FCOLLCODE=st.FCOLLCODE LEFT JOIN masroom ON masroom.froomno = FHALLNO AND masroom.FCOLLCODE = cs.fcntrcode LEFT JOIN reason r ON s.FSESSION = r.FREASONCD WHERE cs.FCNTRCODE='9999' and s.ftheory = 'T' and ifnull(s.fintass,'') <> 'T' and ifnull(s.fretain,'') <> 'T' and s.fsession like 'M%' and FQPCODE in('21321','14321') and ifnull(cd.FHALLNO,'') <> '' AND lpad(cd.FHALLNO,3,'0') between '013' and '013' and s.fdoe = date_format(str_to_date('07/11/2019','%d/%m/%Y'),'%Y-%m-%d') and FPRESENT='P'
// and ifnull(cd.fpassmth,'') = '' and ifnull(FRECPTDATE,'0000-00-00')<>'0000-00-00' order by FHALLNO,FQPCODE,cd.FREGNO";
$this->lobj_get_data = $this->aobj_context->mobj_db->GetAll($get_data);
// var_dump($get_data);
// die();
$this->final_data_arr=array();
$this->hallname= array();
$c=0;
foreach($this->lobj_get_data as $ak=>$av)
{
$this->final_data_arr[$av['FHALLNO']][$av['FREGNO']]['FREGNO']=$av['FREGNO'];
$this->final_data_arr[$av['FHALLNO']][$av['FREGNO']]['FNAME1']=$av['fname1'];
$this->final_data_arr[$av['FHALLNO']][$av['FREGNO']]['FNAME2']=$av['fname2'];
$this->final_data_arr[$av['FHALLNO']][$av['FREGNO']]['fphotopath']=$av['fphotopath'];
$this->final_data_arr[$av['FHALLNO']][$av['FREGNO']]['fqpcode']=$av['fqpcode'];
// To display room name 12/11/2016
$this->hallname[$av['FHALLNO']] = $av['froomname'];
$c++;
}
}
function WriteSlNoRow()
{
}
function logoheader($FUNIVCODE)
{
//var_dump($FUNIVCODE);
if($FUNIVCODE == '030')
{
if(!empty($this->pdf_logo_path))
{
$img_logo_path=$this->aobj_context->main_src."/img/report_uni_logo.jpg";
$this->pdf->Image($img_logo_path,70,4,60);
$this->pdf->Ln(20);
}
}
else
{
// $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,50,50);
// }
$img_logo_path=$this->aobj_context->main_src.'/'.$this->db."/img/report_uni_logo.jpg";
if(!empty($img_logo_path))
{
//$img_logo_path=$this->aobj_context->main_src.$this->pdf_logo_path;
$this->pdf->Image($img_logo_path,10,10,20);
}
$this->pdf->SetFont('Times','B',15);
$this->pdf->cell(180,3,$this->FUNIVNAME."","0",1,"C");
$this->pdf->SetFont('Times','B',8);
$this->pdf->cell(180,6, $this->s_state,"0",1,"C");
}
$this->pdf->SetFont('Times','B',12);
$this->pdf->cell(200,6, "Block : $this->college_details ","0",1,"C");
$this->pdf->SetFont('Times','B',12);
if($FUNIVCODE == '005')
$this->pdf->Cell(180,6,"ATTENDANCE SHEET","0",1,"C");
else
$this->pdf->Cell(180,6,"INVIGILATOR'S DIARY - {$this->FEXAMDATE} EXAMINATION","0",1,"C");
$this->pdf->SetFont('Times','',12);
//$this->pdf->Cell(180,5," {$this->degree}","0",1,"C");
$this->pdf->Cell(180,5," {$this->sub_details}","0",1,"C");
$this->pdf->Cell(180,5," {$this->exam_date}","0",1,"C");
$this->pdf->Ln(1);
$this->pdf->SetFont('Times','',12);
$this->pdf->SetFont('Times','B',12);
}
function loadfooter($FUNIVCODE)
{
//$this->pdf->Ln(1);
$this->pdf->SetFont('Times','B',9);
$empty_cell_width = 6;
$this->pdf->cell($empty_cell_width,5," ",0,"C");
$this->pdf->cell(196,5, "SRN (Absentees) : ","1",1,"L");
$this->pdf->cell($empty_cell_width,5," ",0,"C");
$this->pdf->cell(196,5, "","1",1,"L");
// $this->pdf->Ln(1);
// $this->pdf->cell($empty_cell_width,5," ",0,"C");
// $this->pdf->cell(65,5, "No of TAB / Stylus Issued ","1",0,"L");
// $this->pdf->cell(30,5, "","1",0,"L");
// $this->pdf->cell(65,5, "No of TAB / Stylus Received" ,"1",0,"L");
// $this->pdf->cell(36,5, "","1",1,"L");
$this->pdf->Ln(1);
$this->pdf->cell($empty_cell_width,5," ",0,"C");
$this->pdf->cell(65,5, "No. of Candidates Present ","1",0,"L");
$this->pdf->cell(30,5, "","1",0,"L");
$this->pdf->cell(65,5, "No. of Candidates Absent" ,"1",0,"L");
$this->pdf->cell(36,5, "","1",1,"L");
$this->pdf->Ln(1);
$this->pdf->cell($empty_cell_width,5," ",0,"C");
$this->pdf->cell(196,6, "SRN (Candidate`s b/u Malpractice) : ","1",1,"L");
$this->pdf->Ln(7);
$this->pdf->cell($empty_cell_width,5," ",0,"C");
$this->pdf->cell(0,4, "Room Superintendent Name","0",0,"L");
$this->pdf->cell(0,4, "Room Superintendent Signature","0",1,"R");
$this->pdf->cell($empty_cell_width,5," ",0,"C");
$this->pdf->cell(0,2, "Date","0",1,"L");
}
function formData()
{
session_start();
$FUNIVCODE = $_SESSION['FUNIVCODE'];
//var_dump($FUNIVCODE);
$this->pdf->SetMargins(5,6,10);
$empty_cell_width=6;
$this->pdf->SetFont('Times','B',10);
$this->pdf->cell($empty_cell_width,7," ",0,"C");
$cnt=0;
$first = false;
foreach($this->final_data_arr as $hallk=>$hallv)
{
// To display room name 12/11/2016
$this->hall_no = $this->hallname[$hallk];
//var_dump($this->hallname[$hallk]);
$this->headeractive = true;
$sl_no=0;
$c=1;
$this->pdf->SetFont('Times','',12);
$cnt=0;
$newqpcode = '';
$oldqpcode = '';
$newhallno = '';
$oldhallno = '';
$x = 0;
$z = 0;
foreach($hallv as $hk=>$hv)
{
$sl_no++;
$cnt++;
$newqpcode = $hv['fqpcode'];
$this->qp_code = $hv['fqpcode'];
if($newqpcode != $oldqpcode || $newhallno != $oldhallno)
{
$this->headeractive == false;
$x = 0;
$sl_no=1;
$this->pdf->Ln(1);
if($first)
$this->pdf->loadfooter($FUNIVCODE);
$this->pdf->AddPage();
$candsum = "candsum";
$canddet = "canddet";
$subject = "subject";
$room_allotment = "room_allotment";
$get_qp_details = "select group_concat(s.fdegree order by s.fdegree separator ', ') as degree,FEXAMDATE,CONCAT(s.FSUBNAME,' - ',s.fsubshort) AS FSSUBNAME
from subject s
inner join degree d on d. FDEGREE=s.FDEGREE and d.fexamno = s.fexamno
where s.fcsubcode='{$newqpcode}'
and s.fdegree = '{$this->degree}'
and s.fexamno = '{$this->fexamno}'
group by s.fsubcode";
$obj_get_qp_details = $this->aobj_context->mobj_db->GetRow($get_qp_details);
$degree=$obj_get_qp_details['degree'];
$FSSUBNAME=$obj_get_qp_details['FSSUBNAME'];
//$this->degree = "Program : {$degree}";
$this->FEXAMDATE=$obj_get_qp_details['FEXAMDATE'];
$this->sub_details="Subject Name : {$FSSUBNAME} ";
$get_qp_data = "SELECT distinct DATE_FORMAT(s.FDOE,'%d/%m/%Y') AS FDOE,s.FSESSION, r.fdescpn
FROM {$room_allotment} ra inner join {$subject} s on ra.fqpcode = s.fqpcode left outer join
reason r on s.fsession = r.freasoncd
WHERE ra.FCOLLCODE='{$this->collcode}'
AND ra.FQPCODE='{$newqpcode}'";
//var_dump($get_qp_data);
$get_qp_data = "SELECT distinct DATE_FORMAT(t.FDOE,'%d/%m/%Y') AS FDOE,
t.fsession as fdescpn
FROM iatimetable t
WHERE t.fsubcode='{$newqpcode}'
and ifnull(t.fdoe,'') <> '0000-00-00'
and t.fdegree = '{$this->degree}'
and t.fexamno = '{$this->fexamno}'";
$obj_get_qp_data=$this->aobj_context->mobj_db->GetRow($get_qp_data);
$this->exam_date="Exam Date : {$obj_get_qp_data['FDOE']} Time : {$obj_get_qp_data['fdescpn']}";
$newhallno = $this->hall_no;
$empty_cell_width=6;
$this->logoheader($FUNIVCODE);
$this->pdf->SetFont('Times','B',11);
$this->pdf->cell($empty_cell_width,7," ",0,"C");
$this->pdf->Cell(180,7,"Room No. : {$this->hall_no}","0",1,"L");
$this->pdf->cell($empty_cell_width,7," ",0,"C");
$this->pdf->Ln(3);
if($this->headeractive == true)
{
if($this->rtype == 'F')
{
// $this->pdf->cell($empty_cell_width,7," ",0,"C");
// $this->pdf->Cell(180,7,"Room No. : {$this->hall_no}","0",1,"L");
$this->pdf->cell($empty_cell_width,5," ",0,"C");
$this->pdf->cell(10,5, "Sl.","LRT",0,"C");
$this->pdf->cell(25,5, "SRN","LRT",0,"C");
$this->pdf->cell(70,5, "Name","LRT",0,"C");
$this->pdf->cell(28,5, "TAB","LRT",0,"C");
$this->pdf->cell(28,5, "Signature","LRT",0,"C");
$this->pdf->cell(28,5, "Office Use Only","LRT",1,"C");
$this->pdf->cell($empty_cell_width,5," ",0,"C");
$this->pdf->cell(10,5, "No.","LRB",0,"C");
$this->pdf->cell(25,5, "","LRB",0,"C");
$this->pdf->cell(70,5, "","LRB",0,"C");
$this->pdf->cell(28,5, "Number","LRB",0,"C");
$this->pdf->cell(28,5, "","LRB",0,"C");
$this->pdf->cell(28,5, "Dummy No.","LRB",1,"C");
}
else
{
$this->pdf->SetFont('Times','B',9);
$this->pdf->cell($empty_cell_width,7," ",0,"L");
$this->pdf->cell(10,7, "Sl.","LRT",0,"C");
$this->pdf->cell(20,7, "Reg.","LRT",0,"C");
$this->pdf->cell(70,7, "Name","LRT",0,"C");
$this->pdf->cell(20,7, "Photo","LRT",0,"C");
$this->pdf->cell(20,7, "TAB","LRT",0,"C");
$this->pdf->cell(22,7, "Signature","LRT",0,"C");
$this->pdf->cell(25,7, "Office Use only","LRT",1,"C");
$this->pdf->cell($empty_cell_width,7," ",0,"L");
$this->pdf->cell(10,7, "No.","LRB",0,"C");
$this->pdf->cell(20,7, "No.","LRB",0,"C");
$this->pdf->cell(70,7, "","LRB",0,"C");
$this->pdf->cell(20,7, "","LRB",0,"C");
$this->pdf->cell(20,7, "Number","LRB",0,"C");
$this->pdf->cell(22,7, "","LRB",0,"C");
$this->pdf->cell(25,7, "Dummy No.","LRB",1,"C");
$this->pdf->SetFont('Times','',9);
}
}
$oldqpcode = $newqpcode;
$oldhallno = $newhallno;
$first = true;
}
$this->pdf->SetFont('Times','',9);
if($x ==20)
{
$this->pdf->Ln(5);
$this->pdf->loadfooter($FUNIVCODE);
$this->pdf->AddPage();
$this->logoheader($FUNIVCODE);
$x=0;
$this->pdf->cell($empty_cell_width,7," ",0,"C");
$this->pdf->Cell(180,7,"Room No. : {$this->hall_no}","0",1,"L");
$this->pdf->SetFont('Times','B',9);
$this->pdf->cell($empty_cell_width,7," ",0,"L");
$this->pdf->cell(10,7, "Sl.","LRT",0,"C");
$this->pdf->cell(20,7, "Reg.","LRT",0,"C");
$this->pdf->cell(70,7, "Name","LRT",0,"C");
$this->pdf->cell(20,7, "Photo","LRT",0,"C");
$this->pdf->cell(20,7, "TAB","LRT",0,"C");
$this->pdf->cell(22,7, "Signature","LRT",0,"C");
$this->pdf->cell(25,7, "Office Use only","LRT",1,"C");
$this->pdf->cell($empty_cell_width,7," ",0,"L");
$this->pdf->cell(10,7, "No.","LRB",0,"C");
$this->pdf->cell(20,7, "No.","LRB",0,"C");
$this->pdf->cell(70,7, "","LRB",0,"C");
$this->pdf->cell(20,7, "","LRB",0,"C");
$this->pdf->cell(20,7, "Number","LRB",0,"C");
$this->pdf->cell(22,7, "","LRB",0,"C");
$this->pdf->cell(25,7, "Dummy No.","LRB",1,"C");
}
if($z ==9)
{
$this->pdf->Ln(5);
$this->pdf->loadfooter($FUNIVCODE);
$this->pdf->AddPage();
$this->logoheader($FUNIVCODE);
$x=0;
$z=0;
$this->pdf->SetFont('Times','B',9);
$this->pdf->cell($empty_cell_width,7," ",0,"L");
$this->pdf->cell(10,7, "Sl.","LRT",0,"C");
$this->pdf->cell(20,7, "Reg.","LRT",0,"C");
$this->pdf->cell(70,7, "Name","LRT",0,"C");
$this->pdf->cell(20,7, "Photo","LRT",0,"C");
$this->pdf->cell(20,7, "TAB","LRT",0,"C");
$this->pdf->cell(22,7, "Signature","LRT",0,"C");
$this->pdf->cell(25,7, "Office Use only","LRT",1,"C");
$this->pdf->cell($empty_cell_width,7," ",0,"L");
$this->pdf->cell(10,7, "No.","LRB",0,"C");
$this->pdf->cell(20,7, "No.","LRB",0,"C");
$this->pdf->cell(70,7, "","LRB",0,"C");
$this->pdf->cell(20,7, "","LRB",0,"C");
$this->pdf->cell(20,7, "Number","LRB",0,"C");
$this->pdf->cell(22,7, "","LRB",0,"C");
$this->pdf->cell(25,7, "Dummy No.","LRB",1,"C");
$this->pdf->SetFont('Times','',9);
}
if($this->pdf->GetY() > 260) //if($cnt > 30)
{
$this->pdf->AddPage();
$this->hall_no=$this->hallname[$hallk];
$this->headeractive = false;
$this->logoheader($FUNIVCODE);
$cnt = 0;
$this->pdf->SetFont('Times','B',9);
if($this->rtype == 'F')
{
$this->pdf->cell(10,5, "Sl.","LRT",0,"C");
$this->pdf->cell(25,5, "SRN","LRT",0,"C");
$this->pdf->cell(70,5, "Name","LRT",0,"C");
$this->pdf->cell(28,5, "TAB","LRT",0,"C");
$this->pdf->cell(28,5, "Signature","LRT",0,"C");
$this->pdf->cell(28,5, "Office Use Only","LRT",1,"C");
$this->pdf->cell($empty_cell_width,5," ",0,"C");
$this->pdf->cell(10,5, "No.","LRB",0,"C");
$this->pdf->cell(25,5, "","LRB",0,"C");
$this->pdf->cell(70,5, "","LRB",0,"C");
$this->pdf->cell(28,5, "Number","LRB",0,"C");
$this->pdf->cell(28,5, "","LRB",0,"C");
$this->pdf->cell(28,5, "Dummy No.","LRB",1,"C");
}else
{
$this->pdf->cell($empty_cell_width,7," ",0,"L");
$this->pdf->cell(10,7, "Sl.","LRT",0,"C");
$this->pdf->cell(20,7, "Reg.","LRT",0,"C");
$this->pdf->cell(70,7, "Name","LRT",0,"C");
$this->pdf->cell(20,7, "Photo","LRT",0,"C");
$this->pdf->cell(20,7, "TAB","LRT",0,"C");
$this->pdf->cell(22,7, "Signature","LRT",0,"C");
$this->pdf->cell(25,7, "Office Use only","LRT",1,"C");
$this->pdf->cell($empty_cell_width,7," ",0,"L");
$this->pdf->cell(10,7, "No.","LRB",0,"C");
$this->pdf->cell(20, "No.","LRB",0,"C");
$this->pdf->cell(70,7, "","LRB",0,"C");
$this->pdf->cell(20,7, "","LRB",0,"C");
$this->pdf->cell(20,7, "Number","LRB",0,"C");
$this->pdf->cell(22,7, "","LRB",0,"C");
$this->pdf->cell(25,7, "Dummy No.","LRB",1,"C");
}
}
if($this->rtype == 'F')
{
$this->pdf->SetFont('Times','',9);
$x++;
if(empty($hv['FNAME2']))
{
$this->pdf->cell($empty_cell_width,6," ",0,"C");
$this->pdf->cell(10,6, $sl_no,"1",0,"C");
$this->pdf->cell(25,6, $hv['FREGNO'],"1",0,"C");
$this->pdf->cell(70,6, $hv['FNAME1'],"1",0,"L");
$this->pdf->cell(28,6, "","1",0,"C");
$this->pdf->cell(28,6, "","1",0,"C");
$this->pdf->cell(28,6, "","1",1,"C");
}
else
{
$this->pdf->cell($empty_cell_width,5," ",0,"C");
$this->pdf->cell(10,4, $sl_no,"LRT",0,"C");
$this->pdf->cell(25,4, $hv['FREGNO'],"LRT",0,"C");
$this->pdf->cell(70,4, $hv['FNAME1'],"LRT",0,"L");
$this->pdf->cell(28,4, "","LRT",0,"C");
$this->pdf->cell(28,4, "","LRT",0,"C");
$this->pdf->cell(28,4, "","LRT",1,"C");
$this->pdf->cell($empty_cell_width,5," ",0,"C");
$this->pdf->cell(10,4, "","LRB",0,"C");
$this->pdf->cell(25,4, "","LRB",0,"C");
$this->pdf->cell(70,4, $hv['FNAME2'],"LRB",0,"L");
$this->pdf->cell(28,4, "","LRB",0,"C");
$this->pdf->cell(28,4, "","LRB",0,"C");
$this->pdf->cell(28,4, "","LRB",1,"C");
}
}
else
{
$x = $this->pdf->GetX();
$y = $this->pdf->GetY();
$full_photo_path=trim($this->aobj_context->main_src."/".$hv['fphotopath']);
if($hv['fphotopath'] != '')
{
$keyname = $FUNIVCODE."/".$hv['fphotopath'];
$s3 = S3Client::factory(
array(
'credentials' => array(
'key' => IAM_KEY,
'secret' => IAM_SECRET
),
'version' => "latest",
'region' => 'ap-south-1'
)
);
$filePath = tempnam(sys_get_temp_dir(), rand(10,15));
$result = $s3->getObject([
'Bucket' => STUDENT_PHOTOS_BUCKET,
'Key' => $keyname,
'SaveAs' => $filePath
]);
$curl3 = curl_init();
$photo_url = 'https://university-student-photos.s3.ap-south-1.amazonaws.com/' . $FUNIVCODE . '/' . urlencode($hv['fphotopath']);
curl_setopt($curl3, CURLOPT_URL, $photo_url);
curl_setopt($curl3, CURLOPT_NOBODY, true);
$response_photo = curl_exec($curl3);
$httpCode_photo = curl_getinfo($curl3, CURLINFO_HTTP_CODE);
if($httpCode_photo == 200)
{
$this->pdf->Image($filePath,114,$y+1,15,15);
}
}
$this->pdf->cell($empty_cell_width,7," ",0,"L");
$this->pdf->cell(10,17, $sl_no,"1",0,"C");
$this->pdf->cell(20,17, $hv['FREGNO'],"1",0,"C");
$this->pdf->cell(70,17, $hv['FNAME1'],"1",0,"L");
$this->pdf->cell(20,17,'',"1",0,"L");
$this->pdf->cell(20,17, "","1",0,"C");
$this->pdf->cell(22,17, "","1",0,"C");
$this->pdf->cell(25,17, "","1",1,"C");
$z++;
}
$c++;
}
}
$this->pdf->loadfooter($FUNIVCODE);
}
function SendOutput()
{
$this->pdf->Output("Invigilators Dairy.pdf","I");
}
}
function GenerateIAInvigilatorDairy($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$class_obj=new ra_invigilators_dairy();
//$class_obj->AliasNbPages();
$class_obj->DefaultConstructor($aobj_context);
$class_obj->GetFullQry();
$class_obj->formcolldata();
$class_obj->formData();
$class_obj->SendOutput();
}
?>
|