From: <jhe...@us...> - 2002-11-12 17:53:16
|
Update of /cvsroot/upcase-project/UpCase/admin In directory usw-pr-cvs1:/tmp/cvs-serv18606 Added Files: repository.php Log Message: packages repository view --- NEW FILE: repository.php --- <?php include_once("../config/uc_config.inc"); // ModeliXe tags: // // list_from : url of the package.xml file where info comes from // pkg_list : looped block that list packages info // pkg_name : name of a package // pkg_version : package version // pkg_descr : package description, translated // pkg_status : package status // pkg_home : home page of the original package // pkg_instlink : url of the script that will install the package // First lines to include include_once("lib/uc_page.php"); // Start the session $p = new UcPage("repository"); // Check permissions, log in if necessary $p->open(); $sess = $p->getSession(); $user = $sess->getUser(); // other includes include_once("lib/uc_packages.php"); include_once("lib/uc_repository.php"); // don't use the include_once directive unless you want // to always display this page in the default language include("config/uc_templates.inc"); // prepare template $tmpl = new ModeliXe($uc_tmpl["REPOSITORY"]); $tmpl->SetModeliXe(); $rep = new UcLocalRepository(); if (!empty($doupdate)) $rep->update(); $tmpl->MxUrl("repupdate", $ucConfig->wwwRoot . "/admin/repository.php?doupdate=1"); $tmpl->MxText("descr", $rep->description[$user->lang]); $categories = $rep->getCategories(); foreach ($categories as $category) { $tmpl->MxText("categories.catname", $category->description[$user->lang]); $tmpl->MxUrl("categories.caturl", $ucConfig->wwwRoot . "/admin/category.php", array("catname" => $category->name)); $tmpl->MxBloc("categories", "loop"); } // output $tmpl->MxWrite(); ?> |