X-Git-Url: http://git.pjr.cc/?p=glcas.git;a=blobdiff_plain;f=plugins%2Fadmin.php;h=8b6c2a9f119486864eb01b6dd41835f7f3a99958;hp=4e2466552472c25d0669c4dc4f77b98ad95bbfd7;hb=f99212f7d29b648f3698cf31cbcda6bc04cda182;hpb=17d5412ef5bdde749ce57dbdd627243eb0d701a8 diff --git a/plugins/admin.php b/plugins/admin.php index 4e24665..8b6c2a9 100644 --- a/plugins/admin.php +++ b/plugins/admin.php @@ -15,9 +15,82 @@ class GLCASAdmin { function go($url) { - echo "admin page"; + error_log("repo:go called"); + + if(isset($_REQUEST["action"])) { + switch($_REQUEST["action"]) { + case "addrepo": + GLCASpageBuilder($this,"doAddRepo"); + return; + break; + case "scanrepo": + break; + } + } + GLCASpageBuilder($this, "body"); + } + + function body($url) + { + // for the main admin body, we hae the following components + + // 1. list of currently available repos and stuff + + // 2. way to add a repo direct + + // 3. way to scan for a repo given a url + + // so first, lets do the main body + $this->mainBody($url); + } + + function doAddRepo($url) + { + $myRep = new GLCASRepo($this->config); + + $glt = $myRep->getRepoDetailsYum($_REQUEST["repourl"]); + + echo "
$glt
"; } + function mainBody($url) + { + // first, list available repos + echo "

Repositories


"; + echo ""; + echo "
NameTypeVersionBrowseControl


"; + + // wrap all this in a table + echo "
"; + // now, add a repo + echo "

Add A Repo

"; + echo "
"; + echo "Type
"; + echo "URL
"; + echo "
"; + echo "

"; + + echo "
"; + + // now scan for a repo + echo "

Scan For Repos

"; + echo "
"; + echo "Hint
"; + echo "URL
"; + echo "
"; + echo "
"; + + echo "
"; + } + private $config; }