break; case "getPostByIdentifier": require_once "../framework2/Walkntrade.php"; $wt = new Walkntrade(); $args = array_keys($_POST); $args = split(":", $args[1]); $identifier = htmlspecialchars($args[1]); $school = htmlspecialchars($args[0]); $wt->getPostByIdentifier($identifier, $school); break; case "getSchools": require_once "../framework2/Walkntrade.php"; $wt = new Walkntrade(); header("Content-Type:text/xml"); $query = htmlspecialchars($_POST["query"]); $wt->getSchools($query); break; case "controlPanel": require_once "../framework2/UserMgmt.php"; $um = new UserMgmt(); if (isset($_POST["oldPw"]) && $um->checkPassword($_POST["oldPw"])) { if (isset($_POST["email"]) && $_POST["email"] != "") { $email = filter_var($_POST["email"], FILTER_SANITIZE_EMAIL); switch ($um->modifyAccount($_POST["oldPw"], $email, "", "")) { case 1: return $um->statusDump(999, "This email addres is already used", null); break; case 2: return $um->statusDump(500, "An error has occured (1)", null); break; }