Subversion Repositories SvarDOS

Rev

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

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