-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
78 lines (71 loc) · 2.77 KB
/
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
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
<?php
require 'auth.php';
if (isset($_SESSION['TOTP']) && $_SESSION['TOTP'] = 'JW')
{?>
<?php
require "ConnectToDB.php";
$kwerenda_show_osoby = "call WyszukiwarkaSluzbyAll ($id_uzytkownika);";
$wynik_show_osoby = mysqli_query($link, $kwerenda_show_osoby); ?>
<!DOCTYPE html>
<html lang="pl">
<head>
<title>Lista służb</title>
<?php require "czesci/head";?>
</head>
<body>
<?php require "czesci/navbar_glowny";?>
<div class="table-responsive">
<table class="table table-dark text-center">
<thead>
<tr>
<th scope="col">Lp.</th>
<th scope="col">Imię i nazwisko</th>
<th scope="col">Kiedy?</th>
<th scope="col">Info</th>
<th scope="col">Umów</th>
</tr>
</thead>
<tbody>
<?php
$i = 1;
while ($komorka_show_osoby = mysqli_fetch_array($wynik_show_osoby))
{
echo "<tr>";
echo "<th scope='row'>" . $i++ . "</th>";
echo "<td>" . $komorka_show_osoby['kto'] . "</td>";
if ($komorka_show_osoby['roznica'] < 0 && $komorka_show_osoby['roznica'] > - 7)
{
echo "<td class='bg-success'>" . $komorka_show_osoby['kiedy_sluzba'] . "</td>";
}
elseif ($komorka_show_osoby['roznica'] <= - 7 && $komorka_show_osoby['roznica'] > - 14)
{
echo "<td class='bg-warning'>" . $komorka_show_osoby['kiedy_sluzba'] . "</td>";
}
elseif ($komorka_show_osoby['roznica'] <= - 14 && $komorka_show_osoby['roznica'] > - 30)
{
echo "<td class='bg-danger'>" . $komorka_show_osoby['kiedy_sluzba'] . "</td>";
}
elseif ($komorka_show_osoby['roznica'] <= - 30)
{
echo "<td class='bg-dark'>" . $komorka_show_osoby['kiedy_sluzba'] . "</td>";
$kontrolka = 1;
}
else
{
echo "<td class='bg-primary'>" . $komorka_show_osoby['kiedy_sluzba'] . "</td>";
}
echo "<td><a color='black' href='InfoOsoba.php?id_osoby=" . $komorka_show_osoby['id_osoby'] . "'>Info</a></td>";
echo "<td><font color='black'><a color='black' href='UmowSluzbe.php?id_osoby=" . $komorka_show_osoby['id_osoby'] . "&id_typu=" . $komorka_show_osoby['id_typu'] . "'>Umów</a></td>";
echo "</tr>";
} ?>
</tbody>
</table>
</div>
</body>
</html>
<?php
}
else
{
header("refresh:0;url=Logowanie.php?skad=index.php");
}?>