Skip to content

Commit

Permalink
Add stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim-Digital-Business committed Jan 28, 2022
1 parent ae6961d commit 908c92e
Show file tree
Hide file tree
Showing 4 changed files with 103 additions and 0 deletions.
1 change: 1 addition & 0 deletions auth/profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
resetten</a>
<a href="logout.php" class="btn btn-danger ml-3">Logout</a>
<a href="../tickets/ticket-list.php" class="btn btn-info ml-3">Übersicht Ticket Liste</a>
<a href="../tickets/ticket-list-bildschirm.php" class="btn btn-info ml-3">Übersicht Ticket Liste(Bildschirm)</a>
</p>
</body>

Expand Down
Binary file added tickets/Bell.mp3
Binary file not shown.
21 changes: 21 additions & 0 deletions tickets/table-list-content-refresh.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php
require_once('../database/config.php');

#get DB content
$sql = "SELECT TicketID,Datum,Abteilung,Name,Problem,Assign FROM ticket_table ORDER BY TicketID DESC";
$result = $link->query($sql);

while ($row = $result->fetch_assoc()) {
$ticketID = $row['TicketID'];
echo "
<tr id=1>
<th scope='row'>$row[TicketID]</th>
<td>$row[Abteilung]</td>
<td>$row[Name]</td>
<td>$row[Problem]</td>
<td>$row[Datum]</td>
<td>$row[Assign]</td>
</tr>
";
}
81 changes: 81 additions & 0 deletions tickets/ticket-list-bildschirm.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<?php
#header("Refresh: 60");
require_once('../database/config.php');
include_once('modal-delete-ticket.php');
include_once('modal-assign-ticket.php');
?>

<link rel="stylesheet" href="https://cdn.datatables.net/1.11.3/css/jquery.dataTables.min.css">
<script src="https://cdn.datatables.net/1.11.3/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/plug-ins/1.11.3/sorting/any-number.js"></script>
<script src="https://cdn.datatables.net/plug-ins/1.11.3/sorting/natural.js"></script>
<script src="https://cdn.datatables.net/plug-ins/1.11.3/sorting/date-de.js"></script>
<script src="https://cdn.datatables.net/plug-ins/1.11.3/features/scrollResize/dataTables.scrollResize.min.js"></script>

<body>
<div class="container">

<div class="text-center mt-5 pt-5">
<h3>Ticket Liste</h3>
</div>

<?php
#get DB content
$sql = "SELECT TicketID,Datum,Abteilung,Name,Problem,Assign FROM ticket_table ORDER BY TicketID DESC";
$result = $link->query($sql);
?>
<main class="container" style="margin-top: 25px; overflow-y: auto; height: calc(100vh - 210px);">
<?php

echo "
<table style='width:100%' id='table1' class='display'>
<thead>
<tr>
<th>Ticket ID</th>
<th>Abteilung</th>
<th>Name</th>
<th>Problem</th>
<th>Erfasst am</th>
<th>Bearbeitet von</th>
</tr>
</thead>
<tbody id=1> ";

while ($row = $result->fetch_assoc()) {
$ticketID = $row['TicketID'];
echo "
<tr id=1>
<th scope='row'>$row[TicketID]</th>
<td>$row[Abteilung]</td>
<td>$row[Name]</td>
<td>$row[Problem]</td>
<td>$row[Datum]</td>
<td>$row[Assign]</td>
</tr>
";
}
echo "
</tbody>
</table>";
?>

</main>
</div>
</body>
<!-- Search Ticket Table -->
<script>
$(document).ready(function() {
setInterval(function() {
$("#1").load("table-list-content-refresh.php");
}, 5000);


$('#table1').DataTable({
// scrollResize: true,
// scrollY: 100,
// scrollCollapse: true,
// paging: false
});
});
</script>

0 comments on commit 908c92e

Please sign in to comment.