} else { returnResponse("No nimbusec bundles could be found on your system."); } } else { if ($_POST['action'] === "uninstallation") { // -- Uninstall Nimbusec (execute installation file) -- $res = (require_once "/usr/local/nimbusec/nimbusec/uninstall.php"); if ($res['status']) { array_push($res['content'], "The uninstallation of the nimbusec cPanel / WHM plugin has been finished successfully."); } else { array_push($res['content'], "The uninstallation of the nimbusec cPanel / WHM plugin has been aborted suddenly. It is advised to review the nimbusec logs files to find the possible cause."); } returnResponse($res); } else { if ($_POST['action'] === "retrieveUsers") { $packages = retrieveUsers(); if (gettype($packages) == "array") { returnResponse($packages, 1); } else { returnResponse($packages); } } else { returnResponse("Unknown module called"); } } } } } } } } catch (Exception $exp) {
source: function(request, response) { $.ajax({ url: "", data: { term: extractLast(request.term) }, dataType: "json", type: "POST", success: function(data) { response(data); }, error: function() { // added an error handler for the sake of the example response($.ui.autocomplete.filter( <?php print_r(retrieveUsers()); ?> , extractLast(request.term))); } }); }, focus: function() { // prevent value inserted on focus return false; }, select: function(event, ui) { var terms = split(this.value); // remove the current input terms.pop(); // add the selected item terms.push(ui.item.value);