Subversion Repositories SvarDOS

Rev

Rev 1243 | Rev 1270 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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