/** * get a list of all droplets and show them **/ function list_droplets($info = NULL) { global $parser, $settings, $val, $backend; $groups = CAT_Users::get_groups_id(); $rows = CAT_Helper_Droplet::getDroplets(true); $backups = CAT_Helper_Directory::scanDirectory(CAT_Helper_Directory::sanitizePath(dirname(__FILE__) . '/export'), true, true, NULL, array('zip')); $parser->output('tool', array('rows' => $rows, 'info' => $info, 'backups' => count($backups) && CAT_Helper_Droplet::is_allowed('manage_backups', $groups) ? 1 : NULL, 'can_export' => CAT_Helper_Droplet::is_allowed('export_droplets', $groups) ? 1 : NULL, 'can_import' => CAT_Helper_Droplet::is_allowed('import_droplets', $groups) ? 1 : NULL, 'can_delete' => CAT_Helper_Droplet::is_allowed('delete_droplets', $groups) ? 1 : NULL, 'can_modify' => CAT_Helper_Droplet::is_allowed('modify_droplets', $groups) ? 1 : NULL, 'can_perms' => CAT_Helper_Droplet::is_allowed('manage_perms', $groups) ? 1 : NULL, 'can_add' => CAT_Helper_Droplet::is_allowed('add_droplets', $groups) ? 1 : NULL)); }
$this_step = $_REQUEST['prevstep']; } elseif (isset($_REQUEST['btn_next'])) { $this_step = $_REQUEST['nextstep']; } elseif (isset($_REQUEST['goto'])) { $this_step = $_REQUEST['goto']; } $parser->setGlobals(array('this_step' => $this_step)); write2log(sprintf('current step: [%s]', $this_step)); if ($this_step == 'intro') { // remove old inst.log if (file_exists(CAT_LOGFILE)) { @unlink(CAT_LOGFILE); } if (file_exists(dirname(__FILE__) . '/optional')) { // check for optional modules $zip_files = $dirh->scanDirectory(dirname(__FILE__) . '/optional', true, true, dirname(__FILE__) . '/optional/', array('zip')); if (!count($zip_files) && $steps[6]['id'] == 'optional') { // remove step 'optional' array_splice($steps, 6, 1); } } } // let's see if we have some stored data from previous steps or installations if (file_exists(dirname(__FILE__) . '/instdata.tmp')) { $file = implode("\n", file(dirname(__FILE__) . '/instdata.tmp')); $config = unserialize($file); } else { $config = array('ssl_available' => sslCheck()); } // set timezone default if (!isset($config['default_timezone_string'])) {