** Copyright (c) 1999-2000 The SquirrelMail development team
** Licensed under the GNU GPL. For full terms see the file COPYING.
**
- ** Creates folders on the IMAP server.
+ ** Creates folders on the IMAP server.
** Called from folders.php
**
** $Id$
**/
- session_start();
-
- if (!isset($strings_php))
- include("../functions/strings.php");
- if (!isset($config_php))
- include("../config/config.php");
- if (!isset($page_header_php))
- include("../functions/page_header.php");
- if (!isset($imap_php))
- include("../functions/imap.php");
- if (!isset($display_messages_php))
- include("../functions/display_messages.php");
-
- include("../src/load_prefs.php");
+ require_once('../src/validate.php');
+ require_once('../functions/imap.php');
+ require_once('../functions/display_messages.php');
$imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
$dm = sqimap_get_delimiter($imapConnection);
if (strpos($folder_name, "\"") || strpos($folder_name, "\\") ||
strpos($folder_name, "'") || strpos($folder_name, "$dm")) {
- print "<html><body bgcolor=$color[4]>";
+ echo "<html><body bgcolor=$color[4]>";
plain_error_message(_("Illegal folder name. Please select a different name.")."<BR><A HREF=\"../src/folders.php\">"._("Click here to go back")."</A>.", $color);
sqimap_logout($imapConnection);
exit;
$subfolder_orig = $subfolder;
}
- if (trim($subfolder_orig) == '[ ' . _('None') . ' ]' ||
- trim($subfolder_orig) == '') {
+ if (trim($subfolder_orig) == '') {
sqimap_mailbox_create ($imapConnection, $folder_prefix.$folder_name, "");
} else {
sqimap_mailbox_create ($imapConnection, $subfolder.$dm.$folder_name, "");
}
- fputs($imapConnection, "1 logout\n");
$location = get_location();
header ("Location: $location/folders.php?success=create");
sqimap_logout($imapConnection);
-?>
-
+?>
\ No newline at end of file