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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/wwwroot/www.ivecr2.ac.th/stdShowdata.php
<?php 
session_start();
//error_reporting(0);
//รูปแบบ วัดเดือน ปี เกิด
$today=getdate();
$curday=date("j");
$curmonth=date("n");
$curyear=$today["year"];
$thai_n=array("01"=>"มกราคม","02"=>"กุมภาพันธ์","03"=>"มีนาคม","04"=>"เมษายน","05"=>"พฤษภาคม","06"=>"มิถุนายน","07"=>"กรกฏาคม","08"=>"สิงหาคม","09"=>"กันยายน","10"=>"ตุลาคม","11"=>"พฤศจิกายน","12"=>"ธันวาคม");

$thai_e=array("01"=>"January","02"=>"February","03"=>"March","04"=>"April","05"=>"May","06"=>"June","07"=>"July","08"=>"August","09"=>"September","10"=>"October","11"=>"November","12"=>"December");

$c_month = $thai_n[$curmonth - 1];
$curdate=date("$curyear-$curmonth-$curday");
$cyear=$curyear+543;
$cdate=date("$curday/$curmonth/$cyear");
$datenull=date("0000-00-00");
$thai_day_arr=array("อาทิตย์","จันทร์","อังคาร","พุธ","พฤหัสบดี","ศุกร์","เสาร์");   
$eng_date = strtotime("$curyear-$curmonth-$curday");    
$startyear = 1989;
$endyear =  $curyear+1;
//   ตัวอย่าง การเรียกใช้     $thai_day =  $thai_day_arr[date("w",$eng_dat
?>	
<?php //////////////////////////////////////// ดึงข้อมุลจากตาราง tblstudent//////////////////////////////////////
	

$CardId = $_GET['stdcardID'];//รหัส ปปช.
$stdID = $_GET['stdid'];//รหัส นศ.
$loginstatusad=$_SESSION['status_ori'];


$tecIDlogNumber=$_SESSION['tecNumberNO'];//รหัสประจำตัวครู
$SchoolID=$_SESSION['tecSchoolLog'];//รหัสโรงเรียน

//echo "cardID=>".$CardId;
//echo "<br>stdID=>".$stdID;

$queryStd = select_where("*","student","stdCardID = '$CardId' and student_id = '$stdID' ");
//echo "===>".$queryStd;
$rsStd=mysql_fetch_array($queryStd);
		//$people_id = $rsStd['people_id'];
		$studentID = $rsStd['student_id'];
		$schoolID=$rsStd['school_id'];
		$group_id=$rsStd['group_id'];
		$tecNumber1=$rsStd['tecNumber1'];
		$tecNumber2=$rsStd['tecNumber2'];
		$tecNumber3=$rsStd['tecNumber3'];
		$Longitude =$rsStd['Longitude'];
		$Latitude = $rsStd['Latitude'];
		
		$sqlsc="select * from tbl_school where scID='$schoolID'";
		$resultsc=mysql_query($sqlsc);
		$rssc=mysql_fetch_array($resultsc);
		$SchoolName=$rssc['scName'];//ชื่อหน่วยงาน
		
		$stu_pass = $rsStd['stu_pass'];
		$prefix_id_th = $rsStd['prefix_id_th'];
	/*
		
					if($prefix_id_th == 002){
						$prefixstdori= "นาย";
					}else if($prefix_id_th == 003){
						$prefixstdori= "นางสาว";
					}else if($prefix_id_th == 004){
						$prefixstdori= "นาง";
					}
		*/
					$sqlperStd="select * from ref_prefix_name where PREFIX_NAME_ID=$prefix_id_th";
					$resulperstd=mysql_query($sqlperStd);
					$rsperstd=mysql_fetch_array($resulperstd);
					$prefixstdori=$rsperstd['FULLNAME'];
					
		$stu_fname_th = $rsStd['stu_fname_th'];
		$stu_lname_th = $rsStd['stu_lname_th'];
		$prefix_id_en = $rsStd['prefix_id_en'];
		
		
		
					if($prefix_id_en == 002){
						$prefixstdori_en=  "Mr.";
					}else if($prefix_id_en == 003){
						$prefixstdori_en= "Miss.";
					}else if($prefix_id_en == 004){
						$prefixstdori_en= "Mrs.";
					}
		$endEducation = $rsStd['endEducation'];
				//สถานการศึกษา
				$sqlstatusstd1="select * from tbl_stdstatus where status_id='$endEducation'";
				$resultststd1=mysql_query($sqlstatusstd1);
				$rssta1=mysql_fetch_array($resultststd1);
				 $endEducationOri=$rssta1['status_name'];

		
		$stu_fname_en = $rsStd['stu_fname_en'];
		$stu_lname_en = $rsStd['stu_lname_en'];
		$stu_nickname = $rsStd['stu_nickname'];
		$student_id = $rsStd['student_id'];
		$stdTel = $rsStd['stdTel'];
		$stdEmail = $rsStd['stdEmail'];
		$classyearse=$rsStd['classyear'];//ชั้นปี
		$room=$rsStd['room'];
		$group_id = $rsStd['group_id'];
		$major_name = $rsStd['major_name'];
		$std_apply_no = $rsStd['std_apply_no'];
		$stdApplyNo = $rsStd['stdApplyNo'];
		$stdAdmisResult = $rsStd['stdAdmisResult'];
		$round = $rsStd['round']; 
		$applyBranchId1 = $rsStd['applyBranchId1'];
		
		$birthday_th = $rsStd['birthday_th'];
		$hbdEn = explode("/",$birthday_th);
		//echo "ye==>".$hbdEn[2];
		$month_en = array("January","February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
		$birthday_en= $hbdEn[0]." ".$month_en[($hbdEn[1]-1)]." ".($hbdEn[2]-543);
		$age = $rsStd['stdAge'];
		
		$nation_id = $rsStd['nation_id'];
		$qryNation = select_where("*", "ref_nation", "NATION_ID='$nation_id' ");
		$rsNation = mysql_fetch_array($qryNation);
		$nation_id_show = $rsNation['NATION_NAME_TH'];
		//$nation1_id = $rsStd['nation1_id'];
		
		
		$religion_id = $rsStd['religion_id'];
		$qryReligion = select_where("*", "religion", "religion_id='$religion_id' ");
		$rsReligion = mysql_fetch_array($qryReligion);
		$religion_id_show = $rsReligion['religion_name'];
		
		
		$gender_id = $rsStd['gender_id'];
		$qryGender = select_where("*", "ref_gender", "GENDER_ID='$gender_id' ");
		$rsGender = mysql_fetch_array($qryGender);
		$gender_id_show = $rsGender['GENDER_NAME'];
		
		$std_blgr = $rsStd['std_blgr'];
		//$gender_id = $rsStd['gender_id'];
		$weight = $rsStd['weight'];
		$tall = $rsStd['tall'];
		
		//echo "33333333333==".$bor_tumbol;
		
		//ตำบล อำเภอ จังหวัด สถานที่เกิดของนักเรียน
		$bor_tumbol = $rsStd['bor_tumbol'];
		//echo "tm==".$ho_tumbol ;
		$qryBTum = select_where("*", "tumbol_new", "tumbol_id='$bor_tumbol' ");
		$rsBTum = mysql_fetch_array($qryBTum);
		$bor_post_show = $rsBTum['post'];
		$bor_tumbol_show = $rsBTum['tumbol_name'];
		$bor_amphure = $rsBTum['amphure_id'];
		
		//echo "am==".$ho_amphure ;
		$qryBAmphure = select_where("*", "amphure_new", "amphure_id='$bor_amphure' ");
		$rsBAmphure = mysql_fetch_array($qryBAmphure);
		$bor_amphure_show = $rsBAmphure['amphure_name'];
		$bor_province = $rsBAmphure['province_id'];
		//echo "pr==".$bor_province ;
		$qryBprovince = select_where("*", "province_new", "province_id='$bor_province' ");
		$rsBprovince = mysql_fetch_array($qryBprovince);
			$bor_province_show = $rsBprovince['province_name'];
			$bor_province_en_show = $rsBprovince['province_en'];
		
		
		//$amphur_hbd = $rsStd['amphur_hbd'];
		//$tumbol_hbd = $rsStd['tumbol_hbd'];
		$qty_child = $rsStd['qty_child'];
		$qty_cousin = $rsStd['qty_cousin'];
		$qty_brother = $rsStd['qty_brother'];
		$qty_study_broth = $rsStd['qty_study_broth'];
		
		$congen = $rsStd['congen'];
		$blame = $rsStd['blame'];
		if($congen==""){	$congen_show = "-"; }else{ $congen_show = $congen; }
		if($blame==""){ $blame_show = "-"; }else{ $blame_show = $blame; }
		
		
		$std_expert_id = $rsStd['std_expert_id'];
		$qryAward = select_where("*", "award", "award_id='$std_expert_id' ");
		$rsAward= mysql_fetch_array($qryAward);
		$std_expert_id_show = $rsAward['award_name'];
		
		$cripple_id = $rsStd['cripple_id'];
		
		
		$cars_id = $rsStd['cars_id'];
		$qryCarsType = select_where("*", "cars_type", "cars_id='$cars_id' ");
		$rsCarsType= mysql_fetch_array($qryCarsType);
		$cars_id_show = $rsCarsType['cars_name'];

		$motor_reg = $rsStd['motor_reg'];
		if($motor_reg==""){ 
			$motor_reg_show="-"; 
		}else{ 
			$motor_reg_show=$motor_reg;
		}
		
		$fri_prefix_id = $rsStd['fri_prefix_id'];
		$fri_fname = $rsStd['fri_fname'];
		$fri_lname = $rsStd['fri_lname'];
		$fri_tel = $rsStd['fri_tel'];
		$fri_homeid = $rsStd['fri_homeid'];
		$fri_moo = $rsStd['fri_moo'];
		$fri_soi = $rsStd['fri_soi'];
		$fri_street = $rsStd['fri_street'];
		
		if($fri_street==""){	$fri_street_show = "-"; }else{ $fri_street_show = $fri_street; }
		if($fri_soi==""){ $fri_soi_show = "-"; }else{ $fri_soi_show = $fri_soi; }
		if($home_name==""){ $home_name_show = "-"; }else{ $home_name_show = $home_name; }
		if($fri_moo==""){ $fri_moo_show = "-"; }else{ $fri_moo_show = $fri_moo; }
		if($fri_homeid==""){ $fri_homeid_show = "-"; }else{ $fri_homeid_show = $fri_homeid; }
		
		//ตำบล อำเภอ จังหวัด เพื่อนสนิท
		$fri_tumbol = $rsStd['fri_tumbol'];
		//echo "tm==".$fri_tumbol ;
		$qryFTum = select_where("*", "tumbol_new", "tumbol_id='$fri_tumbol' ");
		$rsFTum = mysql_fetch_array($qryFTum);
			$fri_post_show = $rsFTum['post'];
			$fri_tumbol_show = $rsFTum['tumbol_name'];
			$fri_amphure = $rsFTum['amphure_id'];
		//echo "am==".$fri_amphure ;
		$qryFAmphure = select_where("*", "amphure_new", "amphure_id='$fri_amphure' ");
		$rsFAmphure = mysql_fetch_array($qryFAmphure);
			$fri_amphure_show = $rsFAmphure['amphure_name'];
			$fri_province = $rsFAmphure['province_id'];
		//echo "pr==".$fri_province ;
		$qryFprovince = select_where("*", "province_new", "province_id='$fri_province' ");
		$rsFprovince = mysql_fetch_array($qryFprovince);
			$fri_province_show = $rsFprovince['province_name'];
		
		

		$sch_type_id = $rsStd['sch_type_id'];
		$std_card_old = $rsStd['std_card_old'];
		$level_old = $rsStd['level_old'];
		$branch_old1 = $rsStd['branch_old1'];
		$edu_level_id = $rsStd['edu_level_id'];
//		$edu_old = $rsStd['edu_old'];
		$tran_no = $rsStd['tran_no'];
		$tran = $rsStd['tran'];
		$unit = $rsStd['unit'];
		$gpa = $rsStd['stdGPA'];
		$semester = $rsStd['semester'];
		$years = $rsStd['years'];
		$date_in = $rsStd['date_in'];
		$sele_by_id = $rsStd['sele_by_id'];
		$std_type_id = $rsStd['std_type_id'];
		
		//echo  "////".$level_old;
		
		
		if($tran_no==""){ $tran_no_show = "-"; }else{ $tran_no_show = $tran_no; }
		if($tran==""){	$tran_show = "-"; }else{ $tran_show = $tran; }
		if($unit==""){	$unit_show = "-"; }else{ $unit_show = $unit; }
		if($gpa==""){	$gpa_show = "-"; }else{ $gpa_show = $gpa; }
		
		$fat_prefix_id_th = $rsStd['fat_prefix_id_th'];
		//คำนำหน้าชื่อพ่อ
					$sqlpfat="select * from ref_prefix_name where PREFIX_NAME_ID='$fat_prefix_id_th'";
					$resulpfat=mysql_query($sqlpfat);
					$rspfat=mysql_fetch_array($resulpfat);
					$fat_prefix_id_thori=$rspfat['FULLNAME'];
		
		$fat_fname_th = $rsStd['fat_fname_th'];
		$fat_lname_th = $rsStd['fat_lname_th'];
		$fat_prefix_id_en = $rsStd['fat_prefix_id_en'];
		$fat_fname_en = $rsStd['fat_fname_en'];
		$fat_lname_en = $rsStd['fat_lname_en'];
		
		$fat_occupa = $rsStd['fat_occupa'];
		
		$fat_mar_status = $rsStd['fat_mar_status'];
		$fat_job_place = $rsStd['fat_job_place'];
		$fat_job_position = $rsStd['fat_job_position'];
		$fat_salary = $rsStd['fat_salary'];
		$fat_tel = $rsStd['fat_tel'];
		
		$mot_prefix_id_th = $rsStd['mot_prefix_id_th'];
					//คำนำหน้าชื่อแม่
					$sqlpmot="select * from ref_prefix_name where PREFIX_NAME_ID=$mot_prefix_id_th";
					$resulpmot=mysql_query($sqlpmot);
					$rspmot=mysql_fetch_array($resulpmot);
					$mot_prefix_id_thori=$rspmot['FULLNAME'];
		
		
		$mot_fname_th = $rsStd['mot_fname_th'];
		$mot_lname_th = $rsStd['mot_lname_th'];
		$mot_prefix_id_en = $rsStd['mot_prefix_id_en'];
		$mot_fname_en = $rsStd['mot_fname_en'];
		$mot_lname_en = $rsStd['mot_lname_en'];
		$mot_occupa = $rsStd['mot_occupa'];
		//echo "mocc***=>".$mot_occupa;
		$mot_salary = $rsStd['mot_salary'];
		$mot_job_place = $rsStd['mot_job_place'];
		$mot_job_position = $rsStd['mot_job_position'];
		$mot_tel = $rsStd['mot_tel'];
		$mot_mar_status = $rsStd['mot_mar_status'];
		
		$fat_cripple = $rsStd['fat_cripple'];
		$mot_cripple = $rsStd['mot_cripple'];
		// ข้อมูลทะเบียนบ้าน
		$home_id = $rsStd['home_id'];
		$home_moo = $rsStd['home_moo'];
		$home_name = $rsStd['home_name'];
		$home_soi = $rsStd['home_soi'];
		$home_street = $rsStd['home_street'];
		
		$home_code = $rsStd['home_code'];
		$home_tel = $rsStd['home_tel'];
		
		if($home_street==""){	$home_street_show = "-"; }else{ $home_street_show = $home_street; }
		if($home_soi==""){	$home_soi_show = "-"; }else{ $home_soi_show = $home_soi; }
		if($home_name==""){	$home_name_show = "-"; }else{ $home_name_show = $home_name; }
		if($home_moo==""){	$home_moo_show = "-"; }else{ $home_moo_show = $home_moo; }
		if($home_id=="")	{ $home_id_show = "-"; }else{ $home_id_show = $home_id; }
		
		
		//ตำบล อำเภอ จังหวัด ตามทะเบียนบ้าน
		$ho_tumbol = $rsStd['home_tumbol'];
		//echo "tm==".$ho_tumbol ;
		$qryHTum = select_where("*", "tumbol_new", "tumbol_id='$ho_tumbol' ");
		$rsHTum = mysql_fetch_array($qryHTum);
		$ho_post_show=$rsHTum['post']; //รหัสไปรษณีย์
		$ho_tumbol_show=$rsHTum['tumbol_name'];
		$ho_amphure = $rsHTum['amphure_id'];
		
		//echo "am==".$ho_amphure ;
		$qryHAmphure = select_where("*", "amphure_new", "amphure_id='$ho_amphure' ");
		$rsHAmphure = mysql_fetch_array($qryHAmphure);
		$ho_amphure_show = $rsHAmphure['amphure_name'];
		$ho_province = $rsHAmphure['province_id'];
		//echo "pr==".$ho_province ;
		
		$qryHprovince = select_where("*", "province_new", "province_id='$ho_province' ");
		$rsHprovince = mysql_fetch_array($qryHprovince);
		$ho_province_show = $rsHprovince['province_name'];
		
		// ข้อมูลผู้ปกครอง
		$par_prefix = $rsStd['par_prefix'];
					//คำนำหน้าชื่อผู้ปกครอง
					$sqlppar="select * from ref_prefix_name where PREFIX_NAME_ID=$par_prefix";
					$resulppar=mysql_query($sqlppar);
					$rsppar=mysql_fetch_array($resulppar);
					$par_prefixori=$rsppar['FULLNAME'];
		
		
		$par_fname = $rsStd['par_fname'];
		$par_lname = $rsStd['par_lname'];
		$par_occupa = $rsStd['par_occupa'];
		$par_salary = $rsStd['par_salary'];
		$par_house_id = $rsStd['par_house_id'];
		$par_moo = $rsStd['par_moo'];
		$par_housename = $rsStd['par_housename'];
		$par_soi = $rsStd['par_soi'];
		$par_street = $rsStd['par_street'];
		if($par_street==""){	$par_street_show = "-"; }else{ $par_street_show = $par_street; }
		if($par_soi==""){	$par_soi_show = "-"; }else{ $par_soi_show = $par_soi; }
		if($par_housename==""){	$par_housename_show = "-"; }else{ $par_housename_show = $par_housename; }
		if($par_moo==""){	$par_moo_show = "-"; }else{ $par_moo_show = $par_moo; }
		if($par_house_id==""){	$par_house_id_show = "-"; }else{ $par_house_id_show = $par_house_id; }
		
		
		//ตำบล อำเภอ จังหวัด ของผู้ปกครอง
		$par_tumbol = $rsStd['par_tumbol'];

		$qryPTum = select_where("*", "tumbol_new", "tumbol_id='$par_tumbol' ");
		$rsPTum = mysql_fetch_array($qryPTum);
		$par_post_show=$rsPTum['post']; //รหัสไปรษณีย์
		$par_tumbol_show=$rsPTum['tumbol_name'];// ชื่อตำบล
		$par_amphure = $rsPTum['amphure_id'];
		
		$qryAmphure = select_where("*", "amphure_new", "amphure_id='$par_amphure' ");
		$rsAmphure = mysql_fetch_array($qryAmphure);
		$par_amphure_show=$rsAmphure['amphure_name'];
		$par_province = $rsAmphure['province_id'];
		
		$qryProvince = select_where("*", "province_new", "province_id='$par_province' ");
		$rsProvince = mysql_fetch_array($qryProvince);
		$par_province_show = $rsProvince['province_name'];
		
		$par_tel = $rsStd['par_tel'];
		$par_relation = $rsStd['par_relation'];
		$date_post = $rsStd['date_post'];
		
		
		// รหัสบัตรประชาชน
		$txtID1 = substr($CardId,0,1);
		$txtID2 = substr($CardId,1,4);
		$txtID3 = substr($CardId,5,5);
		$txtID4 = substr($CardId,10,2);
		$txtID5 = substr($CardId,12,1);
		$people_id_show = $txtID1."-".$txtID2."-".$txtID3."-".$txtID4."-".$txtID5;
		// ระดับการศึกษา/สาขาวิชา
		
		$qryBranch = select_where("*","tblbranch"," branchId = '$stdAdmisResult' ");
 		$rsBranch = mysql_fetch_array($qryBranch); 
			$branchId = $rsBranch['branchId'];
			$branch = $rsBranch['branch'];
			$major = $rsBranch['major'];
			$level =  $rsBranch['level'];
			$course =  $rsBranch['course'];
			$typeOfCourse =  $rsBranch['typeOfCourse'];
			if($level =="ปวช.") {
					$courseShow = $level ;
					$classShow = "ปวช.".$rsStd['classyear'];
					$branchShow ="สาขาวิชา  ".$branch;
					$typeOfCourseShow = $typeOfCourse."   สาขาวิชา   ".	$branch;
			}else if($level =="ปวส."){
					$courseShow = $level ." (".$course.")";
					$classShow = "ปวส.".$rsStd['classyear'];
					$branchShow ="สาขางาน".$branch;
					$typeOfCourseShow = $typeOfCourse."    สาขาวิชา   ".	$major."   สาขางาน   ".$branch;
			}else if($level =="ปริญญาตรี"){
					$courseShow = $level ." (".$course.")";
					$classShow = "ปริญญาตรี ปี ".$rsStd['classyear'];
					$branchShow ="สาขางาน".$branch;
					$typeOfCourseShow = $typeOfCourse."    สาขาวิชา   ".	$major."   สาขางาน   ".$branch;
			}
			
			// ชื่อจังหวัดภาษาไทย
			function provinceThShow($provinceId){
				$qryProvince = select_where("*", "province_new", "province_id='$provinceId' ");
				$rsProvince = mysql_fetch_array($qryProvince);
				$province_th_show = $rsProvince['province_name'];
				return $province_th_show ;
			}
			
			// ชื่อจังหวัดภาษาอังกฤษ
			function provinceEnShow($provinceId){
				$qryProvince = select_where("*", "province_new", "province_id='$provinceId' ");
				$rsProvince = mysql_fetch_array($qryProvince);
				$province_en_show = $rsProvince['province_en'];
				return $province_en_show ;
			}
		
	
			// อาชีพ
			function occupShow($occupId){
			$qryOccup = select_where("*", "occup", "occup_id='$occupId' ");
			$rsOccup= mysql_fetch_array($qryOccup);
			$occup_id_show = $rsOccup['occup_name'];
			return $occup_id_show;
		}
		// ความพิการ
		function crippleShow($crippleId){
			$qryCripple = select_where("*", "cripple", "cripple_id='$crippleId' ");
			$rsCripple= mysql_fetch_array($qryCripple);
			$cripple_id_show = $rsCripple['cripple_name'];
			return $cripple_id_show;
		}
		//สถานภาพบิดา มารดา
		function stmarryShow($stmarryId){
			$qryStMarry = select_where("*", "stmarry", "stmarry_id='$stmarryId' ");
			$rsStMarry= mysql_fetch_array($qryStMarry);
			$stmarry_id_show = $rsStMarry['stmarry_name'];
			return $stmarry_id_show;
		}
		// ความสัมพันธ์ของผู้ปกครองกับนักเรียน

		function parrelationShow($parRelation){
			$qryParRelation = select_where("*", "parent_relation", "par_relation='$parRelation' ");
			$rsParRelation= mysql_fetch_array($qryParRelation);
			$par_relation_show = $rsParRelation['par_status'];
			return $par_relation_show;
		}
		
		// ประเภทของนักศึกษา
		function stdtypeShow($stdtypId){
			$qryStdType= select_where("*", "std_type", "std_type_id='$stdtypId' ");
			$rsStdType= mysql_fetch_array($qryStdType);
			$std_type_name_show = $rsStdType['std_type_name'];
			return $std_type_name_show;
		}
		
		// ประเภทการคัดเลือกนักศึกษา
		function selectbyidShow($selectbyId){
			$qrySelectBy= select_where("*", "select_by", "sele_by_id='$selectbyId' ");
			$rsSelectBy= mysql_fetch_array($qrySelectBy);
			$select_by_name_show = $rsSelectBy['sele_by_name'];
			return $select_by_name_show;
		}
		
		// ระดับการศึกษา เดิม
		function edulevelShow($eduId){
			$qryEduLevel= select_where("*", "edu_level", "edu_level_id='$eduId' ");
			$rsEduLevel= mysql_fetch_array($qryEduLevel);
			$edu_level_name_show = $rsEduLevel['edu_name'];
			return $edu_level_name_show;
		}
		
		// วุฒิการศึกษา เดิม
		function eduShow($eduId){
			$qryEduLevel= select_where("*", "edu_level", "edu_level_id='$eduId' ");
			$rsEduLevel= mysql_fetch_array($qryEduLevel);
			$edu_level_name_show = $rsEduLevel['edu_level_name'];
			return $edu_level_name_show;
		}
		
		// ประเภทสถานศึกษา เดิม
		function schooltypeShow($schtypeId){
			$qrySchType= select_where("*", "school_type", "sch_type_id='$schtypeId' ");
			$rsSchType= mysql_fetch_array($qrySchType);
			$sch_type_name_show = $rsSchType['sch_type_name'];
			return $sch_type_name_show;
		}
		
		// ชื่อสถานศึกษา เดิม ภาษาไทย
		function schoolthShow($schoolId){
			$qrySchName= select_where("*", "school_old", "school_id='$schoolId' ");
			$rsSchName= mysql_fetch_array($qrySchName);
			$school_name_show = $rsSchName['school_name'];
			return $school_name_show;
		}
		
		// ชื่อสถานศึกษา เดิม ภาษาไทย
		function schoolenShow($schoolId){
			$qrySchName= select_where("*", "school_old", "school_id='$schoolId' ");
			$rsSchName= mysql_fetch_array($qrySchName);
			$school_name_show = $rsSchName['school_en'];
			return $school_name_show;
		}
		
					//ดึงชื่อรูป นศ.
					$str_defaultfilepicname = "../ivestdcard/photo_std/00.jpg"; // ให้ไฟล์รูปชื่อ 00.png เป็นรูป Default
					$str_filepicname = $rsStd['student_id'].".jpg"; // ให้ไฟล์รูปชื่อ 01.png เป็นรูปที่ต้องการตรวจสอบ
					$str_imgpath = "../stdcard/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
					}
				//ดึงชื่อกลุ่ม ข้อมูลครุที่ปรึกษา
				/*$sqlse="select * from tbl_stdgrouptec where group_id='$group_id' and school_id='$schoolID' ";
				$queryse=mysql_query($sqlse);
				$rsgop=mysql_fetch_array($queryse);
				$tecNumGroup=$rsgop['tecNumber'];//pK techer
				*/
				//ข้อมุลครูที่ปรึกษาคนที่ 1
				$queryper = "select * from  tbl_datatecher1 where tecNumber='$tecNumber1' ";
				$resultper=mysql_query($queryper);
				$rspertec=mysql_fetch_array($resultper); 
				$tecPhoto=$rspertec['tecPhoto'];//รูป
				$tecTel=$rspertec['tecTel'];//โทรศัพท์บ้าน
				$tectelsan=$rspertec['tectelsan'];//โทรศัพมือถือ
				$tecEmail=$rspertec['tecEmail'];//อีเมล์
				$tecPrefixThai=$rspertec['tecPrefixThai'];//คำนำหน้าชื่อ
					//คำนำหน้าชื่อ
					$sqlpf13="select * from ref_prefix_name where PREFIX_NAME_ID=$tecPrefixThai";
					$resulpf13=mysql_query($sqlpf13);
					$rspf13=mysql_fetch_array($resulpf13);
					$tecPrefixThaiori13=$rspf13['FULLNAME'];
					
					$tecLogFname=$tecPrefixThaiori13."&nbsp;".$rspertec['tecFnameThai']."&nbsp;".$rspertec['tecLnameThai'];	
				
				//ข้อมุลครูที่ปรึกษาคนที่ 2
				$queryper2 = "select * from  tbl_datatecher1 where tecNumber='$tecNumber2' ";
				$resultper2=mysql_query($queryper2);
				$rspertec2=mysql_fetch_array($resultper2); 
				$tecPhoto2=$rspertec2['tecPhoto'];//รูป
				$tecTel2=$rspertec2['tecTel'];//โทรศัพท์บ้าน
				$tectelsan2=$rspertec2['tectelsan'];//โทรศัพมือถือ
				$tecEmail2=$rspertec2['tecEmail'];//อีเมล์
				$tecPrefixThai2=$rspertec2['tecPrefixThai'];//คำนำหน้าชื่อ
					//คำนำหน้าชื่อ
					$sqlpf2="select * from ref_prefix_name where PREFIX_NAME_ID=$tecPrefixThai2";
					$resulpf2=mysql_query($sqlpf2);
					$rspf2=mysql_fetch_array($resulpf2);
					$tecPrefixThaiori2=$rspf2['FULLNAME'];
					
					$tecLogFname2=$tecPrefixThaiori2."&nbsp;".$rspertec2['tecFnameThai']."&nbsp;".$rspertec2['tecLnameThai'];			
				
				//ข้อมุลครูที่ปรึกษาคนที่ 3
				$queryper3 = "select * from  tbl_datatecher1 where tecNumber='$tecNumber3' ";
				$resultper3=mysql_query($queryper3);
				$rspertec3=mysql_fetch_array($resultper3); 
				$tecPhoto3=$rspertec3['tecPhoto'];//รูป
				$tecTel3=$rspertec3['tecTel'];//โทรศัพท์บ้าน
				$tectelsan3=$rspertec3['tectelsan'];//โทรศัพมือถือ
				$tecEmail3=$rspertec3['tecEmail'];//อีเมล์
				$tecPrefixThai3=$rspertec3['tecPrefixThai'];//คำนำหน้าชื่อ
					//คำนำหน้าชื่อ
					$sqlpf3="select * from ref_prefix_name where PREFIX_NAME_ID=$tecPrefixThai3";
					$resulpf3=mysql_query($sqlpf3);
					$rspf3=mysql_fetch_array($resulpf3);
					$tecPrefixThaiori3=$rspf3['FULLNAME'];
					
					$tecLogFname3=$tecPrefixThaiori3."&nbsp;".$rspertec3['tecFnameThai']."&nbsp;".$rspertec3['tecLnameThai'];
				
					//ดึงชื่อสถานศึกษา
					$sqlSC="select * from tbl_school where scID='$sclID'";	
					$resultSC=mysql_query($sqlSC);
					$rsSC=mysql_fetch_array($resultSC);
					$schooname=$rsSC['scName'];
					
					//$sqlsestd="select * from student where group_id='$groupse' ";
					//$resultstdse=mysql_query($sqlsestd);
					//$rsstdse=mysql_fetch_array($resultstdse);
										
					$qryBranch = "select * from tblbranch where branchId = '$stdAdmisResult' ";
					//echo "******".$qryBranch;
					$queryBranch=mysql_query($qryBranch);
 					$rsBranch = mysql_fetch_array($queryBranch); 
					$level =  $rsBranch['level'];
					$branch = $rsBranch['branch'];
					$major = $rsBranch['major'];
					$course =  $rsBranch['course'];
					$typeOfCourse =  $rsBranch['typeOfCourse'];
					if($level =="ปวช.") {
							$courseShow = $level ;
							$classShow = "ปวช.".$rsStd['classyear'];
							$branchShow ="สาขาวิชา  ".$branch;
							$typeOfCourseShow = $typeOfCourse."   สาขาวิชา   ".	$branch;
					}else if($level =="ปวส."){
							$courseShow = $level ." (".$course.")";
							$classShow = "ปวส.".$rsStd['classyear'];
							$branchShow ="สาขางาน".$branch;
							$typeOfCourseShow = $typeOfCourse."    สาขาวิชา   ".	$major."   สาขางาน   ".$branch;
					}else if($level =="ปริญญาตรี"){
							$courseShow = "นักศึกษา".$level ." (".$course.") ระดับชั้นปี ".$classyearse." กลุ่ม ".$room;
							//$classShow = "ปริญญาตรี ปี ".$rsStd['classyear'];
							$branchShow ="สาขางาน".$branch;
							$typeOfCourseShow = $typeOfCourse."    สาขาวิชา   ".	$major."   สาขางาน   ".$branch;
					}
					
					

	//แสดงข้อมูลปีการศึกษา ปัจจุบัน
			$sqlsemes=mysql_query("select  max(semes) as semesori from tbl_semester");
			$rssemes=mysql_fetch_array($sqlsemes);
			$semesterori1=$rssemes['semesori'];//ปีการศึกษาปัจจุบัน
			
			
			$groupID=$group_id;//รัหส กลุ่ม นศ.
			$scID=$schoolID;//รหัสสถานศึกษา
			$subGroup=substr($groupID,0,2);
			$subGroup1=$subGroup + 1;
			
			$sqlsemesorishow="select * from tbl_semester where subYear >= '$subGroup' and subYear <= '$subGroup1' order by seID asc";
			$resultshow2=mysql_query($sqlsemesorishow);
			//echo "=>".$sqlsemesori;
			while($rssemesorishow=mysql_fetch_array($resultshow2)){
			$semestershow1=$rssemesorishow['semes'];//ปีการศึกษา
			}
?>

    <script src="js/jQuery-2.1.4.min.js"></script>
	<!-- Color box -->
	<script src="js/jquery.colorbox.js"></script>
    <!---»ÃѺ¤ÇÒÁ¡ÇéÒ§ ¤ÇÒÁÊا¢Í§ windowsBox--->
	<script>
		$(document).ready(function(){
			//Examples of how to assign the Colorbox event to elements
			$(".lightwindow").colorbox({iframe:true, width:"80%", height:"80%"});
		});
	</script>
	<link href="css/css-colorbox.css" rel="stylesheet" type="text/css" />
<style>
body {
  font-family: Arial, sans-serif;
  background-size: cover;
  height:100vh;
}

h1 {
  text-align: center;
  font-family: Tahoma, Arial, sans-serif;
  color: #06D85F;
  margin: 80px 0;
}

.box {
  width: 80%;
  margin: 0 auto;
  background: rgba(255,255,255,0.2);
  padding: 35px;
  border: 2px solid #fff;
  border-radius: 10px/10px;
  background-clip: padding-box;
  text-align: center;
}

.button {
  font-size: 1em;
  padding: 10px;
  color:;
  border: 1px solid #CCC;
  line-height:inherit;
  border-radius: 5px/5px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.0s ease-out;
}
.button:hover {
  background: ;
}

.overlay {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  transition: opacity 500ms;
  visibility: hidden;
  opacity: 0;
}
.overlay:target {
  visibility: visible;
  opacity: 1;
}

.popup {
  margin: 70px auto;
  padding: 20px;
  background: #fff;
  border-radius: 5px;
  width:80%;
  position: relative;
  transition: all 0s ease-in-out;
}

.popup h2 {
  margin-top: 0;
  color: #333;
  font-family: Tahoma, Arial, sans-serif;
}
.popup .close {
  position: absolute;
  top: 20px;
  right: 30px;
  transition: all 200ms;
  font-size: 30px;
  font-weight: bold;
  text-decoration: none;
  color: #333;
}
.popup .close:hover {
  color: #06D85F;
}
.popup .content {
  max-height: 100%;
  overflow: auto;
}

@media screen and (max-width: 700px){
  .box{
    width: 80%;
  }
  .popup{
    width: 80%;
  }
}
</style>
<table width="725" border="0" cellspacing="0" cellpadding="5">
  <tr>
    <td colspan="2" align="left" valign="top"><img src="images/titleTecHomroom.png" width="725" height="51" /></td>
  </tr>
  <tr>
    <td colspan="2" align="right" valign="top">
    <?php
    if($loginstatusad==1){
	echo '<a href="?i=showStd&btst=ad"><img src="images/icon/retour.png" width="25" height="25" />ย้อนกลับ</a>';
}else{
	echo '<a href="?i=showstdByTec&tecNumber='.$tecIDlogNumber.'&schoolID='.$SchoolID.'"><img src="images/icon/retour.png" width="25" height="25" />ย้อนกลับ</a>';
}?>
    </td>
  </tr>
  <tr>
    <td colspan="2" align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="10">
        <tr>
          <td width="25%" align="center" valign="bottom"><a href="http://www.v-cop.net" target="_blank"><img src="images/office.png" width="50" height="50" /></a><br /></td>
          <td width="15%" align="center" valign="bottom"><a href="https://www.google.com/maps/dir/<?php if($Longitude !="" && $Latitude != ""){ echo "14.801387,100.620443/".$Longitude.",".$Latitude; }else{ echo "14.801387,100.620443"; }?>" target="_blank"><img src="images/map.png" width="50" height="29" /></a></td>
          <td width="19%" align="center" valign="bottom"><img src="images/isc_1b.png" width="32" height="32" /><br /></td>
          <td width="16%" align="center" valign="bottom"><!--<a href="showGradestudent.php?studentid=<?php echo $studentID;?>" target="_blank"></a>--><img src="images/5.png" width="32" height="32" /></td>
          <td width="15%" align="center" valign="bottom"><!--<a href="stdShowstuding.php?stdid=<?php echo $studentID;?>&stdcardID=<?php echo $CardId;?>&btst=ad&semester=<?php echo $semestershow1;?>&groID=<?php echo $groupID; ?>&scID=<?php echo $scID; ?>&seestatus=1" target="_blank"></a>--><img src="images/sms_std01.png" width="32" height="32" /></td>
          <td width="10%" align="center" valign="bottom">&nbsp;</td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td colspan="2" align="left" valign="top">
    
    <!-----------ข้อมูลทั่วไป----------->
    <!--
<a class="button" href="#popup3">
ข้อมูลนักศึกษา</a>-->
<a class="button" href="http://www.v-cop.net" target="_blank">
ค้นหาสถานประกอบการ V-COP</a>
<div id="popup3" class="overlay">
	<div class="popup">
		<h2>ข้อมูลนักศึกษา</h2>
		<a class="close" href="#">&times;</a>
		<div class="content">
        
       <table width="100%" border="0" cellspacing="0" cellpadding="5">
                  <tr>
                    <td width="30%" align="left" valign="top">&nbsp;</td>
                    <td width="70%" align="left" valign="top"><img src="<?php echo $str_imgfullpath;?>" alt="" height="" width="100"  style="border:1px solid #CCCCCC; padding:1px"/></td>
                  </tr>
                  <tr>
                    <td width="30%" align="left" valign="top">รหัสบัตรประจำตัวประชาชน :</td>
                    <td width="70%" align="left" valign="top"><?php echo $people_id_show ;?></td>
                  </tr>
                  <tr>
                    <td width="30%" align="left" valign="top">รหัสนักศึกษา :</td>
                    <td width="70%" align="left" valign="top"><?php echo $studentID;?></td>
                  </tr>
                  <tr>
                    <td width="30%" align="left" valign="top">ชื่อ นามสกุล :</td>
                    <td width="70%" align="left" valign="top"><?php echo  $prefixstdori.$stu_fname_th;?> &nbsp;&nbsp;<?php echo  "$stu_lname_th";?>&nbsp;</td>
                  </tr>
                  <tr>
                    <td width="30%" align="left" valign="top">ชื่อเล่น :</td>
                    <td width="70%" align="left" valign="top"><?php echo  "$stu_nickname";?></td>
                  </tr>
                  <tr>
                    <td width="30%" align="left" valign="top">เพศ :</td>
                    <td width="70%" align="left" valign="top"><?php echo  $gender_id_show;?></td>
                  </tr>
                  <tr>
                    <td width="30%" align="left" valign="top">วันเดือนปีเกิด :</td>
                    <td width="70%" align="left" valign="top"><?php echo  displayDateThai($birthday_th);?></td>
                  </tr>
                  <tr>
                    <td width="30%" align="left" valign="top">อายุ :</td>
                    <td width="70%" align="left" valign="top"><?php echo  $age;?></td>
                  </tr>
                  <tr>
                    <td align="left" valign="top">สัญชาติ :</td>
                    <td align="left" valign="top"><?php echo  $nation_id_show;?></td>
                  </tr>
                  <tr>
                    <td align="left" valign="top">เชื้อชาติ :</td>
                    <td align="left" valign="top"><?php echo  $nation_id_show;?></td>
                  </tr>
                  <tr>
                    <td align="left" valign="top">ศาสนา :</td>
                    <td align="left" valign="top"><?php echo  $religion_id_show;?></td>
                  </tr>
                  <tr>
                    <td align="left" valign="top">จังหวัดที่เกิด :</td>
                    <td align="left" valign="top"><?php echo $bor_province_show;?></td>
                  </tr>
                  <tr>
                    <td align="left" valign="top">กรุ๊ปเลือด :</td>
                    <td align="left" valign="top"><?php echo  $std_blgr;?></td>
                  </tr>
                  <tr>
                    <td align="left" valign="top">หมายเลขโทรศัพท์ (บ้าน) :</td>
                    <td align="left" valign="top"><?php echo $tecTel;?></td>
                  </tr>
                  <tr>

                    <td align="left" valign="top">หมายเลขโทรศัพท์ (มือถือ) :</td>
                    <td align="left" valign="top"><?php echo $stdTel;?></td>
                  </tr>
                  <tr>
                    <td align="left" valign="top">อีเมล์ :</td>
                    <td align="left" valign="top"><?php echo $stdEmail;?></td>
                  </tr>
                  <tr>
                    <td align="left" valign="top">สถานนะ :</td>
                    <td align="left" valign="top"><?php echo $endEducationOri;?></td>
                  </tr>
                </table>
        
		</div>
	</div>
</div>
    <!-----------ข้อมูลผู้ปกครอง------------>
<!---<a class="button" href="#popup1">ข้อมูลผู้ปกครอง</a>--->
<a class="button" href="https://www.google.com/maps/dir/<?php if($Longitude !="" && $Latitude != ""){ echo "14.801387,100.620443/".$Longitude.",".$Latitude; }else{ echo "14.801387,100.620443"; }?>" target="_blank">แผนที่ดาวเที่ยม</a>
<div id="popup1" class="overlay">
	<div class="popup">
		<h2>ข้อมูลผู้ปกครอง</h2>
		<a class="close" href="#">&times;</a>
		<div class="content">
              
 <table width="100%" border="0" cellspacing="0" cellpadding="5">
                  <tr>
                    <td width="30%" align="left" valign="top">ชื่อ นามสกุล บิดา :</td>
                    <td width="70%" align="left" valign="top"><?php echo  $fat_prefix_id_thori.$fat_fname_th."&nbsp;&nbsp;".$fat_lname_th;?></td>
                  </tr>
                  <tr>
                    <td width="30%" align="left" valign="top">อาชีพ :</td>
                    <td width="70%" align="left" valign="top"><?php echo occupShow($fat_occupa);?></td>
                  </tr>
                  <tr>
                    <td width="30%" align="left" valign="top">รายได้ :</td>
                    <td width="70%" align="left" valign="top"><?php echo  $fat_salary;?> บาท</td>
                  </tr>
                  <tr>
                    <td width="30%" align="left" valign="top">เบอร์โทรติดต่อ :</td>
                    <td width="70%" align="left" valign="top"><?php echo $fat_tel;?></td>
                  </tr>
                  <tr>
                    <td colspan="2" align="left" valign="top"><hr size="1" /></td>
                  </tr>
                  <tr>
                    <td width="30%" align="left" valign="top">ชื่อ นามสกุล  มารดา :</td>
                    <td width="70%" align="left" valign="top"><?php echo $mot_prefix_id_thori.$mot_fname_th;?>&nbsp; &nbsp;<?php echo $mot_lname_th;?></td>
                  </tr>
                  <tr>
                    <td width="30%" align="left" valign="top">อาชีพ :</td>
                    <td width="70%" align="left" valign="top"><?php echo  occupShow($mot_occupa);?></td>
                  </tr>
                  <tr>
                    <td width="30%" align="left" valign="top">รายได้ :</td>
                    <td width="70%" align="left" valign="top"><?php echo  $mot_salary;?> บาท</td>
                  </tr>
                  <tr>
                    <td width="30%" align="left" valign="top">เบอร์โทรติดต่อ :</td>
                    <td width="70%" align="left" valign="top"><?php echo $mot_tel;?></td>
                  </tr>
                  <tr>
                    <td colspan="2" align="left" valign="top"><hr size="1" /></td>
                  </tr>
                  <tr>
                    <td width="30%" align="left" valign="top"><strong>ข้อมูลผู้ปกครอง</strong></td>
                    <td width="70%" align="left" valign="top">&nbsp;</td>
                  </tr>
                  <tr>
                    <td width="30%" align="left" valign="top">ชื่อ นามสกุล  ผู้ปกครอง :</td>
                    <td width="70%" align="left" valign="top"><?php echo $par_prefixori.$par_fname;?>&nbsp; &nbsp;<?php echo $par_lname;?></td>
                  </tr>
                  <tr>
                    <td width="30%" align="left" valign="top">อาชีพ :</td>
                    <td width="70%" align="left" valign="top"><?php echo  occupShow($par_occupa);?></td>
                  </tr>
                  <tr>
                    <td width="30%" align="left" valign="top">รายได้ :</td>
                    <td width="70%" align="left" valign="top"><?php echo  $par_salary;?> บาท</td>
                  </tr>
                  <tr>
                    <td width="30%" align="left" valign="top">เบอร์โทรติดต่อ :</td>
                    <td width="70%" align="left" valign="top">
                      <?php  echo $par_tel;?>
                   </td>
                  </tr>
                  <tr>
                    <td width="30%" align="left" valign="top">ที่อยู่ผู้ปกครอง :</td>
                    <td width="70%" align="left" valign="top">เลขที่บ้าน&nbsp; <?php echo  $par_house_id_show;?> หมู่ที่&nbsp;<?php echo  $par_moo_show;?> หมู่บ้าน&nbsp;<?php echo $par_housename_show ;?> ซอย&nbsp;<?php echo  $par_soi_show;?></td>
                  </tr>
                  <tr>
                    <td width="30%" align="left" valign="top">&nbsp;</td>
                    <td width="70%" align="left" valign="top">ถนน <?php echo  $par_street_show;?> ตำบล<?php echo  $par_tumbol_show;?>&nbsp; อำเภอ<?php echo  $par_amphure_show;?></b></font>&nbsp; จังหวัด<?php echo  $par_province_show;?> รหัสไปรษณีย์ <?php echo  $par_post_show;?></td>
                  </tr>
                  <tr>
                    <td width="30%" align="left" valign="top">ความสัมพันธ์กับนักเรียนนักศึกษา (ลำดับญาติ) :</td>
                    <td width="70%" align="left" valign="top"><?php echo  parrelationShow($par_relation);?></td>
                  </tr>
                </table>

		</div>
	</div>
</div>
<!-----------ข้อมูลที่พักอาศัย------------>
<a class="button" href="#popup2">ข้อมูลที่พักอาศัย</a>
<div id="popup2" class="overlay">
	<div class="popup">
		<h2>ข้อมูลที่พักอาศัย</h2>
		<a class="close" href="#">&times;</a>
		<div class="content">
        <table width="100%" border="0" cellspacing="0" cellpadding="5">
                  <tr>
                    <td width="30%" align="left" valign="top">บ้านเลขที่ :</td>
                    <td width="70%" align="left" valign="top"><?php echo  $home_id_show;?></td>
                  </tr>
                  <tr>
                    <td width="30%" align="left" valign="top">หมู่ที่ :</td>
                    <td width="70%" align="left" valign="top"><?php echo  $home_moo_show;?></td>
                  </tr>
                  <tr>
                    <td width="30%" align="left" valign="top">ถนน :</td>
                    <td width="70%" align="left" valign="top"><?php echo  $home_street_show;?></td>
                  </tr>
                  <tr>
                    <td width="30%" align="left" valign="top">ตรอก/ซอย :</td>
                    <td width="70%" align="left" valign="top"><?php echo  $home_soi_show;?></td>
                  </tr>
                  <tr>
                    <td width="30%" align="left" valign="top">ตำบล :</td>
                    <td width="70%" align="left" valign="top"><?php echo  $ho_tumbol_show;?></td>
                  </tr>
                  <tr>
                    <td width="30%" align="left" valign="top">อำเภอ :</td>
                    <td width="70%" align="left" valign="top"><?php echo  $ho_amphure_show;?></td>
                  </tr>
                  <tr>
                    <td width="30%" align="left" valign="top">จังหวัด :</td>
                    <td width="70%" align="left" valign="top"><?php echo  $ho_province_show;?></td>
                  </tr>
                  <tr>
                    <td width="30%" align="left" valign="top">รหัสไปรษณีย์ :</td>
                    <td width="70%" align="left" valign="top"><?php echo  $ho_post_show;?></td>
                  </tr>
                </table>
        
		</div>
	</div>
</div>

<!-----------ผลการเรียน------------>
<a class="button" href="showGradestudent.php?studentid=<?php echo $studentID;?>" target="_blank">ตรวจสอบผลการเรียน</a>
<a class="button" href="#popup4">ตารางเรียน</a>
<div id="popup4" class="overlay">
	<div class="popup">
		<h2>ตารางเรียน<br />
		 <font size="-1"> <?php echo $studentID;?>&nbsp; &nbsp;&nbsp;<?php echo  $prefixstdori.$stu_fname_th;?> &nbsp;&nbsp;<?php echo  "$stu_lname_th";?></font>		</h2>
		<a class="close" href="#">&times;</a>
		<div class="content">
        
       
        <table width="725" border="0" align="center" cellpadding="2" cellspacing="0">
  <?php 
		//แสดงข้อมูลตารางสอน ตามปีการศึกษา
			$sqlsemesori="select * from tbl_semester where subYear >= '$subGroup' and subYear <= '$subGroup1' order by seID asc";
			$result2=mysql_query($sqlsemesori);
			//echo "=>".$sqlsemesori;
			while($rssemesori=mysql_fetch_array($result2)){
			$semester1=$rssemesori['semes'];//ปีการศึกษา
			
			/*
			echo "=>".$orderby=substr($semester1,0,1);
			echo "<br>=>".$orderbyYesar=substr($semester1,2,4);
			*/
?>
    <tr>
    <td align="left" valign="top"><a href="stdShowstuding.php?stdid=<?php echo $studentID;?>&stdcardID=<?php echo $CardId;?>&btst=ad&semester=<?php echo $semester1;?>&groID=<?php echo $groupID; ?>&scID=<?php echo $scID; ?>&seestatus=1" target="_blank">ตารางเรียน ภาคเรียนที่&nbsp;<?php echo $semester1;?></a></td>
    </tr>
  <?php
  		}
		
			$semester=$_GET['semester'];
		
  ?>
</table>
<br />

 <?php 
  if($seestatus == 0){
?>
	<table width="90%" border="0" align="center" cellpadding="5" cellspacing="1">
  <tr>
    <td colspan="6" align="center" valign="top">ตารางเรียน&nbsp;ภาคเรียนที่ &nbsp;<?php echo $semester1;?></td>
    </tr>
  <tr bgcolor="#3399FF">
    <td width="60" align="center" valign="top" bgcolor="#3399FF"><font color="#FFFFFF">วัน</font></td>
    <td width="90" align="center" valign="top" bgcolor="#3399FF"><font color="#FFFFFF">เวลาเรียน</font></td>
    <td width="340" align="center" valign="top" bgcolor="#3399FF"><font color="#FFFFFF">รหัสวิชา-ชื่อวิชา</font></td>
    <td width="25" align="center" valign="top" bgcolor="#3399FF"><font color="#FFFFFF">ห้องเรียน</font></td>
    <td width="20" align="center" valign="top" bgcolor="#3399FF"><font color="#FFFFFF">คาบ</font></td>
    <td width="190" align="center" valign="top" bgcolor="#3399FF"><font color="#FFFFFF">ชื่อครูผู้สอน</font></td>

  </tr>
 <?php
	  
  		$sqlsestuding1="select max(semes) as semesOri from tbl_tecstuding where student_group_id='$groupID' and school_id='$scID' ";
		$result1=mysql_query($sqlsestuding1);
		$rssestudingori1=mysql_fetch_array($result1);
		$semesori=$rssestudingori1['semesOri'];
		
		 if($seestatus == 1){
  		$sqlsestudingori1=mysql_query("SELECT * FROM  tbl_tecstuding WHERE  semes =  '$semesori' AND  student_group_id =  '$groupID'  AND  school_id =  '$scID' AND dpr1=1 order by drp22 ASC");
 }else{
	 	$sqlsestudingori1=mysql_query("SELECT * FROM  tbl_tecstuding WHERE  semes =  '$semesori' AND  student_group_id =  '$groupID'  AND  school_id =  '$scID' AND dpr1=1 order by drp22 ASC");
 }

		while($rssestuding1=mysql_fetch_array($sqlsestudingori1)){
  ?>
  <tr bgcolor="#FAFDCE" onmousemove="this.style.backgroundColor='#FFE495'" onmouseout="this.style.backgroundColor=''">
    <td align="left" valign="top"><?php echo $rssestuding1['dpr3'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding1['dpr2'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding1['subject_id']." ".$rssestuding1['subject_name'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding1['drp5'];?></td>
    <td align="center" valign="top"><?php echo $rssestuding1['dpr4'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding1['teacher_name'];?></td>

  </tr>

  <?php 
		}//end while select studing
 if($seestatus == 1){
  		$sqlsestuding2=mysql_query("SELECT * FROM  tbl_tecstuding WHERE  semes =  '$semesori' AND  student_group_id =  '$groupID'  AND  school_id =  '$scID' AND dpr1=2 order by drp22 ASC");
 }else{
	 	$sqlsestuding2=mysql_query("SELECT * FROM  tbl_tecstuding WHERE  semes =  '$semesori' AND  student_group_id =  '$groupID'  AND  school_id =  '$scID' AND dpr1=2 order by drp22 ASC");
 }
		while($rssestuding2=mysql_fetch_array($sqlsestuding2)){
  ?>
  <tr bgcolor="#FFEAFF" onmousemove="this.style.backgroundColor='#FFE495'" onmouseout="this.style.backgroundColor=''">
    <td align="left" valign="top"><?php echo $rssestuding2['dpr3'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding2['dpr2'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding2['subject_id']." ".$rssestuding2['subject_name'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding2['drp5'];?></td>
    <td align="center" valign="top"><?php echo $rssestuding2['dpr4'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding2['teacher_name'];?></td>

  </tr>
  <?php 
		}//end while select studing
if($seestatus == 1){
   		$sqlsestuding3=mysql_query("SELECT * FROM  tbl_tecstuding WHERE  semes =  '$semesori' AND  student_group_id =  '$groupID'  AND  school_id =  '$scID' AND dpr1=3 order by drp22 ASC");
}else{
		$sqlsestuding3=mysql_query("SELECT * FROM  tbl_tecstuding WHERE  semes =  '$semesori' AND  student_group_id =  '$groupID'  AND  school_id =  '$scID' AND dpr1=3 order by drp22 ASC");	
}
		while($rssestuding3=mysql_fetch_array($sqlsestuding3)){
  ?>
  <tr bgcolor="#CFFCCD" onmousemove="this.style.backgroundColor='#FFE495'" onmouseout="this.style.backgroundColor=''">
    <td align="left" valign="top"><?php echo $rssestuding3['dpr3'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding3['dpr2'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding3['subject_id']." ".$rssestuding3['subject_name'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding3['drp5'];?></td>
    <td align="center" valign="top"><?php echo $rssestuding3['dpr4'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding3['teacher_name'];?></td>

  </tr>
  <?php 
		}//end while select studing
if($seestatus == 1){
		$sqlsestuding4=mysql_query("SELECT * FROM  tbl_tecstuding WHERE  semes =  '$semesori' AND  student_group_id =  '$groupID'  AND  school_id =  '$scID' AND dpr1=4 order by drp22 ASC");
}else{
		$sqlsestuding4=mysql_query("SELECT * FROM  tbl_tecstuding WHERE  semes =  '$semesori' AND  student_group_id =  '$groupID'  AND  school_id =  '$scID' AND dpr1=4 order by drp22 ASC");	
}
		while($rssestuding4=mysql_fetch_array($sqlsestuding4)){
  ?>
  <tr bgcolor="#FEF4EB" onmousemove="this.style.backgroundColor='#FFE495'" onmouseout="this.style.backgroundColor=''">
    <td align="left" valign="top"><?php echo $rssestuding4['dpr3'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding4['dpr2'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding4['subject_id']." ".$rssestuding4['subject_name'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding4['drp5'];?></td>
    <td align="center" valign="top"><?php echo $rssestuding4['dpr4'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding4['teacher_name'];?></td>

  </tr>
  <?php 
		}//end while select studing
if($seestatus == 1){
 		$sqlsestuding5=mysql_query("SELECT * FROM  tbl_tecstuding WHERE  semes =  '$semesori' AND  student_group_id =  '$groupID'  AND  school_id =  '$scID' AND dpr1=5 order by drp22 ASC");
}else{
		$sqlsestuding5=mysql_query("SELECT * FROM  tbl_tecstuding WHERE  semes =  '$semesori' AND  student_group_id =  '$groupID'  AND  school_id =  '$scID' AND dpr1=5 order by drp22 ASC");	
}
		while($rssestuding5=mysql_fetch_array($sqlsestuding5)){
  ?>
  <tr bgcolor="#EDFAFE" onmousemove="this.style.backgroundColor='#FFE495'" onmouseout="this.style.backgroundColor=''">
    <td align="left" valign="top"><?php echo $rssestuding5['dpr3'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding5['dpr2'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding5['subject_id']." ".$rssestuding5['subject_name'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding5['drp5'];?></td>
    <td align="center" valign="top"><?php echo $rssestuding5['dpr4'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding5['teacher_name'];?></td>

  </tr>
  <?php 
		}//end while select studing
if($seestatus == 1){
 		$sqlsestuding6=mysql_query("SELECT * FROM  tbl_tecstuding WHERE  semes =  '$semesori' AND  student_group_id =  '$groupID'  AND  school_id =  '$scID' AND dpr1=6 order by drp22 ASC");
}else{
		$sqlsestuding6=mysql_query("SELECT * FROM  tbl_tecstuding WHERE  semes =  '$semesori' AND  student_group_id =  '$groupID'  AND  school_id =  '$scID' AND dpr1=6 order by drp22 ASC");	
}
		while($rssestuding6=mysql_fetch_array($sqlsestuding6)){
  ?>
  <tr bgcolor="#F0DEFA" onmousemove="this.style.backgroundColor='#FFE495'" onmouseout="this.style.backgroundColor=''">
    <td align="left" valign="top"><?php echo $rssestuding6['dpr3'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding6['dpr2'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding6['subject_id']." ".$rssestuding6['subject_name'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding6['drp5'];?></td>
    <td align="center" valign="top"><?php echo $rssestuding6['dpr4'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding6['teacher_name'];?></td>

  </tr>
  <?php 
		}//end while select studing
if($seestatus == 1){
 		$sqlsestuding7=mysql_query("SELECT * FROM  tbl_tecstuding WHERE  semes =  '$semesori' AND  student_group_id =  '$groupID'  AND  school_id =  '$scID' AND dpr1=7 order by drp22 ASC");
}else{
		$sqlsestuding7=mysql_query("SELECT * FROM  tbl_tecstuding WHERE  semes =  '$semesori' AND  student_group_id =  '$groupID'  AND  school_id =  '$scID' AND dpr1=7 order by drp22 ASC");	
}
		while($rssestuding7=mysql_fetch_array($sqlsestuding7)){
  ?>
  <tr bgcolor="#FFD7DD" onmousemove="this.style.backgroundColor='#FFE495'" onmouseout="this.style.backgroundColor=''">
    <td align="left" valign="top"><?php echo $rssestuding7['dpr3'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding7['dpr2'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding7['subject_id']." ".$rssestuding7['subject_name'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding7['drp5'];?></td>
    <td align="center" valign="top"><?php echo $rssestuding7['dpr4'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding7['teacher_name'];?></td>

  </tr>
  <?php 
		}//end while select studing

  ?>
</table>
<?php 
}else{
?>
<table width="90%" border="0" align="center" cellpadding="5" cellspacing="1">
  <tr>
    <td colspan="6" align="center" valign="top">ตารางเรียน&nbsp;ภาคเรียนที่ &nbsp;<?php echo $semester;?></td>
  </tr>
  <tr bgcolor="#3399FF">
    <td width="60" align="center" valign="top" bgcolor="#3399FF"><font color="#FFFFFF">วัน</font></td>
    <td width="90" align="center" valign="top" bgcolor="#3399FF"><font color="#FFFFFF">เวลาเรียน</font></td>
    <td width="340" align="center" valign="top" bgcolor="#3399FF"><font color="#FFFFFF">รหัสวิชา-ชื่อวิชา</font></td>
    <td width="25" align="center" valign="top" bgcolor="#3399FF"><font color="#FFFFFF">ห้องเรียน</font></td>
    <td width="20" align="center" valign="top" bgcolor="#3399FF"><font color="#FFFFFF">คาบ</font></td>
    <td width="190" align="center" valign="top" bgcolor="#3399FF"><font color="#FFFFFF">ชื่อครูผู้สอน</font></td>

  </tr>
 <?php 
	   if($seestatus == 1){
  		$sqlsestuding1="select * from tbl_tecstuding where student_group_id='$groupID' and school_id='$scID' and semes='$semester' and dpr1=1 order by drp22 ASC";
  }else{
		$sqlsestuding1="select * from tbl_tecstuding where student_group_id='$groupID' and school_id='$scID' and semes='$semesterori1' and dpr1=1 order by drp22 ASC";  
  }
		$result1=mysql_query($sqlsestuding1);
		while($rssestuding1=mysql_fetch_array($result1)){
  ?>
  <tr bgcolor="#FAFDCE" onmousemove="this.style.backgroundColor='#FFE495'" onmouseout="this.style.backgroundColor=''">
    <td align="left" valign="top"><?php echo $rssestuding1['dpr3'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding1['dpr2'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding1['subject_id']." ".$rssestuding1['subject_name'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding1['drp5'];?></td>
    <td align="center" valign="top"><?php echo $rssestuding1['dpr4'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding1['teacher_name'];?></td>

  </tr>
  <?php 
		}//end while select studing
 if($seestatus == 1){
  		$sqlsestuding2=mysql_query("select * from tbl_tecstuding where student_group_id='$groupID' and school_id='$scID' and semes='$semester' and dpr1=2 order by drp22 ASC");
 }else{
	 	$sqlsestuding2=mysql_query("select * from tbl_tecstuding where student_group_id='$groupID' and school_id='$scID' and semes='$semesterori1' and dpr1=2 order by drp22 ASC");
 }
		while($rssestuding2=mysql_fetch_array($sqlsestuding2)){
  ?>
  <tr bgcolor="#FFEAFF" onmousemove="this.style.backgroundColor='#FFE495'" onmouseout="this.style.backgroundColor=''">
    <td align="left" valign="top"><?php echo $rssestuding2['dpr3'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding2['dpr2'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding2['subject_id']." ".$rssestuding2['subject_name'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding2['drp5'];?></td>
    <td align="center" valign="top"><?php echo $rssestuding2['dpr4'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding2['teacher_name'];?></td>

  </tr>
  <?php 
		}//end while select studing
if($seestatus == 1){
   		$sqlsestuding3=mysql_query("select * from tbl_tecstuding where student_group_id='$groupID' and school_id='$scID' and semes='$semester' and dpr1=3 order by drp22 ASC");
}else{
		$sqlsestuding3=mysql_query("select * from tbl_tecstuding where student_group_id='$groupID' and school_id='$scID' and semes='$semesterori1' and dpr1=3 order by drp22 ASC");	
}
		while($rssestuding3=mysql_fetch_array($sqlsestuding3)){
  ?>
  <tr bgcolor="#CFFCCD" onmousemove="this.style.backgroundColor='#FFE495'" onmouseout="this.style.backgroundColor=''">
    <td align="left" valign="top"><?php echo $rssestuding3['dpr3'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding3['dpr2'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding3['subject_id']." ".$rssestuding3['subject_name'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding3['drp5'];?></td>
    <td align="center" valign="top"><?php echo $rssestuding3['dpr4'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding3['teacher_name'];?></td>

  </tr>
  <?php 
		}//end while select studing
if($seestatus == 1){
		$sqlsestuding4=mysql_query("select * from tbl_tecstuding where student_group_id='$groupID' and school_id='$scID' and semes='$semester' and dpr1=4 order by drp22 ASC");
}else{
		$sqlsestuding4=mysql_query("select * from tbl_tecstuding where student_group_id='$groupID' and school_id='$scID' and semes='$semesterori1' and dpr1=4 order by drp22 ASC");	
}
		while($rssestuding4=mysql_fetch_array($sqlsestuding4)){
  ?>
  <tr bgcolor="#FEF4EB" onmousemove="this.style.backgroundColor='#FFE495'" onmouseout="this.style.backgroundColor=''">
    <td align="left" valign="top"><?php echo $rssestuding4['dpr3'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding4['dpr2'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding4['subject_id']." ".$rssestuding4['subject_name'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding4['drp5'];?></td>
    <td align="center" valign="top"><?php echo $rssestuding4['dpr4'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding4['teacher_name'];?></td>

  </tr>
  <?php 
		}//end while select studing
if($seestatus == 1){
 		$sqlsestuding5=mysql_query("select * from tbl_tecstuding where student_group_id='$groupID' and school_id='$scID' and semes='$semester' and dpr1=5 order by drp22 ASC");
}else{
		$sqlsestuding5=mysql_query("select * from tbl_tecstuding where student_group_id='$groupID' and school_id='$scID' and semes='$semesterori1' and dpr1=5 order by drp22 ASC");	
}
		while($rssestuding5=mysql_fetch_array($sqlsestuding5)){
  ?>
  <tr bgcolor="#EDFAFE" onmousemove="this.style.backgroundColor='#FFE495'" onmouseout="this.style.backgroundColor=''">
    <td align="left" valign="top"><?php echo $rssestuding5['dpr3'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding5['dpr2'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding5['subject_id']." ".$rssestuding5['subject_name'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding5['drp5'];?></td>
    <td align="center" valign="top"><?php echo $rssestuding5['dpr4'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding5['teacher_name'];?></td>

  </tr>
  <?php 
		}//end while select studing
if($seestatus == 1){
 		$sqlsestuding6=mysql_query("select * from tbl_tecstuding where student_group_id='$groupID' and school_id='$scID' and semes='$semester' and dpr1=6 order by drp22 ASC");
}else{
		$sqlsestuding6=mysql_query("select * from tbl_tecstuding where student_group_id='$groupID' and school_id='$scID' and semes='$semesterori1' and dpr1=6 order by drp22 ASC");	
}
		while($rssestuding6=mysql_fetch_array($sqlsestuding6)){
  ?>
  <tr bgcolor="#F0DEFA" onmousemove="this.style.backgroundColor='#FFE495'" onmouseout="this.style.backgroundColor=''">
    <td align="left" valign="top"><?php echo $rssestuding6['dpr3'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding6['dpr2'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding6['subject_id']." ".$rssestuding6['subject_name'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding6['drp5'];?></td>
    <td align="center" valign="top"><?php echo $rssestuding6['dpr4'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding6['teacher_name'];?></td>

  </tr>
  <?php 
		}//end while select studing
if($seestatus == 1){
 		$sqlsestuding7=mysql_query("select * from tbl_tecstuding where student_group_id='$groupID' and school_id='$scID' and semes='$semester' and dpr1=7 order by drp22 ASC");
}else{
		$sqlsestuding7=mysql_query("select * from tbl_tecstuding where student_group_id='$groupID' and school_id='$scID' and semes='$semesterori1' and dpr1=7 order by drp22 ASC");	
}
		while($rssestuding7=mysql_fetch_array($sqlsestuding7)){
  ?>
  <tr bgcolor="#FFD7DD" onmousemove="this.style.backgroundColor='#FFE495'" onmouseout="this.style.backgroundColor=''">
    <td align="left" valign="top"><?php echo $rssestuding7['dpr3'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding7['dpr2'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding7['subject_id']." ".$rssestuding7['subject_name'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding7['drp5'];?></td>
    <td align="center" valign="top"><?php echo $rssestuding7['dpr4'];?></td>
    <td align="left" valign="top"><?php echo $rssestuding7['teacher_name'];?></td>

  </tr>
  <?php 
		}//end while select studing
    ?>
</table>
<?php } ?>
         </div>
	</div>
</div>
<!-----------ข้อมูลครูที่ปรึกษา------------>
<!--
<a class="button" href="#popup4">ข้อมูลครูที่ปรึกษา</a>
<div id="popup4" class="overlay">
	<div class="popup">
		<h2>ข้อมูลครูที่ปรึกษา</h2>
		<a class="close" href="#">&times;</a>
		<div class="content">
		  <table width="100%%" border="0" cellspacing="0" cellpadding="0">
        	  <tr>
        	    <td colspan="2" align="left" valign="top"><table width="80%" border="0" cellspacing="0" cellpadding="0">
        	      <tr>
        	        <td width="37%" align="left" valign="top">&nbsp;</td>
        	        <td width="63%" align="left" valign="top"><?php
	 if($tecPhoto == ""){ 
		echo "";
	}else{ ?>
        	          <img src="photoTec/<?php echo $tecPhoto;?>" width="100"  style="border:1px solid #CCCCCC; padding:1px"/>
        	          <?php } ?></td>
      	        </tr>
        	      <tr>
        	        <td align="left" valign="top">ชื่อ นามสกุล :</td>
        	        <td align="left" valign="top"><?php echo $tecLogFname;?></td>
      	        </tr>
        	      <tr>
        	        <td align="left" valign="top">หมายเลขโทรศัพท์ :</td>
        	        <td align="left" valign="top"><?php echo $tecTel;?></td>
      	        </tr>
        	      <tr>
        	        <td align="left" valign="top">หมายเลขโทรศัพท์ (มือถือ) :</td>
        	        <td align="left" valign="top"><?php echo $tectelsan;?></td>
      	        </tr>
        	      <tr>
        	        <td align="left" valign="top">อีเมล์  :</td>
        	        <td align="left" valign="top"><?php echo $tecEmail;?></td>
      	        </tr>
        	      <tr>
        	        <td align="center" valign="top">&nbsp;</td>
        	        <td align="center" valign="top">&nbsp;</td>
      	        </tr>
      	      </table></td>
       	      </tr>
        	  <tr>
        	    <td colspan="2" align="center" valign="top"><hr /></td>
       	      </tr>
        	  <tr>
        	    <td align="center" valign="top">&nbsp;</td>
        	    <td align="center" valign="top">&nbsp;</td>
      	    </tr>
        	  <tr>
        	    <td width="50%" align="center" valign="top"><table width="100%%" border="0" cellspacing="0" cellpadding="0">
        	      <tr>
        	        <td align="left" valign="top"><b>ข้อมูลครูที่ปรึกษา (ร่วม)</b></td>
        	        <td align="left" valign="top">&nbsp;</td>
      	        </tr>
        	      <tr>
        	        <td align="left" valign="top">&nbsp;</td>
        	        <td align="left" valign="top"><?php
	 if($tecPhoto2 == ""){ 
		echo "";
	}else{ ?>
        	          <img src="photoTec/<?php echo $tecPhoto2;?>" width="100"  style="border:1px solid #CCCCCC; padding:1px"/>
        	          <?php } ?></td>
      	        </tr>
        	      <tr>
        	        <td align="left" valign="top">ชื่อ นามสกุล :</td>
        	        <td align="left" valign="top"><?php echo $tecLogFname2;?></td>
      	        </tr>
        	      <tr>
        	        <td align="left" valign="top">หมายเลขโทรศัพท์ :</td>
        	        <td align="left" valign="top"><?php echo $tecTel2;?></td>
      	        </tr>
        	      <tr>
        	        <td align="left" valign="top">หมายเลขโทรศัพท์ (มือถือ) :</td>
        	        <td align="left" valign="top"><?php echo $tectelsan2;?></td>
      	        </tr>
        	      <tr>
        	        <td align="left" valign="top">อีเมล์  :</td>
        	        <td align="left" valign="top"><?php echo $tecEmail2;?></td>
      	        </tr>
        	      <tr>
        	        <td align="center" valign="top">&nbsp;</td>
        	        <td align="center" valign="top">&nbsp;</td>
      	        </tr>
      	      </table></td>
        	    <td width="50%" align="center" valign="top"><table width="100%%" border="0" cellspacing="0" cellpadding="0">
        	      <tr>
        	        <td align="left" valign="top"><b>ข้อมูลครูที่ปรึกษา (ร่วม)</b></td>
        	        <td align="left" valign="top">&nbsp;</td>
      	        </tr>
        	      <tr>
        	        <td align="left" valign="top">&nbsp;</td>
        	        <td align="left" valign="top"><?php
	 if($tecPhoto3 == ""){ 
		echo "";
	}else{ ?>
        	          <img src="photoTec/<?php echo $tecPhoto3;?>" width="100"  style="border:1px solid #CCCCCC; padding:1px"/>
        	          <?php } ?></td>
      	        </tr>
        	      <tr>
        	        <td align="left" valign="top">ชื่อ นามสกุล :</td>
        	        <td align="left" valign="top"><?php echo $tecLogFname3;?></td>
      	        </tr>
        	      <tr>
        	        <td align="left" valign="top">หมายเลขโทรศัพท์ :</td>
        	        <td align="left" valign="top"><?php echo $tecTel3;?></td>
      	        </tr>
        	      <tr>
        	        <td align="left" valign="top">หมายเลขโทรศัพท์ (มือถือ) :</td>
        	        <td align="left" valign="top"><?php echo $tectelsan3;?></td>
      	        </tr>
        	      <tr>
        	        <td align="left" valign="top">อีเมล์  :</td>
        	        <td align="left" valign="top"><?php echo $tecEmail3;?></td>
      	        </tr>
        	      <tr>
        	        <td align="center" valign="top">&nbsp;</td>
        	        <td align="center" valign="top">&nbsp;</td>
      	        </tr>
      	      </table></td>
      	    </tr>
      	  </table>
        	<p>&nbsp;</p>
        </div>
	</div>
</div>
---->
</td>
  </tr>
  <tr>
    <td align="left" valign="top">&nbsp;</td>
    <td align="left" valign="top">&nbsp;</td>
  </tr>
  <tr>
    <td width="227" align="left" valign="top"><B>ข้อมูลนักศึกษา</B></td>
    <td width="478" align="left" valign="top">&nbsp;</td>
  </tr>
  <tr>
    <td align="left" valign="top">&nbsp;</td>
    <td align="left" valign="top"><img src="<?php echo $str_imgfullpath;?>" alt="" height="" width="100"  style="border:1px solid #CCCCCC; padding:1px"/></td>
  </tr>
  <tr>
    <td width="227" align="left" valign="top">รหัสบัตรประจำตัวประชาชน :</td>
    <td width="478" align="left" valign="top"><?php echo $people_id_show ;?></td>
  </tr>
  <tr>
    <td align="left" valign="top">รหัสนักศึกษา :</td>
    <td align="left" valign="top"><?php echo $studentID;?></td>
  </tr>
  <tr>
    <td width="227" align="left" valign="top">ชื่อ นามสกุล :</td>
    <td width="478" align="left" valign="top"><?php echo  $prefixstdori.$stu_fname_th;?>  &nbsp;&nbsp;<?php echo  "$stu_lname_th";?>&nbsp;</td>
  </tr>
  <tr>
    <td align="left" valign="top">ชื่อเล่น :</td>
    <td align="left" valign="top"><?php echo  "$stu_nickname";?></td>
  </tr>
  <tr>
    <td width="227" align="left" valign="top">เพศ :</td>
    <td width="478" align="left" valign="top"><?php echo  $gender_id_show;?></td>
  </tr>
  <tr>
    <td width="227" align="left" valign="top">วันเดือนปีเกิด :</td>
    <td width="478" align="left" valign="top"><?php echo  displayDateThai($birthday_th);?></td>
  </tr>
  <tr>
    <td align="left" valign="top">อายุ :</td>
    <td align="left" valign="top"><?php echo  $age;?></td>
  </tr>
  <tr>
    <td align="left" valign="top">สัญชาติ :</td>
    <td align="left" valign="top"><?php echo  $nation_id_show;?></td>
  </tr>
  <tr>
    <td align="left" valign="top">เชื้อชาติ :</td>
    <td align="left" valign="top"><?php echo  $nation_id_show;?></td>
  </tr>
  <tr>
    <td align="left" valign="top">ศาสนา :</td>
    <td align="left" valign="top"><?php echo  $religion_id_show;?></td>
  </tr>
  <tr>
    <td align="left" valign="top">จังหวัดที่เกิด :</td>
    <td align="left" valign="top"><?php echo $bor_province_show;?></td>
  </tr>
  <tr>
    <td align="left" valign="top">กรุ๊ปเลือด :</td>
    <td align="left" valign="top"><?php echo  $std_blgr;?></td>
  </tr>
  <tr>
    <td align="left" valign="top">หมายเลขโทรศัพท์ (บ้าน) :</td>
    <td align="left" valign="top"><?php echo $tecTel;?></td>
  </tr>
  <tr>
    <td align="left" valign="top">หมายเลขโทรศัพท์ (มือถือ) :</td>
    <td align="left" valign="top"><?php echo $stdTel;?></td>
  </tr>
  <tr>
    <td align="left" valign="top">อีเมล์ :</td>
    <td align="left" valign="top"><?php echo $stdEmail;?></td>
  </tr>
  <tr>
    <td align="left" valign="top">ข้อมูลกลุ่ม</td>
    <td align="left" valign="top"><?php echo $group_id;?></td>
  </tr>
  <tr>
    <td align="left" valign="top">รหัสกลุ่ม :</td>
    <td align="left" valign="top"><?php echo $courseShow;?></td>
  </tr>
  <tr>
    <td align="left" valign="top">รหัสผ่านนักศึกษา :</td>
    <td align="left" valign="middle"><a href="editpassStudent.php?student_id=<?php echo $studentID;?>" title="แก้ไขรหัสผ่านนักศึกษา" class="lightwindow page-options"><img src="images/icon/iconEdit.png" width="22" height="22" /></a></td>
  </tr>
  <tr>
    <td align="left" valign="top">สถานนะ :</td>
    <td align="left" valign="middle"><?php echo $endEducationOri;?> &nbsp;<a href="editStatusStudent.php?student_id=<?php echo $studentID;?>" title="แก้ไขสถานะการศึกษา" class="lightwindow page-options"><img src="images/icon/iconEdit.png" width="22" height="22" /></a></td>
  </tr>
  <tr>
    <td colspan="2" align="left" valign="top"><hr size="1"></td>
  </tr>
  <tr>
    <td align="left" valign="top"><B>ข้อมูลที่อยู่อาศัย</B></td>
    <td align="left" valign="top">&nbsp;</td>
  </tr>
  <tr>
    <td align="left" valign="top">บ้านเลขที่ :</td>
    <td align="left" valign="top"><?php echo  $home_id_show;?>&nbsp;หมู่ที่ <?php echo  $home_moo_show;?>&nbsp;ถนน<?php echo  $home_street_show;?>ซอย <?php echo  $home_soi_show;?></td>
  </tr>
  <tr>
    <td align="left" valign="top">ตำบล :</td>
    <td align="left" valign="top"><?php echo  $ho_tumbol_show;?></td>
  </tr>
  <tr>
    <td align="left" valign="top">อำเภอ :</td>
    <td align="left" valign="top"><?php echo  $ho_amphure_show;?></td>
  </tr>
  <tr>
    <td align="left" valign="top">จังหวัด :</td>
    <td align="left" valign="top"><?php echo  $ho_province_show;?></td>
  </tr>
  <tr>
    <td align="left" valign="top">รหัสไปรษณีย์ :</td>
    <td align="left" valign="top"><?php echo  $ho_post_show;?></td>
  </tr>
  <tr>
    <td align="left" valign="top">แผนที่ดาวเทียม :</td>
    <td align="left" valign="top"><a href="https://www.google.com/maps/dir/<?php if($Longitude !="" && $Latitude != ""){ echo "14.801387,100.620443/".$Longitude.",".$Latitude; }else{ echo "14.801387,100.620443"; }?>" target="_blank"><img src="images/map.png" width="50" height="29" /></a> 
    <a href="editMapStudent.php?student_id=<?php echo $studentID;?>" title="แก้ไขแผนที่ดาวเทียม" class="lightwindow page-options"><img src="images/icon/iconEdit.png" width="22" height="22" /></a></td>
  </tr>
  <tr>
    <td colspan="2" align="left" valign="top"><hr size="1"></td>
  </tr>
  <tr>
    <td colspan="2" align="left" valign="top"><table width="725" border="0" cellspacing="0" cellpadding="5">
      <tr>
        <td width="292" align="left" valign="top">ชื่อ นามสกุล บิดา :</td>
        <td width="413" align="left" valign="top"><?php echo  $fat_prefix_id_thori.$fat_fname_th."&nbsp;&nbsp;".$fat_lname_th;?></td>
      </tr>
      <tr>
        <td width="292" align="left" valign="top">อาชีพ :</td>
        <td width="413" align="left" valign="top"><?php echo occupShow($fat_occupa);?></td>
      </tr>
      <tr>
        <td align="left" valign="top">รายได้ :</td>
        <td align="left" valign="top"><?php echo  number_format($fat_salary);?> บาท</td>
      </tr>
      <tr>
        <td align="left" valign="top">เบอร์โทรติดต่อ :</td>
        <td align="left" valign="top"><?php echo $fat_tel;?></td>
      </tr>
      <tr>
        <td colspan="2" align="left" valign="top"><hr size="1" /></td>
      </tr>
      <tr>
        <td width="292" align="left" valign="top">ชื่อ นามสกุล  มารดา :</td>
        <td align="left" valign="top"><?php echo $mot_prefix_id_thori.$mot_fname_th;?>&nbsp; &nbsp;<?php echo $mot_lname_th;?></td>
      </tr>
      <tr>
        <td width="292" align="left" valign="top">อาชีพ :</td>
        <td align="left" valign="top"><?php echo  occupShow($mot_occupa);?></td>
      </tr>
      <tr>
        <td align="left" valign="top">รายได้ :</td>
        <td align="left" valign="top"><?php echo  number_format($mot_salary);?> บาท</td>
      </tr>
      <tr>
        <td align="left" valign="top">เบอร์โทรติดต่อ :</td>
        <td align="left" valign="top"><?php echo $mot_tel;?></td>
      </tr>
      <tr>
        <td colspan="2" align="left" valign="top"><hr size="1" /></td>
      </tr>
      <tr>
        <td align="left" valign="top"><strong>ข้อมูลผู้ปกครอง</strong></td>
        <td align="left" valign="top">&nbsp;</td>
      </tr>
      <tr>
        <td width="292" align="left" valign="top">ชื่อ นามสกุล  ผู้ปกครอง :</td>
        <td align="left" valign="top"><?php echo $par_prefixori.$par_fname;?>&nbsp; &nbsp;<?php echo $par_lname;?></td>
      </tr>
      <tr>
        <td width="292" align="left" valign="top">อาชีพ :</td>
        <td align="left" valign="top"><?php echo  occupShow($par_occupa);?></td>
      </tr>
      <tr>
        <td align="left" valign="top">รายได้ :</td>
        <td align="left" valign="top"><?php echo  number_format($par_salary);?> บาท</td>
      </tr>
      <tr>
        <td align="left" valign="top">เบอร์โทรติดต่อ :</td>
        <td align="left" valign="top"><?php  echo $par_tel;?></td>
      </tr>
      <tr>
        <td align="left" valign="top">ที่อยู่ผู้ปกครอง :</td>
        <td align="left" valign="top"><?php echo  $par_house_id_show;?> หมู่ที่&nbsp;<?php echo  $par_moo_show;?> หมู่บ้าน&nbsp;<?php echo $par_housename_show ;?>ซอย&nbsp;<?php echo  $par_soi_show;?></td>
      </tr>
      <tr>
        <td align="left" valign="top">&nbsp;</td>
        <td align="left" valign="top">ถนน <?php echo  $par_street_show;?> ตำบล<?php echo  $par_tumbol_show;?>&nbsp; อำเภอ<?php echo  $par_amphure_show;?></b></font>&nbsp; จังหวัด<?php echo  $par_province_show;?> รหัสไปรษณีย์ <?php echo  $par_post_show;?></td>
      </tr>
      <tr>
        <td align="left" valign="top">ความสัมพันธ์กับนักเรียนนักศึกษา (ลำดับญาติ) :</td>
        <td align="left" valign="top"><?php echo  parrelationShow($par_relation);?></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td colspan="2" align="left" valign="top"><hr size="1"></td>
  </tr>
  <tr>
    <td align="left" valign="top"><B>ข้อมูลครูที่ปรึกษา</B></td>
    <td align="left" valign="top">&nbsp;</td>
  </tr>
  <tr>
    <td align="left" valign="top">&nbsp;</td>
    <td align="left" valign="top">  
	<?php
	 if($tecPhoto == ""){ 
		echo "";
	}else{ ?>
      <img src="photoTec/<?php echo $tecPhoto;?>" width="100"  style="border:1px solid #CCCCCC; padding:1px"/>
      <?php } ?></td>
  </tr>
  <tr>
    <td align="left" valign="top">ชื่อ นามสกุล :</td>
    <td align="left" valign="top"><?php echo $tecLogFname;?></td>
  </tr>
  <tr>
    <td align="left" valign="top">หมายเลขโทรศัพท์ :</td>
    <td align="left" valign="top"><?php echo $tecTel;?></td>
  </tr>
  <tr>
    <td align="left" valign="top">หมายเลขโทรศัพท์ (มือถือ) :</td>
    <td align="left" valign="top"><?php echo $tectelsan;?></td>
  </tr>
  <tr>
    <td align="left" valign="top">อีเมล์  :</td>
    <td align="left" valign="top"><?php echo $tecEmail;?></td>
  </tr>
   <tr>
    <td colspan="2" align="left" valign="top"><hr size="1"></td>
  </tr>
   <tr>
     <td align="left" valign="top"><b>ข้อมูลครูที่ปรึกษา (ร่วม)</b></td>
     <td align="left" valign="top">&nbsp;</td>
   </tr>
   <tr>
     <td align="left" valign="top">&nbsp;</td>
     <td align="left" valign="top"><?php
	 if($tecPhoto2 == ""){ 
		echo "";
	}else{ ?>
       <img src="photoTec/<?php echo $tecPhoto2;?>" width="100"  style="border:1px solid #CCCCCC; padding:1px"/>
       <?php } ?></td>
   </tr>
   <tr>
     <td align="left" valign="top">ชื่อ นามสกุล :</td>
     <td align="left" valign="top"><?php echo $tecLogFname2;?></td>
   </tr>
   <tr>
     <td align="left" valign="top">หมายเลขโทรศัพท์ :</td>
     <td align="left" valign="top"><?php echo $tecTel2;?></td>
   </tr>
   <tr>
     <td align="left" valign="top">หมายเลขโทรศัพท์ (มือถือ) :</td>
     <td align="left" valign="top"><?php echo $tectelsan2;?></td>
   </tr>
   <tr>
     <td align="left" valign="top">อีเมล์  :</td>
     <td align="left" valign="top"><?php echo $tecEmail2;?></td>
   </tr>
   <tr>
     <td colspan="2" align="left" valign="top"><hr size="1" /></td>
   </tr>
   <tr>
     <td align="left" valign="top"><b>ข้อมูลครูที่ปรึกษา (ร่วม)</b></td>
     <td align="left" valign="top">&nbsp;</td>
   </tr>
   <tr>
     <td align="left" valign="top">&nbsp;</td>
     <td align="left" valign="top"><?php
	 if($tecPhoto3 == ""){ 
		echo "";
	}else{ ?>
       <img src="photoTec/<?php echo $tecPhoto3;?>" width="100"  style="border:1px solid #CCCCCC; padding:1px"/>
       <?php } ?></td>
   </tr>
   <tr>
     <td align="left" valign="top">ชื่อ นามสกุล :</td>
     <td align="left" valign="top"><?php echo $tecLogFname3;?></td>
   </tr>
   <tr>
     <td align="left" valign="top">หมายเลขโทรศัพท์ :</td>
     <td align="left" valign="top"><?php echo $tecTel3;?></td>
   </tr>
   <tr>
     <td align="left" valign="top">หมายเลขโทรศัพท์ (มือถือ) :</td>
     <td align="left" valign="top"><?php echo $tectelsan3;?></td>
   </tr>
   <tr>
     <td align="left" valign="top">อีเมล์  :</td>
     <td align="left" valign="top"><?php echo $tecEmail3;?></td>
   </tr>
  <tr>
    <td colspan="2" align="left" valign="top">&nbsp;</td>
  </tr>
  <tr>
    <td colspan="2" align="left" valign="top">

</td>
  </tr>
</table>

Youez - 2016 - github.com/yon3zu
LinuXploit