Exemple #1
0
        break;
    case 'reloadAvailableConsumables':
        header("Content-Type: text/html; charset=UTF-8");
        $request = new PluginConsumablesRequest();
        $request->loadAvailableConsumables($_POST['used'], $_POST['type']);
        break;
    case 'reloadAvailableConsumablesNumber':
        header("Content-Type: text/html; charset=UTF-8");
        $request = new PluginConsumablesRequest();
        $request->loadAvailableConsumablesNumber($_POST['used'], $_POST['consumables_id']);
        break;
    case 'loadConsumableInformation':
        header("Content-Type: text/html; charset=UTF-8");
        $validation = new PluginConsumablesValidation();
        $validation->loadConsumableInformation(Session::getLoginUserID(), $_POST['consumables_id']);
        break;
    case 'validationConsumables':
        header('Content-Type: application/json; charset=UTF-8"');
        $validation = new PluginConsumablesValidation();
        echo json_encode($validation->validationConsumable($_POST));
        break;
    case 'searchConsumables':
        header('Content-Type: application/json; charset=UTF-8"');
        $request = new PluginConsumablesRequest();
        echo json_encode($request->listItemsForUser($_POST['requesters_id'], $_POST));
        break;
    case 'loadAvailableConsumablesNumber':
        $request = new PluginConsumablesRequest();
        $request->loadAvailableConsumablesNumber($_POST['consumables_id']);
        break;
}