function addItemHandler() { $data = $_POST; return addApplication($data); }
if (isOK($response)) { printDatabasesResult($response, "GETTING CVS DBs FAILED", " ---- GETTING CVS DBs SUCCESSFULLY COMPLETED ----"); } else { echo $response->getMessage(); } break; case "addApplication": echo "Connecting Application to CVS Database..." . PHP_EOL; $email = getEMail(); $password = getPassword(); $dbName = getDbName(); $appId = getAppId(); if (is_numeric($appId)) { $response = addChannel($email, $password, $dbName, $appId); } else { $response = addApplication($email, $password, $dbName, $appId); } if (isOK($response)) { printResult($response, "CONNECTING APPLICATION TO CVS DB FAILED", " Application {$appId} has been connected to the database {$dbName}." . PHP_EOL . " ---- CONNECTING APPLICATION TO CVS DB SUCCESSFULLY COMPLETED ----"); } else { echo $response->getMessage(); } break; case "deleteApplication": $msg = "Deleting Application ..." . PHP_EOL; echo PHP_EOL . "{$msg}"; $email = getEMail(); $password = getPassword(); $dbName = getDbName(); $appId = getAppId(); if (is_numeric($appId)) {