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" /> <link href="dist/css/bootstrap.min.css" rel="stylesheet"> <title>ค้นหารูป</title> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> </head> <body> <div class="container"> <center> <h2>ค้นหารูปนักศึกษาในสังกัดสถาบันภาคกลาง 2</h2> <?php include("connect/connect.php"); $dir = "photo_std/"; // Open a directory, and read its contents if (is_dir($dir)){ if ($dh = opendir($dir)){ while (($file = readdir($dh)) !== false){ //echo "filename:" . $file . "<br>"; if(strpos($file, $_POST['my_id']) !== false){ $data[] = $file; } } closedir($dh); } }else{ echo "not file"; } ?> <br /> <form class="form-horizontal" action="?show=1" method="post" enctype="multipart/form-data"> <div class="form-group"> <label for="inputPassword3" class="col-sm-5 control-label">ค้นหาตามรหัสประจำตัวนักศึกษา :</label> <div class="col-sm-7" style="text-align:left;"> <input name="my_id" type="text" id="student_id" size="25" /> </div> </div> <div class="form-group"> <div class=" col-sm-12"> <input type="submit" name="button" class="btn btn-success" id="button" value="Submit" /> </div> </div> <div class="form-group"> <div class=" col-sm-12"> <a href="index.php"><button type="button" class="btn btn-link">กลับหน้าหลัก</button></a> </div> </div> </form> <br /> <form method="post" action="zipfile/zippic.php"> <button type="submit" class="btn" value="Zip" >Zip</button><br /> <br /><table class="table table-hover"> <tr> <th>ลำดับที่</th> <th>ชื่อไฟล์รูป</th> <th>รูปถ่ายนักศึกษา</th> <th>เลือก || เลือกทั้งหมด <input type="checkbox" id="all" /></th> </tr> <script> $('#all').click(function () { $('input:checkbox').prop('checked', this.checked); }); </script> <?php $i =1; foreach($data as $pic){ echo "<tr>"; echo "<td>".$i++."</td>"; echo "<td>".$pic."</td>"; echo '<td><a href="zipfile/openphoto.php?pic='.urlencode('../backup_std/'.$pic).'&name='.urlencode($pic).'"><img src="photo_std/'.$pic.'" style="max-width:125px;" ></a></td>'; echo '<td><input type="checkbox" name="pic[]" id="checkboxitem" value="../photo_std/'.$pic.'" /></td>'; echo "</tr>"; } ?> </table> </center> </div> </body> </html>