]> arthur.barton.de Git - ngircd-web.git/blobdiff - includes/common.php
README.md: Fix output path of pandoc command
[ngircd-web.git] / includes / common.php
index 4def562f388cb3aa5d1415ebad6d6dd10e07748a..c68277cffb5817455eea54aacdc87c5e58800114 100644 (file)
@@ -1,27 +1,36 @@
 <?php
 
 function begin_page($lang = 'en', $title = null) {
-       echo '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" ';
-       echo '"http://www.w3.org/TR/html4/strict.dtd">' . "\n\n";
+       echo '<!DOCTYPE html>';
        echo '<html lang="' . $lang . '">' . "\n";
        echo '<head>';
        if ($title)
-               echo "<title>$title | ngIRCd: Next Generation IRC Daemon</title>";
+               echo "<title>$title | ngIRCd: Free, portable and lightweight Internet Relay Chat server</title>";
        else
-               echo '<title>ngIRCd: Next Generation IRC Daemon</title>';
+               echo '<title>ngIRCd: Free, portable and lightweight Internet Relay Chat server</title>';
        echo '<meta http-equiv="content-type" content="text/html; charset=utf-8">';
-       echo '<meta http-equiv="content-language" content="' . $lang . '">';
        echo '<meta name="author" content="Alexander Barton">';
        echo '<meta name="author-email" content="alex@barton.de">';
        echo '<meta name="MSSmartTagsPreventParsing" content="TRUE">';
        echo '<link rel="stylesheet" href="common/styles.css" type="text/css" media="screen">';
-       echo '<link rel="author" href="mailto:alex@barton.de" title="E-Mail an Alex">';
-       echo '<script type="text/javascript" src="common/mootools.js"></script>';
-       echo '<script type="text/javascript" src="common/slide.js"></script>';
+       echo '<link rel="author" href="mailto:alex+ngircd@barton.de" title="E-Mail Alex">';
+       echo '<link rel="me" href="https://social.tchncs.de/@ngircd">';
+       echo '<script src="common/mootools.js"></script>';
+       echo '<script src="common/slide.js"></script>';
        echo "</head>\n<body>";
        echo '<div id="bodyBox">';
 
        // Title & Slogan
+       echo '<div id="metaNav">';
+       switch($lang) {
+               case 'de':
+                               echo 'Deutsch&nbsp;|&nbsp;<a href="index.php.en">English</a>';
+                               break;
+               case 'en':
+                               echo '<a href="index.php.de">Deutsch</a>&nbsp;|&nbsp;English';
+                               break;
+       }
+       echo '&nbsp;|&nbsp;<a href="mirrors.php">Mirrors</a></div>';
        echo '<div id="sloganhead">';
        echo '<h1 class="titel">ng<span>IRC</span>d: Next Generation IRC Daemon</h1>';
        echo '<p style="font-family: Georgia">“… serving <em>white hat</em> 6667!”</p>';
@@ -44,7 +53,7 @@ function begin_page($lang = 'en', $title = null) {
                echo '<li><a href="download.php.en">Download</a></li>';
                echo '<li><a href="documentation.php.en">Documentation</a></li>';
                echo '<li><a href="support.php.en">Support</a></li>';
-               echo '<li><a href="bugtracker.php.en">Bug-Tracker</a></li>';
+               echo '<li><a href="bugtracker.php.en">Bug Tracker</a></li>';
        }
        echo '</ul><br style="clear:both">';
 
@@ -53,9 +62,32 @@ function begin_page($lang = 'en', $title = null) {
 
 function end_page() {
        echo '</div>';
-       echo '<p id="footer">ngIRCd &copy;2001-2010 Alexander Barton and ';
-       echo '<a href="doc/AUTHORS">Contributors</a></p>';
+       echo '<p id="footer">ngIRCd &copy;2001-2024 Alexander Barton and ';
+       echo '<a href="doc/AUTHORS">Contributors</a>';
        echo '</div></body></html>';
 }
 
+function download_links($rel, $server, $protocol = "https") {
+       echo "<dd>";
+       echo "Server: <em>$server</em> ";
+       /* Download folder */
+       echo "(<a href=\"$protocol://$server/pub/ngircd/\">$protocol</a>";
+       if ($protocol == "https")
+               echo "&thinsp;🔒";
+       echo "): ";
+       /* Archive files */
+       $count = 1;
+       foreach (array('tar.gz', 'tar.xz', 'tar.Z') as $suffix) {
+               if ($count > 1)
+                       echo ', ';
+               echo "<a href=\"$protocol://$server/pub/ngircd/ngircd-$rel.$suffix\">";
+               if ($suffix == "tar.gz")
+                       echo "ngircd-$rel.";
+               echo "$suffix</a> ";
+               echo "(<a href=\"$protocol://$server/pub/ngircd/ngircd-$rel.$suffix.sig\">Sig</a>)";
+               $count++;
+       }
+       echo "</dd>";
+}
+
 ?>