| Server IP : 104.21.80.248 / Your IP : 162.159.115.41 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";
date_default_timezone_set("Asia/Bangkok");
$code = $_GET['code'];
$action = $_GET['action'];
if($action=="checkout"){
$mysqli->query("UPDATE checkout SET teacher='$idadmin',active='yes' WHERE stucode='$code' AND active='no'");
$mysqli->query("UPDATE student SET status='out' WHERE code='$code' AND status='in'");
echo "<script>window.parent.location=\"CheckOUT.php\"</script>";
}else if ($action=="checkin") {
$tid = $_GET['tid'];
$today=date("Y-m-d H:i:s");
$mysqli->query("INSERT INTO checkin(Id,stucode,teacher,date) VALUES ('','$code','$tid','$today')") ;
$mysqli->query("UPDATE student SET status='in' WHERE code='$code' AND status='out'");
echo "<script>window.parent.location=\"CheckIN.php\"</script>";
}
?>
<?php
require '../admin/popup.php';
//require '../footer.php';
?>
</body>
</html>