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 : |
<?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> <?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"); include("connect/function.php"); $year =$_POST['y'];//ปีการศึกษา $scid= $_POST['tecSchool'];//วิลัยฯที่เลือก$schoolid; $major_id = $_POST['tecSub'];//รหัสสาขาวิชาที่เลือก$majorID; //ดึงชื่อวิลัย $sqlschool="select * from tbl_school where subscID='$scid' "; $reschool=mysql_query($sqlschool); $rsschool=mysql_fetch_array($reschool); $scName=$rsschool['scName']; //ดึงชื่อสาขา $sqlmajor="select * from tbl_dptsubject where sbID='$major_id' "; $remajor=mysql_query($sqlmajor); $rsmajor=mysql_fetch_array($remajor); $sbname=$rsmajor['sbName']; if($scid ==""){ $scregister=""; }else{ $scregister="สังกัด"; } if($major_id==""){ $maname =""; }else{ $maname = "สาขาวิชา"; $sbnameori = $sbname; } if($year == ""){ $yearsori=""; }else{ $textori="ประจำปี"; $yearsori=$year; } ?> <body> <p> </p> <table width="700" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td colspan="3" align="center" valign="top"><h3>สถาบันการอาชีวศึกษาภาคกลาง 2 <br />รายงานข้อมูลการพิมพ์บัตรประจำตัวนักศึกษา <?php echo $scregister.$scName.' <br> '.$maname.$sbnameori.' '.$textori.' '.$yearsori;?></h3></td> <tr> <td colspan="3" align="center" valign="top"><h3></h3></td> </tr> </tr> <tr> <td width="275" align="center" valign="top"> </td> <td width="117" align="center" valign="top"> </td> <td width="278" align="center" valign="top"> </td> </tr> </table><center><h3><a href="system_pdffile/reportPcardbyyear.php?printyear=<?php echo $year;?>&scid=<?php echo $scid;?>&major_id=<?php echo $major_id;?>" target="_blank"><<พิมพ์รายงาน>></a> || <a href="listsubjectbyYear.php">ถอยกลับ</a></h3></center></p> <table width="70%" border="0" align="center" cellpadding="3" cellspacing="1"> <tr> <td width="6%" height="40" align="center" valign="middle" bgcolor="#CCCCCC">ลำดับที่</td> <td width="10%" height="40" align="center" valign="middle" bgcolor="#CCCCCC">เลขที่บัตร</td> <td width="24%" height="40" align="center" valign="middle" bgcolor="#CCCCCC">รหัส นศ.</td> <td width="27%" height="40" align="center" valign="middle" bgcolor="#CCCCCC">ชื่อ - นามกสุล</td> <td width="16%" height="40" align="center" valign="middle" bgcolor="#CCCCCC">วันที่พิมพ์บัตร</td> <td width="11%" height="40" align="center" valign="middle" bgcolor="#CCCCCC">เวลา</td> <td width="6%" height="40" align="center" valign="middle" bgcolor="#CCCCCC"> </td> </tr> <?php if($year == '' && $scid == '' && $major_id== ''){//4 $sqlstdall="select * from log_print_card order by student_id,card_no ASC"; }else if($year != '' && $scid == '' && $major_id== ''){//8 $sqlstdall="select * from log_print_card where printyear='$year' order by student_id,card_no ASC"; }else if($year == '' && $scid != '' && $major_id== ''){//7 $sqlstdall="select * from log_print_card where idschool='$scid' order by student_id,card_no ASC"; }else if($year == '' && $scid == '' && $major_id != ''){//11 $sqlstdall="select * from log_print_card where major_id='$major_id' order by student_id,card_no ASC"; }else if($year != '' && $scid != '' && $major_id == ''){//10 $sqlstdall="select * from log_print_card where printyear='$year' and idschool='$scid' order by student_id,card_no ASC"; }else if($year != '' && $scid == '' && $major_id != ''){//9 $sqlstdall="select * from log_print_card where printyear='$year' and major_id='$major_id' order by student_id,card_no ASC"; }else if($year == '' && $scid != '' && $major_id == ''){ //1 $sqlstdall="select * from log_print_card where idschool='$scid' order by student_id,card_no ASC"; }else if($year == '' && $scid != '' && $major_id != ''){//2 $sqlstdall="select * from log_print_card where idschool='$scid' and major_id='$major_id' order by student_id,card_no ASC"; }else if($year == '' && $scid == '' && $major_id != ''){ //5 $sqlstdall="select * from log_print_card where major_id='$major_id' order by student_id,card_no ASC"; }else if($year != '' && $scid == '' && $major_id != ''){//6 $sqlstdall="select * from log_print_card where printyear='$year' and major_id='$major_id' order by student_id,card_no ASC"; }else if($year != '' && $scid != '' && $major_id != ''){ //3 $sqlstdall="select * from log_print_card where printyear='$year' and major_id='$major_id' and idschool='$scid' order by student_id,card_no ASC"; } //echo "all->".$sqlstdall; $resultall=mysql_query($sqlstdall); $numrow=mysql_num_rows($resultall); $n=0; while($rsall=mysql_fetch_array($resultall)){ $n++; $card_noori=$rsall['card_no']; $student_id=$rsall['student_id']; if(strlen($card_noori)==1) $card_no_showori = "00000".$card_noori; else if(strlen($card_noori)==2) $card_no_showori = "0000".$card_noori; else if(strlen($card_noori)==3) $card_no_showori = "000".$card_noori; else if(strlen($card_noori)==4) $card_no_showori = "00".$card_noori; else if(strlen($card_noori)==5) $card_no_showori = "0".$card_noori; else $card_no_showori = $card_noori; $sqlstd="select * from tblstd_idcard where student_id='$student_id'"; $result=mysql_query($sqlstd); $rsstd=mysql_fetch_array($result); $perfix_idori =$rsstd['perfix_id']; if($perfix_idori=="002") $stdPrefixThaiori="นาย"; elseif($perfix_idori=="003") $stdPrefixThaiori="นางสาว"; elseif($perfix_idori=="009") $stdPrefixThaiori="จ.ส.ท."; else $stdPrefixThaiori=""; if($bg == "#D5EEFF"){ $bg= "#F0F9FF"; }else{ $bg ="#D5EEFF"; } ?> <tr bgcolor="<?php echo $bg;?>" onmousemove="this.style.backgroundColor='#FFE495'" onmouseout="this.style.backgroundColor=''"> <td align="center" valign="top"><?php echo $n;?></td> <td align="center" valign="top"><?php echo $card_no_showori;?></td> <td align="center" valign="top"><?php echo $rsall['student_id'];?></td> <td align="left" valign="top"><?php echo $stdPrefixThaiori.$rsstd['stu_fname']." ".$rsstd['stu_lname'];?></td> <td align="center" valign="top"><?php echo displaydate($rsall['dateprint']);?></td> <td align="center" valign="top"><?php echo $rsall['timeprint'];?> น.</td> <td align="center" valign="top">ลบ</td> </tr> <?php }//end while ?> </table> <p> </p> </body> </html>