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.15.237.229
<?php
function GenerateTeacherReport($aobj_context)
{
session_start();
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$college_code = $_SESSION['collcode'];
$from_dept = $aobj_context->mobj_data["from_dept"];
$to_dept = $aobj_context->mobj_data["to_dept"];
$from_des = $aobj_context->mobj_data["from_des"];
$to_des = $aobj_context->mobj_data["to_des"];
$dept_cond="";
$des_cond="";
$dept_cond=" and t.FDEPTCODE>='{$from_dept}' and t.FDEPTCODE<='{$to_dept}'";
$des_cond=" and t.FDEGNCODE>='{$from_des}' and t.FDEGNCODE<='{$to_des}'";
$main_src_obj=(explode("/",$_SERVER["REQUEST_URI"]));
$main_src=$main_src_obj[1];
$pdf_writer_class=$aobj_context->main_src."/maya-pdf/fpdf.php";
//$root_pdf_file_download=$_SERVER["DOCUMENT_ROOT"]."/".$main_src."/Report_details/output/report_general_list.pdf";
$p_count =1;
include($pdf_writer_class);
$pdf= new FPDF();
$pdf->SetFont('Times','',10);
$pdf->SetMargins(15,15);
$pdf->AliasNbPages();
// query for the page header
$page_header_university = "select FUNIVNAME,FTOWN, date_format(now(),'%d/%m/%Y') as date from control";
$lobj_page_header_university = $aobj_context->mobj_db->GetRow($page_header_university);
$page_header_college ="select concat('[',FCOLLCODE,'] ',FCOLLNAME,', ',FTOWN) as college_name
from college where FCOLLCODE='{$college_code}'";
$lobj_page_header_college = $aobj_context->mobj_db->GetRow($page_header_college);
$page_header_degree = "select concat('[',FDEGREE,'] - ', FDESCPN) as Degree_name,
concat(' ( ',FEXAMNAME,' ) ') as Exam, FADYEAR,FEXAMDATE
from degree where FDEGREE = '{$reval_degree_code}' and
FEXAMNO>='{$reval_from_Exam_no}' and FEXAMNO<='{$reval_to_Exam_no}'";
$lobj_page_header_degree = $aobj_context->mobj_db->GetAll($page_header_degree);
$pdf->aobj_context =$aobj_context ;
$pdf->WhichReport = 'Teachers Report';
$pdf->FUNIVNAME = $lobj_page_header_university[FUNIVNAME];
$pdf->FTOWN = $lobj_page_header_university[FTOWN];
$pdf->date_1 = $lobj_page_header_university['date'];
$pdf->college_name = $lobj_page_header_college['college_name'];
$pdf->Degree_name = $lobj_page_header_degree[0]['Degree_name'];
$pdf->Exam = $lobj_page_header_degree[0]['Exam'];
$pdf->FEXAMDATE = $lobj_page_header_degree[0]['FEXAMDATE'];
//$pdf->AddPage();
$pdf->SetFont('Times','',10);
/* $get_data="select FTEACHCODE,FTEACHNAME,FDEGNDESC,
CONCAT(FADDR1,' ',FADDR2,' ',FADDR3,' ',FADDR4) as address,
d.FDEPTNAME,FFULLTIME,FPERMANENT,FEXP,
DATE_FORMAT(FDOA,'%d/%m/%Y') as doj,
s1.FDEPTNAME as s1,FUGPG1,FEXAMWORK1,
s2.FDEPTNAME as s2,FUGPG2,FEXAMWORK2,
s3.FDEPTNAME as s3,FUGPG3,FEXAMWORK3
from masteach t inner join masdept d on t.FDEPTCODE=d.FDEPTCODE
inner join masdegn des on des.FDEGNCODE=t.FDEGNCODE
left join masdept s1 on s1.FDEPTCODE=FSUBCODE1
left join masdept s2 on s2.FDEPTCODE=FSUBCODE2
left join masdept s3 on s3.FDEPTCODE=FSUBCODE3
where t.FCOLLCODE='{$college_code}'
"; teacher_photos/4335/5727_pairashi 001.jpg */
$get_data="select t.*,FTEACHCODE,trim(concat(ifnull(FTITLE,''),' ',FTEACHNAME)) as LTEACHNAME,FDEGNDESC,FGENDER,FQUAL,DATE_FORMAT(FDOB,'%d/%m/%Y') as FDOB ,FEMAIL,FMOBILE,FPHONE,FPANNO,ifnull(FSTATUS,'Pending') as FSTATUS,DATE_FORMAT(now(),'%d/%m/%Y') as FDATE,
DATE_FORMAT(FLOGDATE,'%d/%m/%Y') as FLOGDATE,
FADDR1,FADDR2,FADDR3,FADDR4,
d.FDEPTNAME,FFULLTIME,FPERMANENT,FEXP,FPHOTO,FREMARKS,
DATE_FORMAT(FDOA,'%d/%m/%Y') as doj,
s1.fsubname as s1,if(FUGPG1='No','',FUGPG1) as FUGPG1,FEXAMWORK1,
s2.fsubname as s2,if(FUGPG2='No','',FUGPG2) as FUGPG2,FEXAMWORK2,
s3.fsubname as s3,if(FUGPG3='No','',FUGPG3) as FUGPG3,FEXAMWORK3,
s4.fsubname as s4,if(FUGPG4='No','',FUGPG4) as FUGPG4,FEXAMWORK4,
s5.fsubname as s5,if(FUGPG5='No','',FUGPG5) as FUGPG5,FEXAMWORK5,t.FIFSCCODE,t.FACCNO,t.FAADHARNO
from masteach t inner join masdept d on t.FDEPTCODE=d.FDEPTCODE
inner join masdegn des on des.FDEGNCODE=t.FDEGNCODE
left join massub s1 on s1.fsubcode=FSUBCODE1
left join massub s2 on s2.fsubcode=FSUBCODE2
left join massub s3 on s3.fsubcode=FSUBCODE3
left join massub s4 on s4.fsubcode=FSUBCODE4
left join massub s5 on s5.fsubcode=FSUBCODE5
where t.FCOLLCODE='{$college_code}'
{$dept_cond} {$des_cond}";
$lobj_get_data= $aobj_context->mobj_db->GetAll($get_data);
$i=0;
$app_height=6;
$width_x=160;
$height=35;
foreach($lobj_get_data as $apk=>$apv)
{
$pdf->AddPage();
$pdf->SetMargins(15,15);
$FTEACHCODE=$apv['FTEACHCODE'];
$FTEACHNAME=$apv['LTEACHNAME'];
$FDEGNDESC=$apv['FDEGNDESC'];
$FDEPTNAME=$apv['FDEPTNAME'];
$FFULLTIME=$apv['FFULLTIME'];
$FPERMANENT=$apv['FPERMANENT'];
$FEXP=$apv['FEXP'];
$FIFSCCODE=$apv['FIFSCCODE'];
$FACCNO=$apv['FACCNO'];
$FAADHARNO=$apv['FAADHARNO'];
$FMOBILE = $apv['FMOBILE'];
$FPHONE = $apv['FPHONE'];
$FPANNO = $apv['FPANNO'];
$FEMAIL = $apv['FEMAIL'];
$FQUAL = $apv['FQUAL'];
$FGENDER = $apv['FGENDER'];
$FSTATUS = $apv['FSTATUS'];
$FREMARKS = $apv['FREMARKS'];
$FDATE = $apv['FDATE'];
$logdate = $apv['FLOGDATE'];
$FDOB=$apv['FDOB'];
$doj=$apv['doj'];
$FSCALE=$apv['FSCALE'];
/*$doj=$apv['doj']; */
$s1=$apv['s1'];
$FUGPG1=$apv['FUGPG1'];
$FEXAMWORK1=$apv['FEXAMWORK1'];
$s2=$apv['s2'];
$FUGPG2=$apv['FUGPG2'];
$FEXAMWORK2=$apv['FEXAMWORK2'];
$s3=$apv['s3'];
$FUGPG3=$apv['FUGPG3'];
$FEXAMWORK3=$apv['FEXAMWORK3'];
$add1=$apv['FADDR1'];
$add2=$apv['FADDR2'];
$add3=$apv['FADDR3'];
$add4=$apv['FADDR4'];
/* if($i%3==0)
{
$pdf->AddPage();
$width_x=160;
$height=34;
} */
$pdf->SetFont('Times','',10);
$height_y=$height;
$pdf->SetFont('Times','B',10);
$pdf->Cell(0,"6","Personal Details",'1',1,'L');
$pdf->SetFont('Times','',10);
$pdf->Cell(30,"6","Teacher Name: ",'1',0,'L');
$pdf->Cell(120,"6",$FTEACHNAME,'1',0,'L');
$pdf->Cell(30,"6",$FTEACHCODE,'1',1,'C');
$pdf->Cell(30,"6","Gender: ",'1',0,'L');
$pdf->Cell(45,"6",$FGENDER,'1',0,'L');
$pdf->Cell(30,"6","Date of Birth: ",'1',0,'L');
$pdf->Cell(45,"6",$FDOB,'1',0,'L');
$pdf->Cell(30,"6","",'R',1,'L');
$pdf->Cell(30,"6","Mobile No.: ",'1',0,'L');
$pdf->Cell(45,"6",$FMOBILE,'1',0,'L');
$pdf->Cell(30,"6","Phone No.: ",'1',0,'L');
$pdf->Cell(45,"6",$FPHONE,'1',0,'L');
$pdf->Cell(30,"6","Affix Photo",'R',1,'C');
$pdf->Cell(30,"6","Email ID: ",'1',0,'L');
$pdf->Cell(120,"6",$FEMAIL,'1',0,'L');
$pdf->Cell(30,"6","Here",'R',1,'C');
$pdf->Cell(30,"5","Address: ",'LRT',0,'L');
$pdf->Cell(120,"5",$add1,'LRT',0,'L');
$pdf->Cell(30,"5","",'LR',1,'L');
$pdf->Cell(30,"5","",'LR',0,'L');
$pdf->Cell(120,"5",$add2,'LR',0,'L');
$pdf->Cell(30,"5","",'LR',1,'L');
$pdf->Cell(30,"5","",'LR',0,'L');
$pdf->Cell(120,"5",$add3,'LR',0,'L');
$pdf->Cell(30,"5","",'LR',1,'L');
$pdf->Cell(30,"5","",'LRB',0,'L');
$pdf->Cell(120,"5",$add4,'LRB',0,'L');
$pdf->Cell(30,"5","",'LRB',1,'L');
$photo_path=$apv[FPHOTO];
if(!empty($photo_path) && file_exists($photo_path))
{
$pdf->Image($photo_path,166,55,28,30);
}
//$pdf->Cell(148,6,$pdf->Image($photo_path,170,45,23,20),'1','1','L');
$pdf->ln(5);
$pdf->SetFont('Times','B',10);
$pdf->Cell(0,"6","Academic Details",'1',1,'L');
$pdf->SetFont('Times','',10);
$pdf->Cell(30,"6","Department: ",'1',0,'L');
$pdf->Cell(0,"6",$FDEPTNAME,'1',1,'L');
$pdf->Cell(30,"6","Designation: ",'1',0,'L');
$pdf->Cell(0,"6",$FDEGNDESC,'1',1,'L');
$pdf->Cell(30,"6","Salary Scale: ",'1',0,'L');
$pdf->Cell(60,"6",$FSCALE,'1',0,'L');
$pdf->Cell(30,"6","Full Time: ",'1',0,'L');
$pdf->Cell(60,"6",$FFULLTIME,'1',1,'L');
$pdf->Cell(30,"6","Joining Date: ",'1',0,'L');
$pdf->Cell(60,"6",$doj,'1',0,'L');
$pdf->Cell(30,"6","Experience: ",'1',0,'L');
$pdf->Cell(60,"6",$FEXP,'1',1,'L');
$pdf->Cell(30,"6","Qualification: ",'1',0,'L');
$pdf->Cell(0,"6",$FQUAL,'1',1,'L');
$pdf->Cell(30,"6","Working Status: ",'1',0,'L');
$pdf->Cell(60,"6",$FSTATUS,'1',0,'L');
$pdf->Cell(30,"6","Updated on: ",'1',0,'L');
$pdf->Cell(60,"6",$logdate,'1',1,'L');
$pdf->Cell(30,"6","Remarks: ",'1',0,'L');
$pdf->Cell(0,"6",$FREMRKS,'1',1,'L');
$pdf->ln(5);
$pdf->SetFont('Times','B',10);
$pdf->Cell(0,"6","Bank Details",'1',1,'L');
$pdf->SetFont('Times','',10);
$pdf->Cell(30,"6","Account No: ",'1',0,'L');
$pdf->Cell(60,"6",$FACCNO,'1',0,'L');
$pdf->Cell(30,"6","IFSC Code: ",'1',0,'L');
$pdf->Cell(60,"6",$FIFSCCODE,'1',1,'L');
$pdf->Cell(30,"6","PAN No.: ",'1',0,'L');
$pdf->Cell(150,"6",$FPANNO,'1',1,'L');
$pdf->ln(5);
$pdf->SetFont('Times','B',10);
$pdf->Cell(0,"6","Subject Specialization",'1',1,'L');
$pdf->SetFont('Times','',10);
WriteHeaders($pdf);
WriteHeadersDetails($pdf,$s1,$FUGPG1,$FEXAMWORK1);
WriteHeadersDetails($pdf,$s2,$FUGPG2,$FEXAMWORK2);
WriteHeadersDetails($pdf,$s3,$FUGPG3,$FEXAMWORK3);
WriteHeadersDetails($pdf,$s4,$FUGPG4,$FEXAMWORK4);
WriteHeadersDetails($pdf,$s5,$FUGPG5,$FEXAMWORK5);
$pdf->ln(25);
$pdf->Cell(30,"6","Date: ".$FDATE,'0',0,'L');
$pdf->Cell(150,"4","Principal Sign. (with seal)",'0',1,'R');
}
/* $pdf->Ln(18);
$pdf->Cell(20,4,"Date :",'0',0,'C');
$pdf->Cell(170,4,"Signature of the Principal with Seal",'0',1,'R');
$pdf->Cell(0,50,'IP Address : '.$_SERVER['REMOTE_ADDR'].", Date ".$pdf->date_1,'0',1,'L'); */
$pdf->Output("teachers_checklist.pdf","D");
}
function WriteHeaders($pdf)
{
$pdf->SetFont('Times','B',10);
$pdf->Cell(120,6,'Subject','1',0,'C');
$pdf->Cell(20,6,'UG / PG','1',0,'C');
$pdf->Cell(20,6,'Examiner','1',0,'C');
$pdf->Cell(20,6,'QP Setter','1',1,'C');
/* $pdf->Cell(20,6,'Squad','1',0,'L');
$pdf->Cell(20,6,'Chief Sup.','1',0,'L');
$pdf->Cell(20,6,'Custodian','1',1,'L'); */
$pdf->SetFont('Times','',10);
}function WriteHeadersDetails($pdf,$s1,$FUGPG1,$FEXAMWORK1)
{
$exp_arr=explode("|",$FEXAMWORK1);
$examinar="";
$qp="";
$sqad="";
$cheif_sup="";
$cust="";
for($i=0;$i<=count($exp_arr);$i++)
{
$val=trim($exp_arr[$i]);
if($val=="EXAMINER")
$examinar="Yes";
else if($val=="QP SETTER")
$qp="Yes";
else if($val=="SQUAD")
$sqad="Yes";
else if($val=="CHIEF SUP")
$cheif_sup="Yes";
else if($val=="CUSTODIAN")
$cust="Yes";
}
if($s1 !="")
{
$pdf->Cell(120,6,$s1,'1',0,'L');
$pdf->Cell(20,6,$FUGPG1,'1',0,'C');
$pdf->Cell(20,6,$examinar,'1',0,'C');
$pdf->Cell(20,6,$qp,'1',1,'C');
//$pdf->Cell(20,6,$sqad,'1',0,'L');
//$pdf->Cell(20,6,$cheif_sup,'1',0,'L');
//$pdf->Cell(20,6,$cust,'1',1,'L');
}
}
?>
|