Exemplo n.º 1
0
     require_once "../framework/UserMgmt.php";
     $quiet = isset($_POST["quiet"]) && $_POST["quiet"] == "true" ? true : false;
     $um = new UserMgmt();
     header("Content-Type:text/xml");
     echo $um->getSentWebmail($quiet);
     break;
 case "getMessage":
     require_once "../framework/UserMgmt.php";
     $um = new UserMgmt();
     $id = isset($_POST["message_id"]) ? htmlspecialchars($_POST["message_id"], FILTER_SANITIZE_NUMBER_INT) : null;
     if ($id == null) {
         echo "no message specified";
         return;
     } else {
         header("Content-Type:text/xml");
         echo $um->getMessage($id);
     }
     break;
 case "pollNewWebmail":
     require_once "../framework/UserMgmt.php";
     $um = new UserMgmt();
     header("Content-Type:text/xml");
     echo $um->pollNewWebmail();
     break;
 case "setEmailPref":
     require_once "../framework/UserMgmt.php";
     $um = new UserMgmt();
     $pref = isset($_POST["pref"]) ? htmlspecialchars($_POST["pref"], FILTER_SANITIZE_NUMBER_INT) : null;
     echo $um->setEmailPref($pref);
     break;
 case "getEmailPref":