X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fwebmail.php;h=3f9c11199a59b2ae9166f5b170ebfecfa8f2a146;hb=c1cb7ba47f57c63d037508747e684b9193ea07e1;hp=41cf17c25ab07d53b35da0957b42c659b5464c01;hpb=e146912692c921160f93dcb6da97dc6246bf95d2;p=squirrelmail.git
diff --git a/src/webmail.php b/src/webmail.php
index 41cf17c2..3f9c1119 100644
--- a/src/webmail.php
+++ b/src/webmail.php
@@ -1,64 +1,115 @@
-
- /**
- ** webmail.php
- **
- ** This simply creates the frames.
- **
- **/
+
-
-
- include ("../config/config.php");
- include ("../functions/prefs.php");
- include ("../functions/imap.php");
+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');
+
+ereg( '(^.*/)[^/]+/[^/]+$', $PHP_SELF, $regs);
+$base_uri = $regs[1];
+
+session_start();
+is_logged_in();
+
+/**
+ * We'll need this to later have a noframes version
+ *
+ * Check if the user has a language preference, but no cookie.
+ * Send him a cookie with his language preference, if there is
+ * such discrepancy.
+ */
+$my_language = getPref($data_dir, $username, 'language');
+if ($my_language != $squirrelmail_language) {
+ setcookie('squirrelmail_language', $my_language, time()+2592000, $base_uri);
+}
+
+set_up_language(getPref($data_dir, $username, 'language'));
- // verify that username and password are correct
- $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
+echo "\n";
+echo '';
+echo $org_title;
+echo '';
- include ("../src/load_prefs.php");
+$left_size = getPref($data_dir, $username, 'left_size');
+$location_of_bar = getPref($data_dir, $username, 'location_of_bar');
+if ($location_of_bar == '') {
+ $location_of_bar = 'left';
+}
+if ($left_size == "") {
+ if (isset($default_left_size)) {
+ $left_size = $default_left_size;
+ }
+ else {
+ $left_size = 200;
+ }
+}
- echo "";
- echo "$org_title";
- echo "";
- echo "