5 ** This simply creates the frames.
11 if(!isset($username)) {
12 echo _("You need a valid user and password to access this page!");
16 # setcookie("username", $username, 0, "/");
17 # setcookie("key", $key, 0, "/");
18 # setcookie("logged_in", 1, 0, "/");
20 session_register("username");
21 session_register("key");
22 session_register("logged_in");
25 $PHPSESSID = session_id();
27 // Refresh the language cookie.
28 if (isset($squirrelmail_language)) {
29 session_register("squirrelmail_language");
30 # setcookie("squirrelmail_language", $squirrelmail_language, time()+2592000);
35 include ("../config/config.php");
36 include ("../functions/prefs.php");
37 include ("../functions/imap.php");
39 // verify that username and password are correct
40 $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
42 include ("../src/load_prefs.php");
47 echo "<FRAMESET COLS=\"$left_size, *\" NORESIZE BORDER=0>";
50 There are three ways to call webmail.php
52 - this just loads the default entry screen.
53 2. webmail.php?right_frame=right_main.php&sort=X&startMessage=X&mailbox=XXXX
54 - This loads the frames starting at the given values.
55 3. webmail.php?right_frame=folders.php
56 - Loads the frames with the Folder options in the right frame.
58 This was done to create a pure HTML way of refreshing the folder list since
59 we would like to use as little Javascript as possible.
61 if ($right_frame == "right_main.php") {
62 $urlMailbox = urlencode($mailbox);
63 echo "<FRAME SRC=\"left_main.php?PHPSESSID=$PHPSESSID\" NAME=\"left\">";
64 echo "<FRAME SRC=\"right_main.php?PHPSESSID=$PHPSESSID&mailbox=$urlMailbox&sort=$sort&startMessage=$startMessage\" NAME=\"right\">";
65 } else if ($right_frame == "folders.php") {
66 $urlMailbox = urlencode($mailbox);
67 echo "<FRAME SRC=\"left_main.php?PHPSESSID=$PHPSESSID\" NAME=\"left\">";
68 echo "<FRAME SRC=\"folders.php?PHPSESSID=$PHPSESSID\" NAME=\"right\">";
70 echo "<FRAME SRC=\"left_main.php?PHPSESSID=$PHPSESSID\" NAME=\"left\">";
71 echo "<FRAME SRC=\"right_main.php?PHPSESSID=$PHPSESSID\" NAME=\"right\">";