-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathWUDetails.php
More file actions
53 lines (53 loc) · 2.17 KB
/
WUDetails.php
File metadata and controls
53 lines (53 loc) · 2.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
session_start();
if (!isset($_SESSION['IP'])) { $_SESSION['IP'] = $_SERVER['REMOTE_ADDR']; $_SESSION['Logged_In'] = 0;}
?>
<!doctype html>
<html>
<head>
<title>Arbeitspaket Details</title>
<link rel="stylesheet" href="include/body.css" type="text/css">
</head>
<body>
<h2>Bisherige Buchungen:</h2>
<table rules="all" border="1px" style="width: 100%; border-color: #FFFFFF">
<tr>
<th>Buchungsdatum</th>
<th>Beschreibung der Tätigkeiten</th>
<th>Mitarbeiter</th>
</tr>
<?php
include "include/PDOConnect.php";
$query = $connection->prepare("SELECT * FROM hours_worked INNER JOIN users on hours_worked.user_id = users.ID WHERE workunit_id = :id");
$query->bindParam(':id', $_GET['ID'], PDO::PARAM_STR);
$query->execute();
for ($i = 0; $i < $query->rowCount(); $i++)
{
$row = $query->fetch();
$WUTable .= "<tr><td>" . $row['creation'] . "</td>";
$WUTable .= "<td><a href='WUDetails.php?id=" . $row['ID'] . "'>" . $row['description'] . "</a></td>";
$WUTable .= "<td>" . $assignment_row['displayname'] . "</td>";
$WUTable .= "<td>" . $row['deadline'] . "</td></tr>";
}
echo $WUTable . "</table>";
?>
<br>
<br>
<h2>Zeiten Buchen:</h2>
<form id='CreateWorkUnit' action='/Project/CreateWorkUnit.php' method='post' accept-charset='UTF-8'>
<input type='hidden' name='submitted' id='submitted' value='1'/>
<input type='hidden' name='Workunit_ID' id='Project_ID' value=<?php echo "'" . $_GET["id"] . "'"; ?>/>
<table rules="all" border="1px" style="width: 100%; border-color: #FFFFFF">
<tr><td><label for='Activity'>Tätigkeitsbeschreibung:</label></td>
<td><textarea Cols="100" rows="25" name='Activity' id='Activity'></textarea></td></tr>
<tr><td><label for='Hours'>Gearbeitete Zeit:</label></td>
<td><input type='text' name='hours' id='hours' maxlength="5" />
<input type='text' name='minutes' id='minutes' maxlength="5" /></td></tr>
<tr><td><label for='Bhours'>Fakturierbare Zeit:</label></td>
<td><input type='text' name='Bhours' id='Bhours' maxlength="5"/>
<input type='text' name='Bminutes' id='Bminutes' maxlength="5"/></td></tr>
<tr><td> </td><td><input type='submit' name='Submit' value='Submit' /></td>
</tr>
</form>
</table>
</html>