b0y-101 Mini Shell


Current Path : E:/www/b-group.old/spfin/application/nu/
File Upload :
Current File : E:/www/b-group.old/spfin/application/nu/print.php

    
<?php
header('Content-Type: text/html; charset=tis620');

function tis2utf8($tis) {
    for ($i = 0; $i < strlen($tis); $i++) {
        $s = substr($tis, $i, 1);
        $val = ord($s);
        if ($val < 0x80) {
            $utf8 .= $s;
        } elseif (( 0xA1 <= $val and $val <= 0xDA ) or ( 0xDF <= $val and $val <= 0xFB )) {
            $unicode = 0x0E00 + $val - 0xA0;
            $utf8 .= chr(0xE0 | ($unicode >> 12));
            $utf8 .= chr(0x80 | (($unicode >> 6) & 0x3F));
            $utf8 .= chr(0x80 | ($unicode & 0x3F));
        }
    }
    return $utf8;
}

function utf8tis620($string) {
    $str = $string;
    $res = "";
    for ($i = 0; $i < strlen($str); $i++) {
        if (ord($str[$i]) == 224) {
            $unicode = ord($str[$i + 2]) & 0x3F;
            $unicode |= ( ord($str[$i + 1]) & 0x3F) << 6;
            $unicode |= ( ord($str[$i]) & 0x0F) << 12;
            $res .= chr($unicode - 0x0E00 + 0xA0);
            $i += 2;
        } else {
            $res .= $str[$i];
        }
    }
    return $res;
}


    //ini_set('display_errors', 'on');
    //error_reporting(E_ALL | E_STRICT);
    ob_start();
     require_once(dirname(__FILE__) . '/html2pdf.class.php');
     
     $html = "";
     $html .= "<h1>".utf8tis620("รายงานผลการประเมิน ข้าราชการ (คะแนน) การปฏิบัติงานเพื่อประกอบการพิจารณาเลื่อนเงินเดือน/ค่าจ้าง")."</h1>";
     $html .= "<P><table class=\"report\" >";
     $html .='<tr>
         <td style="width: 10px;" class="hCol">ลำดับ</td>
         <td style="width: 10px;" class="hCol">ตำแหน่ง เลขที่</td>
         <td style="width: 50px;" class="hCol">ชื่อ-นามสกุล</td>
         <td style="width: 50px;" class="hCol">ชื่อ ตำแหน่ง ในสายงาน</td>
         <td style="width: 50px;" class="hCol">ประเภท ตำแหน่ง</td>
         <td style="width: 50px;" class="hCol">ระดับ ตำแหน่ง</td>
         <td style="width: 10px;" class="hCol">วันสาย</td>
         <td style="width: 10px;" class="hCol">วันลา</td>
         <td style="width: 10px;" class="hCol">คะแนน</td>
         <td style="width: 10px;" class="hCol">คะแนนดิบ</td>
         <td style="width: 10px;" class="hCol">คะแนน ผู้บริหาร</td>
         <td style="width: 10px;" class="hCol">เงินเดือน (1)</td>
         <td style="width: 10px;" class="hCol">ฐานใน การคำนวณ เงินเดือน (2)</td>
         <td style="width: 10px;" class="hCol">เงินเดือนขั้นสูง (5)</td>
         <td style="width: 10px;" class="hCol">ร้อยละ (3)</td>
         <td style="width: 10px;" class="hCol">เลื่อนเงิน เดือน (4) = (2) * (3)</td>
         <td style="width: 10px;" class="hCol">จ่ายจริง (1)+(4)</td>
         <td style="width: 10px;" class="hCol">ค่าตอบแทน</td>
         </tr>';

     $html .='<TR><TD colspan="6" style="width: 220px;" class="dColR">รวมคะแนน : </TD><TD colspan="10" style="width: 5px;" class="dColL">100.25</TD></TR>';
     $html .='<TR><TD colspan="6" style="width: 220px;" class="dColR">วงเงินเลื่อนเงินเดือนร้อยละ 100.25 เป็นเงิน : </TD><TD colspan="10" style="width: 5px;" class="dColL">' . number_format(100.25, 2, ".", ",") . '</TD></TR>';
     $html .='<TR><TD colspan="6" style="width: 220px;" class="dColR">ใช้สำหรับเลื่อนเงินเดือน : </TD><TD colspan="10" style="width: 5px;" class="dColL">' . number_format(100.25, 2, ".", ",") . '</TD></TR>';
     $html .='<TR><TD colspan="6" style="width: 220px;" class="dColR">ใช้สำหรับค่าตอบแทน : </TD><TD colspan="10" style="width: 5px;" class="dColL">' . number_format(100.25, 2, ".", ",") . '</TD></TR>';
     $html .='<TR><TD colspan="6" style="width: 220px;" class="dColR">รวมใช้ไป : </TD><TD colspan="10" style="width: 5px;" class="dColL">' . number_format((100.25), 2, ".", ",") . '</TD></TR>';
     $html .='<TR><TD colspan="6" style="width: 220px;" class="dColR">คงเหลือ : </TD><TD colspan="10" style="width: 5px;" class="dColL">' . number_format(100.25, 2, ".", ",") . '</TD></TR>';

     $html .='</TABLE></P>';
     $html .='<table class="line">';
     $html .='<TR>';
     $html .='<TD style="font-size:16px;font-weight:bold;" class="dColL">หมายเหตุ : ให้ลงลายมือชื่อกำกับทุกหน้า</TD>';
     $html .='</TR>';
     $html .='<TR>';
     $html .='<TD style="height:40px;width: 900px;font-size:18px;font-weight:bold;" class="dColC">ขอรับรองว่าผลการประเมินแต่ละบุคคลถูกต้องตามแบบการประเมินที่เก็บรวบรวมไว้ที่หน่วยงาน และได้ส่งผลการประเมิน(คะแนน)ที่พิมพ์ออกจากระบบจำนวน .............หน้า</TD>';
     $html .='</TR>';
     $html .='</TABLE>';


     $sytyle = '<style type="text/css">
        <!--
        table.report	{
        width: 100%;
        border-spacing: 0px;
        border-padding: 0px;
        border: 1px #000000 solid;
        }
        table.report  td.hCol	{
        background-color: #999999;
        vertical-align:middle;
        font-size: 18px;
        font-weight: bold;
        text-align: center;
        }
        table.report  td.dColC	{
        vertical-align:top;
        font-size: 16px;
        text-align: center;
        border: 1px #eeeeee solid;
        }
        table.report  td.dColL	{
        vertical-align:top;
        font-size: 16px;
        text-align: left;
        border: 1px #eeeeee solid;
        }
        table.report  td.dColR	{
        vertical-align:top;
        font-size: 16px;
        text-align: right;
        border: 1px #eeeeee solid;
        }

        table.line	{
        width: 100%;
        border-spacing: 0px;
        border-padding: 0px;
        }
         table.line  td.hCol	{
        vertical-align:top;
        font-size: 14px;
        font-weight: bold;
        text-align: center;
        }
         table.line  td.dColC	{
        vertical-align:bottom;
        font-size: 14px;
        text-align: center;

        }
         table.line td.dColL	{
        vertical-align:bottom;
        font-size: 14px;
        text-align: left;

        }
        table.line  td.dColR	{
        vertical-align:bottom;
        font-size: 14px;
        text-align: right;

        }

        -->
        </style>';
        $html .= $sytyle;
        $pdf = new HTML2PDF('P', 'A4', 'en');
        $pdf->setDefaultMargins(10, 10, 10, 10);
        $pdf->WriteHTML($html, isset($_GET['vuehtml']));
        $pdf->Output();
        ob_end_flush(); 
        ?>

Copyright © 2019 by b0y-101