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 : |
<!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 ?> <?php $se = $_REQUEST['se']; $group_id = $_REQUEST['group_id']; if($se==""){ ?> <h1> </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>วิทยาลัยเทคนิคลพบุรี</h1> <h1>ประมวลผลเลขที่บัตรประจำตัวนักเรียนนักศึกษารายกลุ่ม</h1></td> </tr> <tr> <td width="200" align="right" valign="top">กลุ่มนักศึกษา:</td> <td width="300" align="left" valign="top"><label for="group_id"></label> <input name="se" id="se" type="hidden" value="1" /> <input name="group_id" type="text" id="group_id" size="25" /> <input type="submit" name="button" id="button" value="Submit" /></td> </tr> <tr> <td colspan="2" align="center" valign="top"><a href="index.php">กลับหน้าหลัก</a></td> </tr> </table> </form> <? }elseif($se==1){ include("connect/connect.php"); $sql_year = "select * from tblstd_idcard where group_id = '$group_id' "; $result2 = mysql_query($sql_year); $rs_year = mysql_fetch_assoc($result2); $years = $rs_year['years']; $minor_name = $rs_year['minor_name']; $sql_max = "select max(card_no), card_no_year from tblstd_idcard where card_no_year = '$years' "; $result1 = mysql_query($sql_max); $rs_max = mysql_fetch_array($result1); $card_no_max = $rs_max['0']; $card_no_year = $rs_max['1']; $n=0; $sql_std = "select * from tblstd_idcard where group_id = '$group_id' order by student_id"; //echo "sql==>".$sql_std; $result1 = mysql_query($sql_std); ?> <form action="card_process_bygroup_ok.php" method="post" enctype="multipart/form-data" name="form1" id="form1"> <input name="group_id" type="hidden" value="<?php echo $group_id; ?>" /> <table width="100%" border="0" cellspacing="5" cellpadding="2"> <tr> <td align="center" valign="top"><h1>วิทยาลัยเทคนิคลพบุรี</h1> <h1>ประมวลผลเลขที่บัตรประจำตัวนักเรียนนักศึกษารายกลุ่ม</h1></td> </tr> <tr> <td align="center" valign="top"> <h2>รหัสกลุ่ม : <?php echo $group_id;?> สาขางาน : <?php echo $minor_name;?></h2></td> </tr> </table> <fieldset style="margin-bottom:20px;" > <table width="60%" border="0" cellspacing="5" cellpadding="2" align="center"> <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> <? $dmy=explode("/",$birthday_th); for($numday=1;$numday<= 31;$numday++) { if($dmy[0]==$numday) $dSe1="SELECTED"; else $dSe1=""; ?> <option value="<? echo $numday;?>" <? echo $dSe1; ?>> <? echo $numday;?></option> <? } ?> </select></td> <td><select id="m" size="1" name="m" style="width:150px" class="validate[required]"> <option value="">----------เดือน:----------</option> <? for($nums=0;$nums<= count($thai_n)-1;$nums++) { if($dmy[1]==$nums+1) $dSe2="SELECTED"; else $dSe2=""; ?> <option value="<? echo $nums+1;?>" <? echo $dSe2; ?>> <? echo $thai_n[$nums];?></option> <? } ?> </select></td> <td><select id="y" name="y" style="width:70px" class="validate[required]"> <option value="">ปี พ.ศ.:</option> <? $thiyear=0; echo $startyear ." ". $endyear; for($num=$startyear;$num<=$endyear;$num++) { $thiyear = $num+543; if($dmy[2]==$thiyear) $dSe3="SELECTED"; else $dSe3=""; ?> <option value="<? echo $thiyear;?>" <? echo $dSe3; ?>> <? echo $thiyear;?></option> <? } ?> </select></td> </tr> </table> </td> <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> <? $dmy=explode("/",$birthday_th); for($numday=1;$numday<= 31;$numday++) { if($dmy[0]==$numday) $dSe11="SELECTED"; else $dSe11=""; ?> <option value="<? echo $numday;?>" <? echo $dSe11; ?>> <? echo $numday;?></option> <? } ?> </select></td> <td><select id="m2" size="1" name="m2" style="width:150px" class="validate[required]"> <option value="">----------เดือน:----------</option> <? for($nums=0;$nums<= count($thai_n)-1;$nums++) { if($dmy[1]==$nums+1) $dSe21="SELECTED"; else $dSe21=""; ?> <option value="<? echo $nums+1;?>" <? echo $dSe21; ?>> <? echo $thai_n[$nums];?></option> <? } ?> </select></td> <td><select id="y2" name="y2" style="width:70px" class="validate[required]"> <option value="">ปี พ.ศ.:</option> <? $thiyear=0; echo $startyear ." ". $endyear; for($num=$startyear;$num<=$endyear;$num++) { $thiyear = $num+543; if($dmy[2]==$thiyear) $dSe31="SELECTED"; else $dSe31=""; ?> <option value="<? echo $thiyear;?>" <? echo $dSe31; ?>> <? echo $thiyear;?></option> <? } ?> </select></td> </tr> </table></td> </tr> </table> </fieldset> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td>ที่</td> <td>รหัสประจำตัวนักศึกษา</td> <td>เลขที่บัตรประชาชน</td> <td>ชื่อ</td> <td>นามสกุล</td> <td>เลขที่บัตรเก่า</td> <td>เลขที่บัตรใหม่</td> </tr> <? $n=0; while($rs_std = mysql_fetch_assoc($result1)){ $n++; $card_no_max++; $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']; if($perfix_id=="002") $stdPrefixThai="นาย"; elseif($perfix_id=="003") $stdPrefixThai="นางสาว"; else $stdPrefixThai=""; if(strlen($card_no_max)==1) $card_no_show = "000".$card_no_max; else if(strlen($card_no_max)==2) $card_no_show = "00".$card_no_max; else if(strlen($card_no_max)==3) $card_no_show = "0".$card_no_max; else $card_no_show = $card_no_max; ?> <tr> <td width="5%"><? echo $n;?></td> <td width="10%"><input name="student_id1[]" type="hidden" value="<?php echo $student_id; ?>" /> <input name="student_id[]" type="text" id="student_id[]" size="25" value="<? echo $student_id;?>" disabled="disabled" /></td> <td width="10%"><input name="people_id[]" type="text" id="people_id[]" size="25" value="<? echo $people_id;?>" disabled="disabled" /></td> <td width="15%"> <input name="stu_fname[]" type="text" id="stu_fname[]" size="25" value="<? echo $stdPrefixThai.$stu_fname;?>" disabled="disabled" /></td> <td width="15%"> <input name="stu_lname[]" type="text" id="stu_lname[]" size="25" value="<? echo $stu_lname; ?>" disabled="disabled"/></td> <td width="15%" align="center"><input name="old_card[]" type="text" id="old_card[]" size="25" value="-" disabled="disabled"/></td> <td width="20%"><input name="card_no[]" type="text" id="card_no[]" size="25" value="<? echo $card_no_max."/".$years; ?>"/></td> </tr> <? }} ?> <tr> <td colspan="7" align="center" valign="top"> </td> </tr> <tr> <td colspan="7" align="center" valign="top"> <input name="card_no_max" type="hidden" value="<?php echo $card_no_max; ?>" /> <input name="card_no_year" type="hidden" value="<?php echo $card_no_year; ?>" /> <input type="submit" name="button" id="button" value="บันทึก" /> <input type="reset" name="button2" id="button2" value="ยกเลิก" /></td> </tr> </table> </form> <p> </p> <p> </p> <p> </p> </body> </html>