]> git.somenet.org - fsinf/pub/w2c.git/blob - html_funcs.php
devmode.
[fsinf/pub/w2c.git] / html_funcs.php
1 <?php
2
3 /**
4 * welcome.TU.code Anmeldesystem.
5 * by David Kaufmann <astra@ionic.at>
6 */
7
8 function html_top($title = ""){
9   if($GLOBALS['devmode'] == 1)$title .= ' [DEVMODE]';
10
11         return <<<EOF
12 <!DOCTYPE html>
13 <html lang="de" dir="ltr">
14 <head>
15 <meta charset="utf-8">
16 <title>$title</title>
17 <link rel="stylesheet" href="style.css">
18 <script src="sorttable.js"></script>
19 </head>
20 <body id="welcometucode">
21 EOF;
22 }
23
24 function html_bottom(){
25         return <<<EOF
26 <hr>
27 <!-- Entwickelt 2015 von David "astra" Kaufmann (Layout + Website) und Jan "someone" Valeš (Datenbank + Website). -->
28 <p class="footnote"><a href="https://frost.fsinf.at/iris?channels=w2c">Live-Support-WebChat</a> (Ist ein WebIRC zu <a href="irc://irc.fsinf.at/w2c">#w2c auf irc.fsinf.at</a>)
29 <br>Auch möglich: <a href="mailto:someone@fsinf.at">eMail an someone@fsinf.at</a></p>
30 </body>
31 </html>
32 EOF;
33 }
34
35 function html_linkbox($current = "") {
36         $items = array(
37                 'index' => "Home",
38                 'list' => "Anmeldungen",
39                 'intern/upload' => "Dateiupload",
40                 'stats' => "Stats"
41         );
42         $out = '<div id="menu" class="align-center"><h1>Anmeldesystem welcomeTUcode</h1><ul class="menulist">';
43         foreach ($items as $file => $name) {
44                 $activeitem = ($current === $file) ? ' menuactive' : '';
45                 $out .= '<li class="menuitem'.$activeitem.'"><a href="./'.$file.'.php">'.$name.'</a></li>';
46         }
47         $out .= '</ul></div><hr>';
48     if($GLOBALS['devmode'] == 1)$out .= '<p class="footnote">DEVMODE aktiv.<br>Am System wird gerade gearbeitet!</p>';
49         return $out;
50 }