Added preference for changing left folder list size
[squirrelmail.git] / src / webmail.php
1 <?
2 /**
3 ** webmail.php
4 **
5 ** This simply creates the frames.
6 **
7 **/
8
9 if(!isset($username)) {
10 echo _("You need a valid user and password to access this page!");
11 exit;
12 }
13
14 setcookie("username", $username, 0, "/");
15 setcookie("key", $key, 0, "/");
16 setcookie("logged_in", 1, 0, "/");
17 // Refresh the language cookie.
18 if (isset($squirrelmail_language))
19 setcookie("squirrelmail_language", $squirrelmail_language,
20 time()+2592000);
21 ?>
22 <HTML><HEAD>
23 <?
24 include ("../config/config.php");
25 include ("../functions/prefs.php");
26
27 include ("../src/load_prefs.php");
28
29 echo "<TITLE>";
30 echo "$org_title";
31 echo "</TITLE>";
32 echo "<FRAMESET COLS=\"$left_size, *\" NORESIZE BORDER=0>";
33
34 /**
35 There are three ways to call webmail.php
36 1. webmail.php
37 - this just loads the default entry screen.
38 2. webmail.php?right_frame=right_main.php&sort=X&startMessage=X&mailbox=XXXX
39 - This loads the frames starting at the given values.
40 3. webmail.php?right_frame=folders.php
41 - Loads the frames with the Folder options in the right frame.
42
43 This was done to create a pure HTML way of refreshing the folder list since
44 we would like to use as little Javascript as possible.
45 **/
46 if ($right_frame == "right_main.php") {
47 $urlMailbox = urlencode($mailbox);
48 echo "<FRAME SRC=\"left_main.php\" NAME=\"left\">";
49 echo "<FRAME SRC=\"right_main.php?mailbox=$urlMailbox&sort=$sort&startMessage=$startMessage\" NAME=\"right\">";
50 } else if ($right_frame == "folders.php") {
51 $urlMailbox = urlencode($mailbox);
52 echo "<FRAME SRC=\"left_main.php\" NAME=\"left\">";
53 echo "<FRAME SRC=\"folders.php\" NAME=\"right\">";
54 } else {
55 echo "<FRAME SRC=\"left_main.php\" NAME=\"left\">";
56 echo "<FRAME SRC=\"right_main.php\" NAME=\"right\">";
57 }
58 ?>
59 </FRAMESET>
60 </HEAD></HTML>