echo "SERVER SAYS: $read<BR>";
}
+ /** If the login attempt was UNsuccessful, lets see why **/
if (substr($read, 0, 7) != "a001 OK") {
if (!$hide) {
if (substr($read, 0, 8) == "a001 BAD") {
exit;
}
else if (substr($read, 0, 7) == "a001 NO") {
- echo "<BR>";
+ echo "<HTML><BODY BGCOLOR=FFFFFF><BR>";
echo "<TABLE COLS=1 WIDTH=70% NOBORDER BGCOLOR=FFFFFF ALIGN=CENTER>";
echo " <TR>";
echo " <TD BGCOLOR=\"DCDCDC\">";
include("../functions/imap.php");
include("../functions/mailbox.php");
- include("../src/load_prefs.php");
-
function formatMailboxName($imapConnection, $mailbox, $delimeter, $color) {
require ("../config/config.php");
return $line;
}
- echo "<BODY BGCOLOR=\"$color[3]\" TEXT=\"$color[6]\" LINK=\"$color[6]\" VLINK=\"$color[6]\" ALINK=\"$color[6]\">";
- echo "<FONT FACE=\"Arial,Helvetica\">";
// open a connection on the imap port (143)
$imapConnection = loginToImapServer($username, $key, $imapServerAddress, 10); // the 10 is to hide the output
+ /** If it was a successful login, lets load their preferences **/
+ include("../src/load_prefs.php");
+ checkForPrefs($data_dir, $username);
+ echo "<BODY BGCOLOR=\"$color[3]\" TEXT=\"$color[6]\" LINK=\"$color[6]\" VLINK=\"$color[6]\" ALINK=\"$color[6]\">";
+ echo "<FONT FACE=\"Arial,Helvetica\">";
+
getFolderList($imapConnection, $boxes);
echo "<FONT FACE=\"Arial,Helvetica\" SIZE=4><B><CENTER>";
$chosen_theme = getPref($data_dir, $username, "chosen_theme");
- if (isset($chosen_theme)) {
+ if ((isset($chosen_theme)) && (file_exists($chosen_theme))) {
require("$chosen_theme");
} else {
- require($theme[0]["PATH"]);
+ if (file_exists($theme[0]["PATH"])) {
+ require($theme[0]["PATH"]);
+ } else {
+ echo "Theme: " . $theme[0]["PATH"] . " was not found.<BR>";
+ echo "Exiting abnormally";
+ exit;
+ }
}
?>
\ No newline at end of file
include("../functions/mailbox_display.php");
include("../functions/display_messages.php");
- include("../src/load_prefs.php");
-
- echo "<BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\">\n";
- echo "<FONT FACE=\"Arial,Helvetica\">";
/////////////////////////////////////////////////////////////////////////////////
//
// incoming variables from URL:
// open a connection on the imap port (143)
$imapConnection = loginToImapServer($username, $key, $imapServerAddress);
+ /** If it was a successful login, lets load their preferences **/
+ include("../src/load_prefs.php");
+ checkForPrefs($data_dir, $username);
+ echo "<BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\">\n";
+ echo "<FONT FACE=\"Arial,Helvetica\">";
+
// If the page has been loaded without a specific mailbox,
// just show a page of general info.
if (!isset($mailbox)) {
This was done to create a pure HTML way of refreshing the folder list since
we would like to use as little Javascript as possible.
**/
- checkForPrefs($data_dir, $username);
-
if ($right_frame == "right_main.php") {
$urlMailbox = urlencode($mailbox);
echo "<FRAME SRC=\"left_main.php\" NAME=\"left\">";