Viewing file:      v_rptRis105.php (5.36 KB)      -rwxr-xr-x Select action/file-type:    (+) |   (+) |   (+) | Code (+) | Session (+) |   (+) | SDB (+) |   (+) |   (+) |   (+) |   (+) |   (+) |
 
<?php define('FPDF_FONTPATH',$this->config->item('path_application').'/font/');
  class PDF extends FPDF {     var $cfgClgLogo;     var $cfgClgName;     var $cfgSiteName;
      //Page header     function Header() {         //Logo         $this->Image($this->cfgClgLogo,10,3,18,15);         //AngsanaNew bold 15         $this->SetFont('AngsanaNew','B',15);         //Move to the right         $this->SetY(7);         $this->SetX(30);         //Title         $this->Cell(0,0,$this->cfgClgName,0,0,'L');         $this->SetX(-10);         $this->SetFontSize(12);         $this->Cell(0,0,'RIS105',0,0,'R');         $this->Ln(7);         $this->SetX(30);         $this->SetFontSize(15);         $this->Cell(0,0,$this->cfgSiteName,0,0,'L');         //Draw line         $this->SetLineWidth(0.4);         $this->Line(10,19,200,19);     }          //Page footer     function Footer()     {         //Position at 3.0 cm from bottom         $this->SetLineWidth(0.4);         $this->Line(10,286,200,286);         //Arial italic 8         $this->SetY(-7);         $this->SetFont('AngsanaNew','',14);         //Page number         $this->Cell(0,0,'หน้า '.$this->PageNo().'/{nb}',0,0,'R');         $this->SetY(-7);         //$this->Cell(10);         $this->Cell(0,0,'วันที่พิมพ์ : '.date("d/m/y H:i"),0,0,'L');     } }
  //Create new pdf file $pdf=new PDF(); $pdf->cfgClgLogo = $this->config->item('rg_upload_picture').$cfgClgLogo; $pdf->cfgClgName = iconv('UTF-8','TIS-620',$cfgClgName); $pdf->cfgSiteName = iconv('UTF-8','TIS-620',$cfgSiteName);
  //Set thai font $pdf->SetThaiFont();
  $pdf->AliasNbPages();
  //Open file $pdf->Open();
  //Disable automatic page break $pdf->SetAutoPageBreak(false);
  //Set initial y axis position per page $y_axis_initial = 65;
  //Set Row Height $row_height = 6;
  //Add first page $pdf->AddPage();
  // find student if ($qu_std->num_rows()) {     $row = $qu_std->row();
  //Title $pdf->SetY(30); $pdf->SetFont('AngsanaNew','B',18); $pdf->Cell(0,0,'ใบขอเทียบโอน/เทียบเท่ารายวิชา',0,0,'C'); $pdf->Ln(7); $pdf->SetFont('AngsanaNew','',16); $pdf->Cell(0,0,'ภาคการศึกษาที่     '.$tmId.'      ปีการศึกษา     '.$acY,0,0,'C'); $pdf->Ln(7); $pdf->Cell(0,0,'รหัสนักศึกษา     '.iconv('UTF-8','TIS-620',$row->stdCode).'      ชื่อ-สกุลนักศึกษา     '.iconv('UTF-8','TIS-620',$row->prefixName.$row->stdName.' '.$row->stdSurname).'      ชั้นปี     '.iconv('UTF-8','TIS-620',$row->stdSyId),0,0,'C'); $pdf->Ln(7); $pdf->Cell(0,0,'หลักสูตร     '.iconv('UTF-8','TIS-620',$row->curName),0,0,'C'); $pdf->Ln(7); $pdf->Rect(10,55,5,5); $pdf->SetX(16); $pdf->Cell(0,0,'เทียบเท่า',0,0,'L'); $pdf->Rect(50,55,5,5); $pdf->SetX(56); $pdf->Cell(0,0,'เทียบโอน',0,0,'L');
  //print column titles for the actual page     $pdf->SetFillColor(232,232,232); $pdf->SetFontSize(14); $pdf->SetY($y_axis_initial); $pdf->Cell(5,6,'ที่',1,0,'C',1); $pdf->Cell(20,6,'รหัสวิชา',1,0,'C',1); $pdf->Cell(40,6,'รายวิชาที่ขอเทียบโอน',1,0,'C',1); $pdf->Cell(15,6,'หน่วยกิต',1,0,'C',1); $pdf->Cell(45,6,'รายวิชาที่ได้รับผลการเรียน',1,0,'C',1); $pdf->Cell(15,6,'หน่วยกิต',1,0,'C',1); $pdf->Cell(25,6,'ระดับผลการเรียน',1,0,'C',1); $pdf->Cell(25,6,'ผลการพิจารณา',1,0,'C',1);
  $y_axis = $y_axis_initial + $row_height;
  $i = 0; while($i < 10) {     $pdf->SetFont('AngsanaNew','',14);     $pdf->SetY($y_axis);     $pdf->Cell(5,6,'',1,0,'L');     $pdf->Cell(20,6,'',1,0,'L');     $pdf->Cell(40,6,'',1,0,'L');     $pdf->Cell(15,6,'',1,0,'L');     $pdf->Cell(45,6,'',1,0,'L');     $pdf->Cell(15,6,'',1,0,'L');     $pdf->Cell(25,6,'',1,0,'L');     $pdf->Cell(25,6,'',1,0,'L');                  //Go to next row     $y_axis = $y_axis + $row_height;     $i++; } //End while
  $pdf->SetY($y_axis); $pdf->Cell(65,6,'รวมหน่วยกิตรายวิชาที่ขอเทียบโอน',0,0,'L'); $pdf->Cell(15,6,'',1,0,'L'); $pdf->Cell(45,6,'รวม',0,0,'R'); $pdf->Cell(15,6,'',1,0,'L'); $pdf->Cell(50,6,'รายวิชา',0,0,'L');
  $y_axis = $y_axis + $row_height;
  $pdf->SetY($y_axis); $pdf->Cell(125,6,'รวม',0,0,'R'); $pdf->Cell(15,6,'',1,0,'L'); $pdf->Cell(50,6,'หน่วยกิต',0,0,'L');
  $y_axis = $y_axis + $row_height + $row_height;
  $pdf->SetY($y_axis); $pdf->Cell(65,6,'ลายมือชื่อนักศึกษา........................................',0,0,'L'); $pdf->Cell(75,6,'ลายมือชื่ออาจารย์ที่ปรึกษา........................................',0,0,'L'); $pdf->Cell(50,6,'กรรมการ1........................................',0,0,'L'); $pdf->Ln(7); $pdf->Cell(65,6,'วันที่........................................',0,0,'L'); $pdf->Cell(75,6,'วันที่........................................',0,0,'L'); $pdf->Cell(50,6,'กรรมการ2........................................',0,0,'L'); $pdf->Ln(7); $pdf->SetX(150); $pdf->Cell(50,6,'กรรมการ3........................................',0,0,'L'); $pdf->Ln(7); $pdf->SetX(150); $pdf->Cell(50,6,'วันที่........................................',0,0,'L'); $pdf->Ln(14); $pdf->Cell(40,4,'เอกสารประกอบการพิจารณา','B',0,'L'); $pdf->Ln(7); $pdf->SetX(15); $pdf->Cell(0,0,'1. ใบรายงานผลการเรียน (Transcript)',0,0,'L'); $pdf->Ln(7); $pdf->SetX(15); $pdf->Cell(0,0,'2. ลักษณะวิชา/คำอธิบายรายวิชาที่เคยได้รับผลการเรียน',0,0,'L'); $pdf->Ln(7); $pdf->Cell(0,0,'* หากผ่านการพิจารณาแล้ว ให้นักศึกษาสำเนาเอกสารไปจ่ายค่าธรรมเนียม เพื่อนำไปแสดงให้',0,0,'L'); $pdf->Ln(7); $pdf->SetX(15); $pdf->Cell(0,0,'งานทะเบียนวัดผลไว้เป็นหลักฐาน',0,0,'L'); $pdf->Ln(7); $pdf->SetX(15); $pdf->Cell(0,0,'งานทะเบียนวัดผลรับทราบและเก็บใบเสร็จไว้เป็นหลักฐานแล้ว',0,0,'L'); $pdf->Ln(14); $pdf->SetX(140); $pdf->Cell(0,0,'นายทะเบียน........................................',0,0,'L'); $pdf->Ln(7); $pdf->SetX(140); $pdf->Cell(0,0,'วันที่........................................',0,0,'L');
  //Create file $pdf->Output();
  } else {     $pdf->SetY(30);     $pdf->SetFont('AngsanaNew','B',18);     $pdf->Cell(0,0,'** ไม่ปรากฏรหัสนักศึกษาดังกล่าว **',0,0,'C');     $pdf->Output(); } $pdf->Output(); ?>
  |