Subversion Repositories SvarDOS

Rev

Rev 3 | Rev 120 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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