X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fwebmail.php;h=97ae646df9a0fa0338dcd0c14675d7496db068c6;hb=6c817138130223d73f95f24d06d63239e120d3e2;hp=72f0c0783d789e002632f9c48f4f7b2ae50674ec;hpb=5afe02cfab408727fec98ffafa8556e3278d2691;p=squirrelmail.git diff --git a/src/webmail.php b/src/webmail.php index 72f0c078..97ae646d 100644 --- a/src/webmail.php +++ b/src/webmail.php @@ -13,19 +13,43 @@ * $Id$ */ -require_once('../functions/strings.php'); -require_once('../config/config.php'); -require_once('../functions/prefs.php'); -require_once('../functions/imap.php'); -require_once('../functions/plugin.php'); -require_once('../functions/i18n.php'); -require_once('../functions/auth.php'); +/* Path for SquirrelMail required files. */ +define('SM_PATH','../'); -$base_uri = dirname(dirname($PHP_SELF)) . "/"; +/* SquirrelMail required files. */ +require_once(SM_PATH . 'functions/strings.php'); +require_once(SM_PATH . 'config/config.php'); +require_once(SM_PATH . 'functions/prefs.php'); +require_once(SM_PATH . 'functions/imap.php'); +require_once(SM_PATH . 'functions/plugin.php'); +require_once(SM_PATH . 'functions/i18n.php'); +require_once(SM_PATH . 'functions/auth.php'); +require_once(SM_PATH . 'functions/global.php'); + +if (!function_exists('sqm_baseuri')){ + require_once(SM_PATH . 'functions/display_messages.php'); +} +$base_uri = sqm_baseuri(); session_start(); + +if (isset($_SESSION['username'])) { + $username = $_SESSION['username']; +} +if (isset($_SESSION['delimiter'])) { + $delimiter = $_SESSION['delimiter']; +} +if (isset($_SESSION['onetimepad'])) { + $onetimepad = $_SESSION['onetimepad']; +} +if (isset($_GET['right_frame'])) { + $right_frame = $_GET['right_frame']; +} + is_logged_in(); +do_hook('webmail_top'); + /** * We'll need this to later have a noframes version * @@ -40,14 +64,26 @@ if ($my_language != $squirrelmail_language) { set_up_language(getPref($data_dir, $username, 'language')); -echo "\n" . - "$org_title"; +echo "\n". + "\n" . + "$org_title\n". + ""; $left_size = getPref($data_dir, $username, 'left_size'); $location_of_bar = getPref($data_dir, $username, 'location_of_bar'); + +if (isset($languages[$squirrelmail_language]['DIR']) && + strtolower($languages[$squirrelmail_language]['DIR']) == 'rtl') { + $temp_location_of_bar = 'right'; +} else { + $temp_location_of_bar = 'left'; +} + if ($location_of_bar == '') { - $location_of_bar = 'left'; + $location_of_bar = $temp_location_of_bar; } +$temp_location_of_bar = ''; + if ($left_size == "") { if (isset($default_left_size)) { $left_size = $default_left_size; @@ -58,10 +94,10 @@ if ($left_size == "") { } if ($location_of_bar == 'right') { - echo ""; + echo "\n"; } else { - echo ""; + echo "\n"; } /* @@ -78,8 +114,7 @@ else { */ if (!isset($right_frame)) { $right_frame = ''; -} - +} if ($right_frame == 'right_main.php') { $urlMailbox = urlencode($mailbox); $right_frame_url = @@ -88,21 +123,21 @@ if ($right_frame == 'right_main.php') { $right_frame_url = 'options.php'; } elseif ($right_frame == 'folders.php') { $right_frame_url = 'folders.php'; -} elseif ($right_frame == 'compose.php') { - $right_frame_url = "compose.php?send_to=$rcptaddress"; -} else { +} else if ($right_frame == '') { $right_frame_url = 'right_main.php'; +} else { + $right_frame_url = urldecode($right_frame); } if ($location_of_bar == 'right') { - echo "" . - ''; + echo "\n" . + "\n"; } else { - echo ''. - ""; + echo "\n". + "\n"; } do_hook('webmail_bottom'); ?> - - + +