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