X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fright_main.php;h=e38d545011e0baa794e0778e6722a8f127b28a59;hb=b135de9c8c0238f850abca25b972b0969bc5d205;hp=ffe3117b2de2ca22bf10529eb927212e51cdc1b3;hpb=aa32c5e4a04adb6e5bc3db6a25ef736ffc267d3a;p=squirrelmail.git diff --git a/src/right_main.php b/src/right_main.php index ffe3117b..e38d5450 100644 --- a/src/right_main.php +++ b/src/right_main.php @@ -1,76 +1,200 @@ - - /** - ** right_main.php - ** - ** This is where the mailboxes are listed. This controls most of what - ** goes on in SquirrelMail. - ** - **/ - - if(!isset($logged_in)) { - echo "You must login first."; - exit; - } - if(!isset($username) || !isset($key)) { - echo "You need a valid user and password to access this page!"; - exit; - } -?> - -
- - - include("../config/config.php"); - include("../functions/imap.php"); - include("../functions/strings.php"); - include("../functions/date.php"); - include("../functions/page_header.php"); - include("../functions/array.php"); - include("../functions/mailbox.php"); - include("../functions/mailbox_display.php"); - include("../functions/display_messages.php"); - - ///////////////////////////////////////////////////////////////////////////////// - // - // incoming variables from URL: - // $sort Direction to sort by date - // values: 0 - descending order - // values: 1 - ascending order - // $startMessage Message to start at - // $mailbox Full Mailbox name - // - // incoming from cookie: - // $username duh - // $key pass - // - ///////////////////////////////////////////////////////////////////////////////// - - - // open a connection on the imap port (143) - $imapConnection = loginToImapServer($username, $key, $imapServerAddress); - - // 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); - echo ""; - exit; - } - - // switch to the mailbox, and get the number of messages in it. - selectMailbox($imapConnection, $mailbox, $numMessages); - - // Display the header at the top of the page - displayPageHeader($mailbox); - - // Get the list of messages for this mailbox - showMessagesForMailbox($imapConnection, $mailbox, $numMessages, $startMessage, $sort); - - // close the connection - fputs($imapConnection, "1 logout\n"); - fclose($imapConnection); +\n"; +do_hook('right_main_after_header'); +if (isset($note)) { + echo html_tag( 'div', '' . $note .'', 'center' ) . "