Subversion Repositories SvarDOS

Rev

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

Rev 1268 Rev 1512
Line 33... Line 33...
33
</form>
33
</form>
34
 
34
 
35
 
35
 
36
<?php
36
<?php
37
 
37
 
-
 
38
// hw filter?
-
 
39
$hw = array();
-
 
40
if (!empty($_GET['hw'])) {
-
 
41
  $hw = explode(' ', strtolower($_GET['hw']));
-
 
42
  foreach ($hw as $h) {
-
 
43
 
-
 
44
    // add all supported CPUs
-
 
45
    if ($h == '586') {
-
 
46
      $hw[] = '8086';
-
 
47
      $hw[] = '186';
-
 
48
      $hw[] = '286';
-
 
49
      $hw[] = '386';
-
 
50
      $hw[] = '486';
-
 
51
    }
-
 
52
    if ($h == '486') {
-
 
53
      $hw[] = '8086';
-
 
54
      $hw[] = '186';
-
 
55
      $hw[] = '286';
-
 
56
      $hw[] = '386';
-
 
57
    }
-
 
58
    if ($h == '386') {
-
 
59
      $hw[] = '8086';
-
 
60
      $hw[] = '186';
-
 
61
      $hw[] = '286';
-
 
62
    }
-
 
63
    if ($h == '286') {
-
 
64
      $hw[] = '8086';
-
 
65
      $hw[] = '186';
-
 
66
    }
-
 
67
    if ($h == '186') {
-
 
68
      $hw[] = '8086';
-
 
69
    }
-
 
70
 
-
 
71
    // add all supported graphic
-
 
72
    if ($h == 'svga') {
-
 
73
      $hw[] = 'vga';
-
 
74
      $hw[] = 'ega';
-
 
75
      $hw[] = 'cga';
-
 
76
      $hw[] = 'mda';
-
 
77
    }
-
 
78
    if ($h == 'vga') {
-
 
79
      $hw[] = 'ega';
-
 
80
      $hw[] = 'cga';
-
 
81
      $hw[] = 'mda';
-
 
82
    }
-
 
83
    if ($h == 'ega') {
-
 
84
      $hw[] = 'cga';
-
 
85
      $hw[] = 'mda';
-
 
86
    }
-
 
87
    if ($h == 'cga') {
-
 
88
      $hw[] = 'mda';
-
 
89
    }
-
 
90
 
-
 
91
  }
-
 
92
}
-
 
93
 
38
$db = json_decode(file_get_contents('../packages/_index.json'), true);
94
$db = json_decode(file_get_contents('../packages/_index.json'), true);
39
 
95
 
40
echo "<table style=\"width: 100%;\">\n";
96
echo "<table style=\"width: 100%;\">\n";
41
 
97
 
42
echo "<thead><tr><th>PACKAGE</th><th>VERSION</th><th>DESCRIPTION</th></tr></thead>\n";
98
echo "<thead><tr><th>PACKAGE</th><th>VERSION</th><th>DESCRIPTION</th></tr></thead>\n";
Line 44... Line 100...
44
foreach ($db as $pkg => $meta) {
100
foreach ($db as $pkg => $meta) {
45
 
101
 
46
  if ((!empty($catfilter)) && (array_search($catfilter, $meta['cats']) === false)) continue;
102
  if ((!empty($catfilter)) && (array_search($catfilter, $meta['cats']) === false)) continue;
47
 
103
 
48
  $desc = $meta['desc'];
104
  $desc = $meta['desc'];
-
 
105
  check_next_ver:
49
  $pref = array_shift($meta['versions']); // get first version (that's the preferred one)
106
  $pref = array_shift($meta['versions']); // get first version (that's the preferred one)
-
 
107
  if (empty($pref)) continue; // no more versions
-
 
108
  $hwhint = '';
-
 
109
  if (!empty($pref['hwreq'])) {
-
 
110
    /* if hw filter present, make sure it fullfills package's requirements */
-
 
111
    foreach (explode(' ', $pref['hwreq']) as $req) {
-
 
112
      if (array_search($req, $hw, true) === false) goto check_next_ver;
-
 
113
    }
-
 
114
 
-
 
115
    $hwhint = ' title="' . htmlspecialchars(strtoupper($pref['hwreq'])) . '"';
-
 
116
  }
50
  $ver = $pref['ver'];
117
  $ver = $pref['ver'];
51
  $bsum = $pref['bsum'];
118
  $bsum = $pref['bsum'];
52
 
119
 
53
  echo "<tr><td><a href=\"repo/?a=pull&amp;p={$pkg}\">{$pkg}</a></td><td>{$ver}</td><td>{$desc}</td></tr>\n";
120
  echo "<tr><td><a{$hwhint} href=\"repo/?a=pull&amp;p={$pkg}\">{$pkg}</a></td><td>{$ver}</td><td>{$desc}</td></tr>\n";
54
}
121
}
55
echo "</table>\n";
122
echo "</table>\n";
56
 
123
 
57
$errs = trim(file_get_contents('../packages/_buildidx.log'));
124
$errs = trim(file_get_contents('../packages/_buildidx.log'));
58
if (!empty($errs)) echo '<p style="color: #f00; font-weigth: bold;">Note to SvarDOS packagers: inconsistencies have been detected in the repository, please <a href="?p=repo&amp;showlogs=1#logs">review them</a>.</p>';
125
if (!empty($errs)) echo '<p style="color: #f00; font-weigth: bold;">Note to SvarDOS packagers: inconsistencies have been detected in the repository, please <a href="?p=repo&amp;showlogs=1#logs">review them</a>.</p>';