4 $URL_HANDLERS["/"] = "GLCASWebBase";
8 function __construct($config)
10 $this->config = $config;
11 error_log("construct GLCASWebBase");
16 error_log("go GLCASWebBase");
17 GLCASpageBuilder($this, "body");
22 global $WEB_ROOT_FS, $URL_HANDLERS, $BASE_URL;
24 // first, list available repos
25 echo "<h3>Repositories</h3>";
26 echo "<br><table border=\"1\">";
27 echo "<tr><th>Name</th><th>Type</th><th>OS</th><th>Version</th><th>Architecture</th><th>Other</th><th>Prefix</th><th>Short URL</th><th>Browse</th></tr>";
29 // now iterate thru the repos and print them
30 $repo = new GLCASRepo($this->config);
31 $repos = $repo->getRepos();
33 foreach($repos as $rkey => $rval) {
34 $desc = $rval["desc"];
36 $version = $rval["version"];
37 $arch = $rval["arch"];
38 $other = $rval["other"];
39 $repotype = $rval["repotype"];
40 $prefix = $rval["prefix"];
41 $shorturl = $rval["shorturl"];
42 if($prefix == "") $prefix = "-";
43 if($shorturl == "") $shorturl = "-";
44 echo "<tr><td>$desc</td><td>$repotype</td><td>$os</td><td>$version</td><td>$arch</td><td>$other</td><td>$prefix</td><td>$shorturl</td>";
47 $browseurl = "$BASE_URL/repo/$rkey";
50 if($prefix != "-") $brurl = "$prefix/$shorturl";
51 $browseurl = "$BASE_URL/$brurl/";
53 echo "<td><a href=\"$browseurl\">Browse</td><td>";
58 echo "</table><br><hr>";