Subversion Repositories SvarDOS

Rev

Rev 1243 | Rev 1270 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1243 Rev 1269
Line 5... Line 5...
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>';