Viewing file:      v_exportFSG.php (6.83 KB)      -rw-r--r-- Select action/file-type:    (+) |   (+) |   (+) | Code (+) | Session (+) |   (+) | SDB (+) |   (+) |   (+) |   (+) |   (+) |   (+) |
 
<?php
  ini_set("memory_limit", '1024M'); define('FPDF_FONTPATH',$this->config->item('path_application').'/font/'); //echo $this->config->item('path_application').'/font/'; exit;  header('Content-Type: text/html; charset=utf-8'); $pdf = new FPDF();
  /*echo json_encode($studen->result()); exit;*/
  if ($studen->num_rows()) {         $college = $college->result();         $qu_pp = $qu_pp->result();         $printDate = explode(" ",a2th(fullDate(splitDateDb2($printDate))));     if($graduateDate == 2){         $dataGraduate = explode(" ",a2th(fullDate(splitDateDb2($graduateDatePicker))));     }     foreach($studen->result() as $res){         /*echo print_r($res);         exit;*/
          $pdf->AddPage();         $pdf->Image($this->config->item('path_application').'/uploads/eregis/picture/logo_pi.jpg',92.5,18,28);         $pdf->Ln(74.5);
          $pdf->AddFont('THSarabunIT9Bold','B','THSarabunIT9Bold.php');         $pdf->AddFont('THSarabunIT9','','THSarabunIT9.php');
          $pdf->SetFont('THSarabunIT9Bold','B',16);         $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620','สถาบันพระบรมราชชนก'),0,1,"C");         $pdf->Ln(9.1);         $pdf->SetFont('THSarabunIT9Bold','B',16);         $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620','หนังสือรับรอง'),0,1,"C");         $pdf->Ln(6.5);         $pdf->SetFont('THSarabunIT9','',16);         $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620','หนังสือสำคัญฉบับนี้ให้ไว้เพื่อแสดงว่า'),0,1,"C");         $pdf->Ln(10.937767);         $pdf->SetFont('THSarabunIT9Bold','B',16);         //print_r($res); exit;         $res->pfName = ($res->pfName=='') ? $res->prefixName : $res->pfName;                  $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620', $res->pfName.''.$res->stdName.' '.$res->stdSurname),0,1,"C");           $pdf->Ln(10.937767);         $pdf->SetFont('THSarabunIT9','',16);         $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620','รหัสประจำตัวนักศึกษา '.$res->stdCode),0,1,"C");         $pdf->Ln(6.5);         $pdf->SetFont('THSarabunIT9','',16);         $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620','เป็นผู้ที่สำเร็จการศึกษาตามหลักสูตร '.$res->edgName.( !$affiliatedTo  ?  '':' สมทบมหาวิทยาลัย'.$affiliatedTo ) ),0,1,"C");         $pdf->Ln(6.5);         $pdf->SetFont('THSarabunIT9','',16);         if($graduateDateY == 2){             $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620','ปีการศึกษา '.$graduateYDatePicker),0,1,"C");         }else{             $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620','ปีการศึกษา '.$res->stdGraduateY),0,1,"C");              }         $pdf->Ln(10.937767);         $pdf->SetFont('THSarabunIT9','',16);         $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',$college[0]->clgName),0,1,"C");         $pdf->Ln(6.5);         $pdf->SetFont('THSarabunIT9','',16);         $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620',$college[0]->FacName.' สถาบันพระบรมราชชนก'),0,1,"C");         $type = array('2','3','4','5');         if(in_array($typeForm,$type)){             $pdf->Ln(6.5);             $pdf->SetFont('THSarabunIT9','',16);             if($typeForm == 2){                 $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620','ซึ่งสภาสถาบันพระบรมราชชนก ได้อนุมัติปริญญาแล้ว'),0,1,"C");             }else if($typeForm == 3){                 $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620','ซึ่งสภาสถาบันพระบรมราชชนก ได้อนุมัติประกาศนียบัตรแล้ว'),0,1,"C");             }else if($typeForm == 4){                 $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620','ซึ่งสภามหาวิทยาลัย'.$academicCollage.' ได้อนุมัติปริญญาแล้ว'),0,1,"C");             }else if($typeForm == 5){                 $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620','ซึ่งสำนักงานปลัดกระทรวง กระทรวงสาธารณสุข ได้อนุมัติให้สำเร็จการศึกษาแล้ว'),0,1,"C");             }         }         $pdf->Ln(8.5);         $pdf->SetFont('THSarabunIT9','',16);         if($graduateDate == 1){             $dataGraduate = explode(" ",a2th(fullDate(splitDateDb2($res->stdGraduateDate))));             $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620','เมื่อวันที่ '.$dataGraduate[0].' เดือน '.$dataGraduate[1].' พ.ศ. '.$dataGraduate[2]),0,1,"C");         }else{             $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620','เมื่อวันที่ '.$dataGraduate[0].' เดือน '.$dataGraduate[1].' พ.ศ. '.$dataGraduate[2]),0,1,"C");         }         $pdf->Ln(6.5);         $pdf->SetFont('THSarabunIT9','',16);         $pdf->Cell(0,0,iconv( 'UTF-8','TIS-620','ให้ไว้ ณ วันที่ '.$printDate[0].' เดือน '.$printDate[1].' พ.ศ. '.$printDate[2]),0,1,"C");         $pdf->Ln(8.5);         $pdf->Ln(8.5);         $pdf->Ln(8.5);         $pdf->Image($this->config->item('path_application').'/uploads/eregis/picture/borderPicture.jpg',37,195,25);         $pdf->SetX(100);         $pdf->Cell(95,0,iconv( 'UTF-8','TIS-620','............................................'),0,1,"C");         $pdf->Ln(5.5);         $pdf->SetX(100);         $pdf->Cell(95,5,'('.iconv('UTF-8','TIS-620',$qu_pp[0]->name).')',0,0,'C');         $pdf->Ln(6.5);         $pdf->SetX(100);         $pdf->Cell(95,5,iconv('UTF-8','TIS-620',!$directorPos ? 'ผู้อำนวยการ'.$college[0]->clgName:$directorPos),0,0,'C');         $pdf->Ln(6.5);         $pdf->SetX(100);         $pdf->Cell(95,5,iconv('UTF-8','TIS-620','นายทะเบียน'),0,0,'C');         $pdf->Ln(23);         $pdf->SetX(29);         $pdf->Cell(95,0,iconv( 'UTF-8','TIS-620','..........................................'),0,1,"L");         $pdf->Ln(3.5);         $pdf->SetX(27);         //$pdf->Cell(95,5,iconv('UTF-8','TIS-620','      ลายมือชื่อนักศึกษา'),0,0,'L');         $pdf->Cell(95,5,iconv('UTF-8','TIS-620','ลายมือชื่อผู้ขอหนังสือรับรอง'),0,0,'L');         }
          $pdf->Output('หนังสือรับรอง.pdf', 'I');
  }else{     ?>     <meta http-equiv="Content-Type" content="text/html; charset=TIS-620" />     <table align="center">         <tr>             <td align="center"><font face="Microsoft Sans Serif" >** ไม่ปรากฏข้อมูล **<br>             <?php echo anchor($this->config->item("rg_folder")."rpt_misc/searchFSG","[ปิดหน้านี้]");?>             </font></td>         </tr>     </table> <?php }
  ?>
  <meta charset="UTF-8"> 
  |