-
Notifications
You must be signed in to change notification settings - Fork 0
/
regeln.php
52 lines (47 loc) · 1.57 KB
/
regeln.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
<?php
include "config.php";
include "lib/meldung.php";
include "lib/fetch_all_assoc.php";
$page['navbarid'] = 2;
// MySQL
$mysqli = new mysqli($mysql_info['hostname'], $mysql_info['username'], $mysql_info['password'], $mysql_info['database']);
$mysqli->set_charset("utf8");
$parents = $mysqli->query("SELECT * FROM regeln WHERE parent = 0");
$parent_row = fetch_all_assoc($parents, array('id'));
$mysqli->close();
include "templates/navbar.php";
?>
<div class="container">
<?php echo meldung("Diese Regeln sind nicht Rechtsgültig", "danger"); ?>
<?php foreach( $parent_row as $Parent ): ?>
<div class="panel panel-default">
<div class="panel-heading"><?php echo $Parent['content']; ?></div>
<div class="panel-body">
<ul>
<?php
$mysqli = new mysqli($mysql_info['hostname'], $mysql_info['username'], $mysql_info['password'], $mysql_info['database']);
$mysqli->set_charset("utf8");
$points = $mysqli->query("SELECT * FROM regeln WHERE parent = " . $Parent['id']);
$points_row = fetch_all_assoc($points, array('id'));
$mysqli->close();
?>
<?php foreach( $points_row as $Point ): ?>
<li><?php echo $Point['content']; ?></li>
<?php endforeach; ?>
</ul>
</div>
</div>
<?php endforeach; ?>
</div>
</div>
<div id="footer">
<div class="container">
<p class="text-muted"></p>
</div>
</div>
<!-- Javascript -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
<!-- End Javascript -->
</body>
</html>