|
21 | 21 | ?> |
22 | 22 |
|
23 | 23 | <form method="get"> |
24 | | -<div class="form-check"> |
25 | | -<input class="form-check-input" type="radio" name="sort" id="exampleRadios1" value="activity" checked> |
26 | | - <label class="form-check-label" for="exampleRadios1"> |
27 | | - Activity |
28 | | - </label> |
29 | | -</div> |
30 | | -<div class="form-check"> |
31 | | - <input class="form-check-input" type="radio" name="sort" id="exampleRadios2" value="samm2"> |
32 | | - <label class="form-check-label" for="exampleRadios2"> |
33 | | - SAMM 2 |
34 | | - </label> |
35 | | -</div> |
36 | | -<div class="form-check"> |
37 | | - <input class="form-check-input" type="radio" name="sort" id="exampleRadios3" value="iso27001-2017"> |
38 | | - <label class="form-check-label" for="exampleRadios3"> |
39 | | - ISO27001:27001 |
40 | | - </label> |
41 | | -</div> |
| 24 | + <div class="form-check"> |
| 25 | + <input class="form-check-input" type="radio" name="sort" id="exampleRadios1" value="activity" <?php if($_GET['sort'] == "activity") echo "checked"; ?>> |
| 26 | + <label class="form-check-label" for="exampleRadios1"> |
| 27 | + Activity |
| 28 | + </label> |
| 29 | + </div> |
| 30 | + <div class="form-check"> |
| 31 | + <input class="form-check-input" type="radio" name="sort" id="exampleRadios2" value="samm2" <?php if($_GET['sort'] == "samm2") echo "checked"; ?>> |
| 32 | + <label class="form-check-label" for="exampleRadios2"> |
| 33 | + SAMM 2 |
| 34 | + </label> |
| 35 | + </div> |
| 36 | + <div class="form-check"> |
| 37 | + <input class="form-check-input" type="radio" name="sort" id="exampleRadios3" value="iso27001-2017" <?php if($_GET['sort'] == "iso27001-2017") echo "checked"; ?>> |
| 38 | + <label class="form-check-label" for="exampleRadios3"> |
| 39 | + ISO27001:27001 |
| 40 | + </label> |
| 41 | + </div> |
| 42 | + <div class="form-check"> |
| 43 | + <input type="checkbox" class="form-check-input" name="performed" id="exampleCheck1" value="true" <?php if($showPerformed) {echo " checked=checked";}?>> |
| 44 | + <label class="form-check-label" for="exampleCheck1">Show performed activities</label> |
| 45 | + </div> |
| 46 | + <div class="form-check"> |
| 47 | + <input type="checkbox" class="form-check-input" name="planned" id="exampleCheck2" value="true" <?php if($showPlanned) {echo " checked=checked";} ?>> |
| 48 | + <label class="form-check-label" for="exampleCheck2">Show planned activities</label> |
| 49 | + </div> |
42 | 50 | <button type="submit" class="btn btn-primary">Submit</button> |
43 | 51 | </form> |
44 | 52 |
|
|
58 | 66 | </thead> |
59 | 67 | <tbody> |
60 | 68 | <?php |
61 | | - foreach ($dimensions as $dimension => $subdimensions) { |
| 69 | + foreach ($filteredDimensions as $dimension => $subdimensions) { |
62 | 70 | foreach ($subdimensions as $subdimension => $activity) { |
63 | 71 | foreach ($activity as $activityName => $content) { |
64 | 72 | echo "<tr>"; |
|
94 | 102 | <tbody> |
95 | 103 | <?php |
96 | 104 | $mapping = array(); |
97 | | - foreach ($dimensions as $dimension => $subdimensions) { |
| 105 | + foreach ($filteredDimensions as $dimension => $subdimensions) { |
98 | 106 | foreach ($subdimensions as $subdimension => $activity) { |
99 | 107 | foreach ($activity as $activityName => $content) { |
100 | 108 | $content["dimension"] = $dimension; |
|
110 | 118 | } |
111 | 119 | } |
112 | 120 | } |
113 | | - ksort($mapping); |
| 121 | + ksort($mapping, SORT_NUMERIC); |
114 | 122 |
|
115 | 123 | foreach($mapping as $mappingName => $mappingElement) { |
116 | 124 | foreach($mappingElement as $activityName => $activity) { |
|
0 commit comments