function addServerList($pname = 'all') { $server = get_update_server(); if (empty($server)) { return; } $url = $server . "list.php?pkg=" . urlencode($pname) . "&ext=1"; $list = file_get_url($url, 'list'); $pkgs =& $this->pkgs; foreach (preg_split('/\\n/', $list) as $ln) { $pkg = pkg_info_csv($ln); if ($pkg) { $dirname = $pkg['vcheck']; if (isset($pkgs[$dirname])) { $pkgs[$dirname][] = $pkg; } else { $pkgs[$dirname] = array($pkg); } } } }
exit; } xoops_cp_header(); echo mystyle(); include 'mymenu.php'; switch ($op) { default: clear_get_cache(3600 * 48); check_packages(); // checking regsiterd packages break; case 'pkgs': // package managiment echo "<fieldset>\n"; import_form(); $svr = get_update_server(); if ($svr) { $src = array("{SERVER}"); $dst = array($svr); echo "<p>" . str_replace($src, $dst, _AM_FETCH_DESCRIPTION) . "</p>"; } echo "</fieldset>\n"; reglist_packages(); break; case 'detail': $view = isset($_GET['view']) ? $_GET['view'] : false; $new = isset($_GET['new']) ? intval($_GET['new']) : 0; detail_package(intval($_GET['pkgid']), $view, $new); break; case 'opts': // options select in a package