]> arthur.barton.de Git - ngircd-web.git/blob - includes/common.php
Add note and link to Mastodon account
[ngircd-web.git] / includes / common.php
1 <?php
2
3 function begin_page($lang = 'en', $title = null) {
4         echo '<!DOCTYPE html>';
5         echo '<html lang="' . $lang . '">' . "\n";
6         echo '<head>';
7         if ($title)
8                 echo "<title>$title | ngIRCd: Free, portable and lightweight Internet Relay Chat server</title>";
9         else
10                 echo '<title>ngIRCd: Free, portable and lightweight Internet Relay Chat server</title>';
11         echo '<meta http-equiv="content-type" content="text/html; charset=utf-8">';
12         echo '<meta name="author" content="Alexander Barton">';
13         echo '<meta name="author-email" content="alex@barton.de">';
14         echo '<meta name="MSSmartTagsPreventParsing" content="TRUE">';
15         echo '<link rel="stylesheet" href="common/styles.css" type="text/css" media="screen">';
16         echo '<link rel="author" href="mailto:alex+ngircd@barton.de" title="E-Mail Alex">';
17         echo '<link rel="me" href="https://social.tchncs.de/@ngircd">';
18         echo '<script src="common/mootools.js"></script>';
19         echo '<script src="common/slide.js"></script>';
20         echo "</head>\n<body>";
21         echo '<div id="bodyBox">';
22
23         // Title & Slogan
24         echo '<div id="metaNav">';
25         switch($lang) {
26                 case 'de':
27                                 echo 'Deutsch&nbsp;|&nbsp;<a href="index.php.en">English</a>';
28                                 break;
29                 case 'en':
30                                 echo '<a href="index.php.de">Deutsch</a>&nbsp;|&nbsp;English';
31                                 break;
32         }
33         echo '&nbsp;|&nbsp;<a href="mirrors.php">Mirrors</a></div>';
34         echo '<div id="sloganhead">';
35         echo '<h1 class="titel">ng<span>IRC</span>d: Next Generation IRC Daemon</h1>';
36         echo '<p style="font-family: Georgia">“… serving <em>white hat</em> 6667!”</p>';
37         echo '</div>';
38
39         // Navigation
40         echo '<ul class="nav">';
41         switch($lang) {
42           case 'de':
43                 echo '<li><a href="index.php.de">ngIRCd</a></li>';
44                 echo '<li><a href="news.php.de">Neuigkeiten</a></li>';
45                 echo '<li><a href="download.php.de">Download</a></li>';
46                 echo '<li><a href="documentation.php.de">Dokumentation</a></li>';
47                 echo '<li><a href="support.php.de">Support</a></li>';
48                 echo '<li><a href="bugtracker.php.de">Bug-Tracker</a></li>';
49                 break;
50           default:
51                 echo '<li><a href="index.php.en">ngIRCd</a></li>';
52                 echo '<li><a href="news.php.en">News</a></li>';
53                 echo '<li><a href="download.php.en">Download</a></li>';
54                 echo '<li><a href="documentation.php.en">Documentation</a></li>';
55                 echo '<li><a href="support.php.en">Support</a></li>';
56                 echo '<li><a href="bugtracker.php.en">Bug Tracker</a></li>';
57         }
58         echo '</ul><br style="clear:both">';
59
60         echo '<div id="content">';
61 }
62
63 function end_page() {
64         echo '</div>';
65         echo '<p id="footer">ngIRCd &copy;2001-2024 Alexander Barton and ';
66         echo '<a href="doc/AUTHORS">Contributors</a>';
67         echo '</div></body></html>';
68 }
69
70 function download_links($rel, $server, $protocol = "https") {
71         echo "<dd>";
72         echo "Server: <em>$server</em> ";
73         /* Download folder */
74         echo "(<a href=\"$protocol://$server/pub/ngircd/\">$protocol</a>";
75         if ($protocol == "https")
76                 echo "&thinsp;🔒";
77         echo "): ";
78         /* Archive files */
79         $count = 1;
80         foreach (array('tar.gz', 'tar.xz', 'tar.Z') as $suffix) {
81                 if ($count > 1)
82                         echo ', ';
83                 echo "<a href=\"$protocol://$server/pub/ngircd/ngircd-$rel.$suffix\">";
84                 if ($suffix == "tar.gz")
85                         echo "ngircd-$rel.";
86                 echo "$suffix</a> ";
87                 echo "(<a href=\"$protocol://$server/pub/ngircd/ngircd-$rel.$suffix.sig\">Sig</a>)";
88                 $count++;
89         }
90         echo "</dd>";
91 }
92
93 ?>