-<?
- include("../config/config.php");
- include("../functions/strings.php");
- include("../functions/page_header.php");
- include("../functions/imap.php");
- include("../functions/mime.php");
- include("../functions/mailbox.php");
- include("../functions/date.php");
+<?php
+ session_start();
+
+ if (!isset($config_php))
+ include("../config/config.php");
+ if (!isset($strings_php))
+ include("../functions/strings.php");
+ if (!isset($page_header_php))
+ include("../functions/page_header.php");
+ if (!isset($imap_php))
+ include("../functions/imap.php");
+ if (!isset($mime_php))
+ include("../functions/mime.php");
+ if (!isset($date_php))
+ include("../functions/date.php");
include("../src/load_prefs.php");
echo "</CENTER></B>";
echo "</TD></TR><TR><TD BGCOLOR=\"$color[4]\">";
$urlmailbox = urlencode($mailbox);
- echo "<FONT FACE=\"Arial, Helvetica\"><CENTER><A HREF=\"../src/download.php?absolute_dl=true&passed_id=$id&passed_ent_id=$entid&mailbox=$urlmailbox\">";
+ echo "<CENTER><A HREF=\"../src/download.php?absolute_dl=true&passed_id=$id&passed_ent_id=$entid&mailbox=$urlmailbox\">";
echo _("Download this as a file");
- echo "</A></CENTER><BR><BR></FONT><TT>";
+ echo "</A></CENTER><BR><BR><TT>";
if ($type1 == "html")
echo $body;
else
echo "</TT></TD></TR></TABLE>";
}
- $imapConnection = loginToImapServer($username, $key, $imapServerAddress, 0);
- selectMailbox($imapConnection, $mailbox, $numMessages);
+ $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
+ sqimap_mailbox_select($imapConnection, $mailbox);
// $message contains all information about the message
// including header and body
- $message = fetchMessage($imapConnection, $passed_id, $mailbox);
+ $message = sqimap_get_message($imapConnection, $passed_id, $mailbox);
$type0 = $message["ENTITIES"][$passed_ent_id]["TYPE0"];
$type1 = $message["ENTITIES"][$passed_ent_id]["TYPE1"];
}
}
- fputs($imapConnection, "1 logout\n");
+ sqimap_logout($imapConnection);
?>