X-Git-Url: http://git.pjr.cc/?a=blobdiff_plain;f=plugins%2Fwebbase.php;h=fea2f2fbface9fccab527a2df05f2fab5f1e9f52;hb=2924678dd2b842e5ecbb2f009fc6601500312b57;hp=13dbcc341b0f8b68fd82d81697b0d9fa6189ffb2;hpb=17d5412ef5bdde749ce57dbdd627243eb0d701a8;p=glcas.git diff --git a/plugins/webbase.php b/plugins/webbase.php index 13dbcc3..fea2f2f 100644 --- a/plugins/webbase.php +++ b/plugins/webbase.php @@ -19,7 +19,44 @@ class GLCASWebBase { function body($url) { - echo "i am disturbing"; + global $WEB_ROOT_FS, $URL_HANDLERS, $BASE_URL; + + // first, list available repos + echo "

Repositories

"; + echo "
"; + echo ""; + + // now iterate thru the repos and print them + $repo = new GLCASRepo($this->config); + $repos = $repo->getRepos(); + + foreach($repos as $rkey => $rval) { + $desc = $rval["desc"]; + $os = $rval["os"]; + $version = $rval["version"]; + $arch = $rval["arch"]; + $other = $rval["other"]; + $repotype = $rval["repotype"]; + $prefix = $rval["prefix"]; + $shorturl = $rval["shorturl"]; + if($prefix == "") $prefix = "-"; + if($shorturl == "") $shorturl = "-"; + echo ""; + + // get url + $browseurl = "$BASE_URL/repo/$rkey"; + if($shorturl!="-") { + $brurl = $shorturl; + if($prefix != "-") $brurl = "$prefix/$shorturl"; + $browseurl = "$BASE_URL/$brurl/"; + } + echo ""; + echo ""; + } + + echo "
NameTypeOSVersionArchitectureOtherPrefixShort URLBrowse
$desc$repotype$os$version$arch$other$prefix$shorturlBrowse"; + echo "


"; + } private $config;