forked from devsecopsmaturitymodel/DevSecOps-MaturityModel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreport.php
68 lines (54 loc) · 2.01 KB
/
report.php
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
56
57
58
59
60
61
62
63
64
65
66
67
68
<?php
include_once "head.php";
?>
<body>
<?php
include_once "navi.php";
if(array_key_exists("performed", $_GET)) {
$showPerformed = $_GET['performed'];
if($showPerformed != "true") $showPerformed = false;
}else {
$showPerformed = false;
}
if(array_key_exists("planned", $_GET)) {
$showPlanned = $_GET['planned'];
if($showPlanned != "true") $showPlanned = false;
}else {
$showPlanned = false;
}
?>
<form method="get">
<div class="form-check">
<input type="checkbox" class="form-check-input" name="performed" id="exampleCheck1" value="true" <?php if($showPerformed) {echo " checked=checked";}?>>
<label class="form-check-label" for="exampleCheck1">Show performed activities</label>
</div>
<div class="form-check">
<input type="checkbox" class="form-check-input" name="planned" id="exampleCheck2" value="true" <?php if($showPlanned) {echo " checked=checked";} ?>>
<label class="form-check-label" for="exampleCheck2">Show planned activities</label>
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
<?php
include_once "data.php";
include_once "detail.php";
foreach ($dimensions as $dimension => $subdimensions) {
echo "<h1>Dimension $dimension</h1>";
foreach ($subdimensions as $subdimension => $activity) {
echo "<h2>Sub-Dimension $subdimension</h2>";
for ($i = 1; $i <= 4; $i++) {
$tableContent .= "<td><ul>";
foreach ($activity as $activityName => $content) {
if(elementIsSelected($activityName) && !$showPerformed) {
continue;
}
if(!elementIsSelected($activityName) && !$showPlanned) {
continue;
}
$content = getContentForLevelFromSubdimensions($i, $content, $activityName);
if ($content != "") {
printDetail($dimension, $subdimension, $activityName, $dimensions, true);
}
}
}
}
}