Subversion Repositories SvarDOS

Rev

Rev 896 | Rev 1512 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 896 Rev 910
Line 4... Line 4...
4
<p>This page lists all packages that are available in the SvarDOS repository. These packages can be downloaded from within SvarDOS using the pkgnet tool, or you can download them from here.</p>
4
<p>This page lists all packages that are available in the SvarDOS repository. These packages can be downloaded from within SvarDOS using the pkgnet tool, or you can download them from here.</p>
5
 
5
 
6
<p>If you wish to receive notifications about new or updated packages, you may subscribe to the <a href="http://svn.svardos.org/rss.php?repname=SvarDOS&path=%2Fpackages%2F">SvarDOS Packages RSS feed</a>.</p>
6
<p>If you wish to receive notifications about new or updated packages, you may subscribe to the <a href="http://svn.svardos.org/rss.php?repname=SvarDOS&path=%2Fpackages%2F">SvarDOS Packages RSS feed</a>.</p>
7
 
7
 
8
<?php
8
<?php
-
 
9
  // load the category list
-
 
10
  $cats = json_decode(file_get_contents('../packages/_cats.json'), true);
-
 
11
  sort($cats);
-
 
12
 
-
 
13
  $catfilter = '';
-
 
14
  if (!empty($_GET['cat'])) $catfilter = strtolower($_GET['cat']);
-
 
15
?>
-
 
16
 
-
 
17
<form action="?" method="get">
-
 
18
<br>
-
 
19
<p>Category filter:&nbsp;
-
 
20
<input type="hidden" name="p" value="repo">
-
 
21
<select name="cat">
-
 
22
  <option value="">ALL</option>
-
 
23
<?php
-
 
24
  foreach ($cats as $c) {
-
 
25
    $sel = '';
-
 
26
    if ($c == $catfilter) $sel = ' selected';
-
 
27
    echo '  <option value="' . $c . "\"{$sel}>" . $c . "</option>\n";
-
 
28
  }
-
 
29
?>
-
 
30
</select>
-
 
31
<input type="submit" value="refresh">
-
 
32
</p>
-
 
33
</form>
-
 
34
 
-
 
35
 
-
 
36
<?php
9
 
37
 
10
$db = json_decode(file_get_contents('../packages/_index.json'), true);
38
$db = json_decode(file_get_contents('../packages/_index.json'), true);
11
 
39
 
12
echo "<table>\n";
40
echo "<table style=\"width: 100%;\">\n";
13
 
41
 
14
echo "<thead><tr><th>PACKAGE</th><th>VERSION</th><th>DESCRIPTION</th></tr></thead>\n";
42
echo "<thead><tr><th>PACKAGE</th><th>VERSION</th><th>DESCRIPTION</th></tr></thead>\n";
15
 
43
 
16
foreach ($db as $pkg => $meta) {
44
foreach ($db as $pkg => $meta) {
17
 
45
 
-
 
46
  if ((!empty($catfilter)) && (array_search($catfilter, $meta['cats']) === false)) continue;
-
 
47
 
18
  $desc = $meta['desc'];
48
  $desc = $meta['desc'];
19
  $pref = array_shift($meta['versions']); // get first version (that's the preferred one)
49
  $pref = array_shift($meta['versions']); // get first version (that's the preferred one)
20
  $ver = $pref['ver'];
50
  $ver = $pref['ver'];
21
  $bsum = $pref['bsum'];
51
  $bsum = $pref['bsum'];
22
 
52