-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathpackage.php
More file actions
executable file
·39 lines (34 loc) · 969 Bytes
/
package.php
File metadata and controls
executable file
·39 lines (34 loc) · 969 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<!DOCTYPE html>
<html>
<head>
<title>dcs-get package listing</title>
</head>
<body>
<h1>Package Listing</h1>
<p>This is an up to date list of all packages available for dcs-get, along with their dependencies.</p>
<h2>Packages</h2>
<?php
error_reporting(0);
//error_reporting(E_ALL);
define('BASE_URL', 'http://backus.uwcs.co.uk/dcs-get/');
$packages = json_decode(file_get_contents(BASE_URL.'packages.json'), true);
ksort($packages);
foreach($packages as $package => $data) {
echo '<ul><li>';
echo htmlspecialchars($package).' - ';
if (isset($data['description'])) {
echo htmlspecialchars($data['description']).' - ';
}
echo 'Version: '.htmlspecialchars(implode(', ', $data['version'])).'<br>';
if (isset($data['dependencies'])) {
echo '<ul>';
foreach ($data['dependencies'] as $dep => $details) {
echo '<li>'.htmlspecialchars($details[0]).' - '.htmlspecialchars($details[1]).'</li>';
}
echo '</ul>';
}
echo '</li></ul>';
}
?>
</body>
</html>