function suspendPackage($id, $state) { return ZPackage::suspendPackage($id, $state); }
case 'edit': header('Cache-Control: private'); $token = token(); $id = intval($_REQUEST['id']); $package = ZPackage::getPackage($id); if (!$package) { setmsg(t("No such package defined."), 'warning', 'package.php'); } $op = $_REQUEST['op']; if (checktoken() && 'remove' == $op) { if (ZPackage::removePackage($id)) { setmsg(t('Package Removed.'), 'notice'); } } if (checktoken() && 'suspend' == $_REQUEST['op']) { if (ZPackage::suspendPackage($id, !intval($_REQUEST['suspend']))) { setmsg('', 'notice'); } else { setmsg(t('Error')); } } if (checktoken() && 'edit' == $op) { $package = array(); $package['name'] = strip_tags($_REQUEST['name']); $package['desc'] = strip_tags($_REQUEST['desc']); $package['space'] = $_REQUEST['space']; $package['bandwidth'] = $_REQUEST['bandwidth']; $package['site'] = intval($_REQUEST['site']); $package['ftp'] = intval($_REQUEST['ftp']); $package['sql'] = intval($_REQUEST['sql']); $package['state'] = intval($_REQUEST['state']);