Example #1
0
                     echo '<div class="alert alert-danger"><b>Uncool!</b> Could not change the password for the user <b>' . $_POST['mailbox_name'] . '</b>.</div>';
                 }
             } else {
                 echo '<div class="alert alert-danger"><b>WTF?!</b> The passwords do not match.</div>';
             }
         } else {
             echo '<div class="alert alert-danger"><b>Fawk!</b> The user <b>' . $_POST['mailbox_name'] . '</b> does not exist.</div>';
         }
     } else {
         echo '<div class="alert alert-warning"><b>Ey!</b> Please fill out every field.</div>';
     }
 } else {
     if ($path_info[1] == 'ChangeDestinations') {
         if (!empty($_POST['mailbox_name'])) {
             if (in_array($_POST['mailbox_name'], UberspaceMM::getUsernames(true))) {
                 if (UberspaceMM::changeForwards($_POST['mailbox_name'], implode(' ', explode(',', trim($_POST['destinations']))))) {
                     echo '<div class="alert alert-success"><b>Yay!</b> Changed forwarding destinations for user <b>' . $_POST['mailbox_name'] . '</b>.</div>';
                 } else {
                     echo '<div class="alert alert-danger"><b>Fuack!</b> It was impossible for me to change the destinations for the user <b>' . $_POST['mailbox_name'] . '</b>.</div>';
                 }
             } else {
                 echo '<div class="alert alert-danger"><b>Fawk!</b> The user <b>' . $_POST['mailbox_name'] . '</b> does not exist.</div>';
             }
         } else {
             echo '<div class="alert alert-warning"><b>Ey!</b> Please fill out every field.</div>';
         }
     } else {
         if ($path_info[1] == 'SetupVirtualMailboxes') {
             if (UberspaceMM::setupVirtualMailboxes()) {
                 echo '<div class="alert alert-success"><b>Yay!</b> Successfully set up virtual mailboxes.</div>';
             } else {