示例#1
0
             if (UberspaceMM::addNewAlias($_POST['mailbox_name'], implode(' ', explode(',', trim($_POST['destinations']))))) {
                 echo '<div class="alert alert-success"><b>Yay!</b> Added user <b>' . $_POST['mailbox_name'] . '</b>.</div>';
             } else {
                 echo '<div class="alert alert-danger"><b>Hmmpf!</b> Could not add the user <b>' . $_POST['mailbox_name'] . '</b>.</div>';
             }
         } else {
             echo '<div class="alert alert-danger"><b>Fawk!</b> The username <b>' . $_POST['mailbox_name'] . '</b> already exists.</div>';
         }
     } else {
         echo '<div class="alert alert-warning"><b>Ey!</b> Please fill out every field.</div>';
     }
 } else {
     if ($path_info[1] == 'Delete') {
         if (!empty($path_info[2])) {
             if (in_array($path_info[2], UberspaceMM::getUsernames(true))) {
                 if (UberspaceMM::deleteUser($path_info[2])) {
                     echo '<div class="alert alert-success"><b>Yippieh!</b> The user <b>' . $path_info[2] . '</b> was successfully deleted.</div>';
                 } else {
                     echo '<div class="alert alert-danger"><b>Damn it!</b> Could not delete the user <b>' . $path_info[2] . '</b>.</div>';
                 }
             } else {
                 echo '<div class="alert alert-warning"><b>OMG!</b> The user <b>' . $path_info[2] . '</b> does not even exist.</div>';
             }
         } else {
             echo '<div class="alert alert-warning"><b>Sorry!</b> I can not determine which user you want to delete. :/</div>';
         }
     } else {
         if ($path_info[1] == 'Edit') {
             if (!empty($path_info[2])) {
                 $username = $path_info[2];
                 if (in_array($path_info[2], UberspaceMM::getUsernames(true))) {