template cleanup

This commit is contained in:
mischa 2022-09-06 12:47:12 +00:00
parent fae4c3876f
commit 9569d4ce07
3 changed files with 9 additions and 18 deletions

View File

@ -2,8 +2,8 @@
<a href="https://git.high5.nl/opensmtpdadmin/">OpenSMTPD Admin <?php echo VERSION; ?></a> <a href="https://git.high5.nl/opensmtpdadmin/">OpenSMTPD Admin <?php echo VERSION; ?></a>
<?php <?php
if (SHOW_FOOTER == "YES" && FOOTER_LINK) { if (SHOW_FOOTER == "YES" && FOOTER_LINK) {
echo "&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;"; echo '&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;';
echo "<a href=\"" . FOOTER_LINK . "\">" . FOOTER_TEXT . "</a>"; echo '<a href="' . FOOTER_LINK . '">' . FOOTER_TEXT . '</a>';
} }
?> ?>
</div> </div>

View File

@ -10,25 +10,18 @@
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo isset($LANG['charset']) ? $LANG['charset'] : 'iso-8859-1' ?>" /> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo isset($LANG['charset']) ? $LANG['charset'] : 'iso-8859-1' ?>" />
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<?php <link rel="stylesheet" href="stylesheet.css">
if (file_exists(realpath("./stylesheet.css"))) echo "<link rel=\"stylesheet\" href=\"stylesheet.css\">";
if (file_exists(realpath("../stylesheet.css"))) echo "<link rel=\"stylesheet\" href=\"../stylesheet.css\">";
?>
<title>OpenSMTPD Admin - <?php echo $_SERVER['HTTP_HOST']; ?></title> <title>OpenSMTPD Admin - <?php echo $_SERVER['HTTP_HOST']; ?></title>
</head> </head>
<body> <body>
<div id="login_header"> <div id="login_header">
<?php <?php
if (file_exists(realpath("./stylesheet.css"))) { if (file_exists(realpath("./stylesheet.css"))) {
echo "<img id=\"login_header_logo\" src=\"images/postbox.png\" />"; echo '<img id="login_header_logo" src="images/postbox.png" />';
echo "<img id=\"login_header_logo\" height=\"30px\" src=\"images/opensmtpdadmin.png\" />"; echo '<img id="login_header_logo" height="30px" src="images/opensmtpdadmin.png" />';
}
if (file_exists(realpath("../stylesheet.css"))) {
echo "<img id=\"login_header_logo\" src=\"../images/postbox.png\" />";
echo "<img id=\"login_header_logo\" height=\"30px\"% src=\"../images/opensmtpdadmin.png\" />";
} }
if (SHOW_HEADER == "YES" && HEADER_TEXT) { if (SHOW_HEADER == "YES" && HEADER_TEXT) {
echo "<h2>" . HEADER_TEXT . "</h2>"; echo '<h2>' . HEADER_TEXT . '</h2>';
} }
?> ?>
</div> </div>

View File

@ -6,10 +6,8 @@
<li><a target="_top" href="vacation.php"><?php echo $LANG['Menu_user_vacation']; ?></a></li> <li><a target="_top" href="vacation.php"><?php echo $LANG['Menu_user_vacation']; ?></a></li>
<?php } ?> <?php } ?>
<?php } else {?> <?php } else {?>
<li><a target="_top" href="list-domain.php"><?php echo $LANG['Menu_list_domain']; ?></a></li> <li><a target="_top" href="list-domain.php"><?php echo $LANG['Menu_list_domain']; ?></a></li>
<li><a target="_top" href="list-virtual.php"><?php echo $LANG['Menu_list_virtual']; ?></a></li> <li><a target="_top" href="list-virtual.php"><?php echo $LANG['Menu_list_virtual']; ?></a></li>
<?php if ($ROLE == ADMIN_ROLE) { ?> <?php if ($ROLE == ADMIN_ROLE) { ?>
<li><a target="_top" href="list-admin.php"><?php echo $LANG['Menu_list_admin']; ?></a></li> <li><a target="_top" href="list-admin.php"><?php echo $LANG['Menu_list_admin']; ?></a></li>
<li><a target="_top" href="backup.php"><?php echo $LANG['Menu_backup']; ?></a></li> <li><a target="_top" href="backup.php"><?php echo $LANG['Menu_backup']; ?></a></li>
@ -28,8 +26,8 @@
</div> </div>
<?php <?php
if (file_exists(realpath("motd.txt"))) { if (file_exists(realpath("motd.txt"))) {
echo "<div id=\"motd\">"; echo '<div id="motd">';
include("motd.txt"); include 'motd.txt';
echo "</div>"; echo '</div>';
} }
?> ?>