-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshowKids.php
108 lines (89 loc) · 3.42 KB
/
showKids.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
108
<?php
session_start();
require_once "database.php";
if (!isset($_SESSION['tata_logged_ID'])){
header('Location: user.php') ;
exit();
}
$kidsQuery = $db->query('SELECT * FROM kids_themselves ORDER BY birthdate ASC');
$kids = $kidsQuery->fetchAll();
$oldestKid = $kids[0][2];
$firstBirth = $kids[0][3];
?>
<!DOCTYPE html>
<html lang="pl">
<head>
<meta charset="utf-8">
<title>Sentencje i aforyzmy - Juliusz Chojaczyk</title>
<meta name="description" content="cytaty, bombelki, Julek, aforyzmy, bombelek">
<meta name="keywords" content="cytaty, Julek, bombelek, bombelki">
<meta http-equiv="X-Ua-Compatible" content="IE=edge">
<link rel="stylesheet" href="css/main.css" type="text/css">
<link href="css/lightbox.css" rel="stylesheet" />
<link rel="stylesheet" href="css/fontello.css" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Lobster|Open+Sans:400,700&subset=latin-ext" rel="stylesheet">
<!--[if lt IE 9]>
<script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script>
<![endif]-->
</head>
<body>
<!---------------------------------------------------------------------------------------------------->
<header>
<div class="headContainer">
<p>
Witaj <?echo(ucfirst($_SESSION['tata_logged_ID']))?>
</br>
</p>
</div>
</header>
<!---------------------------------------------------------------------------------------------------->
<nav>
<div class="navContainer" style="margin-top:20px;">
<?
if ($_SESSION['alWrite']==true)
echo "<a href=\"addQuote.php\"><div class=\"navButton\">DODAJ CYTAT</div></a>";
?>
<a href="showQuotes.php"><div class="navButton">PRZEGLĄDAJ CYTATY</div></a>
<a href="logout.php"><div class="navButton">WYLOGUJ</div></a>
<div style="clear:both;"></div>
</div>
</nav>
<main>
<div class="kidsContainer">
<div class="navButton" style="text-align:center;">BOMBELKI</div>
<div class="kidsNav">
<a href="addKid.php"><div class="kidNavButton" style="background-color:#37b93d; margin-bottom:30px;">DODAJ BOMBELKA <i class="icon-user-plus"></i></div></a>
<? foreach ($kids as $kid)
{
echo "<div class=\"kidNavButton\">".strtoupper($kid['kiduno'])." <i class=\"icon-" ;
if ($kid['sex']=='female') echo "fe" ;
echo "male\"></i></div>" ;
echo "<div class=\"kidContainer\">" ;
echo "<div class=\"kidPicture\">" ;
echo "<a class=\"example-image-link\" href=\"pics\\768\\".$kid['default_pic']."\" data-lightbox=\"example-1\"><img class=\"example-image\" src=\"pics\\320\\".$kid['default_pic']."\" alt=\"image-1\" width=\"200\" /></a>";
echo "</div>" ;
echo "<div class=\"kidInfo\">";
echo "<u>NARODZINY:</u></br>".$kid['birthdate']."</br></br>";
echo "INFO:</br>".$kid['about_kid']."</br>";
echo "</div>" ;
echo "<div style=\"clear:both;\"></div>";
echo "</div>" ;
}
?>
</div>
</div>
</main>
<!---------------------------------------------------------------------------------------------------->
<footer>
<div class="footContainer">
Copyrights All Rights Reserved - Adam Chojaczyk 2020 r.
</div>
</footer>
<script src="js/lightbox-plus-jquery.js">
lightbox.option({
'alwaysShowNavOnTouchDevices': true
})
</script>
<!---------------------------------------------------------------------------------------------------->
</body>
</html>