$ht = $height/100; } $bmi = number_format(($weight / ( $ht * $ht)), 2); $sql111 = "Select dbirth From opcard where hn='$hn' "; $result111 = Mysql_Query($sql111); list($dbirth) = Mysql_fetch_row($result111); $cAge = calcage($dbirth); $pdf = new SHSPdf('L', 'mm', array( 80, 50)); $pdf->SetThaiFont(); // �絿�� $pdf->SetFont('THSarabun','',14); // ���¡��ҹ������������� $pdf->SetAutoPageBreak(true, 2); $pdf->SetMargins(2, 2); $pdf->AddPage(); $full_text = "HN: $hn, $thidate, $cAge\n"; $full_text .= "VN: $vn, T: $temperature C, P: $pause ����/�ҷ�, R: $rate ����/�ҷ�\n"; $full_text .= "BP: $bp1 / $bp2 mmHg, ��: $weight ��., ��: $height ��.\n"; $full_text .= "������: $cigarette, ����: $alcohol, bmi: $bmi, PS: $painscore\n"; $full_text .= "�ѡɳ�: $type, ��Թԡ: ".(substr($clinic,3))."\n"; $full_text .= "�ä��Шӵ��: ".trim($congenital_disease)."\n"; $full_text .= "�ҡ��: ".trim($organ); $pdf->MultiCell(0, 6, $full_text); $pdf->AutoPrint(true); $pdf->Output(); ?>
$pdf = new SHSPdf('P', 'mm', 'A4'); $pdf->SetThaiFont(); // �絿�� $pdf->SetAutoPageBreak(false, 0); $pdf->SetMargins(30, 19, 20, 25); // left, top, right $pdf->AddPage(); $pdf->SetFont('THSarabun','',16); // ���¡��ҹ������������� $pdf->SetXY(30, 19); $pdf->Image('images/ks_025_2.png', 94, 19, 30, 30, 'PNG'); $pdf->SetXY(30, 39); $pdf->Cell(47, 5, '��� �� ����.��.�/'.to_thai_number($run_number), 1, 1); $pdf->SetXY(145, 39); $pdf->MultiCell(45, 5, '�ç��Һ�Ť�������ѡ��������'."\n".'�ӺžԪ�� ��������ͧ'."\n".'�ѧ��Ѵ�ӻҧ �����', 1, 'L'); $pdf->SetXY(110, 59); $pdf->Cell(0, 5, $thai_date, 1, 1, 'L'); if( $type === 'sso' ){ $title = '����ͧ ���觵�Ǽ������Է����ѡ��Сѹ�آ�Ҿ��ǹ˹�� �ѡ�ҵ��'; }else{ $title = '����ͧ ���Ѻ�ͧ�Է�Լ���Сѹ���ͧ�ç��Һ�Ť�������ѡ��������'; } $pdf->SetXY(30, 69); $pdf->Cell(0, 5, $title, 1, 1); if( $type === 'nhso-lmc' ){ $to = '���¹ ��Թԡ�Ǫ���� L-MC �ӻҧ'; }else{