Subversion Repositories SvarDOS

Rev

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