X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fwebmail.php;h=1f1362da1bed1515a528215e0b4083d3bfb3034b;hb=6c31f818f42a3fac4d8ae7712ce17cd9a88df414;hp=158c7c42d7ebb3162360256e8ec31fdee894fd59;hpb=5bbe20e463dc798b73953224f54fd9bbeb5dad29;p=squirrelmail.git diff --git a/src/webmail.php b/src/webmail.php index 158c7c42..1f1362da 100644 --- a/src/webmail.php +++ b/src/webmail.php @@ -1,102 +1,120 @@ \n" . + "$org_title"; - if (!session_is_registered("user_is_logged_in")) { - do_hook ("login_before"); - // verify that username and password are correct - $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0); - do_hook ("login_verified"); - } +$left_size = getPref($data_dir, $username, 'left_size'); +$location_of_bar = getPref($data_dir, $username, 'location_of_bar'); - session_register ("user_is_logged_in"); - $user_is_logged_in = true; +if (isset($languages[$squirrelmail_language]['DIR']) && + strtolower($languages[$squirrelmail_language]['DIR']) == 'rtl') { + $temp_location_of_bar = 'right'; +} else { + $temp_location_of_bar = 'left'; +} - include ("../src/load_prefs.php"); +if ($location_of_bar == '') { + $location_of_bar = $temp_location_of_bar; +} +$temp_location_of_bar = ''; - echo "\n"; - echo ""; - echo "$org_title"; - echo ""; - $ishelp = substr(getenv(REQUEST_URI),-8); // If calling help, set left frame to 300 - if ($ishelp == "help.php") { - echo ""; - } else { - echo ""; - } +if ($left_size == "") { + if (isset($default_left_size)) { + $left_size = $default_left_size; + } + else { + $left_size = 200; + } +} -/** - There are four ways to call webmail.php - 1. webmail.php - - This just loads the default entry screen. - 2. webmail.php?right_frame=right_main.php&sort=X&startMessage=X&mailbox=XXXX - - This loads the frames starting at the given values. - 3. webmail.php?right_frame=folders.php - - Loads the frames with the Folder options in the right frame. - 4. webmail.php?right_frame=help.php - - Lets the left frame set up different menu for help and calls the right frame. +if ($location_of_bar == 'right') { + echo ""; +} +else { + echo ""; +} - 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. -**/ - if ($right_frame == "right_main.php") { - $urlMailbox = urlencode($mailbox); - echo ""; - echo ""; - } else if ($right_frame == "folders.php") { - $urlMailbox = urlencode($mailbox); - echo ""; - echo ""; - } else if ($right_frame == "help.php") { - echo ""; - echo ""; - } else { - echo ""; - echo ""; - } +/* + * There are three ways to call webmail.php + * 1. webmail.php + * - This just loads the default entry screen. + * 2. webmail.php?right_frame=right_main.php&sort=X&startMessage=X&mailbox=XXXX + * - This loads the frames starting at the given values. + * 3. webmail.php?right_frame=folders.php + * - Loads the frames with the Folder options in the right frame. + * + * 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. + */ +if (!isset($right_frame)) { + $right_frame = ''; +} +if ($right_frame == 'right_main.php') { + $urlMailbox = urlencode($mailbox); + $right_frame_url = + "right_main.php?mailbox=$urlMailbox&sort=$sort&startMessage=$startMessage"; +} elseif ($right_frame == 'options.php') { + $right_frame_url = 'options.php'; +} elseif ($right_frame == 'folders.php') { + $right_frame_url = 'folders.php'; +} else if ($right_frame == '') { + $right_frame_url = 'right_main.php'; +} else { + $right_frame_url = urldecode($right_frame); +} +if ($location_of_bar == 'right') { + echo "" . + ''; +} +else { + echo ''. + ""; +} +do_hook('webmail_bottom'); ?>