File manager - Edit - /home/autoph/tmp/public_html/pms_v1/pdfViewer/pep_pdfEmployeeview.php
Back
<?php ob_start(); $prfDateX = date_create() ->format("Y-m-d"); //https://www.youtube.com/watch?v=gNH6NNyhJLk //https://www.youtube.com/watch?v=EYYZFRRdR6A PDF with MySQL database $count = 0; require ('./fpdf.php'); class PDF extends FPDF{ function Header(){ $this->Image('../images/ahg_logo.png',10,5, 30,10, 'PNG','wwww.autohubgroup.com'); } /* function Footer(){ $this->SetY(-25); $this->Image('../images/ahg_logo.png'); } */ } $pcpIDpdf = $_GET['pcpIDpdf']; include_once("../../../cfg/conn.php"); include ("../functions/users.php"); if(isset($_GET['pcpIDpdf'])){ if($_GET['sme'] ==1 || $_GET['sme'] ==2){ if($_GET['sme'] ==1){ $GetPCPSemester = "1ST"; }else{ $GetPCPSemester = "2ND"; } }else{ $GetPCPSemester = $_GET['sme']; } $getSem = $_GET['sme']; $sourceID = $_GET['source']; $pcpIDpdf = $_GET['pcpIDpdf']; $TotalWeightedPoints = 0; $MonWP=0; $MonNR=0; $pi = "SELECT * FROM `pms_formula` WHERE deleted = 0 LIMIT 1"; $qPi = mysqli_query($conn,$pi); while($row = mysqli_fetch_array($qPi)){ $multiplierPTS = $row['multiplier_pts']; $plusFactorPTS = $row['plus_factor_pts']; $nrMaxCount = $row['nr_max_count']; } //PART 3 OF EVALUATION FORM $getPEFDBHead = "SELECT * FROM `pef_evaluation_data` WHERE `pcp_id`='$pcpIDpdf '"; $qGet = mysqli_query($conn,$getPEFDBHead); $ckhRow = mysqli_num_rows($qGet); $improvement=0; $strength=0; $competencyX=0; $competencyNotes=0; $potentialX=0; $PotenNotes=0; $competency =0; $nextHeadNotes=0; $suitabilityAndNotes =0; $confirnDataNotes =0; if($ckhRow > 0){ while($db = mysqli_fetch_array($qGet)){ $strength = $db['part_three_strength']; $improvement = $db['part_three_improvement']; $competencyX = $db['part_three_competency']; switch($competencyX){ case '1': $competency ="NONE"; break; case '2': $competency="A Particular competencies only (specify in the comment box)"; break; case '3': $competency="Two or more competency (specify in the comment box)"; break; } $competencyNotes = $db['part_three_competency_notes']; $suitabilityX = $db['part_three_suitability']; switch($suitabilityX){ case '1': $suitability ="Very Suitable"; break; case '2': $suitability="Suitable"; break; case '3': $suitability="Not Suitable"; break; } $suitabilityNotes = $db['part_three_suitability_notes']; $suitabilityAndNotes = $suitability ." (". $suitabilityNotes .")"; $potentialX = $db['part_three_potential']; switch($potentialX){ case '1': $potential ="Just right for the present position"; break; case '2': $potential="Moderate Potential"; break; case '3': $potential="High Potential / ready for promotion"; break; } $potentialNotes = $db['part_three_potential_notes']; $PotenNotes = $potential ." (".$potentialNotes.")"; $confirm = $db['emp_confirm_agreement']; switch($confirm){ case '1': $confirnData ="AGREE"; break; case '2': $confirnData="AGREE WITH RESERVATION"; break; case '3': $confirnData="DISAGREE"; break; } $confirmNotes = $db['emp_confirm_notes']; $confirnDataNotes = $confirnData ." (".$confirmNotes.")"; $nextHeadNotes = $db['next_head_notes']; } } //+++++++++++++++++++ $varA = "EXCELLENT (Consistently shown exceptional competencies / exemplary behaviours in all areas of the performance factor being assessed)"; $varB = "VERY SATISFACTORY (Exhibited above average competencies/behaVERY SATISFACTORY (Exhibited above average competencies/behaVERY SATISFACTORY (Exhibited above average competencies/behaVERY SATISFACTORY (Exhibited above average competencies/behaVERY SATISFACTORY (Exhibited above average competencies/behaviors in all areas of the performance factor being assessed all the time"; $varC = "VERY SATISFACTORY (Exhibited above average competencies/behaviors in all areas of the performance factor being assessed all the time"; $varD = "VERY SATISFACTORY (Exhibited above average competencies/behaviors in all areas of the performance factor being assessed all the time"; $varE = "BELOW SATISFACTORY (Met normal/minimum expectation..."; $varF = "BELOW SATISFACTORY (Met normal/minimum expectation..."; $chkPoint = "SELECT `employee_id`,`year`,`period`,`pcp_name`,`period_count` FROM `pcp_headers` WHERE `id`='$pcpIDpdf'"; $qChk=mysqli_query($conn,$chkPoint); $ckhRow = mysqli_num_rows($qChk); If($ckhRow > 0){ while($row=mysqli_fetch_array($qChk)){ $employeeID = $row['employee_id']; $period = $row['period']; $pcpYear = $row['year']; $periodCount = $row['period_count']; } } $periodText ="PERFORMANCE EVALUATION (" . $period. " Semester of ". $pcpYear .")"; //END OF CHECKPOINT=============================================================================== //END OF CHECKPOINT=============================================================================== } $getName = "SELECT * FROM pms_employee_data WHERE id = $sourceID LIMIT 1"; $getMyName = mysqli_query($conn,$getName); while($nRow = mysqli_fetch_array($getMyName)){ $fname=$nRow['first_name']; $lname=$nRow['last_name']; $employeeName = $fname ." ". $lname; } //$sql ="SELECT * FROM `kra_position_tbl` WHERE `pms_unit_id`='$unitID' AND `deleted`=0 ORDER BY `kra_name` ASC"; $sql = "SELECT * FROM `pcp_employee_data` WHERE `pcp_header_id`='$pcpIDpdf' AND `deleted`=0 GROUP BY `pcp_kra_id` ORDER BY id ASC"; $pdf = new PDF(); //set margins $pdf->SetMargins(10,20,10); $pdf->AddPage(); //L = Land Scape, P = Portrait //set column size in array format $width_cell = array(69,15,13,13,13,13,13,13,13,15); //set Image //$pdf->Image('../images/ahg_logo.png',10,5, 25,10, 'PNG','wwww.autohubgroup.com'); //background color $pdf->SetFillColor(255,255,255); //use for report title bgcolor $pdf->SetFont('Arial','B',10); $pdf->MultiCell(0,2,'',0,0,true); $pdf->MultiCell(0,4,$employeeName,0,'L',1); $pdf->SetFont('Arial','',7); $pdf->MultiCell(0,5,$periodText,0,'L',1); $pdf->SetFillColor(0, 0, 0,90); //use for header bgcolor $pdf->SetTextColor(255,255,255,90); $pdf->SetLineWidth(0); $pdf->SetDrawColor(0,0,25); //header start $pdf->MultiCell(190,7,'PART I - OUTPUT / ACCOMPLISHMENT (70%)',1,'C',true); $pdf->SetFillColor(240, 240, 240,90); //use for header bgcolor $pdf->SetTextColor(0,0,0,90); $pdf->Cell($width_cell[0],6,'KRA NAME',1,0,'L',true); $pdf->Cell($width_cell[1],6,'WEIGHT',1,0,'C',true); if($GetPCPSemester==="1ST"){ $pdf->Cell($width_cell[2],6,'JAN',1,0,'C',true); $pdf->Cell($width_cell[3],6,'FEB',1,0,'C',true); $pdf->Cell($width_cell[4],6,'MAR',1,0,'C',true); $pdf->Cell($width_cell[5],6,'APR',1,0,'C',true); $pdf->Cell($width_cell[6],6,'MAY',1,0,'C',true); $pdf->Cell($width_cell[7],6,'JUN',1,0,'C',true); }else{ $pdf->Cell($width_cell[2],6,'JUL',1,0,'C',true); $pdf->Cell($width_cell[3],6,'AUG',1,0,'C',true); $pdf->Cell($width_cell[4],6,'SEP',1,0,'C',true); $pdf->Cell($width_cell[5],6,'OCT',1,0,'C',true); $pdf->Cell($width_cell[6],6,'NOV',1,0,'C',true); $pdf->Cell($width_cell[7],6,'DEC',1,0,'C',true); } $pdf->Cell($width_cell[8],6,'NR',1,0,'C',true); $pdf->Cell($width_cell[9],6,'WP',1,0,'C',true); $pdf->SetFillColor(255,255,255); //use for body bgcolor $fill=false; //$pdf->Cell(400,200,'Hello Arnel'); $getData = mysqli_query($conn,$sql); $statRow = mysqli_num_rows($getData); $kraTitle = ''; $count=0; while($drow = mysqli_fetch_array($getData)){ $pcpID= $drow['id']; $kraID = $drow['pcp_kra_id']; $kpiID = $drow['pcp_kpi_id']; $empRecordID= $drow['employee_id']; $MonWP=0; $MonNR = 0; $myNRRating=0; $MonWPrint=0; $pefKraNR = 0; $kraWeightPrint=''; //$kraWeight =getPositionKRAName($kraID)[1]; $kraWeight = getEmployeeKRAName($kraID)[1]; if (!preg_match("/%/",$kraWeight)) { $kraWeightMultiplier =$kraWeight / 100; }else{ $kraExWeight = explode("%",$kraWeight); $kraWeightMultiplier =$kraExWeight[0] / 100; } $pdf->MultiCell(0,6,"",0,'P',false); //setup row padding if($kraTitle == $kraID){ $pdf->Cell($width_cell[0],6,"",1,0,'C',$fill); $kraWeightPrint=''; }else{ $count = $count + 1; $kraWeightPrint = getEmployeeKRAName($kraID)[1]; } $pdf->Cell($width_cell[0],6,strtoupper(getEmployeeKRAName($kraID)[0]),1,0,'L',$fill); $pdf->Cell($width_cell[1],6,$kraWeightPrint,1,0,'C',$fill); //return response()->json(['data' => Employee::get()]); if($GetPCPSemester === "1ST"){ $jMar = "SELECT AVG(mar_numerical_rating) AS marActual FROM `mar_emp_data` WHERE `kra_id`='$kraID' AND `emp_rec_id`='$empRecordID' AND `pcp_id`='$pcpIDpdf' AND `mar_semester_data`='$getSem' AND `mar_month_data`=1 AND `deleted`=0 LIMIT 1"; $gMarD = mysqli_query($conn,$jMar); //$data = EmployeeModel::find('10004'); //$MonA = $gMarD[0]['marActual']; while($jRow = mysqli_fetch_array($gMarD)){ $MonA = number_format($jRow['marActual'],3,'.',''); } $pefKraNR = $pefKraNR + $MonA; $fMar = "SELECT AVG(mar_numerical_rating) AS marActual FROM `mar_emp_data` WHERE `kra_id`='$kraID' AND `emp_rec_id`='$empRecordID' AND `pcp_id`='$pcpIDpdf' AND `mar_semester_data`='$getSem' AND `mar_month_data`=2 AND `deleted`=0 LIMIT 1"; $gMarF = mysqli_query($conn,$fMar); while($fRow = mysqli_fetch_array($gMarF)){ $MonB = number_format($fRow['marActual'],3,'.',''); } $pefKraNR = $pefKraNR + $MonB; $fMar = "SELECT AVG(mar_numerical_rating) AS marActual FROM `mar_emp_data` WHERE `kra_id`='$kraID' AND `emp_rec_id`='$empRecordID' AND `pcp_id`='$pcpIDpdf' AND `mar_semester_data`='$getSem' AND `mar_month_data`=3 AND `deleted`=0 LIMIT 1"; $gMarF = mysqli_query($conn,$fMar); while($fRow = mysqli_fetch_array($gMarF)){ $MonC = number_format($fRow['marActual'],3,'.',''); } $pefKraNR = $pefKraNR + $MonC; $fMar = "SELECT AVG(mar_numerical_rating) AS marActual FROM `mar_emp_data` WHERE `kra_id`='$kraID' AND `emp_rec_id`='$empRecordID' AND `pcp_id`='$pcpIDpdf' AND `mar_semester_data`='$getSem' AND `mar_month_data`=4 AND `deleted`=0 LIMIT 1"; $gMarF = mysqli_query($conn,$fMar); while($fRow = mysqli_fetch_array($gMarF)){ $MonD = number_format($fRow['marActual'],3,'.',''); } $pefKraNR = $pefKraNR + $MonD; $fMar = "SELECT AVG(mar_numerical_rating) AS marActual FROM `mar_emp_data` WHERE `kra_id`='$kraID' AND `emp_rec_id`='$empRecordID' AND `pcp_id`='$pcpIDpdf' AND `mar_semester_data`='$getSem' AND `mar_month_data`=5 AND `deleted`=0 LIMIT 1"; $gMarF = mysqli_query($conn,$fMar); while($fRow = mysqli_fetch_array($gMarF)){ $MonE = number_format($fRow['marActual'],3,'.',''); } $pefKraNR = $pefKraNR + $MonE; $fMar = "SELECT AVG(mar_numerical_rating) AS marActual FROM `mar_emp_data` WHERE `kra_id`='$kraID' AND `emp_rec_id`='$empRecordID' AND `pcp_id`='$pcpIDpdf' AND `mar_semester_data`='$getSem' AND `mar_month_data`=6 AND `deleted`=0 LIMIT 1"; $gMarF = mysqli_query($conn,$fMar); while($fRow = mysqli_fetch_array($gMarF)){ $MonF = number_format($fRow['marActual'],3,'.',''); } $pefKraNR = $pefKraNR + $MonF; $kNR = ($pefKraNR / $periodCount); //$divisorCount==number of period to or months applicable $myNRRating = number_format($kNR,3,'.',''); $MonWP = $kraWeightMultiplier * $kNR; $MonWPrint = number_format(($MonWP),3,'.',''); }else{ $jMar = "SELECT AVG(mar_numerical_rating) AS marActual FROM `mar_emp_data` WHERE `kra_id`='$kraID' AND `emp_rec_id`='$empRecordID' AND `pcp_id`='$pcpIDpdf' AND `mar_semester_data`='$getSem' AND `mar_month_data`=7 AND `deleted`=0 LIMIT 1"; $gMarD = mysqli_query($conn,$jMar); while($jRow = mysqli_fetch_array($gMarD)){ $MonA = number_format($jRow['marActual'],3,'.',''); } $pefKraNR = $pefKraNR + $MonA; $fMar = "SELECT AVG(mar_numerical_rating) AS marActual FROM `mar_emp_data` WHERE `kra_id`='$kraID' AND `emp_rec_id`='$empRecordID' AND `pcp_id`='$pcpIDpdf' AND `mar_semester_data`='$getSem' AND `mar_month_data`=8 AND `deleted`=0 LIMIT 1"; $gMarF = mysqli_query($conn,$fMar); while($fRow = mysqli_fetch_array($gMarF)){ $MonB = number_format($fRow['marActual'],3,'.',''); } $pefKraNR = $pefKraNR + $MonB; $fMar = "SELECT AVG(mar_numerical_rating) AS marActual FROM `mar_emp_data` WHERE `kra_id`='$kraID' AND `emp_rec_id`='$empRecordID' AND `pcp_id`='$pcpIDpdf' AND `mar_semester_data`='$getSem' AND `mar_month_data`=9 AND `deleted`=0 LIMIT 1"; $gMarF = mysqli_query($conn,$fMar); while($fRow = mysqli_fetch_array($gMarF)){ $MonC = number_format($fRow['marActual'],3,'.',''); } $pefKraNR = $pefKraNR + $MonC; $fMar = "SELECT AVG(mar_numerical_rating) AS marActual FROM `mar_emp_data` WHERE `kra_id`='$kraID' AND `emp_rec_id`='$empRecordID' AND `pcp_id`='$pcpIDpdf' AND `mar_semester_data`='$getSem' AND `mar_month_data`=10 AND `deleted`=0 LIMIT 1"; $gMarF = mysqli_query($conn,$fMar); while($fRow = mysqli_fetch_array($gMarF)){ $MonD = number_format($fRow['marActual'],3,'.',''); } $pefKraNR = $pefKraNR + $MonD; $fMar = "SELECT AVG(mar_numerical_rating) AS marActual FROM `mar_emp_data` WHERE `kra_id`='$kraID' AND `emp_rec_id`='$empRecordID' AND `pcp_id`='$pcpIDpdf' AND `mar_semester_data`='$getSem' AND `mar_month_data`=11 AND `deleted`=0 LIMIT 1"; $gMarF = mysqli_query($conn,$fMar); while($fRow = mysqli_fetch_array($gMarF)){ $MonE = number_format($fRow['marActual'],3,'.',''); } $pefKraNR = $pefKraNR + $MonE; $fMar = "SELECT AVG(mar_numerical_rating) AS marActual FROM `mar_emp_data` WHERE `kra_id`='$kraID' AND `emp_rec_id`='$empRecordID' AND `pcp_id`='$pcpIDpdf' AND `mar_semester_data`='$getSem' AND `mar_month_data`=12 AND `deleted`=0 LIMIT 1"; $gMarF = mysqli_query($conn,$fMar); while($fRow = mysqli_fetch_array($gMarF)){ $MonF = number_format($fRow['marActual'],3,'.',''); } $pefKraNR = $pefKraNR + $MonF; $kNR = ($pefKraNR / $periodCount); //$divisorCount==number of period to or months applicable $myNRRating = number_format($kNR,3,'.',''); $MonWP = $kraWeightMultiplier * $kNR; $MonWPrint = number_format(($MonWP),3,'.',''); } $pdf->Cell($width_cell[2],6,$MonA,1,0,'C',$fill); $pdf->Cell($width_cell[3],6,$MonB,1,0,'C',$fill); $pdf->Cell($width_cell[4],6,$MonC,1,0,'C',$fill); $pdf->Cell($width_cell[5],6,$MonD,1,0,'C',$fill); $pdf->Cell($width_cell[6],6,$MonE,1,0,'C',$fill); $pdf->Cell($width_cell[7],6,$MonF,1,0,'C',$fill); $pdf->Cell($width_cell[8],6,$myNRRating,1,0,'C',$fill); $pdf->Cell($width_cell[9],6,$MonWPrint,1,0,'C',$fill); $TotalWeightedPoints = $TotalWeightedPoints + $MonWP; $fill =!$fill; // use code to put alternate color between rows $kraTitle=$kraID; $MonNR = 0; $MonWP=0; $myNRRating=0; $MonWPrint=0; } $pdf->MultiCell(1,6,"",0,1,0,'L',$fill); //setup row padding (border, padding top,) $pdf->SetFillColor(200,200,200); //use for body bgcolor $pdf->Cell(162,6,'Numerical Rating (Sum of Weight Points)',1,0,'R',1); $pdf->Cell(28,6,number_format(($TotalWeightedPoints),3,'.',''),1,1,'C',1); //$percentageEquivalentRate = number_format((($TotalWeightedPoints /$nrMaxCount) * 100),2,'.',''); $percentageEquivalentRate = ((($TotalWeightedPoints / $nrMaxCount ) * $multiplierPTS) + $plusFactorPTS)* 100; $percentageEquivalent = number_format((($percentageEquivalentRate)),2,'.','')."%"; //$perCentile = ((($totaNGSumOfWeight / $nrMaxCount ) * $multiplierPTS) + $plusFactorPTS) * 100; //$perCentileVal= number_format($perCentile,2,'.','') ."%"; $pdf->Cell(162,6,'Percentile Equivalent',1,0,'R',1); $pdf->Cell(28,6,$percentageEquivalent,1,1,'C',1); $gP = "SELECT * FROM `gps_adjectival_eq` WHERE $percentageEquivalentRate BETWEEN eq_percentage_from AND eq_percentage_to "; $gpA = mysqli_query($conn,$gP); while($row=mysqli_fetch_array($gpA)){ $pefAdjectival= $row['eq_adjectival']; } $pdf->Cell(162,6,'Adjectival Equivalent',1,0,'R',1); $pdf->Cell(28,6,$pefAdjectival,1,1,'C',1); $WeihtedRatingPartOne = number_format(($percentageEquivalentRate * .70),2,'.',''); $pdf->Cell(162,6,'Weighted Rating for Part I (PR x .70)',1,0,'R',1); $pdf->Cell(28,6,$WeihtedRatingPartOne."%",1,1,'C',1); //PART II $pdf->SetFillColor(0, 0, 0,0); //use for header bgcolor $pdf->SetTextColor(255,255,255,255); $pdf->MultiCell(190,6,'PART II - OUTPUT / ACCOMPLISHMENT (70%)',1,'C',true); $pdf->SetFillColor(255,255,255,90); //use for header bgcolor $pdf->SetTextColor(32,42,32,0); $pdf->Cell(20,6,'4.7 - 5.0',1,0,'C',1); $pdf->MultiCell(170,6,$varA,1,1,'L',1); $y = $pdf->GetY(); $pdf->Cell(20,6,'4.0 - 4.6',1,0,'C',1); $pdf->MultiCell(170,5,$varB,1,'L',1); $y2 = $pdf->GetY(); $pdf->SetY($y); $pdf->MultiCell(20,$y2-$y,'',1,'C',1); $pdf->Cell(20,6,'3.5 - 3.9',1,0,'C',1); $pdf->Cell(170,6,$varC,1,1,'L',1); $pdf->Cell(20,6,'3.0 - 3.4',1,0,'C',1); $pdf->Cell(170,6,$varD,1,1,'L',1); $pdf->Cell(20,6,'2.5 - 2.9',1,0,'C',1); $pdf->Cell(170,6,$varE,1,1,'L',1); $pdf->Cell(20,6,'2.0 - 2.4',1,0,'C',1); $pdf->Cell(170,6,$varF,1,1,'L',1); //PERFORMANCE FACTOR $pdf->MultiCell(1,6,"",0,0,'L',false); //setup row padding (border, padding top,) $pdf->SetFillColor(187,193,186,255); //use for header bgcolor $pdf->SetTextColor(0,0,0,0); $pdf->Cell(12,6,'NO',1,0,'C',true); $pdf->Cell(71 ,6,'PERFORMANCE FACTORS',1,0,'l',true); $pdf->Cell(15,6,'WEIGHT',1,0,'l',true); $pdf->Cell(15,6,'N. RATING',1,0,'l',true); $pdf->Cell(15,6,'W.POINTS',1,0,'l',true); $pdf->Cell(62,6,'REMARKS',1,0,'l',true); //=========================================================== $weightedPointsTotal = 0; $pdf->SetFillColor(255,255,255,255); //use for header bgcolor $pdf->SetTextColor(0,0,0,0); $pdf->MultiCell(1,6,"",0,'L',false); //setup row padding (border, padding top,) $getFac = "SELECT * FROM `performance_factors` WHERE deleted = 0 ORDER BY `factors_order` ASC"; $qFac = mysqli_query($conn,$getFac); while($row=mysqli_fetch_array($qFac)){ $pdf->MultiCell(0,0,"",0,0,'L',false); //setup row padding (border, padding top,) $pdf->Cell(12,6,$row['id'],1,0,'C',true); $pdf->Cell(71,6,$row['factors_name'],1,0,'L',true); $pdf->Cell(15,6,$row['factors_wp'],1,0,'C',true); $code = $row['code_name']; $getDB = "SELECT AVG(`assigned_score`) AS 'assignedScore', assigned_wp,notes FROM `pef_evaluation_behavioral` WHERE `pcp_id`='$pcpIDpdf' AND `factor_code_name`='$code' ORDER BY id ASC"; $qDB = mysqli_query($conn,$getDB); $chBPRow = mysqli_num_rows($qDB); $bWeight = $row['factors_wp']; $numWeight = explode("%",$bWeight); $floatWeight = $numWeight[0]; while($qD = mysqli_fetch_array($qDB)){ $inputValue = $qD['assignedScore']; $weightedPoints = $inputValue * ($floatWeight / 100); $weightedPoints = number_format($weightedPoints,3,'.',''); $Notes = $qD['notes']; $weightedPointsTotal = number_format(($weightedPointsTotal + $weightedPoints),3,'.','') ; } $pdf->Cell(15,6,$inputValue,1,0,'C',true); $pdf->Cell(15,6, $weightedPoints,1,0,'C',true); $pdf->Cell(62,6,$Notes,1,1,'L',true); } $pdf->MultiCell(1,0 ,"",0,1,0,'L',$fill); //setup row padding (border, padding top,) $pdf->SetFillColor(200,200,200); //use for body bgcolor $pdf->Cell(162,6,'Numerical Rating (Sum of Weighted Points)',1,0,'R',1); $pdf->Cell(28,6,$weightedPointsTotal,1,1,'C',1); $percentageEquivalentPart = number_format((($weightedPointsTotal /$nrMaxCount) * 100),2,'.',''); $percentageEquivalentPartTwo = number_format((($weightedPointsTotal /$nrMaxCount) * 100),2,'.','')."%"; $pdf->Cell(162,6,'Percentile Equivalent',1,0,'R',1); $pdf->Cell(28,6,$percentageEquivalentPartTwo,1,1,'C',1); $gPTwo = "SELECT * FROM `gps_adjectival_eq` WHERE $percentageEquivalentPart BETWEEN eq_percentage_from AND eq_percentage_to "; $gpB = mysqli_query($conn,$gPTwo); while($row=mysqli_fetch_array($gpB)){ $pefAdjectivalTwo= $row['eq_adjectival']; } $pdf->Cell(162,6,'Adjectival Equivalent',1,0,'R',1); $pdf->Cell(28,6,$pefAdjectivalTwo,1,1,'C',1); $WeihtedRatingPartTwo = number_format(($percentageEquivalentPart * .30),2,'.',''); $WeihtedRatingPartTwoText = number_format(($percentageEquivalentPart * .30),2,'.','')."%"; $pdf->Cell(162,6,'Weighted Rating for Part II (PR x .30)',1,0,'R',1); $pdf->Cell(28,6,$WeihtedRatingPartTwoText,1,1,'C',1); $percentageEquivalentPartOnetwo = $WeihtedRatingPartTwo + $WeihtedRatingPartOne; $WeihtedRatingPartOneTwo = number_format(($percentageEquivalentPartOnetwo),2,'.','')."%"; $pdf->Cell(162,6,'OVERALL PERFORMANCE (Part I + Part II Weighted Points))',1,0,'R',1); $pdf->Cell(28,6,$WeihtedRatingPartOneTwo,1,1,'C',1); $gPOneTwo = "SELECT * FROM `gps_adjectival_eq` WHERE $percentageEquivalentPartOnetwo BETWEEN eq_percentage_from AND eq_percentage_to "; $gpC = mysqli_query($conn,$gPOneTwo); while($row=mysqli_fetch_array($gpC)){ $pefAdjectivalOneTwo= $row['eq_adjectival']; } $pdf->Cell(162,6,'Adjectival Equivalent',1,0,'R',1); $pdf->Cell(28,6,$pefAdjectivalOneTwo,1,1,'C',1); //PART III $pdf->SetFillColor (255,255,255,255); $pdf->MultiCell(190,30,'',0,'L',1); $pdf->SetFillColor(0, 0, 0,0); //use for header bgcolor $pdf->SetTextColor(255,255,255,255); $pdf->MultiCell(190,6,'PART III - COMMENTS AND RECOMMENDATIONS',0,'C',1); $pdf->SetFont('Arial','',7); $pdf->SetFillColor(255,255,255); //use for body bgcolor $pdf->SetTextColor(0,0,0,0); // $pdf->MultiCell(1,50,"",0,0,'L',false); //setup row padding (border, padding top,) //$pdf->MultiCell(1,6,"",0,1,0,'L',$fill); //setup row padding (border, padding top,) $pdf->MultiCell(190,6,'BY THE RATER',0,'L',1); $pdf->MultiCell(190,6,'1. Ratee\'s Strength / Significant Contributions:',0,'L',1); $pdf->Cell(190,12,$strength,1,1,'L',1); $pdf->MultiCell(190,6,'',0,1,'L',1); $pdf->MultiCell(190,6,'2. Areas for Improvement/Development Needs',0,'L',1); $pdf->Cell(190,12,$improvement,1,1,'L',1); $pdf->MultiCell(190,6,'',0,1,'L',1); $pdf->MultiCell(190,6,'3. Competencies not utilized/maximize in present job:',0,'L',1); $pdf->Cell(190,12,$competency ." (".$competencyNotes.")",1,1,'L',1); $pdf->MultiCell(190,6,'',1,'L',1); $pdf->MultiCell(190,6,'Suitability to present position',0,'L',1); $pdf->Cell(190,12,$suitabilityAndNotes,1,1,'L',1); $pdf->MultiCell(190,6,'',1,'L',1); $pdf->MultiCell(190,6,'5. Potential of the ratee to assume higher position:',0,'L',1); $pdf->Cell(190,12,$PotenNotes,1,1,'L',1); $pdf->MultiCell(190,6,'',1,'L',1); $pdf->MultiCell(190,6,'BY THE RATEE',0,'L',1); $pdf->Cell(190,12,$confirnDataNotes,1,1,'L',1); $pdf->MultiCell(190,6,'',1,'L',1); $pdf->MultiCell(190,6,'BY THE NEXT HIGHER HEAD',0,'L',1); $pdf->Cell(190,12,'XXXX',1,1,'L',1); //PREPARED BY $pdf->SetFillColor(255,255,255); //use for body bgcolor $pdf->SetFont('Arial','B',10); $pdf->MultiCell(1,20,"",0,'L',false); //setup row padding (border, padding top,) $pdf->Cell(100,0,"_____________________________",0,1,'L',false); $pdf->Cell(100,8,$employeeName .' / '. $prfDateX ,0,0,'L',false); $pdf->Output('my_file.php','I'); ?>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0.08 |
proxy
|
phpinfo
|
Settings