403Webshell
Server IP : 202.29.229.35  /  Your IP : 3.144.231.11
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/connect/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/wwwroot/www.ivecr2.ac.th/stdcard/connect//sqlQuery.php
<?php
	function select($field,$table){
		$sql = "select $field from $table";
		//echo "===>".$sql."<br>";
		$query = mysql_query($sql)  or die (mysql_error());
		return $query;
	}
	function select_where($field,$table,$where){
		$sql = "select $field from $table where $where ";
		//echo "===>".$sql."<br>";
		$query = mysql_query($sql)  or die (mysql_error());
		return $query;
	}
	function insert($table,$values){
		$sql = "insert into $table values ($values)";
	//echo "===>".$sql."<br>";
		$query = mysql_query($sql) or die (mysql_error());
		return $query;
	}	
	function updateAll($table,$set){
		$sql = "update $table set $set ";
		//echo "แก้ไข==> ".$sql."<br>";
		$query = mysql_query($sql) or die (mysql_error());
		return $query;
	}	
	function update($table,$set,$where){
		$sql = "update $table set $set where $where";
		//echo "แก้ไข==> ".$sql."<br>";
		$query = mysql_query($sql) or die (mysql_error());
		return $query;
	}
	
	function delete($table,$where){
		$sql = "delete from $table where $where";
		$query = mysql_query($sql) or die (mysql_error());
		return $query;
	}	
	
	function alert($mes,$url){
		echo '<script>alert("'.$mes.'"); window.location("'.$url.'");</script>';
	}
//----------------- จังหวัด  ------------------------------------------
function provinceName($provincdId){
		$queryProvince = "select * from province where PROVINCE_ID='$provincdId' ";
		//echo "province===".$queryProvince."<br>" ;
		$resultProvince = mysql_query($queryProvince);
		$rsProvince = mysql_fetch_array($resultProvince);
		$stdHouseChangwat = $rsProvince['PROVINCE_NAME']; 
		return $stdHouseChangwat;
	}
	
//----------------- ชื่ออำเภอ  ------------------------------------------
	function amphurName($amphurId){
		$queryAmphur = "select * from amphur where AMPHUR_ID='$amphurId' ";
		$resultAmphur = mysql_query($queryAmphur);
		$rsAmphur = mysql_fetch_array($resultAmphur);
		$stdHouseAmphur = $rsAmphur['AMPHUR_NAME']; 
		return $stdHouseAmphur;
	}
//----------------- ชื่อตำบล  ------------------------------------------
	function districtName($districtId){
		$queryDistrict = "select * from district where DISTRICT_ID='$districtId' ";
		$resultDistrict = mysql_query($queryDistrict);
		$rsDistrict = mysql_fetch_array($resultDistrict);
		$stdHouseDistrict = $rsDistrict['DISTRICT_NAME']; 
		return $stdHouseDistrict;
	}
	
	//----------------- ชื่อสถานศึกษา------------------------------------------
	function schoolOld($schoolOldId){
		$querySchool = "select * from school where SCHOOL_ID='$schoolOldId' ";
		$resultSchool = mysql_query($querySchool);
		$rsSchool = mysql_fetch_array($resultSchool);
		$stdSchoolName = $rsSchool['SCHOOL_NAME']; 
		return $stdSchoolName;
	}
//----------------- สาขาเดิมที่จบ ------------------------------------------
	function stdBranchOld($stdbranchIdOld){
		$sql = "select * from tblbranch_pvch where branchIdAll='$stdbranchIdOld' ";
		echo "===>".$sql."<br>";
		$query=mysql_query($sql) or die (mysql_error());
	}
//----------------- สาขาที่สมัครสมัครเรียน ------------------------------------------
	function stdApplyBranch($stdApplyBranchId){
		$sql = "select * from tblbranch where branchId ='$stdApplyBranchId' ";
		$query=mysql_query($sql) or die (mysql_error());
	}	
	
// ฟังก์ชันคำนวณหาอายุ ปี ค.ศ เก็บแยก
function getAge($year,$month,$day) {
	$then = mktime(1,1,1,$month,$day,$year);
	return(floor((time()-$then)/31556926));
}
	
// ฟังก์ชันแปลงวันเดือนปีเป็นรูปแบบไทยแบบเต็ม
	function displayDateSql($x){
		$thai_m=array("มกราคม", "กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม");
		$date_array=explode("-",$x);
		$y=$date_array[0];
		$m=$date_array[1]-1;
		$d=$date_array[2];

		$m=$thai_m[$m];
		$y=$y+543;

		$displaydate="$d $m $y";
		return $displaydate;
	}    
		
				
// ฟังก์ชันแปลงวันเดือนปีเป็นรูปแบบไทยแบบเต็ม
	function displayDate($x){
		$thai_m=array("มกราคม", "กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม");
		$date_array=explode("/",$x);
		$y=$date_array[2];
		$m=$date_array[1]-1;
		$d=$date_array[0];

		$m=$thai_m[$m];
		$y=$y+543;

		$displaydate="$d $m $y";
		return $displaydate;
	}    
	
// 	ฟังก์ชันแปลงวันเดือนปีเป็นรูปแบบไทยแบบเต็ม เก็บเป็นปี พ.ศ.
	function displayDateThai($x){
		$thai_m=array("มกราคม", "กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม");
		$date_array=explode("/",$x);

		$y=$date_array[2];
		$m=$date_array[1]-1;
		$d=$date_array[0];
		
		$m=$thai_m[$m];
		$y=$y;

		$displaydate="$d $m $y";
		return $displaydate;
	}           
	
	 	
	//-------------------------------------- check ขนาด----------------------------------
	function checkextensionfile($txt,$photo_size){
		if ($txt == "jpg" or $txt == "jpeg") {
			$photo_size /= 1024;  
			return $photo_size;
		}else {  
			echo "<script>alert('!!!ไม่สามารถอัพโหลดรูปได้ สกุลรูปไม่ถูกต้อง');window.history.back()";
			exit();
		}
	}

	//-------------------------------------- check ว่า อัพไฟล์หรือไม่----------------------------------
	function checkfile($txt){
		if (!$txt) {
			echo "<script>alert('!!!คุณไม่ได้อัพโหลดไฟล์รูป'); window.history.back();</script>";
			exit();
		}
	}

	//-------------------------------------- check ว่าขนาดรูปเกินกว่ากำหนดหรือไม่ ---------------------------------
	function checksizefile($txt){
		if ($txt>2400){
				echo "<script>alert('!!!ไม่สามารถอัพโหลดรูปได้ ไฟล์รูปขนาดเกิน 2 Mb');window.history.back();";
			exit();
		}
	}	

function getGroup($branchId,$stdLevel,$stdMajor,$typeOfCourse, $branchId3){
	/*echo "stdLevel**==>".$stdLevel."<br>";
	echo "majorOld**==>".$stdMajor."<br>";
	echo "typeOfCourseOld**==>".$typeOfCourse."<br>";*/
	if($stdLevel=="ม.3"){$stdGroup=1;}
	elseif($stdLevel=="ม.6"){$stdGroup=2;}
	elseif($stdLevel=="ปวช."){
			if($branchId!="210502"){
						if($typeOfCourse=="ช่างอุตสาหกรรม"){
								if($stdMajor=="ช่างก่อสร้าง")
									$stdGroup=3;
								elseif($stdMajor=="สถาปัตยกรรม")
									$stdGroup=4;
								else
									$stdGroup=5;
						}elseif($typeOfCourse=="พณิชยกรรม"){
								if($stdMajor=="การตลาด")
									$stdGroup=6;
								else
									$stdGroup=7;
						}elseif($typeOfCourse=="ศิลปกรรม"){
									$stdGroup=8;
						}elseif($typeOfCourse=="คหกรรม"){ 
							if($branchId3=="402") //อาหารและโภชนา
									$stdGroup=9;
							elseif($branchId3=="406") //คหกรรม
									$stdGroup=10;
						}
			}else{
				$stdGroup=11; //ปวข.เทคนิคคอมพิวเตอร์
			}
	}
		return $stdGroup;
}
	     
?>


Youez - 2016 - github.com/yon3zu
LinuXploit