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 session_start(); error_reporting(0); include("connect/connect.php"); /* if($_SESSION['start_login'] != 1){ echo '<META HTTP-EQUIV="Refresh" CONTENT="0;URL=http://std-card.lbtech.ac.th/login.php">'; exit(); } */ //รูปแบบ วัดเดือน ปี เกิด $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 ?> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>System Card</title> <link href="dist/css/bootstrap.min.css" rel="stylesheet"> </head> <!------------นำเมาส์ชี้ที่่รูปแล้วเกิดภาพซ้อน-------------------> <style type="text/css"> /*Credits: Dynamic Drive CSS Library */ /*URL: http://www.dynamicdrive.com/style/ */ .thumbnail{ position: relative; z-index: 0; } .thumbnail:hover{ background-color: transparent; z-index: 50; } .thumbnail span{ /*CSS for enlarged image*/ position: absolute; background-color: lightyellow;/* สีขอบรูปใหญ่ */ padding: 5px; /*ขนาดเส้นกรอบ */ left: -1000px; border: 1.5px dashed gray; /*ขนาดและสีเส้นปะ*/ visibility: hidden; color: black; text-decoration: none ; } .thumbnail span img{ /*CSS for enlarged image*/ border-width: 0; padding: 2px; } .thumbnail:hover span{ /*CSS for enlarged image on hover*/ visibility: visible; top: 10; left: 0px; /*รูปเยื้องทางซ้าย*/ } .style24 {color: #FFFFFF} </style> <!----------------------------> <body> <?php $se = $_REQUEST['se']; if($se==""){ ?> <p><p><p><p> <center><font size="+2"> ค้นหาทำเนียบรุ่นนักศึกษา<br> หลักสูตรเทคโนโลยีบัณฑิต สถาบันการอาชีวศึกษาภาคกลาง 2 </font></center> <div class="container"> <fieldset> <legend> <p> </p> <center> <h3><a href="index.php">กลับหน้าหลัก</a></h3> </center> <form name="form1" method="post" action=""> <table width="800" border="0" align="center" cellpadding="5" cellspacing="5"> <tr> <td width="223" align="right" valign="top">วิทยาลัยในสังกัดสถาบันฯ :</td> <td width="542"><select name="tecSchool" id="dpm_ID4" class="validate[required]"> <option selected value="" >-------------เลือก---------------</option> <?php $sqlsc="select * from tbl_school order by scID ASC"; $resultsc=mysql_query($sqlsc); while($rssc=mysql_fetch_array($resultsc)){ ?> <option value="<?php echo $rssc['subscID'];?>"><?php echo $rssc['scName'];?></option> <?php }//end while dpm ?> </select></td> </tr> <tr> <td align="right" valign="top"> </td> <td> </td> </tr> <tr> <td align="right" valign="top">สาขาวิชาที่เปิดสอน : </td> <td><select name="tecSub" id="tecSub" class="validate[required]"> <option selected value="" >-------------เลือก---------------</option> <?php $sqldpm="select * from tbl_dptsubject"; $resultdpm=mysql_query($sqldpm); while($rsdpm=mysql_fetch_array($resultdpm)){ ?> <option value="<?php echo $rsdpm['sbID'];?>"><?php echo $rsdpm['sbName'];?></option> <?php }//end while dpm ?> </select></td> </tr> <tr> <td align="right" valign="top"> </td> <td> </td> </tr> <tr> <td align="right" valign="top">เลือกปีการศึกษา :</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> <tr> <td align="right" valign="top"> </td> <td> </td> </tr> <tr> <td align="right" valign="top"> </td> <td><input type="submit" name="button" id="button" value="Submit"> <input name="se" id="se" type="hidden" value="1" /></td> </tr> </table> </form> </fieldset> </div> <?php }elseif($se==1){ //include("connect/connect.php"); $year =$_POST['y'];//ปีการศึกษา $scid= $_POST['tecSchool'];//วิลัยฯที่เลือก$schoolid; $major_id = $_POST['tecSub'];//รหัสสาขาวิชาที่เลือก$majorID; /* echo "year=>".$year; echo "<br>school=>".$scid; echo "<br>major_ID=>".$major_id; */ //ดึงชื่อวิลัย $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="สังกัด"; $scnameori=$scName; } if($major_id==""){ $maname =""; }else{ $maname = "สาขาวิชา"; $sbnameori = $sbname; } if($year == ""){ $yearsori=""; }else{ $textori="ประจำปีการศึกษา "; $yearsori=$year; } ?> <p><p><p><p> <center> <font size="+2"> ทำเนียบรูปถ่ายนักศึกษาหลักสูตรเทคโนโลยีบัณฑิต<br /> <?php if($major_id == "" || $scid == "" || $year == ""){ echo " สถาบันการอาชีวศึกษาภาคกลาง 2<br />"; } ?> <?php if($major_id != "" || $scid != ""){ echo $maname.$sbnameori." ".$scregister.$scnameori."<br>"; } ?> <?php if($year != ""){ echo $textori.$yearsori; } ?> </font><p> <h3><a href="photoStd.php?se=<?php echo "";?>">ย้อนกลับ</a></h3> </center> <br /> <?php if($year == '' && $scid == '' && $major_id== ''){//4 $sqlstdall="select * from tblstd_idcard order by student_id,card_no ASC"; }else if($year != NULL && $scid == '' && $major_id== ''){//8 $sqlstdall="select * from tblstd_idcard where start_year='$year' order by student_id,card_no ASC"; }else if($year == '' && $scid != '' && $major_id== ''){//7 $sqlstdall="select * from tblstd_idcard where idschool='$scid' order by student_id,card_no ASC"; }else if($year == '' && $scid == '' && $major_id != ''){//11 $sqlstdall="select * from tblstd_idcard where major_id='$major_id' order by student_id,card_no ASC"; }else if($year != '' && $scid != '' && $major_id == ''){//10 $sqlstdall="select * from tblstd_idcard where start_year='$year' and idschool='$scid' order by student_id,card_no ASC"; }else if($year != '' && $scid == '' && $major_id != ''){//9 $sqlstdall="select * from tblstd_idcard where start_year='$year' and major_id='$major_id' order by student_id,card_no ASC"; }else if($year == '' && $scid != '' && $major_id == ''){ //1 $sqlstdall="select * from tblstd_idcard where idschool='$scid' order by student_id,card_no ASC"; }else if($year == '' && $scid != '' && $major_id != ''){//2 $sqlstdall="select * from tblstd_idcard 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 tblstd_idcard where major_id='$major_id' order by student_id,card_no ASC"; }else if($year != '' && $scid == '' && $major_id != ''){//6 $sqlstdall="select * from tblstd_idcard where start_year='$year' and major_id='$major_id' order by student_id,card_no ASC"; }else if($year != '' && $scid != '' && $major_id != ''){ //3 $sqlstdall="select * from tblstd_idcard where start_year='$year' and major_id='$major_id' and idschool='$scid' order by student_id,card_no ASC"; } $result=mysql_query($sqlstdall); $num_rows=mysql_num_rows($result); $count_column = 0; // นับจำนวนคอลัมน์ $count_rows = 0; // นับจำนวนแถว //while($rsstd=mysql_fetch_array($result) and $count_rows<30){ ?> <table width="800" border="0" align="center" cellpadding="0" cellspacing="5"> <tr> <td align="center" valign="top"><font size="+2"><a name="B1"></a>ข้อมูลทั้งหมด <?php echo $num_rows;?> รายการ</font></td> </tr> <tr> <td align="center" valign="top"> </td> </tr> </table> <table width="1000" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <?php while($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=""; $str_defaultfilepicname = "00.jpg"; // ให้ไฟล์รูปชื่อ 00.png เป็นรูป Default $str_filepicname = $rsstd['student_id'].".jpg"; // ให้ไฟล์รูปชื่อ 01.png เป็นรูปที่ต้องการตรวจสอบ $str_imgpath = "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 ?> <td align="center" valign="top"> <table width="200" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="150" height="150" align="center" valign="top"><!-----------------------------------------------เริ่มแสดงความเห็นใต้ภาพ----------------------------------------------> <a class="thumbnail" href="photoStd.php?se=1" title=""><span><img alt="" src="<?php echo $str_imgfullpath;?>" width="400" /></span> <img src="<?php echo $str_imgfullpath;?>" alt="" height="100" width="100" style="border:1px solid #CCCCCC; padding:1px"/><br><font size="-1"><?php echo $rsstd['student_id']."<br>".$stdPrefixThaiori.$rsstd['stu_fname']." ".$rsstd['stu_lname']."<br>สาขาวิชา".$rsstd['major_name']."<br>".$rsstd['school'];?></font></a></td> </tr> <tr> <td align="center" valign="top"></td> </tr> </table></td> <?php //เพิ่มจำนวนคอล้มน์และตรวจสอบว่า แสดงข่าวครบ 3 คอลัมน์หรือยัง // ถ้าครบแล้ว ให้เพิ่มหมายเลขบรรทัด พร้อมทั้งกำหนดตำแหน่งคอลัมน์ให้เริ่มที่ 0 เพื่อจะได้นับคอลัมน์ของแถวถัดไป $count_column ++; if($count_column==5){ $count_rows ++; $count_column = 0; echo "<tr></tr>"; } }//end while ?> </tr> </table> <br><center> <h3><a href="photoStd.php?se=<?php echo "";?>">ย้อนกลับ</a></h3></center> <?php }//end else se ?> </body> </html>