commit jun 24

This commit is contained in:
2024-06-24 09:42:54 +02:00
parent 6e1ecbc485
commit d0f1607632
9 changed files with 383 additions and 208 deletions

View File

@@ -225,20 +225,36 @@
</ul>
</div>
<img src="assets/images/logo.webp" class="logo-img mt-3 mt-lg-0 mt-md-0" alt="">
<div class="dropdown" id="dropdownid" style="position: absolute; width:fit-content;">
<!-- Login -->
<div class="dropdown" id="dropdownid" style="position: absolute; width: fit-content;">
<a class="btn btn-secondary dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-bs-toggle="dropdown" aria-expanded="false">
<i class="fa-solid fa-users"></i>
</a>
<ul class="dropdown-menu" aria-labelledby="dropdownMenuLink">
<?php if (loggedin()) {
<?php
if (loggedin()) {
echo '<li><a class="dropdown-item" href="php/logout.php">Log out</a></li>';
if (is_admin()) {
echo '<li><a class="dropdown-item" href="admin_panel.php">Admin panel</a></li>';
}
} else {
echo '<li><a class="dropdown-item" href="login.html">Log in</a></li>
<li><a class="dropdown-item" href="signup.php">Sign up</a></li>';
} ?>
<li><a class="dropdown-item" href="signup.php">Sign up</a></li>';
}
?>
</ul>
</div>
<!-- Weather icon -->
<?php if (loggedin()) {
echo '<div class="weather-div" style="position: absolute; color: white; font-size: 25px; left:12%; top:15px;">
<a style="color:white" href="weather.php"><i class="fa-solid fa-cloud-sun"></i></a>
<div>';
} ?>
<!-- site navigation-->
@@ -368,8 +384,8 @@
<div class="card4 d-flex align-items-center justify-content-center flex-column mb-4">
<img class="img-fourth-au" src="assets/images/team3.jpg" alt="">
<div class="card-text4 d-flex align-items-center justify-content-start flex-column">
<h4 class="h4-fourth"><?php echo $data[3]['name'] . ' ' . $data[3]['surname']; ?></h4>
<p class="p-fourth"><?php echo $data[3]['email'] . '<br>' . $data[3]['birth_day'] . '.' . $data[3]['birth_month'] . '.' . $data[3]['birth_year'] . '.'; ?></p>
<h4 class="h4-fourth"><?php echo $data[11]['name'] . ' ' . $data[11]['surname']; ?></h4>
<p class="p-fourth"><?php echo $data[11]['email'] . '<br>' . $data[11]['birth_day'] . '.' . $data[11]['birth_month'] . '.' . $data[11]['birth_year'] . '.'; ?></p>
</div>
</div>
</div>
@@ -395,8 +411,8 @@
<div class="card4 d-flex align-items-center justify-content-center flex-column mb-4">
<img class="img-fourth-au" src="assets/images/team6.jpg" alt="">
<div class="card-text4 d-flex align-items-center justify-content-start flex-column">
<h4 class="h4-fourth"><?php echo $data[6]['name'] . ' ' . $data[6]['surname']; ?></h4>
<p class="p-fourth"><?php echo $data[6]['email'] . '<br>' . $data[6]['birth_day'] . '.' . $data[6]['birth_month'] . '.' . $data[6]['birth_year'] . '.'; ?></p>
<h4 class="h4-fourth"><?php echo $data[15]['name'] . ' ' . $data[15]['surname']; ?></h4>
<p class="p-fourth"><?php echo $data[15]['email'] . '<br>' . $data[15]['birth_day'] . '.' . $data[15]['birth_month'] . '.' . $data[15]['birth_year'] . '.'; ?></p>
</div>
</div>
</div>
@@ -417,10 +433,11 @@
</thead>
<tbody>
<?php
for ($id = 7; $id <= max(array_keys($data)); $id++) {
$maxId = max(array_keys($data));
for ($id = 7; $id <= $maxId; $id++) {
if (isset($data[$id])) {
echo "<tr>";
// Combine key and value for birth date into a formatted string
$birthDate = "{$data[$id]['birth_day']}.{$data[$id]['birth_month']}.{$data[$id]['birth_year']}.";
echo "<td class='td-others'>{$data[$id]['name']}</td>";
@@ -428,13 +445,12 @@
echo "<td class='td-others'>{$data[$id]['email']}</td>";
echo "<td class='td-others'>$birthDate</td>";
echo "</tr>";
} else {
echo "<tr><td colspan='4'>No data found for ID $id</td></tr>";
}
}
?>
</tbody>
</table>
</div>
</div>