403Webshell
Server IP : 202.29.229.35  /  Your IP : 18.119.120.88
Web Server : Apache
System : Linux aapanel2 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
User : www ( 1001)
PHP Version : 5.5.38
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /www/wwwroot/www.ivecr2.ac.th/stdcard/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/wwwroot/www.ivecr2.ac.th/stdcard/print_card-0.php
<?php
//echo phpinfo();
$month_show['01']="ม.ค.";
$month_show['02']="ก.พ.";
$month_show['03']="มี.ค.";
$month_show['04']="เม.ย.";
$month_show['05']="พ.ค.";
$month_show['06']="มิ.ย.";
$month_show['07']="ก.ค.";
$month_show['08']="ส.ค.";
$month_show['09']="ก.ย.";
$month_show['10']="ต.ค.";
$month_show['11']="พ.ย.";
$month_show['12']="ธ.ค.";
require('fpdf.php');
require('code39.php');

class PDF extends FPDF
{ //Load data 
					function LoadData($file)
					{           //Read file lines
								$lines=file($file);
								$data=array();
								foreach($lines as $line)
											$data[]=explode(';',chop($line));
								return $data;
					}
} // end class

$pdf=new PDF('P','cm',array(8.5,5.5));  //set ���
		$pdf=new PDF_Code39('P','cm',array(8.5,5.5));
		$pdf->AddPage();
		$pdf->AddFont('angsanab','','angsanab.php');
		$pdf->SetMargins(0,0,0,0);
/*	
$host="localhost";
$user_name="root";
$pass_word="1234";
$db="std_card_db";
*/
$host="localhost";
$user_name="stdcard_db";
$pass_word="Stdcard123";
$db="stdcard_db";

@mysql_connect( $host,$user_name,$pass_word) or die ("can not connect to server");
mysql_query("SET NAMES utf8");
@mysql_select_db($db) or die("can not select database"); 


	$group_id = $_REQUEST['group_id'];
	$student_id = $_REQUEST['student_id'];
	if($group_id=="") {
		if($student_id==""){ 
			echo "กรุณากรอกรหัสกลุ่ม หรือ รหัสนักเรียนนักศึกษา";
			exit();
		}else{
			$sql_std = "select * from tblstd_idcard  where student_id = '$student_id' ";
		}
	}else{
		$sql_std = "select * from tblstd_idcard  where group_id = '$group_id' order by student_id";
	}
/*echo $sql_std ;
echo "group=>".$group_id;
exit();*/
$result1 = mysql_query($sql_std);
while($rs_std = mysql_fetch_array($result1)){
	$student_id = 	$rs_std['student_id'];
	$people_id = 	$rs_std['people_id'];
	$perfix_id = 	$rs_std['perfix_id'];
	$stu_fname = 	$rs_std['stu_fname'];
	$stu_lname = 	$rs_std['stu_lname'];
	$start_year = 	$rs_std['start_year'];
	$schedu_id = 	$rs_std['schedu_id'];
	$group_id = 	$rs_std['group_id'];
	$minor_name = 	$rs_std['minor_name'];
	$card_no = 	$rs_std['card_no'];
	$date_print = 	$rs_std['date_print'];
	$date_expire = 	$rs_std['date_expire'];
	/*	 
	echo 	 "minor==>".$minor_name ;
	echo "<br>==>".utf8_to_tis620($minor_name);
	exit();*/
	if($perfix_id=="002")
			$stdPrefixThai="นาย";
	elseif($perfix_id=="003")
			$stdPrefixThai="นางสาว";
	else
			$stdPrefixThai="";
	
	if(substr($schedu_id,0,1)=="2"){
		$level_show = "ปวช. สาขางาน".$minor_name;	
	}elseif(substr($schedu_id,0,1)=="3"){
		$level_show = "ปวส. สาขางาน".$minor_name;
	}
	/*
	echo "==>".$schedu_id."<br>";
	echo substr($schedu_id,0,1);
	echo $level_show."<br>";
	exit();
	*/
	if(strlen($card_no)==1)
		$card_no_show = "000".$card_no;
	elseif(strlen($card_no)==2)
		$card_no_show = "00".$card_no;
	elseif(strlen($card_no)==3)
		$card_no_show = "0".$card_no;
	elseif(strlen($card_no)==4)
		$card_no_show = $card_no;
		
	$m1 = explode("/",$date_print);
	$m2 = explode("/",$date_expire);
	$date_print_show = $m1[0]." ".$month_show[$m1[1]]." ".$m1[2];
	$date_expire_show = $m2[0]." ".$month_show[$m2[1]]." ".$m2[2];
	
	$str_defaultfilepicname = "00.jpg"; // ให้ไฟล์รูปชื่อ 00.png เป็นรูป Default
    $str_filepicname = $student_id.".jpg"; // ให้ไฟล์รูปชื่อ 01.png เป็นรูปที่ต้องการตรวจสอบ
    $str_imgpath = "photo_std/"; // Path รูป
    $str_imgfullpath = $str_imgpath . $str_filepicname; // นำ Path รูป มาเชื่อมกับ ชื่อรูป
	
    if (file_exists($str_imgfullpath)) // ตรวจสอบว่ามีไฟล์รูปตาม Path ในตัวแปร $str_imgfullpath หรือไม่
       $str_imgfullpath = $str_imgpath . $str_filepicname; // ถ้ามีไฟล์รูปให้ Path ชี้ที่ไฟล์รูปที่ต้องการ                                                  
    else
       $str_imgfullpath = $str_imgpath . $str_defaultfilepicname; // ถ้าไม่มีไฟล์รุปให้ Path ชี้ไปที่ไฟล์รูป Default
	
		$pdf->Image($str_imgfullpath,.25,1.02,2.2,2.6);//pic-std
		$pdf->SetXY(.2,1);
		
		 $pdf->SetThaiFont();
		 $pdf->SetFont('angsanab','',12);
		
		$pdf->SetXY(2.5,1.5);
		$pdf->Cell(5,0,utf8_to_tis620("เลขที่บัตรประชาชน ".$people_id,0,1,'L')); //no.id 13
		$pdf->SetXY(1.1,1.9);
		//$pdf->Cell(5,0,$idcard,0,1,'C'); //no.id 13
		//เลขที่บัตร
		$pdf->SetXY(5.7,1.9);
		$pdf->Cell(5,0,$card_no_show."/".$start_year,0,1,'L'); // no. idcard
		
		//รหัสนักศึกษา
		$pdf->SetXY(3.6,2.2);
		$pdf->Cell(20,0,$student_id,0,0,'L'); //id std
		
		$pdf->SetXY(3.2,2.6);
		$pdf->Cell(5,0,utf8_to_tis620($stdPrefixThai.$stu_fname. "    " . $stu_lname),0,0,'L'); //fname lname
		
		$pdf->SetXY(3.1,3);
		//$pdf->Cell(5,0,utf8_to_tis620($major_name,0,1,'L')); //sebject 
		$pdf->Cell(5,0,utf8_to_tis620($level_show)); //sebject 
	
		$pdf->Image("boss.gif",6.2,2.4,2.2,1.5);//����繵� boss
		
		//bar code
		$pdf->Code39(1.4,4.1,$student_id,0.095,0.65);
		
		 $pdf->SetThaiFont();
		 $pdf->SetFont('angsanab','',12);
		$pdf->Text(3.5,5.3,utf8_to_tis620($date_print_show ."                       ".$date_expire_show));//�ѹ����͡�ѵ�
		$pdf->AddPage();
} // end while
$pdf->Output();
?>

Youez - 2016 - github.com/yon3zu
LinuXploit