-
Notifications
You must be signed in to change notification settings - Fork 0
/
contact.php
107 lines (78 loc) · 4.47 KB
/
contact.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<!DOCTYPE html>
<html>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="styles/main.css">
<link rel="stylesheet" href="styles/contact.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<script src="https://kit.fontawesome.com/a076d05399.js" crossorigin="anonymous"></script>
<script src="script.js"></script>
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon">
<title>Kontakt</title>
<body onload = time();>
<?php require_once "./header.php" ?>
<?php require_once 'libs/users.php' ?>
<?php require_once 'libs/db.php' ?>
<div class="content">
<div class="contact">
<div class="info">
<?php $results = mysqli_query($db, "SELECT * FROM contact"); ?>
<?php while ($row = mysqli_fetch_array($results)) { ?>
<?php if (isset($_SESSION['user']) && $_SESSION['usertype'] == 'admin'): ?>
<button class="btn btn-success edit-info" style="border-radius: 15px;">
<a href="change-info.php?edit=<?php echo $row['id']; ?>">Upraviť údaje <i class="fa fa-edit"></i></a>
</button>
<?php endif; ?>
<h2>Adresa<i class="fa fa-address-book" style="font-size:24px; margin-left: 4.5%"></i></h2>
<address><?php echo $row['address']; ?></address>
<h2>Starosta<i class="fa fa-vcard" style="font-size:24px; margin-left: 4.5%"></i></h2>
<address><?php echo $row['mayor']; ?></address>
<h2>Telefónne číslo<i class="fa fa-phone" style="font-size:24px; margin-left: 4.5%"></i></h2>
<address><?php echo $row['phone']; ?></address>
<h2>E-mail<i class="fa fa-envelope" style="font-size: 24px; margin-left: 4.5%"></i></h2>
<address><?php echo $row['email']; ?></address>
<?php } ?>
</div>
<div class="map">
<?php $results = mysqli_query($db, "SELECT * FROM map"); ?>
<?php while ($row = mysqli_fetch_array($results)) { ?>
<?php if (isset($_SESSION['user']) && $_SESSION['usertype'] == 'admin'): ?>
<button class="btn btn-success edit-info" style="border-radius: 15px;">
<a href="edit-map.php?edit=<?php echo $row['id']; ?>">Upraviť súradnice na mape <i class="fa fa-edit"></i></a>
</button>
<?php endif; ?>
<?php echo $row['map']; ?>
<?php } ?>
</div>
</div>
<div class="office_hours">
<h1>Úradné hodiny</h1>
<table>
<tr>
<th>Deň</th>
<th>Čas</th>
<th>Dezinfekčná prestávka</th>
<th>Čas</th>
</tr>
<?php $results = mysqli_query($db, "SELECT * FROM office_hours"); ?>
<?php while ($row = mysqli_fetch_array($results)) { ?>
<tr class="time">
<td class="day"> <?= $row["day"] ?>
<?php if (isset($_SESSION['user']) && $_SESSION['usertype'] == 'admin'): ?>
<button class="btn btn-success" style="border-radius: 15px; margin-right: 10%;">
<a href="edit-time.php?edit=<?php echo $row['id']; ?>">Upraviť časy <i class="fa fa-edit"></i></a>
</button>
<?php endif; ?>
</td>
<td><?php echo $row['time']; ?></td>
<td><?php echo $row['break']; ?></td>
<td><?php echo $row['time2']; ?></td>
</tr>
<?php } ?>
</table>
</div>
</div>
<?php require_once "./footer.php" ?>
</body>
</html>