b40316f9 |
1 | <? |
2 | include("../config/config.php"); |
3 | include("../functions/strings.php"); |
4 | include("../functions/page_header.php"); |
5 | include("../functions/imap.php"); |
7ce342dc |
6 | include("../functions/display_messages.php"); |
b40316f9 |
7 | |
d3cdb279 |
8 | include("../src/load_prefs.php"); |
9 | |
813eba2f |
10 | $imapConnection = sqimap_login($username, $key, $imapServerAddress, 0); |
11 | $dm = sqimap_get_delimiter($imapConnection); |
7ce342dc |
12 | |
13 | if (strpos($folder_name, "\"") || strpos($folder_name, ".") || |
14 | strpos($folder_name, "/") || strpos($folder_name, "\\") || |
15 | strpos($folder_name, "'") || strpos($folder_name, "$dm")) { |
036a8a9d |
16 | plain_error_message(_("Illegal folder name. Please select a different name.<BR><A HREF=\"../src/folders.php\">Click here to go back</A>."), $color); |
7ce342dc |
17 | exit; |
18 | } |
19 | |
20 | if ($contain_subs == true) |
21 | $folder_name = "$folder_name$dm"; |
22 | |
d92b6f31 |
23 | if (trim($subfolder) == "[ None ]") { |
813eba2f |
24 | sqimap_mailbox_create ($imapConnection, $folder_name, ""); |
d92b6f31 |
25 | } else { |
813eba2f |
26 | sqimap_mailbox_create ($imapConnection, $subfolder.$dm.$folder_name, ""); |
d92b6f31 |
27 | } |
b40316f9 |
28 | fputs($imapConnection, "1 logout\n"); |
29 | |
813eba2f |
30 | // if ($auto_forward == true) { |
31 | // header ("Location: webmail.php?right_frame=folders.php"); |
32 | // } else { |
33 | echo "<html><BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\">\n"; |
34 | displayPageHeader($color, "None"); |
35 | echo "<FONT FACE=\"Arial,Helvetica\">"; |
36 | echo "<BR><BR><BR><CENTER><B>"; |
37 | echo _("Folder Created!"); |
38 | echo "</B><BR><BR>"; |
39 | echo _("The folder has been successfully created."); |
40 | echo "<BR><A HREF=\"webmail.php?right_frame=folders.php\" TARGET=_top>"; |
41 | echo _("Click here"); |
42 | echo "</A> "; |
43 | echo _("to continue."); |
44 | echo "</CENTER></FONT>"; |
45 | echo "</BODY></HTML>"; |
46 | // } |
b40316f9 |
47 | ?> |
b40316f9 |
48 | |