if (isset($_POST["mailbox"])) {
            # check for $mailbox
            if ($_POST["mailbox"] == "dorandom") {
                echo "Der Mailboxname " . $_POST['mailbox'] . " darf nicht verwendet werden.";
            } else {
                if ($_POST["mailbox"] == "") {
                    echo "Der Mailboxname darf nicht leer sein.";
                } else {
                    $boxname = test_input($_POST["mailbox"]);
                    $destination = $_POST["destination"];
                    $duration = $_POST["ttl"];
                    $comment = $_POST["comment"];
                    $form_array = "";
                    # empty array
                    $form_array = array("Boxname" => $boxname, "Destination" => $destination, "ttl" => $duration, "Comment" => $comment);
                    create_mailbox($db_array, $form_array, $path);
                }
            }
        } else {
            echo "Fehler in POST";
            echo "<pre>";
            print_r($_POST);
            echo "</pre>";
        }
    }
}
if (isset($_POST["delete"])) {
    # check for delete mark
    $boxname = $_POST["deleteboxname"];
    delete_mailbox($db_array, $boxname, $path);
} else {
Beispiel #2
0
function _moduleContent(&$smarty, $module_name)
{
    //global variables
    global $arrConf;
    global $arrCredentials;
    // global $arrConfModule;
    //$arrConf = array_merge($arrConf,$arrConfModule);
    //folder path for custom templates
    $local_templates_dir = getWebDirModule($module_name);
    $pImap = new paloImap();
    //actions
    $accion = getAction();
    switch ($accion) {
        case "view_bodymail":
            $content = viewMail($smarty, $module_name, $local_templates_dir, $arrConf, $pImap);
            break;
        case "download_attach":
            $content = download_attach($smarty, $module_name, $local_templates_dir, $arrConf, $pImap);
            break;
        case "get_inline_attach":
            $content = inline_attach($smarty, $module_name, $local_templates_dir, $arrConf, $pImap);
            break;
        case "mv_msg_to_folder":
            $content = moveMsgsToFolder($smarty, $module_name, $local_templates_dir, $arrConf, $pImap);
            break;
        case "mark_msg_as":
            $content = markMsgAs($smarty, $module_name, $local_templates_dir, $arrConf, $pImap);
            break;
        case "delete_msg_trash":
            $content = deleteMsgTrash($smarty, $module_name, $local_templates_dir, $arrConf, $pImap);
            break;
        case "toggle_important":
            $content = toogle_important_msg($smarty, $module_name, $local_templates_dir, $arrConf, $pImap);
            break;
        case "create_mailbox":
            $content = create_mailbox($smarty, $module_name, $local_templates_dir, $arrConf, $pImap);
            break;
        case "get_templateEmail":
            $content = get_templateEmail($smarty, $module_name, $local_templates_dir, $arrConf, $pImap);
            break;
        case "compose_email":
            $content = compose_email($smarty, $module_name, $local_templates_dir, $arrConf, $pImap);
            break;
        case "attach_file":
            $content = attachFile($smarty, $module_name, $local_templates_dir, $arrConf, $pImap);
            break;
        case "deattach_file":
            $content = dettachFile($smarty, $module_name, $local_templates_dir, $arrConf, $pImap);
            break;
        case "forwardGetAttachs":
            $content = forwardGetAttachs($smarty, $module_name, $local_templates_dir, $arrConf, $pImap);
            break;
        case "refreshMail":
            $content = refreshMail('checkmail', $smarty, $module_name, $local_templates_dir, $arrConf, $pImap);
            break;
        default:
            $content = reportMail($smarty, $module_name, $local_templates_dir, $arrConf, $pImap);
            break;
    }
    return $content;
}
Beispiel #3
0
include_once dirname(__FILE__) . "/frame.class.inc";
include_once dirname(__FILE__) . "/class.unix.inc";
while (list($num, $ligne) = each($_GET)) {
    $a[] = "{$num}={$ligne}";
}
writelogs_framework(@implode(" - ", $a), __FUNCTION__, __FILE__, __LINE__);
if (isset($_GET["service-cmds"])) {
    service_cmds();
    exit;
}
if (isset($_GET["backup-test-nas"])) {
    backup_test_nas();
    exit;
}
if (isset($_GET["create-mbx"])) {
    create_mailbox();
    exit;
}
if (isset($_GET["imapd-conf"])) {
    imapd_conf();
    exit;
}
if (isset($_GET["cyrus-events"])) {
    cyrus_events();
    exit;
}
if (isset($_GET["cyrquota"])) {
    cyrus_quota();
    exit;
}
if (isset($_GET["mailboxlist-domain"])) {