Subversion Repositories SvarDOS

Rev

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

Rev 285 Rev 631
Line 3... Line 3...
3
 
3
 
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
<?php
6
<?php
7
 
7
 
8
$handle = fopen('repo/index.tsv', "rb");
8
$handle = fopen('../packages/index.tsv', "rb");
9
if ($handle === FALSE) {
9
if ($handle === FALSE) {
10
  echo "<p>ERROR: INDEX FILE NOT FOUND</p>\n";
10
  echo "<p>ERROR: INDEX FILE NOT FOUND</p>\n";
11
  exit(0);
11
  exit(0);
12
}
12
}
13
 
13
 
Line 15... Line 15...
15
 
15
 
16
echo "<thead><tr><th>PACKAGE</th><th>VERSION</th><th>DESCRIPTION</th></tr></thead>\n";
16
echo "<thead><tr><th>PACKAGE</th><th>VERSION</th><th>DESCRIPTION</th></tr></thead>\n";
17
 
17
 
18
while (($arr = fgetcsv($handle, 1024, "\t")) !== FALSE) {
18
while (($arr = fgetcsv($handle, 1024, "\t")) !== FALSE) {
19
  // format: pkgname | version | desc | bsdsum
19
  // format: pkgname | version | desc | bsdsum
20
  echo "<tr><td><a href=\"repo/{$arr[0]}.zip\">{$arr[0]}</a></td><td>{$arr[1]}</td><td>{$arr[2]}</td></tr>\n";
20
  echo "<tr><td><a href=\"repo/?a=pull&amp;p={$arr[0]}\">{$arr[0]}</a></td><td>{$arr[1]}</td><td>{$arr[2]}</td></tr>\n";
21
}
21
}
22
echo "</table>\n";
22
echo "</table>\n";
23
 
23
 
24
fclose($handle);
24
fclose($handle);
25
 
25