Subversion Repositories SvarDOS

Rev

Rev 1243 | Rev 1270 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
3 mv_fox 1
<!DOCTYPE html>
1226 mateusz.vi 2
<html>
3 mv_fox 3
  <head>
1243 mateusz.vi 4
<?php
5
  $chapters = array('' => 'Main page',
6
                    'repo' => 'Packages',
7
                    'help' => 'Help',
8
                    'forum' => 'Forum');
9
 
1269 mateusz.vi 10
  /* pages available through ?p=xxx but not listed in main menu */
11
  $hidden_pages = array('files');
12
 
1243 mateusz.vi 13
  $p = '';
1269 mateusz.vi 14
  /* validate that ?p=xxx targets a valid subpage */
15
  if (! empty($_GET['p'])) {
16
    if (!empty($chapters[$_GET['p']]))) $p = $_GET['p'];
17
    if (in_array($_GET['p'], $hidden_pages, true)) $p = $_GET['p'];
18
  }
1243 mateusz.vi 19
 
20
  if (empty($p)) {
21
    echo '<title>SvarDOS</title>';
22
  } else {
23
    echo '<title>SvarDOS ' . $chapters[$p] . '</title>';
24
  }
25
  echo "\n";
26
?>
175 mateuszvis 27
    <meta name="keywords" content="svardos,svarog386,freedos">
3 mv_fox 28
    <meta name="author" content="Mateusz Viste">
29
    <meta name="robots" content="index, follow">
30
    <meta charset="UTF-8">
1224 mateusz.vi 31
    <meta name="viewport" content="width=device-width, initial-scale=1">
3 mv_fox 32
    <link rel="stylesheet" href="style.css">
33
  </head>
34
  <body>
35
 
1243 mateusz.vi 36
  <p style="margin: 0 0 -1em auto; font-size: 0.9em; text-align: right;"><a href="/">Main page</a> I <a href="?p=repo">Packages</a> I <a href="?p=help">Help</a> I <a href="?p=forum">Forum</a>  <!-- I <a href="?p=nls">NLS</a>--></p>
3 mv_fox 37
 
14 mv_fox 38
<?php
3 mv_fox 39
 
1243 mateusz.vi 40
  if (empty($p)) {
41
    include 'index-main.php';
42
  } else {
43
    include "index-{$p}.php";
44
  }
3 mv_fox 45
 
14 mv_fox 46
?>
3 mv_fox 47
  </body>
48
</html>