예제 #1
0
             } else {
                 unset($logo);
             }
         }
         $display_logo = true;
     }
 }
 if ($display_logo) {
     $pdf->Image($logo, 0.5, 0.4, 2.5, 0.9, null, null, 'N', true, 300, null, false, false, 0, true);
 } else {
     //set position for header text, if enabled
     $pdf->SetXY($x + 0.5, $y + 0.4);
 }
 //header
 if ($fax_header != '') {
     $pdf->SetLeftMargin(0.5);
     $pdf->SetFont($pdf_font, "", 10);
     $pdf->Write(0.3, $fax_header);
 }
 //fax, cover sheet
 $pdf->SetTextColor(0, 0, 0);
 $pdf->SetFont($pdf_font, "B", 55);
 $pdf->SetXY($x + 4.55, $y + 0.25);
 $pdf->Cell($x + 3.5, $y + 0.4, $text['label-fax-fax'], 0, 0, 'R', false, null, 0, false, 'T', 'T');
 $pdf->SetFont($pdf_font, "", 12);
 $pdf->SetFontSpacing(0.0425);
 $pdf->SetXY($x + 4.55, $y + 1.0);
 $pdf->Cell($x + 3.5, $y + 0.4, $text['label-fax-cover-sheet'], 0, 0, 'R', false, null, 0, false, 'T', 'T');
 $pdf->SetFontSpacing(0);
 //field labels
 $pdf->SetFont($pdf_font, "B", 12);
예제 #2
0
 function ten_tardiness_second($second_offenders = array())
 {
     $this->load->library('fpdf');
     define('FPDF_FONTPATH', $this->config->item('fonts_path'));
     $this->load->library('fpdi');
     // initiate FPDI
     $pdf = new FPDI('P', 'mm', 'Legal');
     $pdf->SetLeftMargin(20);
     $pdf->SetRightMargin(15);
     // add a page
     $pdf->AddPage();
     // set the sourcefile
     $pdf->setSourceFile('dtr/template/notice2nd.pdf');
     // select the first page
     $tplIdx = $pdf->importPage(1);
     // use the page we imported
     $pdf->useTemplate($tplIdx);
     $offices = Input::get('offices');
     $office_id = $offices[0];
     $m1 = 'Jul';
     $m2 = 'Aug';
     $m3 = 'Sep';
     $m4 = 'Oct';
     $m5 = 'Nov';
     $m6 = 'Dec';
     $mo1 = '07';
     $mo2 = '08';
     $mo3 = '09';
     $mo4 = '10';
     $mo5 = '11';
     $mo6 = '12';
     $pdf->SetFont('Arial', '', '12');
     $pdf->SetXY(155, 50);
     $pdf->Write(0, date('F d, Y'));
     $pdf->SetX(35);
     $pdf->SetFont('Arial', 'B', '');
     $pdf->Cell(0, 6, "HON. EDWARD S. HAGEDORN ", '', 1, 'L', FALSE);
     $pdf->SetFont('Arial', '', '');
     $pdf->SetX(35);
     $pdf->Cell(0, 6, "City Mayor", '', 1, 'L', FALSE);
     $pdf->SetX(35);
     $pdf->Cell(0, 6, "Puerto Princesa City", '', 1, 'L', FALSE);
     $pdf->Cell(0, 6, "", '', 1, 'C', FALSE);
     $pdf->Cell(0, 6, "Thru: ATTY. SHIRLEY R. DAGANTA", '', 1, 'C', FALSE);
     $pdf->Cell(0, 6, "CG Assistant Dept. Head II", '', 1, 'C', FALSE);
     $pdf->Cell(0, 6, "Assistant City Legal Officer II", '', 1, 'C', FALSE);
     $pdf->Ln(12);
     $pdf->SetX(35);
     $pdf->SetFont('Arial', 'B', '');
     $pdf->Write(0, 'Madam:');
     $pdf->SetFont('Arial', '', '');
     $pdf->Ln(6);
     $pdf->SetX(35);
     $pdf->MultiCell(0, 6, "                Please be informed that despite the first notice issued to him/her as per records in this office, it has been observed that the he/she has continuously incurred the following tardiness and undertime, viz:", 0, 'L', false);
     //$pdf->SetX(35);
     //$pdf->Cell(0,6," $number of your employees has incurred the following, viz:",'',0,'L',false);
     $pdf->SetFont('Arial', 'BI', 10);
     $pdf->Ln(2);
     $pdf->SetFillColor(210, 210, 210);
     //$pdf->SetX(20);
     //header
     $pdf->Cell(50, 8, "Name", 'RLTB', 0, 'C', 1);
     $pdf->Cell(20, 4, $m1, '1', 0, 'C', 1);
     $pdf->Cell(20, 4, $m2, '1', 0, 'C', 1);
     $pdf->Cell(20, 4, $m3, '1', 0, 'C', 1);
     $pdf->Cell(20, 4, $m4, '1', 0, 'C', 1);
     $pdf->Cell(20, 4, $m5, '1', 0, 'C', 1);
     $pdf->Cell(20, 4, $m6, '1', 1, 'C', 1);
     $pdf->SetFont('Arial', '', 9);
     $pdf->SetFillColor(240, 240, 240);
     $pdf->Cell(50, 4, "", 'RLB', 0, 'C', false);
     $pdf->Cell(10, 4, "Tardy", '1', 0, 'C', 1);
     $pdf->Cell(10, 4, "UT", '1', 0, 'C', 1);
     $pdf->Cell(10, 4, "Tardy", '1', 0, 'C', 1);
     $pdf->Cell(10, 4, "UT", '1', 0, 'C', 1);
     $pdf->Cell(10, 4, "Tardy", '1', 0, 'C', 1);
     $pdf->Cell(10, 4, "UT", '1', 0, 'C', 1);
     $pdf->Cell(10, 4, "Tardy", '1', 0, 'C', 1);
     $pdf->Cell(10, 4, "UT", '1', 0, 'C', 1);
     $pdf->Cell(10, 4, "Tardy", '1', 0, 'C', 1);
     $pdf->Cell(10, 4, "UT", '1', 0, 'C', 1);
     $pdf->Cell(10, 4, "Tardy", '1', 0, 'C', 1);
     $pdf->Cell(10, 4, "UT", '1', 1, 'C', 1);
     $pdf->SetFillColor(215, 255, 215);
     $year1 = Input::get('year');
     $tardis = $second_offenders;
     if (is_array($tardis)) {
         foreach ($tardis as $tardi) {
             $name = $this->Employee->get_employee_info($tardi, $field = '');
             $late1 = $this->Tardiness->count_late($name['employee_id'], $mo1, $year1, 1, 3);
             $late2 = $this->Tardiness->count_late($name['employee_id'], $mo2, $year1, 1, 3);
             $late3 = $this->Tardiness->count_late($name['employee_id'], $mo3, $year1, 1, 3);
             $late4 = $this->Tardiness->count_late($name['employee_id'], $mo4, $year1, 1, 3);
             $late5 = $this->Tardiness->count_late($name['employee_id'], $mo5, $year1, 1, 3);
             $late6 = $this->Tardiness->count_late($name['employee_id'], $mo6, $year1, 1, 3);
             $under_time1 = $this->Tardiness->count_late($name['employee_id'], $mo1, $year1, 2, 4);
             $under_time2 = $this->Tardiness->count_late($name['employee_id'], $mo2, $year1, 2, 4);
             $under_time3 = $this->Tardiness->count_late($name['employee_id'], $mo3, $year1, 2, 4);
             $under_time4 = $this->Tardiness->count_late($name['employee_id'], $mo4, $year1, 2, 4);
             $under_time5 = $this->Tardiness->count_late($name['employee_id'], $mo5, $year1, 2, 4);
             $under_time6 = $this->Tardiness->count_late($name['employee_id'], $mo6, $year1, 2, 4);
             $late1['tardi_count'] = $this->Tardiness->is_tardy_zero($late1['tardi_count']);
             $late2['tardi_count'] = $this->Tardiness->is_tardy_zero($late2['tardi_count']);
             $late3['tardi_count'] = $this->Tardiness->is_tardy_zero($late3['tardi_count']);
             $late4['tardi_count'] = $this->Tardiness->is_tardy_zero($late4['tardi_count']);
             $late5['tardi_count'] = $this->Tardiness->is_tardy_zero($late5['tardi_count']);
             $late6['tardi_count'] = $this->Tardiness->is_tardy_zero($late6['tardi_count']);
             $under_time1['tardi_count'] = $this->Tardiness->is_tardy_zero($under_time1['tardi_count']);
             $under_time2['tardi_count'] = $this->Tardiness->is_tardy_zero($under_time2['tardi_count']);
             $under_time3['tardi_count'] = $this->Tardiness->is_tardy_zero($under_time3['tardi_count']);
             $under_time4['tardi_count'] = $this->Tardiness->is_tardy_zero($under_time4['tardi_count']);
             $under_time5['tardi_count'] = $this->Tardiness->is_tardy_zero($under_time5['tardi_count']);
             $under_time6['tardi_count'] = $this->Tardiness->is_tardy_zero($under_time6['tardi_count']);
             //start employee tardy
             $pdf->Cell(50, 4, ucwords(strtolower(utf8_decode($name['fname'] . ' ' . $name['mname'] . ' ' . $name['lname']))), 'RLTB', 0, 'L', false);
             $pdf->Cell(10, 4, $late1['tardi_count'], '1', 0, 'C', FALSE);
             $pdf->Cell(10, 4, $under_time1['tardi_count'], '1', 0, 'C', FALSE);
             $pdf->Cell(10, 4, $late2['tardi_count'], '1', 0, 'C', FALSE);
             $pdf->Cell(10, 4, $under_time2['tardi_count'], '1', 0, 'C', FALSE);
             $pdf->Cell(10, 4, $late3['tardi_count'], '1', 0, 'C', FALSE);
             $pdf->Cell(10, 4, $under_time3['tardi_count'], '1', 0, 'C', FALSE);
             $pdf->Cell(10, 4, $late4['tardi_count'], '1', 0, 'C', FALSE);
             $pdf->Cell(10, 4, $under_time4['tardi_count'], '1', 0, 'C', FALSE);
             $pdf->Cell(10, 4, $late5['tardi_count'], '1', 0, 'C', FALSE);
             $pdf->Cell(10, 4, $under_time5['tardi_count'], '1', 0, 'C', FALSE);
             $pdf->Cell(10, 4, $late6['tardi_count'], '1', 0, 'C', FALSE);
             $pdf->Cell(10, 4, $under_time6['tardi_count'], '1', 1, 'C', FALSE);
         }
     }
     $pdf->Cell(50, 4, "", 'RLTB', 0, 'L', FALSE);
     $pdf->Cell(10, 4, "", '1', 0, 'C', FALSE);
     $pdf->Cell(10, 4, "", '1', 0, 'C', FALSE);
     $pdf->Cell(10, 4, "", '1', 0, 'C', FALSE);
     $pdf->Cell(10, 4, "", '1', 0, 'C', FALSE);
     $pdf->Cell(10, 4, "", '1', 0, 'C', FALSE);
     $pdf->Cell(10, 4, "", '1', 0, 'C', FALSE);
     $pdf->Cell(10, 4, "", '1', 0, 'C', FALSE);
     $pdf->Cell(10, 4, "", '1', 0, 'C', FALSE);
     $pdf->Cell(10, 4, "", '1', 0, 'C', FALSE);
     $pdf->Cell(10, 4, "", '1', 0, 'C', FALSE);
     $pdf->Cell(10, 4, "", '1', 0, 'C', FALSE);
     $pdf->Cell(10, 4, "", '1', 1, 'C', FALSE);
     // line break
     $pdf->Ln(5);
     $pdf->SetFont('Arial', '', '12');
     $pdf->SetX(35);
     $pdf->MultiCell(0, 6, "             Section 8, Rule XVII of the Omnibus Rules Implementing Book V of Executive Order No. 292, states that: \n\t\t\t\t   'Officers and employees who have incurred tardiness and undertime, regardless of the number of minutes per day, ten (10) times a month for at least two (2) consecutive months during the year or for at least two (2) months in a semester shall be subject to disciplinary action.'\n\t\t\t\t   Violation of the said rule carries the following penalties:\n\t\t\n\t\t\t\t   1.\tFirst Offense - Reprimand;\n\t\t\t\t   2.\tSecond Offense - Suspension for one (1) day to thirty (30) days; and\n\t\t\t\t   3.\tThird Offense - Dismissal.\n\t\t\n\t\t\t\t   For your appropriate action.\n\t\t", '', 1, 'L', false);
     $pdf->Cell(0, 6, " Very truly yours,              ", 0, 'R', FALSE);
     $pdf->Cell(0, 6, "              ", '', 1, 'R', FALSE);
     $pdf->Cell(0, 6, "               ", '', 1, 'R', FALSE);
     $pdf->SetFont('Arial', 'B', '');
     $pdf->Cell(0, 6, " FELIMON R. SABAS              ", '', 1, 'R', FALSE);
     $pdf->SetFont('Arial', '', '');
     $pdf->Cell(0, 6, " CG Department Head II              ", '', 1, 'R', FALSE);
     $pdf->Cell(0, 6, " (City Personnel Officer)              ", '', 1, 'R', FALSE);
     $pdf->MultiCell(0, 6, "\n\t\tNOTED:\n\t\t\n\t\tBY AUTHORITY OF THE CITY MAYOR:", 0, 'L', FALSE);
     $pdf->SetFont('Arial', 'B', '');
     $pdf->Cell(0, 6, "    ATTY. AGUSTIN M. ROCAMORA", '', 1, 'L', FALSE);
     $pdf->SetFont('Arial', '', '');
     $pdf->Cell(0, 6, "       City Administrator II", '', 1, 'L', FALSE);
     header('Cache-Control: maxage=3600');
     //Adjust maxage appropriately
     header('Pragma: public');
     //If the parameter is D = download F = save as file
     $pdf->Output('dtr/reports/ten_tardiness_second.pdf', 'F');
 }