]> arthur.barton.de Git - ngircd-web.git/blobdiff - includes/common.php
Ooops! It's 2019 already
[ngircd-web.git] / includes / common.php
index 2e9f2471c3ddd951ade0cbd170e585fed1fe65bf..236885bd58cbfe7cc9ab045d3f77de645f569c7f 100644 (file)
@@ -63,9 +63,32 @@ function begin_page($lang = 'en', $title = null) {
 
 function end_page() {
        echo '</div>';
-       echo '<p id="footer">ngIRCd &copy;2001-2018 Alexander Barton and ';
+       echo '<p id="footer">ngIRCd &copy;2001-2019 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>";
+}
+
 ?>