Beispiel #1
0
     break;
 case "getSchools":
     require_once "../framework/Walkntrade.php";
     $wt = new Walkntrade();
     header("Content-Type:text/xml");
     $query = htmlspecialchars($_POST["query"]);
     $wt->getSchools($query);
     break;
 case "controlPanel":
     require_once "../framework/UserMgmt.php";
     $um = new UserMgmt();
     $oldPw = filter_var($_POST["oldPw"], FILTER_SANITIZE_STRING);
     $email = filter_var($_POST["email"], FILTER_SANITIZE_EMAIL);
     $newPw = filter_var($_POST["newPw"], FILTER_SANITIZE_STRING);
     $phone = filter_var($_POST["phone"], FILTER_SANITIZE_NUMBER_INT);
     switch ($um->controlPanel($oldPw, $email, $newPw, $phone)) {
         case "1":
             echo "Not authorized";
             break;
         case "2":
             echo "Not authorized";
             break;
         case "3":
             echo "One or more of your settings are redundant and have not been changed. You will be logged out now so your changes to take effect. If you changed your email, you will need to verify it before you may log in.";
             break;
         case "0":
             echo "Your settings have been saved. You will be logged out now in order for your changes to take effect. If you changed your email, you will need to verify it before you may log in.";
             break;
         case "301":
             echo "No Act";
             break;