From f8f9bed9bb69ef0432fbc67741f82071b6582b4d Mon Sep 17 00:00:00 2001 From: lkehresman Date: Wed, 15 Dec 1999 18:04:29 +0000 Subject: [PATCH] added color customization added INSTALL and README git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@82 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- INSTALL | 12 +++++++++ README | 19 ++++++++++++++ functions/display_messages.php | 46 +++++++++++++++++----------------- functions/mailbox_display.php | 28 ++++++++++----------- functions/page_header.php | 8 +++--- src/compose.php | 22 ++++++++-------- src/compose_send.php | 22 ++++++++-------- src/delete_message.php | 5 ++-- src/empty_trash.php | 4 +-- src/folders.php | 19 +++++++------- src/folders_create.php | 2 +- src/folders_delete.php | 2 ++ src/folders_rename_do.php | 2 ++ src/folders_rename_getname.php | 8 +++--- src/left_main.php | 23 +++-------------- src/login.php | 6 ++--- src/move_messages.php | 6 ++--- src/read_body.php | 32 +++++++++++------------ src/right_main.php | 9 ++++--- src/signout.php | 11 ++++---- 20 files changed, 154 insertions(+), 132 deletions(-) create mode 100644 INSTALL create mode 100644 README diff --git a/INSTALL b/INSTALL new file mode 100644 index 00000000..3e934765 --- /dev/null +++ b/INSTALL @@ -0,0 +1,12 @@ +Sorry for the incomplete documentation at this time. Here is a quick +overview of how to install SquirrelMail. + +1. Compile Apache (or whatever web server) with PHP4 capabilities. + +2. Unarchive SquirrelMail in a subdirectory that is accessable by the + web server. EX: /home/httpd/html/squirrelmail-0.1 + +3. Edit the config file, config/config.php + +4. Point your browser to the location you specified in step 2. + In this example, it's: http://YOURHOST/squirrelmail-0.1/index.html diff --git a/README b/README new file mode 100644 index 00000000..cafa307e --- /dev/null +++ b/README @@ -0,0 +1,19 @@ +SquirrelMail version 0.1 +December 14, 1999 +------------------------ + +For information on installing, see INSTALL + +SquirrelMail's goal is to be an easy-to-configure web-based email +client. For more information about SquirrelMail, please visit our +web site: http://squirrelmail.sourceforge.net + +If you have questions, please direct them to the mailing list +specified on the web site. Please do not email us directly unless +absolutely necessary. + +This product is copyrighted under the GPL liscense. Please read +COPYING for more information. + +Thanks, +Luke and Nathan diff --git a/functions/display_messages.php b/functions/display_messages.php index 661cd27f..6dcc4a65 100644 --- a/functions/display_messages.php +++ b/functions/display_messages.php @@ -7,11 +7,11 @@ ** **/ - function error_username_password_incorrect() { + function error_username_password_incorrect($color) { echo "
"; - echo ""; + echo "
"; echo " "; - echo "
"; + echo " "; echo "
ERROR
"; echo "
"; echo "

Unknown user or password incorrect.
Click here to try again.
"; @@ -20,25 +20,25 @@ echo ""; } - function general_info($motd, $org_logo, $version, $org_name) { + function general_info($motd, $org_logo, $version, $org_name, $color) { echo "
"; - echo ""; + echo "
"; echo " "; - echo "
"; + echo " "; echo "
Welcome to $org_name's WebMail system
"; echo "
"; - echo "
"; + echo "
"; echo "
Running SquirrelMail version $version (c) 1999 by Nathan and Luke Ehresman.
"; echo "
"; echo " "; echo " "; - echo " "; - echo " "; echo " "; @@ -47,12 +47,12 @@ echo "
"; + echo "
"; if (strlen($org_logo) > 3) echo " "; else echo " $org_name"; echo "
"; + echo " "; echo " $motd"; echo "
"; } - function messages_deleted_message($mailbox, $sort, $startMessage) { + function messages_deleted_message($mailbox, $sort, $startMessage, $color) { $urlMailbox = urlencode($mailbox); echo "
"; - echo ""; + echo "
"; echo " "; - echo "
"; + echo " "; echo "
Messages Deleted
"; echo "
"; echo "

The selected messages were deleted successfully.
\n"; @@ -64,12 +64,12 @@ echo "
"; } - function messages_moved_message($mailbox, $sort, $startMessage) { + function messages_moved_message($mailbox, $sort, $startMessage, $color) { $urlMailbox = urlencode($mailbox); echo "
"; - echo ""; + echo "
"; echo " "; - echo "
"; + echo " "; echo "
Messages Moved
"; echo "
"; echo "

The selected messages were moved successfully.
\n"; @@ -81,13 +81,13 @@ echo "
"; } - function error_message($message, $mailbox, $sort, $startMessage) { + function error_message($message, $mailbox, $sort, $startMessage, $color) { $urlMailbox = urlencode($mailbox); echo "
"; - echo ""; + echo "
"; echo " "; - echo "
"; - echo "
ERROR
"; + echo "
"; + echo "
ERROR
"; echo "
"; echo "

$message
\n"; echo "
"; @@ -98,12 +98,12 @@ echo "
"; } - function plain_error_message($message) { + function plain_error_message($message, $color) { echo "
"; - echo ""; + echo "
"; echo " "; - echo "
"; - echo "
ERROR
"; + echo "
"; + echo "
ERROR
"; echo "
"; echo "

$message"; echo "
"; diff --git a/functions/mailbox_display.php b/functions/mailbox_display.php index bd01aeb0..66c7fde5 100644 --- a/functions/mailbox_display.php +++ b/functions/mailbox_display.php @@ -161,35 +161,35 @@ echo ""; if ($startMessage < $endMessage) { - echo "\n"; } else if ($startMessage == $endMessage) { - echo "\"TD>"; echo "
Viewing message $startMessage ($numMessages total)
\n"; echo "\n"; } - echo "\n"; /** The delete and move options */ - echo ""; - echo "
"; + echo "
"; echo "
Viewing messages $startMessage to $endMessage ($numMessages total)
\n"; echo "
"; + echo "
"; + echo "
"; if (($nextGroup <= $numMessages) && ($prevGroup >= 0)) { echo "Previous\n"; echo "Next\n"; } else if (($nextGroup > $numMessages) && ($prevGroup >= 0)) { echo "Previous\n"; - echo "Next\n"; + echo "Next\n"; } else if (($nextGroup <= $numMessages) && ($prevGroup < 0)) { - echo "Previous\n"; + echo "Previous\n"; echo "Next\n"; } echo "
"; + echo "
"; echo "\n\n\n
"; - echo "\n"; + echo "
\n"; echo " \n"; echo "
\n"; echo " \n"; @@ -219,9 +219,9 @@ echo "
\n\n\n"; echo "
"; - echo ""; - echo ""; + echo "\n"; - echo "
"; + echo ""; + echo ""; echo " "; /** FROM HEADER **/ echo " "; + echo ""; } else if ($startMessage == $endMessage) { // if there's only one message in the box, handle it different. $i = $startMessage - 1; printMessageInfo($imapConnection, $t, $msgs[$i]["ID"], $msgs[$i]["FROM"], $msgs[$i]["SUBJECT"], $msgs[$i]["DATE_STRING"], $msgs[$i]["FLAG_ANSWERED"], $msgs[$i]["FLAG_SEEN"], $mailbox, $sort, $startMessage); @@ -267,17 +267,17 @@ echo "
NumFrom"; @@ -252,7 +252,7 @@ // loop through and display the info for each message. $t = 0; // $t is used for the checkbox number if ($numMessages == 0) { // if there's no messages in this folder - echo "

THIS FOLDER IS EMPTY
 

THIS FOLDER IS EMPTY
 
\n"; echo "
"; + echo "
"; if (($nextGroup <= $numMessages) && ($prevGroup >= 0)) { echo "Previous\n"; echo "Next\n"; } else if (($nextGroup > $numMessages) && ($prevGroup >= 0)) { echo "Previous\n"; - echo "Next\n"; + echo "Next\n"; } else if (($nextGroup <= $numMessages) && ($prevGroup < 0)) { - echo "Previous\n"; + echo "Previous\n"; echo "Next\n"; } echo "
"; /** End of message-list table */ diff --git a/functions/page_header.php b/functions/page_header.php index 83f1fc80..b5c99694 100644 --- a/functions/page_header.php +++ b/functions/page_header.php @@ -6,18 +6,18 @@ ** **/ - function displayPageHeader($mailbox) { + function displayPageHeader($color, $mailbox) { /** Here is the header and wrapping table **/ $shortBoxName = readShortMailboxName($mailbox, "."); - echo ""; - echo " "; + echo "
"; + echo " "; echo " "; echo "
"; echo " Sign Out"; echo " "; echo "
Current Folder: $shortBoxName
"; echo "
\n"; - echo ""; + echo "
"; echo "
"; echo " Compose  "; echo " Addresses  "; diff --git a/src/compose.php b/src/compose.php index c517b106..ac450160 100644 --- a/src/compose.php +++ b/src/compose.php @@ -8,9 +8,9 @@ include("../functions/mime.php"); - echo "\n"; + echo "\n"; $imapConnection = loginToImapServer($username, $key, $imapServerAddress); - displayPageHeader("None"); + displayPageHeader($color, "None"); if ($forward_id) { selectMailbox($imapConnection, $mailbox, $numMessages); @@ -44,9 +44,9 @@ echo "\n"; echo "\n"; echo " \n"; - echo " \n"; echo " \n"; echo " \n"; - echo " \n"; echo " \n"; echo " \n"; - echo " \n"; echo " \n"; echo " \n"; - echo " \n"; echo " \n"; echo " \n"; - echo " "; echo " \n"; diff --git a/src/compose_send.php b/src/compose_send.php index 016ef3c7..57dc4dad 100644 --- a/src/compose_send.php +++ b/src/compose_send.php @@ -8,14 +8,14 @@ include("../functions/display_messages.php"); if ($passed_body == "") { - echo ""; - displayPageHeader("None"); - plain_error_message("You have not entered a message body."); + echo "\n"; + displayPageHeader($color, "None"); + plain_error_message("You have not entered a message body.", $color); exit; } else if ($passed_to == "") { - echo ""; - displayPageHeader("None"); - plain_error_message("You have not filled in the \"To:\" field."); + echo "\n"; + displayPageHeader($color, "None"); + plain_error_message("You have not filled in the \"To:\" field.", $color); echo "\n"; echo "
"; @@ -28,9 +28,9 @@ exit; } else if ($passed_subject == "") { - echo ""; - displayPageHeader("None"); - plain_error_message("You have not entered a subject."); + echo "\n"; + displayPageHeader($color, "None"); + plain_error_message("You have not entered a subject.", $color); echo "\n"; echo "
"; echo "
"; @@ -46,9 +46,9 @@ sendMessage($smtpServerAddress, $smtpPort, $username, $domain, $passed_to, $passed_cc, $passed_bcc, $passed_subject, $passed_body, $version); echo ""; - echo ""; + echo "\n"; - displayPageHeader("None"); + displayPageHeader($color, "None"); echo ""; echo "


Message Sent!

"; echo "You will be automatically forwarded.
If not, click here"; diff --git a/src/delete_message.php b/src/delete_message.php index b6232f74..f490f4cf 100644 --- a/src/delete_message.php +++ b/src/delete_message.php @@ -1,4 +1,3 @@ - \n"; + $imapConnection = loginToImapServer($username, $key, $imapServerAddress); selectMailbox($imapConnection, $mailbox, $numMessages, $imapServerAddress); - displayPageHeader($mailbox); + displayPageHeader($color, $mailbox); deleteMessages($imapConnection, $message, $message, $numMessages, $trash_folder, $move_to_trash, $auto_expunge, $mailbox); messages_deleted_message($mailbox, $sort, $startMessage); diff --git a/src/empty_trash.php b/src/empty_trash.php index ea38697e..2cf16df1 100644 --- a/src/empty_trash.php +++ b/src/empty_trash.php @@ -47,8 +47,8 @@ } selectMailbox($imapConnection, $trash_folder, $numMessages); - echo ""; - displayPageHeader($mailbox); + echo "\n"; + displayPageHeader($color, $mailbox); messages_deleted_message($trash_folder, $sort, $startMessage); fputs($imapConnection, "1 logout"); ?> diff --git a/src/folders.php b/src/folders.php index 5dea2602..0dd352f6 100644 --- a/src/folders.php +++ b/src/folders.php @@ -1,4 +1,3 @@ - \n"; + + displayPageHeader($color, "None"); echo "
\n"; + echo " \n"; echo " To: \n"; - echo " \n"; + echo " \n"; if ($send_to) echo "
"; else @@ -54,24 +54,24 @@ echo "
\n"; + echo " \n"; echo " CC:\n"; - echo " \n"; + echo " \n"; echo "
"; echo "
\n"; + echo " \n"; echo " BCC:\n"; - echo " \n"; + echo " \n"; echo "
"; echo "
\n"; + echo " \n"; echo " Subject:\n"; - echo " \n"; + echo " \n"; if ($reply_subj) { $reply_subj = str_replace("\"", "'", $reply_subj); $reply_subj = stripslashes($reply_subj); @@ -95,7 +95,7 @@ echo "
\n"; + echo " \n"; echo "   
"; echo "
\n"; - echo " \n"; echo "
\n"; + echo "
\n"; echo " Folders\n"; echo "
\n"; @@ -19,8 +20,8 @@ /** DELETING FOLDERS **/ echo "\n"; - echo ""; - echo ""; + echo "
\n"; /** CREATING FOLDERS **/ - echo ""; - echo ""; + echo "
\n"; /** RENAMING FOLDERS **/ - echo ""; - echo ""; + echo "
Delete Folder
"; + echo "
Delete Folder
"; echo "\n"; echo "
Create Folder
"; + echo "
Create Folder
"; echo "\n"; echo "
\n"; echo "  as a subfolder of
"; @@ -55,8 +56,8 @@ echo "
Rename or Move Folder
"; + echo "
Rename or Move Folder
"; echo "
\n"; echo ""; - echo ""; - echo ""; + echo "
Rename or Move a folder
"; + echo "
Rename or Move a folder
"; echo "\n"; echo "Original Name:   
\n"; echo "As a subfolder of:   "; diff --git a/src/left_main.php b/src/left_main.php index 3b2929e2..e3725eb8 100644 --- a/src/left_main.php +++ b/src/left_main.php @@ -13,32 +13,15 @@ } ?> - - - - - "; + echo ""; + // open a connection on the imap port (143) $imapConnection = loginToImapServer($username, $key, $imapServerAddress); diff --git a/src/login.php b/src/login.php index 9814a3a2..4e1197a2 100644 --- a/src/login.php +++ b/src/login.php @@ -11,20 +11,20 @@ setcookie("logged_in", 0, time(), "/"); ?> - \n"; echo "\n"; echo "
\n"; echo "
SquirrelMail version $version
By Nathan and Luke Ehresman
\n"; echo "\n"; echo " \n"; - echo " \n"; echo " \n"; - echo "
\n"; + echo " \n"; echo "
$org_name Login
\n"; echo "
\n"; + echo " \n"; echo " \n"; echo " \n"; echo "
\n"; diff --git a/src/move_messages.php b/src/move_messages.php index 1edfa827..93c48ec2 100644 --- a/src/move_messages.php +++ b/src/move_messages.php @@ -1,4 +1,3 @@ - \n"; function putSelectedMessagesIntoString($msg) { $j = 0; @@ -37,7 +37,7 @@ // If the delete button was pressed, the moveButton variable will not be set. if (!$moveButton) { - displayPageHeader($mailbox); + displayPageHeader($color, $mailbox); if (is_array($msg) == 1) { // Marks the selected messages ad 'Deleted' $j = 0; @@ -58,7 +58,7 @@ echo "

No messages selected.
"; } } else { // Move messages - displayPageHeader($mailbox); + displayPageHeader($color, $mailbox); // lets check to see if they selected any messages if (is_array($msg) == 1) { $j = 0; diff --git a/src/read_body.php b/src/read_body.php index c55a14de..a7beb54e 100644 --- a/src/read_body.php +++ b/src/read_body.php @@ -16,8 +16,8 @@ echo ""; echo ""; - echo "\n"; - displayPageHeader($mailbox); + echo "\n"; + displayPageHeader($color, $mailbox); /** translate the subject and mailbox into url-able text **/ $url_subj = urlencode(trim(stripslashes($message["HEADER"]["SUBJECT"]))); @@ -80,7 +80,7 @@ echo "
"; echo "\n"; - echo " "; - echo " \n"; - echo " \n"; - echo " "; + echo " "; echo "
"; + echo "
"; echo " "; echo " "; echo " "; echo "
"; @@ -97,53 +97,53 @@ echo "
"; echo "
"; + echo "
"; echo " \n"; echo " \n"; /** subject **/ - echo " \n"; echo " \n"; /** from **/ echo " \n"; - echo " \n"; echo " \n"; /** date **/ echo " \n"; - echo " \n"; echo " \n"; /** to **/ echo " \n"; - echo " \n"; echo " \n"; /** cc **/ if ($message["HEADER"]["CC"][0]) { echo " \n"; - echo " \n"; echo " \n"; } echo "
\n"; + echo " \n"; echo " Subject:\n"; - echo " \n"; + echo " \n"; echo " $subject\n"; echo "
\n"; + echo " \n"; echo " From:\n"; - echo " \n"; + echo " \n"; echo " $from_name\n"; echo "
\n"; + echo " \n"; echo " Date:\n"; - echo " \n"; + echo " \n"; echo " $dateString\n"; echo "
\n"; + echo " \n"; echo " To:\n"; - echo " \n"; + echo " \n"; echo " $to_string\n"; echo "
\n"; + echo " \n"; echo " Cc:\n"; - echo " \n"; + echo " \n"; echo " $cc_string\n"; echo "
\n"; + echo "
\n"; $body = formatBody($message); for ($i = 0; $i < count($body); $i++) { @@ -151,7 +151,7 @@ } echo "
 
 
\n"; ?> \ No newline at end of file diff --git a/src/right_main.php b/src/right_main.php index ffe3117b..ed51ab20 100644 --- a/src/right_main.php +++ b/src/right_main.php @@ -17,7 +17,6 @@ } ?> - \n"; + echo ""; ///////////////////////////////////////////////////////////////////////////////// // // incoming variables from URL: @@ -52,8 +53,8 @@ // If the page has been loaded without a specific mailbox, // just show a page of general info. if (!isset($mailbox)) { - displayPageHeader("None"); - general_info($motd, $org_logo, $version, $org_name); + displayPageHeader($color, "None"); + general_info($motd, $org_logo, $version, $org_name, $color); echo ""; exit; } @@ -62,7 +63,7 @@ selectMailbox($imapConnection, $mailbox, $numMessages); // Display the header at the top of the page - displayPageHeader($mailbox); + displayPageHeader($color, $mailbox); // Get the list of messages for this mailbox showMessagesForMailbox($imapConnection, $mailbox, $numMessages, $startMessage, $sort); diff --git a/src/signout.php b/src/signout.php index 3197d198..9936f307 100644 --- a/src/signout.php +++ b/src/signout.php @@ -15,21 +15,22 @@ setcookie("logged_in", 0, time(), "/"); ?> -
"; - echo " "; + include ("../config/config.php"); + echo "\n"; + echo "

"; + echo " "; echo " "; echo " "; - echo " "; + echo " "; echo " "; echo " "; - echo " "; + echo " "; echo " "; -- 2.25.1
"; echo " Sign Out"; echo "
"; echo "
You have been successfully signed out.
"; echo " Click here to log back in.

"; echo "
"; echo "
"; echo "