| Server IP : 104.21.80.248 / Your IP : 162.159.115.42 Web Server : Apache/2.4.25 (Win32) OpenSSL/1.0.2j PHP/5.6.30 System : Windows NT WIN-ECQAAA40806 6.2 build 9200 (Windows Server 2012 Standard Edition) i586 User : SYSTEM ( 0) PHP Version : 5.6.30 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /Inetpub/www/news/edu2018/teacher/ |
Upload File : |
<?php
include "header.php";
$SQL1 = $mysqli->query("SELECT * FROM student where status='out'");
?>
<div class="wrapper">
<div class="container">
<form name="user" action="" method="post">
<div class="table-responsive">
<!--Breadcrumbs -->
<ol class="breadcrumb">
<li><a href="index.html">Home</a></li>
<li class="active"><font color="#0039e6">ข้อมูลนักเรียน</font></li>
</ol>
<!--End Breadcrumbs -->
<table id="Get_data" class="table table-hover table-datatable table-striped table-bordered">
<thead>
<tr>
<td width="30">NO</td>
<td width="100" align='center'>รหัส</td>
<td align='center'>ชื่อ-นามสกุล</td>
<td width="50">ชื่อเล่น</td>
<td width="50" align='center'>ชั้น</td>
<td width="70" align='center'>หอพัก</td>
<td width="50" align='center'>รูป</td>
<td width="100" align='center'>จัดการ</td>
</tr>
</thead>
<?php
$i=0;
while($Row=mysqli_fetch_array($SQL1)) {
$i++
?>
<tr>
<td align="center"><?=$i;?></td>
<td align='center'><?=$Row["code"];?></td>
<td><?=$Row["prefix"];?><?=$Row["name"];?> <?=$Row["sname"];?></td>
<td><?=$Row["nicname"];?></td>
<td align='center'><?=$Row["class"];?></td>
<td><?=$Row["rsroom"];?></td>
<td align='center'><?php if($Row["pic"]==""){echo "-";}else { ?>
<button type="button" class="btn btn-default btn-xs" data-toggle = "modal" data-target="#pic<?=$Row["code"];?>">
<span class='glyphicon glyphicon-picture'></span> Picture</button>
<?php } ?>
<!-- Modal -->
<div class="modal fade" id="pic<?=$Row['code'];?>" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">รูปนักเรียน</h4>
</div>
<div class="modal-body">
<p><center><img src="../student/photo/<?=$Row["pic"];?>" class="img-thumbnail" alt="<?=$Row["code"];?>" width="300" height="320"><br>
<h4>รหัส : <?=$Row["code"];?></h4>
</center></p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">ปิด</button>
</div>
</div>
</div>
</div>
</td>
<td align="center">
<?php if($Row["status"]=="out"){?>
<button type="button" class="btn btn-success btn-xs" data-toggle = "modal" data-target="#<?=$Row["code"];?>"> <span class="glyphicon glyphicon-edit"></span> Check-IN </button>
<!-- Modal -->
<div class="modal fade" id="<?=$Row['code'];?>" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">รับนักเรียนเข้าโรงเรียน</h4>
</div>
<div class="modal-body">
<div class="row">
<div class="col-sm-4">
<p>รูปนักเรียน</p>
<img src="../student/photo/<?=$Row["pic"];?>" class="img-thumbnail" alt="<?=$Row["code"];?>" width="150" height="120"><br>
<?=$Row["prefix"];?><?=$Row["name"];?> <?=$Row["sname"];?>
</div>
<div class="col-sm-8">
<?php
$grand= $mysqli->query("SELECT * FROM checkout where stucode='$Row[code]' AND active='yes' ORDER BY Id DESC LIMIT 1");
$record = mysqli_fetch_array($grand);
?><p>รูปผู้ปกครองมารับเมื่อ <?=$record['date'];?></p>
<img src="../photo/chk-out/<?=$record['tphoto'];?>" class="img-thumbnail" width="290" ><br>
<?php
$grand1= $mysqli->query("SELECT * FROM grand where tid='$record[tid]'");
$record1 = mysqli_fetch_array($grand1);
?>
<?=$record1['tprefix'];?><?=$record1['tname'];?> <?=$record1['tsname'];?>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">ปิด</button>
<a href="ok.php?code=<?=$Row['code'];?>&tid=<?=$idadmin;?>&action=checkin" class="btn btn-success" role="button">บันทึก</a>
</div>
</div>
</div>
</div>
<?php }else { ?>
<button type="button" class="btn btn-warning btn-xs"><span class="glyphicon glyphicon-edit"></span> Check-OUT</button>
<?php } ?>
</td>
</tr>
<?php } ?>
</table>
<script>
$(document).ready(function(){
$('#Get_data').DataTable();
});
</script>
</div>
</form>
</div>
</div>
<?php
require '../admin/popup.php';
require '../footer.php';
?>
</body>
</html>