Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>timerec</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<?php
setlocale(LC_TIME, 'de_DE.UTF8');
session_start();
if(!$_SESSION['userid']){
session_destroy();
header('Location: login.php');
}
if(!$_SESSION['userarray']['admin']){
echo "<h3>keine Rechte, diese Seite einzusehen!</h3>";
exit;
}
include('dbconnect.php');
if(isset($_GET['id'])){
$id = $_GET['id'];
$query = "select * from zeit_history where zeit_ID = $id order by timestamp desc;";
$res = $dbc->query($query);
}
if(isset($_GET['del'])){
$datum = $_GET['del'];
$query = "select * from zeit_history
where date(datumzeit) = '$datum' and maID = '". $_SESSION['infoarray']['maID'] ."' and zeit_ID not in (select zeit_ID from zeit)
order by history_ID desc;";
echo $query;
$res = $dbc->query($query);
}
echo "<table id='history'>
<tr><th>Zeit</th><th>Status</th><th>Bemerkung</th><th>geändert am</th><th>geändert durch</th><th>gelöscht durch</th></tr>";
foreach ($res as $row){
echo "<tr>";
echo "<td>".$row['datumzeit']."</td>";
echo "<td>".$row['status']."</td>";
echo "<td>".$row['note']."</td>";
echo "<td>".$row['timestamp']."</td>";
echo "<td>".$row['userid']."</td>";
echo "<td>".$row['del_by']."</td>";
echo "</tr>";
}
echo "</table>";
?>
</body>
</html>