]> arthur.barton.de Git - ngircd-web.git/blob - includes/common.php
Use "<!DOCTYPE html>", and fix some validation errors
[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: Next Generation IRC Daemon</title>";
9         else
10                 echo '<title>ngIRCd: Next Generation IRC Daemon</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@barton.de" title="E-Mail an Alex">';
17         echo '<script src="common/mootools.js"></script>';
18         echo '<script src="common/slide.js"></script>';
19         echo "</head>\n<body>";
20         echo '<div id="bodyBox">';
21
22         // Title & Slogan
23         echo '<div id="metaNav">';
24         switch($lang) {
25                 case 'de':
26                                 echo 'Deutsch&nbsp;|&nbsp;<a href="index.php.en">English</a>';
27                                 break;
28                 case 'en':
29                                 echo '<a href="index.php.de">Deutsch</a>&nbsp;|&nbsp;English';
30                                 break;
31         }
32         echo '&nbsp;|&nbsp;<a href="mirrors.php">Mirrors</a></div>';
33         echo '<div id="sloganhead">';
34         echo '<h1 class="titel">ng<span>IRC</span>d: Next Generation IRC Daemon</h1>';
35         echo '<p style="font-family: Georgia">“… serving <em>white hat</em> 6667!”</p>';
36         echo '</div>';
37
38         // Navigation
39         echo '<ul class="nav">';
40         switch($lang) {
41           case 'de':
42                 echo '<li><a href="index.php.de">ngIRCd</a></li>';
43                 echo '<li><a href="news.php.de">Neuigkeiten</a></li>';
44                 echo '<li><a href="download.php.de">Download</a></li>';
45                 echo '<li><a href="documentation.php.de">Dokumentation</a></li>';
46                 echo '<li><a href="support.php.de">Support</a></li>';
47                 echo '<li><a href="bugtracker.php.de">Bug-Tracker</a></li>';
48                 break;
49           default:
50                 echo '<li><a href="index.php.en">ngIRCd</a></li>';
51                 echo '<li><a href="news.php.en">News</a></li>';
52                 echo '<li><a href="download.php.en">Download</a></li>';
53                 echo '<li><a href="documentation.php.en">Documentation</a></li>';
54                 echo '<li><a href="support.php.en">Support</a></li>';
55                 echo '<li><a href="bugtracker.php.en">Bug Tracker</a></li>';
56         }
57         echo '</ul><br style="clear:both">';
58
59         echo '<div id="content">';
60 }
61
62 function end_page() {
63         echo '</div>';
64         echo '<p id="footer">ngIRCd &copy;2001-2019 Alexander Barton and ';
65         echo '<a href="doc/AUTHORS">Contributors</a>';
66         echo '</div></body></html>';
67 }
68
69 function download_links($rel, $server, $protocol = "https") {
70         echo "<dd>";
71         echo "Server: <em>$server</em> ";
72         /* Download folder */
73         echo "(<a href=\"$protocol://$server/pub/ngircd/\">$protocol</a>";
74         if ($protocol == "https")
75                 echo "&thinsp;🔒";
76         echo "): ";
77         /* Archive files */
78         $count = 1;
79         foreach (array('tar.gz', 'tar.xz', 'tar.Z') as $suffix) {
80                 if ($count > 1)
81                         echo ', ';
82                 echo "<a href=\"$protocol://$server/pub/ngircd/ngircd-$rel.$suffix\">";
83                 if ($suffix == "tar.gz")
84                         echo "ngircd-$rel.";
85                 echo "$suffix</a> ";
86                 echo "(<a href=\"$protocol://$server/pub/ngircd/ngircd-$rel.$suffix.sig\">Sig</a>)";
87                 $count++;
88         }
89         echo "</dd>";
90 }
91
92 ?>