| 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 : |
<?
require_once "../config/confiteacher.inc.php";
$teach=$objResult["teachcode"];
$teachname=$objResult["name"];
$lastname=$objResult["lastname"];
$grupsarat=$objResult["grupsara"];
?>
<?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);
}
function Header(){
$this->Image('logo1.jpg',9,4,196);
$this->AddFont('angsa','','angsa.php');
$this->SetFont('angsa','',16);
$this->Text(0,0,iconv( 'UTF-8','TIS-620','หน้าที่. '.$this->PageNo()),0,1,"R");
$this->Ln(19);
//$this->Text(112,10,'พ.ค./พ.ย.',0,1,'C');
//$this->Text(129,10,'มิ.ย./ธ.ค.',0,1,'C');
//$this->Text(143,10,'ก.ค./ม.ค.',0,1,'C');
//$this->Text(157,10,'ส.ค./ก.พ.',0,1,'C');
//$this->Text(171,10,'ก.ย./มี.ค.',0,1,'C');
$this->Text(40,25,'รหัสวิชา.'.$_GET[id],0,1,'C');
$this->SetFont('angsa','',10);
$this->Text(194,25,'%เข้าเรียน',0,1,'C');
$this->Text(109.5,25,'1',0,1,'C');
$this->Text(112.5,25,'2',0,1,'C');
$this->Text(115.5,25,'3',0,1,'C');
$this->Text(118.5,25,'4',0,1,'C');
$this->Text(122.0,25,'5',0,1,'C');
$this->Text(125.0,25,'6',0,1,'C');
$this->Text(128.0,25,'7',0,1,'C');
$this->Text(130.5,25,'8',0,1,'C');
$this->Text(133.5,25,'9',0,1,'C');
$this->Text(136.0,25,'10',0,1,'C');
$this->Text(139.5,25,'11',0,1,'C');
$this->Text(142.5,25,'12',0,1,'C');
$this->Text(145.5,25,'13',0,1,'C');
$this->Text(148.5,25,'14',0,1,'C');
$this->Text(151.5,25,'15',0,1,'C');
$this->Text(154.5,25,'16',0,1,'C');
$this->Text(157.5,25,'17',0,1,'C');
$this->Text(160.5,25,'18',0,1,'C');
$this->Text(163.5,25,'19',0,1,'C');
$this->Text(166.5,25,'20',0,1,'C');
$this->Text(169.5,25,'21',0,1,'C');
$this->Text(172.5,25,'22',0,1,'C');
$this->Text(175.5,25,'23',0,1,'C');
$this->Text(178.5,25,'24',0,1,'C');
$this->Text(181.5,25,'25',0,1,'C');
}
function Footer(){
$this->AddFont('angsa','','angsa.php');
$this->SetFont('angsa','',10);
$this->SetY(-5);
$this->Cell(0,0,iconv( 'UTF-8','TIS-620','BY gpa.klws.ac.th.'.$teach),0,1,"L");
$this->Cell(0,0,iconv( 'UTF-8','TIS-620','Create date : '.date("Y-m-d")),0,1,"R");
}
//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)
{
$timesix='ป';
$timecome='ม';
$Username=$eachResult[Username];
$teachin=$eachResult[teachin];
$codin=$eachResult[codin];
$room=$eachResult[room];
$time80=$eachResult[time80];
$timegrade=$eachResult[timegrade];
$timec1=$eachResult[timec1];
$timec2=$eachResult[timec2];
$timec3=$eachResult[timec3];
$timec4=$eachResult[timec4];
$timec5=$eachResult[timec5];
$timec6=$eachResult[timec6];
$timec7=$eachResult[timec7];
$timec8=$eachResult[timec8];
$timec9=$eachResult[timec9];
$timec10=$eachResult[timec10];
$timec11=$eachResult[timec11];
$timec12=$eachResult[timec12];
$timec13=$eachResult[timec13];
$timec14=$eachResult[timec14];
$timec15=$eachResult[timec15];
$timec16=$eachResult[timec16];
$timec17=$eachResult[timec17];
$timec18=$eachResult[timec18];
$timec19=$eachResult[timec19];
$timec20=$eachResult[timec20];
$timec21=$eachResult[timec21];
$timec22=$eachResult[timec22];
$timec23=$eachResult[timec23];
$timec24=$eachResult[timec24];
$timec25=$eachResult[timec25];
$crsql="SELECT ( kabto ) FROM `registeacher`
WHERE codeteach='$_GET[id]' and registeach='$teachin' and yearsxx='$_GET[year]' and kabto!=''" ;
$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
$dcrd = mysql_fetch_array($slr);
$kaball=$dcrd[0];
$crsql="SELECT count( timec1 ) FROM `transcriptintall`
WHERE idstin = '$Username' and codin='$codin' and teachin='$teachin' and timec1 !='1' and yearsx='$_GET[year]' and timec1!=''" ;
$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
$dcrd = mysql_fetch_array($slr);
$ncome1=$dcrd[0];
$crsql="SELECT count( timec2 ) FROM `transcriptintall`
WHERE idstin = '$Username' and codin='$codin' and teachin='$teachin' and timec2 !='1' and yearsx='$_GET[year]' and timec2!=''" ;
$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
$dcrd = mysql_fetch_array($slr);
$ncome2=$dcrd[0];
$crsql="SELECT count( timec3 ) FROM `transcriptintall`
WHERE idstin = '$Username' and codin='$codin' and teachin='$teachin' and timec3 !='1' and yearsx='$_GET[year]' and timec3!=''" ;
$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
$dcrd = mysql_fetch_array($slr);
$ncome3=$dcrd[0];
$crsql="SELECT count( timec4 ) FROM `transcriptintall`
WHERE idstin = '$Username' and codin='$codin' and teachin='$teachin' and timec4 !='1' and yearsx='$_GET[year]' and timec4!=''" ;
$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
$dcrd = mysql_fetch_array($slr);
$ncome4=$dcrd[0];
$crsql="SELECT count( timec5 ) FROM `transcriptintall`
WHERE idstin = '$Username' and codin='$codin' and teachin='$teachin' and timec5 !='1' and yearsx='$_GET[year]' and timec5!=''" ;
$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
$dcrd = mysql_fetch_array($slr);
$ncome5=$dcrd[0];
$crsql="SELECT count( timec6 ) FROM `transcriptintall`
WHERE idstin = '$Username' and codin='$codin' and teachin='$teachin' and timec6 !='1' and yearsx='$_GET[year]' and timec6!=''" ;
$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
$dcrd = mysql_fetch_array($slr);
$ncome6=$dcrd[0];
$crsql="SELECT count( timec7 ) FROM `transcriptintall`
WHERE idstin = '$Username' and codin='$codin' and teachin='$teachin' and timec7 !='1' and yearsx='$_GET[year]' and timec7!=''" ;
$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
$dcrd = mysql_fetch_array($slr);
$ncome7=$dcrd[0];
$crsql="SELECT count( timec8 ) FROM `transcriptintall`
WHERE idstin = '$Username' and codin='$codin' and teachin='$teachin' and timec8 !='1' and yearsx='$_GET[year]' and timec8!=''" ;
$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
$dcrd = mysql_fetch_array($slr);
$ncome8=$dcrd[0];
$crsql="SELECT count( timec9 ) FROM `transcriptintall`
WHERE idstin = '$Username' and codin='$codin' and teachin='$teachin' and timec9 !='1' and yearsx='$_GET[year]' and timec8!=''" ;
$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
$dcrd = mysql_fetch_array($slr);
$ncome9=$dcrd[0];
$crsql="SELECT count( timec10) FROM `transcriptintall`
WHERE idstin = '$Username' and codin='$codin' and teachin='$teachin' and timec10 !='1' and yearsx='$_GET[year]' and timec10!=''" ;
$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
$dcrd = mysql_fetch_array($slr);
$ncome10=$dcrd[0];
$crsql="SELECT count( timec11 ) FROM `transcriptintall`
WHERE idstin = '$Username' and codin='$codin' and teachin='$teachin' and timec11 !='1' and yearsx='$_GET[year]' and timec11!=''" ;
$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
$dcrd = mysql_fetch_array($slr);
$ncome11=$dcrd[0];
$crsql="SELECT count( timec12 ) FROM `transcriptintall`
WHERE idstin = '$Username' and codin='$codin' and teachin='$teachin' and timec12 !='1' and yearsx='$_GET[year]' and timec12!=''" ;
$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
$dcrd = mysql_fetch_array($slr);
$ncome12=$dcrd[0];
$crsql="SELECT count( timec13 ) FROM `transcriptintall`
WHERE idstin = '$Username' and codin='$codin' and teachin='$teachin' and timec13 !='1' and yearsx='$_GET[year]' and timec13!=''" ;
$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
$dcrd = mysql_fetch_array($slr);
$ncome13=$dcrd[0];
$crsql="SELECT count( timec14 ) FROM `transcriptintall`
WHERE idstin = '$Username' and codin='$codin' and teachin='$teachin' and timec14 !='1' and yearsx='$_GET[year]' and timec14!=''" ;
$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
$dcrd = mysql_fetch_array($slr);
$ncome14=$dcrd[0];
$crsql="SELECT count( timec15 ) FROM `transcriptintall`
WHERE idstin = '$Username' and codin='$codin' and teachin='$teachin' and timec15 !='1' and yearsx='$_GET[year]' and timec15!=''" ;
$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
$dcrd = mysql_fetch_array($slr);
$ncome15=$dcrd[0];
$crsql="SELECT count( timec16 ) FROM `transcriptintall`
WHERE idstin = '$Username' and codin='$codin' and teachin='$teachin' and timec16 !='1' and yearsx='$_GET[year]' and timec16!=''" ;
$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
$dcrd = mysql_fetch_array($slr);
$ncome16=$dcrd[0];
$crsql="SELECT count( timec17 ) FROM `transcriptintall`
WHERE idstin = '$Username' and codin='$codin' and teachin='$teachin' and timec17 !='1' and yearsx='$_GET[year]' and timec17!=''" ;
$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
$dcrd = mysql_fetch_array($slr);
$ncome17=$dcrd[0];
$crsql="SELECT count( timec18 ) FROM `transcriptintall`
WHERE idstin = '$Username' and codin='$codin' and teachin='$teachin' and timec18 !='1' and yearsx='$_GET[year]' and timec18!=''" ;
$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
$dcrd = mysql_fetch_array($slr);
$ncome18=$dcrd[0];
$crsql="SELECT count( timec19 ) FROM `transcriptintall`
WHERE idstin = '$Username' and codin='$codin' and teachin='$teachin' and timec19 !='1' and yearsx='$_GET[year]' and timec19!=''" ;
$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
$dcrd = mysql_fetch_array($slr);
$ncome19=$dcrd[0];
$crsql="SELECT count( timec20) FROM `transcriptintall`
WHERE idstin = '$Username' and codin='$codin' and teachin='$teachin' and timec20 !='1' and yearsx='$_GET[year]' and timec20!=''" ;
$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
$dcrd = mysql_fetch_array($slr);
$ncome20=$dcrd[0];
$crsql="SELECT count( timec21) FROM `transcriptintall`
WHERE idstin = '$Username' and codin='$codin' and teachin='$teachin' and timec21 !='1' and yearsx='$_GET[year]' and timec21!=''" ;
$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
$dcrd = mysql_fetch_array($slr);
$ncome21=$dcrd[0];
$crsql="SELECT count( timec22) FROM `transcriptintall`
WHERE idstin = '$Username' and codin='$codin' and teachin='$teachin' and timec22 !='1' and yearsx='$_GET[year]' and timec22!=''" ;
$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
$dcrd = mysql_fetch_array($slr);
$ncome22=$dcrd[0];
$crsql="SELECT count( timec23) FROM `transcriptintall`
WHERE idstin = '$Username' and codin='$codin' and teachin='$teachin' and timec23 !='1' and yearsx='$_GET[year]' and timec23!=''" ;
$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
$dcrd = mysql_fetch_array($slr);
$ncome23=$dcrd[0];
$crsql="SELECT count( timec24) FROM `transcriptintall`
WHERE idstin = '$Username' and codin='$codin' and teachin='$teachin' and timec24 !='1' and yearsx='$_GET[year]' and timec24!=''" ;
$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
$dcrd = mysql_fetch_array($slr);
$ncome24=$dcrd[0];
$crsql="SELECT count( timec25) FROM `transcriptintall`
WHERE idstin = '$Username' and codin='$codin' and teachin='$teachin' and timec25 !='1' and yearsx='$_GET[year]' and timec25!=''" ;
$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
$dcrd = mysql_fetch_array($slr);
$ncome25=$dcrd[0];
$ncomeall=$ncome1+$ncome2+$ncome3+$ncome4+$ncome5+$ncome6+$ncome7+$ncome8+$ncome9+$ncome10+$ncome11+$ncome12+$ncome13+$ncome14+$ncome15+$ncome16+$ncome17+$ncome18+$ncome19+$ncome20+$ncome21+$ncome22+$ncome23+$ncome24+$ncome25;
$come=$timec1+$timec2+$timec3+$timec4+$timec5+$timec6+$timec7+$timec8+$timec9+$timec10+$timec11+$timec12+$timec13+$timec14+$timec15+$timec16+$timec17+$timec18+$timec19+$timec20+$timec21+$timec22+$timec23+$timec24+$timec25;
@$percen=($come/$kaball)*100;
$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,$room,1,0,'C');
$this->Cell(8,6,$eachResult["ordinal"],1,0,'C');
$this->Cell($w2,6,$timec1,1,0,'C');
$this->Cell($w2,6,$timec2,1,0,'C');
$this->Cell($w2,6,$eachResult["timec3"],1,0,'C');
$this->Cell($w2,6,$eachResult["timec4"],1,0,'C');
$this->Cell($w2,6,$eachResult["timec5"],1,0,'C');
$this->Cell($w2,6,$eachResult["timec6"],1,0,'C');
$this->Cell($w2,6,$eachResult["timec7"],1,0,'C');
$this->Cell($w2,6,$eachResult["timec8"],1,0,'C');
$this->Cell($w2,6,$eachResult["timec9"],1,0,'C');
$this->Cell($w2,6,$eachResult["timec10"],1,0,'C');
$this->Cell($w2,6,$eachResult["timec11"],1,0,'C');
$this->Cell($w2,6,$eachResult["timec12"],1,0,'C');
$this->Cell($w2,6,$eachResult["timec13"],1,0,'C');
$this->Cell($w2,6,$eachResult["timec14"],1,0,'C');
$this->Cell($w2,6,$eachResult["timec15"],1,0,'C');
$this->Cell($w2,6,$eachResult["timec16"],1,0,'C');
$this->Cell($w2,6,$eachResult["timec17"],1,0,'C');
$this->Cell($w2,6,$eachResult["timec18"],1,0,'C');
$this->Cell($w2,6,$eachResult["timec19"],1,0,'C');
$this->Cell($w2,6,$eachResult["timec20"],1,0,'C');
$this->Cell($w2,6,$eachResult["timec21"],1,0,'C');
$this->Cell($w2,6,$eachResult["timec22"],1,0,'C');
$this->Cell($w2,6,$eachResult["timec23"],1,0,'C');
$this->Cell($w2,6,$eachResult["timec24"],1,0,'C');
$this->Cell($w2,6,$eachResult["timec25"],1,0,'C');
$this->Cell(5,6,$come,1,0,'C');
$this->Cell(5,6,$ncomeall,1,0,'C');
$this->Cell(5,6,$time80,1,0,'C');
$this->Cell(5,6,$timegrade,1,0,'C');
$this->Ln();
$rang++;
}
}
//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 idstin,codin,teachin,termx,idgrupin,dayin,timec1,timec2,timec3,timec4,timec5,timec6,timec7,timec8,timec9,timec10,timec11,timec12,timec13,timec14,timec15,timec16,timec17,timec18,timec19,timec20,timec21,timec22,timec23,timec24,timec25,time80,timegrade,Username,prefix,Name,surname,cllass,room,ordinal FROM transcriptintall join klw on klw.Username=transcriptintall.idstin WHERE codin = '$_GET[id]' and teachin ='$teach' and yearsx='$_GET[year]' and idgrupin='$_GET[dayin]' order by cllass asc,room+1 asc,ordinal+1 asc";
$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];
$_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;
$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(-0);
$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('logo.jpg',85,7,33);
//$pdf->Ln(35);
//$pdf->FancyTable($header,$resultData);
//$pdf->SetFont('angsana','',18);
//$pdf->Text(65,46,'งานกิจกรรมพัฒนาผู้เรียน โรงเรียนกันทรลักษ์วิทยา',0,1,'C');
//$pdf->Text(90,56,'จังหวัดศรีสะเกษ',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(90,178,'รวมนักเรียนทั้งหมด',0,1,'C');
//$pdf->Text(90,190,'การอนุมัติผลการเรียน',0,1,'C');
//$pdf->Text(80,200,'ลงชื่อ...................................ครูที่ปรึกษากิจกรรมชุมนุม',0,1,'C');
//$pdf->Text(80,210,'ลงชื่อ...................................หัวหน้างานกิจกรรมพัฒนาผู้เรียน',0,1,'C');
//$pdf->Text(80,220,'ลงชื่อ...................................รองผู้อำนวยการฝ่ายบริหารงานวิชาการ',0,1,'C');
//$pdf->Text(80,260,'ลงชื่อ...................................ผู้บริหารสถานศึกษา',0,1,'C');
//$pdf->Text(85,270,'............/.............../..........',0,1,'C');
//$pdf->Text(85,230,'เรียนเสนอเพื่อโปรดพิจารณา',0,1,'C');
//$pdf->Text(90,240,'อนุมัติ',0,1,'C');
//$pdf->Text(130,240,'ไม่อนุมัติ',0,1,'C');
//$pdf->Text(73,65,'แบบประเมินผลกิจกรรมพัฒนาผู้เรียน',0,1,'C');
//$pdf->Cell(0,60,'ชุมนุม'.' '.$_GET[name],0 ,1,'C');
//$pdf->Text(73,85,'ภาคเรียนที่'.' '.$termx,0,1,'C');
//$pdf->Text(103,85,'ปีการศึกษา'.' '.$years,0,1,'C');
//$pdf->Text(40,100,'ครูที่ปรึกษากิจกรรม 1..............................................................................',0,1,'C');
//$pdf->Text(75,110,'2..............................................................................',0,1,'C');
//$pdf->Text(45,156,'ผ',0,1);
//$pdf->Text(45,166,'มผ',0,1);
//$pdf->Image('line.png',40,120,140);
//$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,-100);
//$pdf->Image('linet.png',75,140,-170);
//$pdf->Image('linet.png',90,140,-170);
//$pdf->Image('linet.png',105,140,-170);
//$pdf->Image('linet.png',120,140,-170);
//$pdf->Image('linet.png',135,140,-170);
//$pdf->Image('linet.png',150,120,-85);
/////////////////////////////////////$pdf->Text(64,148,$years,0,1);
//$pdf->Text(63,144,'ม.1',0,1);
//$pdf->Text(64,148,$sum1,0,1);
//$pdf->Text(64,156,$sum1p,0,1);
//$pdf->Text(64,168,$sum1mp,0,1);
//$pdf->Text(81,144,'ม.2',0,1);
//$pdf->Text(81,148,$sum2,0,1);
//$pdf->Text(81,156,$sum2p,0,1);
//$pdf->Text(81,168,$sum2mp,0,1);
//$pdf->Text(95,144,'ม.3',0,1);
//$pdf->Text(97,148,$sum3,0,1);
//$pdf->Text(97,156,$sum3p,0,1);
//$pdf->Text(97,168,$sum3mp,0,1);
//$pdf->Text(108,144,'ม.4',0,1);
//$pdf->Text(111,148,$sum4,0,1);
//$pdf->Text(111,156,$sum4p,0,1);
//$pdf->Text(111,168,$sum4mp,0,1);
//$pdf->Text(124,144,'ม.5',0,1);
//$pdf->Text(127,148,$sum5,0,1);
//$pdf->Text(127,156,$sum5p,0,1);
//$pdf->Text(127,168,$sum5mp,0,1);
//$pdf->Text(138,144,'ม.6',0,1);
//$pdf->Text(141,148,$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/$teach.pdf","F");
?>
PDF Open Click <a href="MyPDF/<? echo $teach; ?>.pdf">here</a> to Open
</body>
</html>