removed client side import of footer and menu
This commit is contained in:
parent
dfd08b0783
commit
8dcafb7d10
5 changed files with 78 additions and 69 deletions
|
@ -1,34 +0,0 @@
|
|||
<?php
|
||||
include "../internal/mysql.php";
|
||||
|
||||
?>
|
||||
<div id="blueBar"></div>
|
||||
<div id="footerContent">
|
||||
<div>
|
||||
<a href="/datenschutzerklaerung.php">Datenschutzerklärung</a><br>
|
||||
<a href="/bildquellen.php">Bildquellen</a><br>
|
||||
<a href="/impressum.php">Impressum</a><br>
|
||||
</div>
|
||||
<div id="newestPost">
|
||||
<h3>Neueste Beiträge:</h3>
|
||||
<?php
|
||||
$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"];
|
||||
echo("<a href=\"/post.php?id=$id\">$title</a><br>");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
</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>
|
|
@ -1,32 +0,0 @@
|
|||
<?php
|
||||
$page = $_GET["page"];
|
||||
?>
|
||||
|
||||
<a href="/" <?php echo($page == "home" ? "class=\"menueSelected\"" : "");?>>Startseite</a>
|
||||
<div class="dropdown">
|
||||
<a href="#" <?php echo($page == "projekte" ? "class=\"menueSelected\"" : "");?>>Projekte</a>
|
||||
<div class="dropdown-content">
|
||||
<a href="/Projekte/proxdroid.php">Proxdroid - Proxmox Android App</a><br>
|
||||
<a href="/Projekte/websitecloner.php">Website Cloner</a><br>
|
||||
<a href="/Projekte/youtubedownloader.php">YouTube Downloader</a><br>
|
||||
<a href="/Projekte/mqttpush.php">MQTT Push</a><br>
|
||||
<a href="/Projekte/gclogLink.php">Geocaching Premium Log link Generator</a><br>
|
||||
<a href="/Projekte/ledtisch1.php">LED Tisch Version 1</a><br>
|
||||
<a href="/Projekte/ledtisch2.php">LED Tisch Version 2</a><br>
|
||||
<a href="/Projekte/regensensor.php">Regensensor</a><br>
|
||||
<a href="/Projekte/blitzortung.php">Blitzortung</a><br>
|
||||
<a href="/Projekte/insecam.php">Insecam</a><br>
|
||||
<a href="/Projekte/URLkuerzer1.php">URL Kürzer V1</a><br>
|
||||
<a href="/Projekte/URLkuerzer2.php">URL Kürzer V2</a><br>
|
||||
<a href="/Projekte/smartmirror.php">Smart Mirror</a><br>
|
||||
<a href="/Projekte/snowboy.php">Installation von Snowboy</a><br>
|
||||
</div>
|
||||
</div>
|
||||
<a href="//kurz.ml">URL Kürzer</a>
|
||||
<div class="dropdown">
|
||||
<a href="#" <?php echo($page == "status" ? "class=\"menueSelected\"" : "");?>>Status</a>
|
||||
<div class="dropdown-content">
|
||||
<a href="//status.jonasled.de">Server</a><br>
|
||||
<a href="/ntpstatus.php">NTP Server</a><br>
|
||||
</div>
|
||||
</div>
|
|
@ -1,8 +1,43 @@
|
|||
<?php
|
||||
|
||||
function getFooter(){
|
||||
echo(<<<EOF
|
||||
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ärung</a><br>
|
||||
<a href="/bildquellen.php">Bildquellen</a><br>
|
||||
<a href="/impressum.php">Impressum</a><br>
|
||||
</div>
|
||||
<div id="newestPost">
|
||||
<h3>Neueste Beiträ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 includeHTML="/include/footer.php">
|
||||
</footer>
|
||||
<script src="/js/includeHTML.js"></script>
|
||||
</body>
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
<?php
|
||||
include "menue.php";
|
||||
|
||||
function getHeader($pagetitle, $navselect)
|
||||
{
|
||||
$menu = getMenu($navselect);
|
||||
echo( <<<EOF
|
||||
<!DOCTYPE html >
|
||||
<html lang = "de" >
|
||||
|
@ -39,7 +41,7 @@ function getHeader($pagetitle, $navselect)
|
|||
</svg >
|
||||
</div >
|
||||
</div >
|
||||
<div id = "mainMenu" includeHTML = "/include/menue.php?page=$navselect" ></div >
|
||||
<div id = "mainMenu">$menu</div >
|
||||
</header >
|
||||
<!--Matomo Image Tracker -->
|
||||
<img src = "https://matomo.jonasled.de/matomo.php?idsite=1&rec=1" style = "border:0" alt = "" />
|
||||
|
|
38
internal/menue.php
Normal file
38
internal/menue.php
Normal file
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
function getMenu($page){
|
||||
$startpage = $page == "home" ? "class=\"menueSelected\"" : "";
|
||||
$projects = $page == "projekte" ? "class=\"menueSelected\"" : "";
|
||||
$status = $page == "status" ? "class=\"menueSelected\"" : "";
|
||||
|
||||
return <<<EOF
|
||||
<a href="/" $startpage>Startseite</a>
|
||||
<div class="dropdown">
|
||||
<a href="#" $projects>Projekte</a>
|
||||
<div class="dropdown-content">
|
||||
<a href="/Projekte/proxdroid.php">Proxdroid - Proxmox Android App</a><br>
|
||||
<a href="/Projekte/websitecloner.php">Website Cloner</a><br>
|
||||
<a href="/Projekte/youtubedownloader.php">YouTube Downloader</a><br>
|
||||
<a href="/Projekte/mqttpush.php">MQTT Push</a><br>
|
||||
<a href="/Projekte/gclogLink.php">Geocaching Premium Log link Generator</a><br>
|
||||
<a href="/Projekte/ledtisch1.php">LED Tisch Version 1</a><br>
|
||||
<a href="/Projekte/ledtisch2.php">LED Tisch Version 2</a><br>
|
||||
<a href="/Projekte/regensensor.php">Regensensor</a><br>
|
||||
<a href="/Projekte/blitzortung.php">Blitzortung</a><br>
|
||||
<a href="/Projekte/insecam.php">Insecam</a><br>
|
||||
<a href="/Projekte/URLkuerzer1.php">URL Kürzer V1</a><br>
|
||||
<a href="/Projekte/URLkuerzer2.php">URL Kürzer V2</a><br>
|
||||
<a href="/Projekte/smartmirror.php">Smart Mirror</a><br>
|
||||
<a href="/Projekte/snowboy.php">Installation von Snowboy</a><br>
|
||||
</div>
|
||||
</div>
|
||||
<a href="//kurz.ml">URL Kürzer</a>
|
||||
<div class="dropdown">
|
||||
<a href="#" $status>Status</a>
|
||||
<div class="dropdown-content">
|
||||
<a href="//status.jonasled.de">Server</a><br>
|
||||
<a href="/ntpstatus.php">NTP Server</a><br>
|
||||
</div>
|
||||
</div>
|
||||
EOF;
|
||||
}
|
||||
?>
|
Loading…
Reference in a new issue