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