191 lines
5.6 KiB
PHP
191 lines
5.6 KiB
PHP
<?php
|
|
error_reporting(E_ALL);
|
|
|
|
|
|
require('config.php');
|
|
require('EpiApi.php');
|
|
require('vendor/autoload.php');
|
|
|
|
$Epi = new Epirent();
|
|
?>
|
|
|
|
|
|
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
|
|
<title>Packmonitor</title>
|
|
|
|
<!-- Bootstrap -->
|
|
<link rel="stylesheet" href="vendor/twbs/bootstrap/dist/css/bootstrap.min.css" >
|
|
<script src="scripts/jquery-3.5.1.min.js"></script>
|
|
<link href="css/sticky-footer.css" rel="stylesheet">
|
|
<script src="https://kit.fontawesome.com/93d71de8bc.js" crossorigin="anonymous"></script>
|
|
|
|
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
|
|
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
|
<!--[if lt IE 9]>
|
|
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
|
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
|
<![endif]-->
|
|
|
|
<script type="text/javascript">
|
|
$(document).ready(function () {
|
|
refreshCheckOutTable();
|
|
refreshCheckInTable();
|
|
});
|
|
|
|
function refreshCheckOutTable() {
|
|
$('#getCheckOutTableHolder').load('sources/getCheckOutTable.php', function () {
|
|
setTimeout(refreshCheckOutTable, 5000);
|
|
});
|
|
}
|
|
function refreshCheckInTable() {
|
|
$('#getCheckInTableHolder').load('sources/getCheckInTable.php', function () {
|
|
setTimeout(refreshCheckInTable, 5000);
|
|
});
|
|
}
|
|
|
|
|
|
|
|
</script>
|
|
|
|
</head>
|
|
<body style="background-color: black;">
|
|
|
|
<div class="container-fluid">
|
|
<div class="row">
|
|
<div class="col-lg">
|
|
<h2 class="text-light">Check-Out
|
|
<?php
|
|
if (CheckOut_FutureDays != -1) {
|
|
echo "in den nächsten " . CheckOut_FutureDays . " Tagen";
|
|
}
|
|
?></h2>
|
|
<table class="table table-dark">
|
|
<thead>
|
|
<tr>
|
|
<th scope="col">#</th>
|
|
<th scope="col">Kunde</th>
|
|
<th scope="col">Event</th>
|
|
<th scope="col">
|
|
<?php
|
|
if (!HideDispoTimes) {
|
|
echo "Dispo-Start";
|
|
}
|
|
if (UsePackingNoteDateForCheckout) {
|
|
echo "<br><i>Packen-Start</i></th>";
|
|
} else {
|
|
echo "<br><i>VB-Start</i></th>";
|
|
}
|
|
if (!HideCheckInTimeOnCheckout) {
|
|
if(!HideDispoTimes){
|
|
echo "<th scope='col'>Dispo-Ende<br><i>VB-Ende</i></th>";
|
|
}else{
|
|
echo "<th scope='col'><i>VB-Ende</i></th>";
|
|
|
|
}
|
|
|
|
}
|
|
?>
|
|
<th scope="col">Status</th>
|
|
<?php
|
|
if(ShowShippingIcons){
|
|
echo "<th scope='col'>Shipping</th>";
|
|
}
|
|
?>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="getCheckOutTableHolder">
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
<div class="col-lg">
|
|
<h2 class="text-light">Check-In
|
|
<?php
|
|
if (CheckIn_FutureDays != -1) {
|
|
echo "in den nächsten " . CheckIn_FutureDays . " Tagen";
|
|
}
|
|
?></h2>
|
|
<table class="table table-dark">
|
|
<thead>
|
|
<tr>
|
|
<th scope="col">#</th>
|
|
<th scope="col">Kunde</th>
|
|
<th scope="col">Event</th>
|
|
|
|
<?php
|
|
if (!HideCheckOutTimeOnCheckin) {
|
|
echo "<th scope='col'>Dispo-Start<br><i>RP-Start</i></th>";
|
|
}
|
|
|
|
if(!HideDispoTimes){
|
|
echo "<th scope='col'>Dispo-Ende";
|
|
}else{
|
|
echo "<th scope='col'>";
|
|
}
|
|
if (UsePackingNoteDateForCheckin) {
|
|
echo "<br><i>Rücklieferung</i></th>";
|
|
} else {
|
|
echo "<br><i>RP-Ende</i></th>";
|
|
}
|
|
?>
|
|
|
|
|
|
|
|
<th scope="col">Status</th>
|
|
<?php
|
|
if(ShowShippingIcons){
|
|
echo "<th scope='col'>Shipping</th>";
|
|
}
|
|
?>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="getCheckInTableHolder">
|
|
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</header>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
|
|
<script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha384-nvAa0+6Qg9clwYCGGPpDQLVpLNn0fRaROjHqs13t4Ggj3Ez50XnGQqc/r8MhnRDZ" crossorigin="anonymous"></script>
|
|
<!-- Include all compiled plugins (below), or include individual files as needed -->
|
|
<script src="vendor/twbs/bootstrap/dist/js/bootstrap.min.js" integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd" crossorigin="anonymous"></script>
|
|
</body>
|
|
</html>
|
|
|
|
|
|
<?php
|
|
|
|
function getTimeFromSeconds(string $timestring) {
|
|
|
|
$hours = floor($timestring / 3600);
|
|
$mins = floor($timestring / 60 % 60);
|
|
$secs = floor($timestring % 60);
|
|
|
|
$timeFormat = sprintf('%02d:%02d', $hours, $mins);
|
|
|
|
return $timeFormat;
|
|
}
|
|
?>
|