| Server IP : 61.19.30.66 / Your IP : 216.73.216.59 Web Server : Apache/2.2.22 (Ubuntu) System : Linux klw 3.11.0-15-generic #25~precise1-Ubuntu SMP Thu Jan 30 17:39:31 UTC 2014 x86_64 User : www-data ( 33) PHP Version : 5.3.10-1ubuntu3.48 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /var/www/gpa/print/ |
Upload File : |
<?php
require('fpdf.php');
define('FPDF_FONTPATH','font/');
class PDF extends FPDF
{
function TextWithDirection($x, $y, $txt, $direction='R')
{
if ($direction=='R')
$s=sprintf('BT %.2F %.2F %.2F %.2F %.2F %.2F Tm (%s) Tj ET',1,0,0,1,$x*$this->k,($this->h-$y)*$this->k,$this->_escape($txt));
elseif ($direction=='L')
$s=sprintf('BT %.2F %.2F %.2F %.2F %.2F %.2F Tm (%s) Tj ET',-1,0,0,-1,$x*$this->k,($this->h-$y)*$this->k,$this->_escape($txt));
elseif ($direction=='U')
$s=sprintf('BT %.2F %.2F %.2F %.2F %.2F %.2F Tm (%s) Tj ET',0,1,-1,0,$x*$this->k,($this->h-$y)*$this->k,$this->_escape($txt));
elseif ($direction=='D')
$s=sprintf('BT %.2F %.2F %.2F %.2F %.2F %.2F Tm (%s) Tj ET',0,-1,1,0,$x*$this->k,($this->h-$y)*$this->k,$this->_escape($txt));
else
$s=sprintf('BT %.2F %.2F Td (%s) Tj ET',$x*$this->k,($this->h-$y)*$this->k,$this->_escape($txt));
if ($this->ColorFlag)
$s='q '.$this->TextColor.' '.$s.' Q';
$this->_out($s);
}
function TextWithRotation($x, $y, $txt, $txt_angle, $font_angle=0)
{
$font_angle+=90+$txt_angle;
$txt_angle*=M_PI/180;
$font_angle*=M_PI/180;
$txt_dx=cos($txt_angle);
$txt_dy=sin($txt_angle);
$font_dx=cos($font_angle);
$font_dy=sin($font_angle);
$s=sprintf('BT %.2F %.2F %.2F %.2F %.2F %.2F Tm (%s) Tj ET',$txt_dx,$txt_dy,$font_dx,$font_dy,$x*$this->k,($this->h-$y)*$this->k,$this->_escape($txt));
if ($this->ColorFlag)
$s='q '.$this->TextColor.' '.$s.' Q';
$this->_out($s);
}
//Load data
function LoadData($file)
{
//Read file lines
$lines=file($file);
$data=array();
foreach($lines as $line)
$data[]=explode(';',chop($line));
return $data;
}
//Simple table
function BasicTable($header,$data)
{
//Header
$w1=array(10,15,50,8,8,8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,5,5);
//Header
for($i=0;$i<count($header);$i++)
$this->Cell($w1[$i],0,$header[$i],1,0,'C');
$this->Ln();
//Data
$w2=3;
$rang=1;
foreach ($data as $eachResult)
{
$this->Cell(10,6,iconv('UTF-8','TIS-620',$rang),1);
$this->Cell(15,6,$eachResult["Username"],1,0,'C');
$this->Cell(50,6,$eachResult["prefix"].$eachResult["Name"].' '.$eachResult["surname"],1,0,'L');
$this->Cell(8,6 ,$eachResult["cllass"],1,0,'C');
$this->Cell(8,6,$eachResult["room"],1,0,'C');
$this->Cell(8,6,$eachResult["ordinal"],1,0,'C');
$this->Cell($w2,6,$eachResult["day"],1,0,'C');
$this->Cell($w2,6,$eachResult["day"],1,0,'C');
$this->Cell($w2,6,$eachResult["day"],1,0,'C');
$this->Cell($w2,6,$eachResult["day"],1,0,'C');
$this->Cell($w2,6,$eachResult["day"],1,0,'C');
$this->Cell($w2,6,$eachResult["day"],1,0,'C');
$this->Cell($w2,6,$eachResult["day"],1,0,'C');
$this->Cell($w2,6,$eachResult["day"],1,0,'C');
$this->Cell($w2,6,$eachResult["day"],1,0,'C');
$this->Cell($w2,6,$eachResult["day"],1,0,'C');
$this->Cell($w2,6,$eachResult["day"],1,0,'C');
$this->Cell($w2,6,$eachResult["day"],1,0,'C');
$this->Cell($w2,6,$eachResult["day"],1,0,'C');
$this->Cell($w2,6,$eachResult["day"],1,0,'C');
$this->Cell($w2,6,$eachResult["day"],1,0,'C');
$this->Cell($w2,6,$eachResult["day"],1,0,'C');
$this->Cell($w2,6,$eachResult["day"],1,0,'C');
$this->Cell($w2,6,$eachResult["day"],1,0,'C');
$this->Cell($w2,6,$eachResult["day"],1,0,'C');
$this->Cell($w2,6,$eachResult["day"],1,0,'C');
$this->Cell($w2,6,$eachResult["day"],1,0,'C');
$this->Cell($w2,6,$eachResult["day"],1,0,'C');
$this->Cell($w2,6,$eachResult["day"],1,0,'C');
$this->Cell($w2,6,$eachResult["day"],1,0,'C');
$this->Cell($w2,6,$eachResult["day"],1,0,'C');
$this->Cell(5,6,$eachResult["day"],1,0,'C');
$this->Cell(5,6,$eachResult["day"],1,0,'C');
$this->Cell(5,6,$eachResult["gradeac"],1,0,'C');
$this->Cell(5,6,$eachResult["day"],1,0,'C');
$this->Ln();
$rang++;
}
}
//Better table
function ImprovedTable($header,$data)
{
//Column widths
$w=array(15,25,25,30,35,25,25);
//Header
for($i=0;$i<count($header);$i++)
$this->Cell($w[$i],7,$header[$i],1,0,'C');
$this->Ln();
//Data
foreach ($data as $eachResult)
{
$this->Cell(15,6,$eachResult["expose_id"],1,0,'C');
$this->Cell(20,6,$eachResult["expose_product"],1,0,'C');
$this->Cell(25,6,$eachResult["expose_number"],1,0,'C');
$this->Cell(30,6 ,$eachResult["expose_name"],1,0,'C');
$this->Cell(35,6,$eachResult["expose_lastname"],1,0,'C');
$this->Cell(25,6,$eachResult["product_code"],1,0,'C');
$this->Cell(25,6,number_format($eachResult["day"],2),1,0,'C');
$this->Ln();
}
//Closure line
$this->Cell(array_sum($w),0,'','T');
}
//Colored table
function FancyTable($header,$data)
{
//Colors, line width and bold font
$this->SetFillColor(255,0,0);
$this->SetTextColor(255);
$this->SetDrawColor(128,0,0);
$this->SetLineWidth(.3);
$this->SetFont('','B');
//Header
$w=array(15,20,25,10,10,10,5,5);
for($i=0;$i<count($header);$i++)
$this->Cell($w[$i],7,$header[$i],1,0,'C',true);
$this->Ln();
//Color and font restoration
$this->SetFillColor(224,235,255);
$this->SetTextColor(0);
$this->SetFont('');
//Data
$fill=false;
foreach($data as $row)
{
$this->Cell($w[0],6,$row[0],'LR',0,'L',$fill);
$this->Cell($w[1],6,$row[1],'LR',0,'L',$fill);
$this->Cell($w[2],6,$row[2],'LR',0,'L',$fill);
$this->Cell($w[3],6,$row[3],'LR',0,'C',$fill);
$this->Cell($w[4],6,number_format($row[4]),'LR',0,'R',$fill);
$this->Cell($w[5],6,number_format($row[5]),'LR',0,'R',$fill);
$this->Ln();
$fill=!$fill;
}
$this->Cell(array_sum($w),0,'','T');
}
}
$pdf=new PDF('P' , 'mm' , 'A4' );
//Column titles
//$header=array('ที่','รหัสนร.','ชื่อ','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','');
//$header=array('','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','');
//Data loading
//*** Load MySQL Data ***//
$objConnect = mysql_connect("localhost","root","klw3322") or die("Error Connect to Database");
$objDB = mysql_select_db("klw");
mysql_query("set NAMES'tis620'");// set อักขระให้เป็น Utf8 เพิ่มตรงนี้เลยครับ รับรองได้ชัวครับ
$strSQL = "SELECT * FROM uploadfile join teacher on teacher.teachcode=uploadfile.upteach WHERE fileID = '$_GET[id]'";
$objQuery = mysql_query($strSQL);
$resultData = array();
for ($i=0;$i<mysql_num_rows($objQuery);$i++) {
$result = mysql_fetch_array($objQuery);
array_push($resultData,$result);
}
$sub=$_GET[id];
$teachcode=$result[upteach];
$teachname=$result[name];
$lastname=$result[lastname];
$grupsara=$result[grupsara];
$xyear=$result[xyear];
$subjectup=$result[subjectup];
$codesu=$result[codesu];
$classup=$result[classup];
$mumber=$result[mumber];
$unitupp=$result[unitupp];
$story=$result[story];
$timel=$result[timel];
$timel=$result[timel];
$quantity=$result[quantity];
$position=$result[position];
$registest=$result[registest];
$reportup=$result[reportup];
$sing=$result[sing];
$check1=$result[check1];
$check2=$result[check2];
$check3=$result[check3];
$check4=$result[check4];
$check5=$result[check5];
$check6=$result[check6];
$check7=$result[check7];
$check8=$result[check8];
$crsql="SELECT namup FROM uploadfileconfig WHERE idupload='$check1'";
$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
$dcrd = mysql_fetch_array($slr);
$check11=$dcrd[0];
$crsql="SELECT namup FROM uploadfileconfig WHERE idupload='$check2'";
$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
$dcrd = mysql_fetch_array($slr);
$check12=$dcrd[0];
$crsql="SELECT namup FROM uploadfileconfig WHERE idupload='$check3'";
$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
$dcrd = mysql_fetch_array($slr);
$check13=$dcrd[0];
$crsql="SELECT namup FROM uploadfileconfig WHERE idupload='$check4'";
$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
$dcrd = mysql_fetch_array($slr);
$check14=$dcrd[0];
$crsql="SELECT namup FROM uploadfileconfig WHERE idupload='$check5'";
$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
$dcrd = mysql_fetch_array($slr);
$check15=$dcrd[0];
$crsql="SELECT namup FROM uploadfileconfig WHERE idupload='$check6'";
$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
$dcrd = mysql_fetch_array($slr);
$check16=$dcrd[0];
$crsql="SELECT namup FROM uploadfileconfig WHERE idupload='$check7'";
$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
$dcrd = mysql_fetch_array($slr);
$check17=$dcrd[0];
$crsql="SELECT namup FROM uploadfileconfig WHERE idupload='$check8'";
$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
$dcrd = mysql_fetch_array($slr);
$check18=$dcrd[0];
$crsql="SELECT namesara FROM groupsara WHERE is_sara='$grupsara'";
$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
$dcrd = mysql_fetch_array($slr);
$namesara=$dcrd[0];
$crsql="SELECT name FROM teacher WHERE teachcode='$registest'";
$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
$dcrd = mysql_fetch_array($slr);
$nameteach=$dcrd[0];
$crsql="SELECT lastname FROM teacher WHERE teachcode='$registest'";
$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
$dcrd = mysql_fetch_array($slr);
$lastnameteach=$dcrd[0];
$crsql="SELECT uploadsent FROM uploadfileseting WHERE idset='$reportup'";
$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
$dcrd = mysql_fetch_array($slr);
$namereport=$dcrd[0];
$part='http://61.19.30.66/gpa/signature/doc_signs/';
$_month_name = array("01"=>"มกราคม", "02"=>"กุมภาพันธ์", "03"=>"มีนาคม",
"04"=>"เมษายน", "05"=>"พฤษภาคม", "06"=>"มิถุนายน",
"07"=>"กรกฎาคม", "08"=>"สิงหาคม", "09"=>"กันยายน",
"10"=>"ตุลาคม", "11"=>"พฤศจิกายน", "12"=>"ธันวาคม");
$vardate=date('Y-m-d');
$yy=date('Y');
$mm =date('m');$dd=date('d');
if ($dd<10){
$dd=substr($dd,1,2);
}
$date=$dd ." ".$_month_name[$mm]." ".$yy+= 543;
$crsql="SELECT (years) FROM config";
$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
$dcrd = mysql_fetch_array($slr);
$years=$dcrd[0];
$crsql="SELECT (termx) FROM config";
$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
$dcrd = mysql_fetch_array($slr);
$termx=$dcrd[0];
$sumall=$sum1+$sum2+$sum3+$sum4+$sum5+$sum6;
//************************//
$pdf->AddFont('angsana','','angsa.php');
$pdf->AddFont('angsana','B','angsab.php');
$pdf->AddFont('angsana','I','angsai.php');
$pdf->AddFont('angsana','BI','angsaz.php');
$pdf->SetFont('angsana','',13);
//*** Table 1 ***//
//$pdf->AddPage();
//$pdf->AddFont('angsana','B','angsab.php');
//$pdf->Image('logo.jpg',80,8,33);
//$pdf->Image('line.png',101,52,83);
//$pdf->Image('line.png',101,62,83);
//$pdf->Image('line.png',101,72,83);
$pdf->SetFont('angsana','',15);
//$pdf->TextWithRotation(188,80,'มา',90,-45);
//$pdf->TextWithRotation(192,80,'ขาด',90,-45);
//$pdf->TextWithRotation(198,80,'ประเมินผล',90,-45);
//$pdf->TextWithRotation(202,80,'ระดับคุณภาพ',90,-45);
//$pdf->Text(102,50,'เดือน',0,1);
//$pdf->Text(102,60,'วันที่',0,1);
//$pdf->Text(102,70,'คาบ',0,1);
//$pdf->Text(102,30,'วิชากิจกรรม'.$_GET[name],0,1);
//$pdf->Text(87,80,'ชั้น',0,1);
//$pdf->Text(94,80,'ห้อง',0,1);
//$pdf->Text(87,80,'ชั้น',0,1);
//$pdf->Text(102,80,'เลขที่',0,1);
$pdf->Text(180,290,$date,0,1);
$pdf->Ln(35);
$pdf->SetFont('angsana','',14);
//$pdf->BasicTable($header,$resultData);
//*** Table 2 ***//
//$pdf->AddPage();
//$pdf->Image('logo.png',80,8,33);
//$pdf->Ln(35);
//$pdf->ImprovedTable($header,$resultData);
//*** Table 3 ***//
$pdf->AddPage();
$pdf->Image('kut.png',20,7,20);
//@$pdf->Image($part.$sing.'.png',130,122,30);
$pdf->Ln(35);
//$pdf->FancyTable($header,$resultData);
$pdf->SetFont('angsana','B',18);
$pdf->Text(20,150,'บันทึกการตรวจ',0,1,'C');
$pdf->Text(90,20,'บันทึกข้อความ',0,1,'C');
$pdf->Text(20,35,'ส่วนราชการ',0,1,'C');
$pdf->Text(50,35,'โรงเรียนกันทรลักษวิทยา',0,1,'C');
$pdf->Text(20,45,'ที่',0,1,'C');
$pdf->Text(50,45,'-',0,1,'C');
$pdf->Text(65,45,'วันที่...........................................',0,1,'C');
$pdf->Text(20,55,'เรื่อง',0,1,'C');
$pdf->Text(20,68,'เรียน',0,1,'C');
//$pdf->Cell(20,55,'เรื่อง'.' '.$_GET[name],0 ,1,'C');
//$pdf->Text(65,128,'สรุปผลการประเมินกิจกรรมพัฒนาผู้เรียน',0,1,'C');
//$pdf->Text(73,138,'จำนวนนักเรียนในแต่ละระดับชั้น',0,1,'C');
//$pdf->Text(160,138,'รวม',0,1,'C');
//$pdf->Text(45,178,'รวม',0,1,'C');
$pdf->SetFont('angsana','',18);
$pdf->Text(35,68,'ผู้อำนวยการโรงเรียนกันทรลักษ์วิทยา',0,1,'C');
$pdf->Text(120,130,'ลงชื่อ...................................ครูผู้สอน',0,1,'C');
$pdf->Text(120,220,'ลงชื่อ...................................ผู้ตรวจ',0,1,'C');
$pdf->Text(25,160,'1.มีตัวชี้วัด/ผลการเรียนรู้',0,1,'C');
$pdf->Text(25,168,'2.มีสาระสำคัญ',0,1,'C');
$pdf->Text(25,174,'3.มีจุดประสงค์การเรียนรู้ KPA',0,1,'C');
$pdf->Text(25,180,'4.มีสาระการเรียนรู้',0,1,'C');
$pdf->Text(25,186,'5.มีการวัดและประเมินผล KPA',0,1,'C');
$pdf->Text(25,192,'6.มีกิจกรรมการเรียนรู้',0,1,'C');
$pdf->Text(25,198,'7.มีสื่อ/แหล่งการเรียนรู้ที่หลากหลาย',0,1,'C');
$pdf->Text(25,204,'8.มีการบูรณาการกับสาระการเรียนรู้อื่น หรือเศรษฐกิจพอเพียง',0,1,'C');
$pdf->Text(25,245,'ความเห็นหัวหน้ากลุ่มสาระฯ',0,1,'C');
$pdf->Text(80,245,'ความเห็นรองผู้อำนวยการโรงเรียน',0,1,'C');
$pdf->Text(145,245,'ความเห็นผู้อำนวยการโรงเรียน',0,1,'C');
$pdf->Text(140,160,'...................',0,1,'C');
$pdf->Text(140,168,'...................',0,1,'C');
$pdf->Text(140,174,'...................',0,1,'C');
$pdf->Text(140,180,'...................',0,1,'C');
$pdf->Text(140,186,'...................',0,1,'C');
$pdf->Text(140,192,'...................',0,1,'C');
$pdf->Text(140,198,'...................',0,1,'C');
$pdf->Text(140,204,'...................',0,1,'C');
$pdf->Text(140,159,$check11,0,1,'C');
$pdf->Text(140,167,$check12,0,1,'C');
$pdf->Text(140,173,$check13,0,1,'C');
$pdf->Text(140,179,$check14,0,1,'C');
$pdf->Text(140,185,$check15,0,1,'C');
$pdf->Text(140,191,$check16,0,1,'C');
$pdf->Text(140,197,$check17,0,1,'C');
$pdf->Text(140,203,$check18,0,1,'C');
$pdf->Text(125,229,$nameteach.' '.$lastnameteach,0,1,'C');
$pdf->Text(35,55,'เสนอ'.$namereport,0,1,'C');
$pdf->Text(25,255,'...............................................',0,1,'C');
$pdf->Text(25,265,'...............................................',0,1,'C');
$pdf->Text(80,255,'....................................................',0,1,'C');
$pdf->Text(80,265,'....................................................',0,1,'C');
$pdf->Text(145,255,'...............................................',0,1,'C');
$pdf->Text(145,265,'...............................................',0,1,'C');
$pdf->Text(125,138,$teachname.' '.$lastname,0,1,'C');
$pdf->Text(120,138,'(......................................................)',0,1,'C');
$pdf->Text(120,230,'(......................................................)',0,1,'C');
$pdf->Text(20,275,'ลงชื่อ..........................................',0,1,'C');
$pdf->Text(25,283,'(...........................................)',0,1,'C');
$pdf->Text(28,290,'............/.............../..........',0,1,'C');
$pdf->Text(80,275,'ลงชื่อ..........................................',0,1,'C');
$pdf->Text(85,283,'(.............................................)',0,1,'C');
$pdf->Text(89,290,'............/.............../..........',0,1,'C');
$pdf->Text(140,275,'ลงชื่อ..........................................',0,1,'C');
$pdf->Text(145,283,'(.............................................)',0,1,'C');
$pdf->Text(149,290,'............/.............../..........',0,1,'C');
//$pdf->Text(40,68,'ผู้อำนวยการโรงเรียนกันทรลักษ์วิทยา',0,1,'C');
//$pdf->Text(80,260,'ลงชื่อ...................................ผู้บริหารสถานศึกษา',0,1,'C');
//$pdf->Text(85,270,'............/.............../..........',0,1,'C');
//$pdf->Text(90,240,'อนุมัติ',0,1,'C');
//$pdf->Text(130,240,'ไม่อนุมัติ',0,1,'C');
$pdf->Text(55,80,'ข้าพเจ้า'.' '.$teachname.' '.$lastname.' ตำแหน่ง'.$position.' กลุ่มสาระการเรียนรู้',0,1,'C');
$pdf->Text(20,87,$namesara.' ภาคเรียนที่ '.$termx.' ปีการศึกษา '.$xyear.' ได้รับผิดชอบสอนวิชา'.$subjectup,0,1,'C');
$pdf->Text(20,95,'รหัสวิชา'.' '.$codesu.' ชั้นมัธยมศึกษาปีที่ '.$classup.' จำนวน '.$mumber.' คาบ/สัปดาห์ ในครั้งนี้ขออนุญาตใช้แผนการจัดการเรียนรู้',0,1,'C');
$pdf->Text(20,103,'หน่วยที่'.' '.$unitupp.' เรื่อง'.$story.' จำนวน '.$timel.' ชั่วโมง จำนวน '.$quantity.' แผน',0,1,'C');
//$pdf->Text(103,85,'ปีการศึกษา'.' '.$years,0,1,'C');
//$pdf->Text(40,100,'ครูที่ปรึกษากิจกรรม 1..............................................................................',0,1,'C');
$pdf->Text(55,115,'จึงเรียนมาเพื่อโปรดทราบและพิจารณา',0,1,'C');
//$pdf->Text(45,156,'ผ',0,1);
//$pdf->Text(45,166,'มผ',0,1);
//$pdf->Image('line.png',20,56,180);
//$pdf->Image('line.png',60,130,90);
//$pdf->Image('line.png',60,140,90);
//$pdf->Image('line.png',40,150,140);
//$pdf->Image('line.png',40,160,140);
//$pdf->Image('line.png',40,170,140);
//$pdf->Image('line.png',40,180,140);
//$pdf->Image('linet.png',40,120,-85);
//$pdf->Image('linet.png',180,120,-85);
//$pdf->Image('linet.png',60,120,-85);
//$pdf->Image('linet.png',75,140,-125);
//$pdf->Image('linet.png',90,140,-125);
//$pdf->Image('linet.png',105,140,-125);
//$pdf->Image('linet.png',120,140,-125);
//$pdf->Image('linet.png',135,140,-125);
//$pdf->Image('linet.png',150,120,-85);
/////////////////////////////////////$pdf->Text(64,148,$years,0,1);
//$pdf->Text(43,140,'การประ',0,1);
//$pdf->Text(43,145,'เมินผล',0,1);
//$pdf->Text(63,145,'ม.1',0,1);
//$pdf->Text(64,178,$sum1,0,1);
//$pdf->Text(64,156,$sum1p,0,1);
//$pdf->Text(64,168,$sum1mp,0,1);
//$pdf->Text(81,145,'ม.2',0,1);
//$pdf->Text(81,178,$sum2,0,1);
//$pdf->Text(81,156,$sum2p,0,1);
//$pdf->Text(81,168,$sum2mp,0,1);
//$pdf->Text(95,145,'ม.3',0,1);
//$pdf->Text(97,178,$sum3,0,1);
//$pdf->Text(97,156,$sum3p,0,1);
//$pdf->Text(97,168,$sum3mp,0,1);
//$pdf->Text(108,145,'ม.4',0,1);
//$pdf->Text(111,178,$sum4,0,1);
//$pdf->Text(111,156,$sum4p,0,1);
//$pdf->Text(111,168,$sum4mp,0,1);
//$pdf->Text(124,145,'ม.5',0,1);
//$pdf->Text(127,178,$sum5,0,1);
//$pdf->Text(127,156,$sum5p,0,1);
//$pdf->Text(127,168,$sum5mp,0,1);
//$pdf->Text(138,145,'ม.6',0,1);
//$pdf->Text(141,178,$sum6,0,1);
//$pdf->Text(141,156,$sum6p,0,1);
//$pdf->Text(141,168,$sum6mp,0,1);
//$sumpall=$sum6p+$sum5p+$sum4p+$sum3p+$sum2p+$sum1p;
//$summpall=$sum6mp+$sum5mp+$sum4mp+$sum3mp+$sum2mp+$sum1mp;
//$pdf->Text(160,156,$sumpall,0,1);
//$pdf->Text(160,168,$summpall,0,1);
//$pdf->Text(160,178,$sumall,0,1);
//$pdf->Image('4.png',80,234,10);
//$pdf->Image('4.png',120,234,10);
$pdf->Output("MyPDF/$teachcode.pdf","F");
?>
PDF Download Click <a href="MyPDF/<? echo $teachcode; ?>.pdf">here</a> to Download
</body>
</html>