Subversion Repositories SvarDOS

Rev

Rev 13 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
3 mv_fox 1
<?php
2
  $arts = array(
3
  'pkgincl'=>'Packages inclusion rules',
4
  'pkgformat'=>'Package format'
5
  );
6
 
7
  natcasesort($arts);
8
 
9
  if (isset($_GET['art'])) {
10
    $art = $_GET['art'];
11
    if (!array_key_exists($art, $arts)) {
12
      echo "<p>invalid article!</p>";
13
      return;
14
    } else {
15
      echo "<p class=\"title\">" . htmlentities($arts[$art]) . "</p>\n";
16
      echo "<p class=\"copyr\">This is an article from the Svarog386 tech base</p>\n";
17
      echo '<p class="tech">';
18
      echo htmlentities(file_get_contents('tech/' . $art . '.txt'));
19
      echo "</p>\n";
20
      return;
21
    }
22
  }
23
?>
24
 
25
<p class="title">Svarog386 technical notes</p>
26
<p class="copyr">no documentation is perfect, this one's no exception</p>
27
<table style="margin: 0 auto;">
28
 
29
<?php
30
foreach ($arts as $file=>$title) {
31
  echo "<tr><td><a href=\"?p=tech&art={$file}\">" . htmlentities($title) . "</a></td></tr>";
32
}
33
?>
34
 
35
</table>