Subversion Repositories SvarDOS

Rev

Rev 3 | Rev 89 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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