Subversion Repositories SvarDOS

Rev

Rev 179 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 179 Rev 188
1
<?php
1
<?php
2
  $arts = array(
2
  $arts = array(
3
  'support'     => 'How do I get in touch with the SvarDOS community?',
3
  'support'     => 'How do I get in touch with the SvarDOS community?',
4
  'pkgincl'     => 'Packages inclusion rules',
4
  'pkgincl'     => 'Packages inclusion rules',
5
  'pkgformat'   => 'Package format',
5
  'pkgformat'   => 'Package format',
6
  'licensing'   => 'SvarDOS licensing',
6
  'licensing'   => 'SvarDOS licensing',
7
  'vboxfonts'   => 'Under VirtualBox the language-specific glyphs appear broken',
7
  'vboxfonts'   => 'Under VirtualBox the language-specific glyphs appear broken',
8
  'whatmeans'   => 'What does "Svarog" mean?'
8
  'whatmeans'   => 'What does "Svarog" mean?'
9
  );
9
  );
10
 
10
 
11
  natcasesort($arts);
11
  natcasesort($arts);
12
 
12
 
13
  if (isset($_GET['art'])) {
13
  if (isset($_GET['art'])) {
14
    $art = $_GET['art'];
14
    $art = $_GET['art'];
15
    if (!array_key_exists($art, $arts)) {
15
    if (!array_key_exists($art, $arts)) {
16
      echo "<p>invalid article!</p>";
16
      echo "<p>invalid article!</p>";
17
      return;
17
      return;
18
    } else {
18
    } else {
19
      echo '<h1>' . htmlentities($arts[$art]) . "</h1>\n";
19
      echo '<h1>' . htmlentities($arts[$art]) . "</h1>\n";
20
      echo "<p class=\"copyr\">This is an article from the SvarDOS tech base</p>\n";
20
      echo "<p class=\"copyr\">This is an article from the SvarDOS tech base</p>\n";
21
      echo '<p class="tech">';
21
      echo '<p class="tech">';
22
      echo htmlentities(file_get_contents('tech/' . $art . '.txt'));
22
      echo htmlentities(file_get_contents('tech/' . $art . '.txt'));
23
      echo "</p>\n";
23
      echo "</p>\n";
24
      return;
24
      return;
25
    }
25
    }
26
  }
26
  }
27
?>
27
?>
28
 
28
 
29
<h1>SvarDOS technical notes</h1>
29
<h1>SvarDOS technical notes</h1>
30
<p class="copyr">no documentation is perfect, this one's no exception</p>
30
<p class="copyr">no documentation is perfect, this one's no exception</p>
-
 
31
 
31
<table style="margin: 0 auto;">
32
<table>
32
 
33
 
33
<?php
34
<?php
34
foreach ($arts as $file=>$title) {
35
foreach ($arts as $file=>$title) {
35
  echo "<tr><td><a href=\"?p=tech&art={$file}\">" . htmlentities($title) . "</a></td></tr>";
36
  echo "<tr><td><a href=\"?p=tech&art={$file}\">" . htmlentities($title) . "</a></td></tr>\n";
36
}
37
}
37
?>
38
?>
38
 
39
 
39
</table>
40
</table>
40
 
41