31fe65f496c59176eaf716f323f71d4131e11632
2 if (!isset($config_php))
3 include("../config/config.php");
4 if (!isset($strings_php))
5 include("../functions/strings.php");
6 if (!isset($page_header_php))
7 include("../functions/page_header.php");
9 include("../functions/imap.php");
10 if (!isset($display_messages_php))
11 include("../functions/display_messages.php");
13 include("../src/load_prefs.php");
15 $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
16 $dm = sqimap_get_delimiter($imapConnection);
18 if (strpos($folder_name, "\"") ||
strpos($folder_name, ".") ||
19 strpos($folder_name, "/") ||
strpos($folder_name, "\\") ||
20 strpos($folder_name, "'") ||
strpos($folder_name, "$dm")) {
21 plain_error_message(_("Illegal folder name. Please select a different name.")."<BR><A HREF=\"../src/folders.php\">"._("Click here to go back")."</A>."), $color);
25 if ($contain_subs == true)
26 $folder_name = "$folder_name$dm";
28 if (trim($subfolder) == "[ None ]") {
29 sqimap_mailbox_create ($imapConnection, $folder_name, "");
31 sqimap_mailbox_create ($imapConnection, $subfolder.$dm.$folder_name, "");
33 fputs($imapConnection, "1 logout\n");
35 // if ($auto_forward == true) {
36 // header ("Location: webmail.php?right_frame=folders.php");
38 echo "<html><BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\">\n";
39 displayPageHeader($color, "None");
40 echo "<BR><BR><BR><CENTER><B>";
41 echo _("Folder Created!");
43 echo _("The folder has been successfully created.");
44 echo "<BR><A HREF=\"webmail.php?right_frame=folders.php\" TARGET=_top>";
47 echo _("to continue.");
49 echo "</BODY></HTML>";