+<HTML>
+<META HTTP-EQUIV="REFRESH" CONTENT="0;URL=webmail.php?right_frame=folders.php" TARGET=_top>
<?
include("../config/config.php");
include("../functions/strings.php");
include("../functions/page_header.php");
include("../functions/imap.php");
- $imapConnection = fsockopen($imapServerAddress, 143, &$errorNumber, &$errorString);
- if (!$imapConnection) {
- echo "Error connecting to IMAP Server.<br>";
- echo "$errorNumber : $errorString<br>";
- exit;
- }
- $serverInfo = fgets($imapConnection, 256);
-
- fputs($imapConnection, "1 login $username $key\n");
- $read = fgets($imapConnection, 1024);
- echo $read;
-
- if ($subfolder == "INBOX")
- fputs($imapConnection, "1 create \"user.$username.$folder_name\"\n");
- else
- fputs($imapConnection, "1 create \"user.$username.$subfolder.$folder_name\"\n");
-
+ echo "<BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\">\n";
+ $imapConnection = loginToImapServer($username, $key, $imapServerAddress);
+ fputs($imapConnection, "1 create \"$subfolder.$folder_name\"\n");
fputs($imapConnection, "1 logout\n");
- echo "<BR><BR><A HREF=\"folders.php\">Return</A>";
+ echo "<CENTER><BR><BR>You will be automatically forwarded.<BR>If not, <A HREF=\"webmail.php?right_frame=folders.php\" TARGET=_top>click here</A></CENTER>";
?>
-
+</BODY></HTML>