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>สถาบันการอาชีวศึกษาภาคกลาง 2</title> </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 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; } ?> <center> ทำเนียบรูปถ่าย<br /> นักศึกษาหลักสูตรเทคโนโลยีบัณฑิต<br /> <?php echo $maname.$sbnameori."<br>".$scregister.$scnameori." สถาบันการอาชีวศึกษาภาคกลาง 2"; ?> </center> <br /> <table width="1000" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <?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){ 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=""; function check_pic($id){ if ($handle = opendir('photo_std/')) { while (false !== ($entry = readdir($handle))) { if ($entry != "." && $entry != "..") { //strpos(); $entry_array = explode(".",$entry); if($id == $entry_array[0][1][2][3][4][5][6][7][8][9]){ $name[]= $entry; } } } closedir($handle); if(count($name) > 0){ return $name; }else{ return false; } } } ?> <td align="center" valign="top"> <table width="150" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="150" align="center" valign="top"> <?php $student_id=$rsstd['student_id']; $pic = check_pic($student_id); foreach($pic as $item){ echo "stdpic=>".$item; ?> <!-----------------------------------------------เริ่มแสดงความเห็นใต้ภาพ----------------------------------------------> <a class="thumbnail" href="" title=""> <?php if($item != ""){ ?> <span><img alt="" src="photo_std/<?php echo $item//$rsstd['student_id']."."."jpg";?>" width="400" /></span><img alt="" src="photo_std/<?php echo $item//$rsstd['student_id']."."."jpg";?>" width="150" style="border:1px solid #CCCCCC; padding:4px"/> <?php }else{ ?> <span><img alt="" src="photo_std/00.jpg" width="400" /></span><img alt="" src="photo_std/00.jpg" width="150" style="border:1px solid #CCCCCC; padding:4px"/> <?php } ?> </a> <?php }//foreach ?> </td> </tr> <tr> <td align="center" valign="top"><?php echo $rsstd['student_id']."<br>".$stdPrefixThaiori.$rsstd['stu_fname']." ".$stdPrefixThaiori.$rsstd['stu_fname'];?></td> </tr> </table></td> <?php //เพิ่มจำนวนคอล้มน์และตรวจสอบว่า แสดงข่าวครบ 3 คอลัมน์หรือยัง // ถ้าครบแล้ว ให้เพิ่มหมายเลขบรรทัด พร้อมทั้งกำหนดตำแหน่งคอลัมน์ให้เริ่มที่ 0 เพื่อจะได้นับคอลัมน์ของแถวถัดไป $count_column ++; if($count_column==4){ $count_rows ++; $count_column = 0; echo "<tr></tr>"; } }//end while ?> </tr> </table> <p> </p> </body> </html>