website/public/internal/footer.php

47 lines
1.4 KiB
PHP

<?php
include "mysql.php";
function getFooter(){
include "mysql.php";
include "config.php";
$newestPost = "";
$result = $conn->query("SELECT * FROM posts order by id desc limit $footerMaxPost");
if ($result->num_rows > 0) {
while ($row = $result->fetch_assoc()) {
$title = $row["title"];
$id = $row["id"];
$newestPost .= "<a href=\"/post.php?id=$id\">$title</a><br>";
}
}
echo (<<<EOF
</div>
<footer>
<div id="blueBar"></div>
<div id="footerContent">
<div>
<a href="/datenschutzerklaerung.php">Datenschutzerkl&auml;rung</a><br>
<a href="/bildquellen.php">Bildquellen</a><br>
<a href="/impressum.php">Impressum</a><br>
</div>
<div id="newestPost">
<h3>Neueste Beitr&auml;ge:</h3>
$newestPost
</div>
<div class="center">
<p class="center">
<a href="https://www.instagram.com/jonasled1/"><i class="fab fa-instagram fa-2x"></i></a><i class="footerIconSpacer"></i>
<a href="https://www.thingiverse.com/jonasled/designs/"><i class="fas fa-cubes fa-2x"></i></a><i class="footerIconSpacer"></i>
<a href="https://paypal.me/jonasled/"><i class="fab fa-paypal fa-2x"></i></a>
</p>
</div>
</div>
</footer>
<script src="/js/includeHTML.js"></script>
</body>
</html>
EOF);
}