-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
55 lines (47 loc) · 1.38 KB
/
Copy pathindex.php
File metadata and controls
55 lines (47 loc) · 1.38 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
54
55
<?php
require 'dutyroster.php';
$dienstplan = new dienstplan();
if(!$dienstplan->load() or $_GET['regenerate']=='regenerate') {
$dienstplan->generate();
}
$debug = $dienstplan->getdebug();
if(isset($_SESSION['username'])) {
$dienstplan->add_message('speichere dutyroster für '.$dienstplan->readable_month);
$dienstplan->save();
} else {
session_destroy();
}
?>
<html lang="de">
<head>
<?php include 'header.html';?>
</head>
<body>
<div class="container">
<?php include 'navigation.php';?>
<h1>Der Dienstplan für <?php echo $dienstplan->readable_month; ?></h1>
<h2><form><button type="submit" formaction="./?generate=generate">NEU GENERIEREN</button></form></h2>
<?php if($debug): ?>
<section class="row">
<aside><?php echo implode("<br>\n", $debug); ?></aside>
</section>
<?php endif; ?>
<section class="row">
<aside><?php echo $dienstplan->show_messages(); ?></aside>
</section>
<section class="row">
<article id="main" class="seven columns">
<?php echo $dienstplan->display('dutyroster'); ?>
</article>
<div class="three columns offset-by-one">
<aside>
<?php echo $dienstplan->display('statistics'); ?>
</aside>
<aside id="debug">
<?php echo $dienstplan->display('debug'); ?>
</aside>
</div>
</section>
</div>
</body>
</html>