-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.php
30 lines (28 loc) · 882 Bytes
/
index.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
<?php
$conf = file_get_contents('./config.json');
$CONFIG = json_decode($conf);
?>
<!DOCTYPE html>
<html>
<?php
include './head.php';
include './backend/funcs.php';
$db_conn = \funcs\Functions::conn();
$sql = 'SELECT * FROM `domains`';
$res = \funcs\Functions::query($db_conn, $sql);
while ($row = mysqli_fetch_assoc($res)) {
$urls[$row['url']] = $row['status'];
}
$sql = 'SELECT * FROM `messages`';
$res = \funcs\Functions::query($db_conn, $sql);
while ($res !== false && $row = mysqli_fetch_assoc($res)) {
$messages[$row['id']]['message'] = $row['message'];
$messages[$row['id']]['colour'] = $row['colour'];
}
?>
<body>
<?php include './header.php'; ?>
<?php include './main-content.php'; ?>
<?php include './footer.php'; ?>
</body>
</html>