5 * Copyright (c) 1999-2003 The SquirrelMail Project Team
6 * Licensed under the GNU GPL. For full terms see the file COPYING.
8 * This code makes SM No Frames compatible
11 * @package squirrelmail
14 require_once(SM_PATH
. 'functions/imap.php');
16 global $use_frames, $allow_frames;
17 sqgetGlobalVar('use_frames', $use_frames, SQ_COOKIE
);
19 switch ($allow_frames) {
20 case 4: // if $use_frames unset, fall through to case 2
21 if (isset($use_frames))
23 case 2: // Do not use frames
26 case 3: // if $use_frames unset, fall through to case 1
27 if (isset($use_frames))
29 default: // default is also to use frames
37 * Displays the top html header or the left folder list
42 function noframes_top() {
43 global $onetimepad, $password, $username, $domain, $trash_folder, $imapConnection,
44 $sent_folder, $draft_folder, $imapServerAddress, $imapPort, $left_size,
45 $key, $delimiter, $color, $use_frames, $location_of_bar,
46 $auto_create_special, $date_format, $hour_format, $collapse_folders, $boxes;
47 if ($use_frames) return;
48 $size = $left_size - 20;
49 if ($location_of_bar == 'left' ||
$location_of_bar != 'right') {
50 $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 10); // the 10 is to hide the output
51 echo "<table width='100%' cellpadding=3 cellspacing=5 border=0>\n";
52 echo "<tr><td width='$size'><img src='" . SM_PATH
. "images/blank.gif' width=$size height=1 border=0></td>";
53 echo "<td width='15'><img src='" . SM_PATH
. "images/blank.gif' width=15 height=1 border=0></td>";
54 echo "<td width='100%'><img src='" . SM_PATH
. "images/blank.gif' width=1 height=1 border=0></td></tr>";
55 echo "<tr><td valign=top>\n";
56 do_hook('left_main_before');
57 echo "<table cellpadding=0 width='100%'><tr><td><table cellpadding=1 cellspacing=0 width='100%'><tr bgcolor='$color[0]'>";
58 echo "<td><table width='100%' border=0 cellpadding=3 cellspacing=0>\n";
59 echo "<tr><td BGCOLOR='".$color[9]."' align=center>\n";
60 echo "<B>" . _("Folders") . "</B></td></tr><tr bgcolor='$color[4]'><td>\n";
61 require_once(SM_PATH
. 'src/left_main.php');
62 echo "<br>\n</td></tr></table></td></tr></table></td></tr></table><br>\n";
63 do_hook('left_main_after');
64 echo "</td><td><img src='" . SM_PATH
. "images/blank.gif' width=15 height=1 border=0></td></td><td valign=top>\n\n";
66 echo "<table width='100%' cellpadding=3 cellspacing=5 border=0>\n";
67 echo "<tr><td width='100%'></td><td width='15'><img src='" . SM_PATH
. "images/blank.gif' width=15 height=1 border=0></td>";
68 echo "<td width='$size'><img src='" . SM_PATH
. "images/blank.gif' width=$size height=1 border=0></td></tr>";
69 echo "<tr><td valign=top>\n\n";
74 * Displays the bottom html header or the right folder list
80 function noframes_bottom() {
81 global $onetimepad, $password, $username, $domain, $trash_folder, $imapConnection,
82 $sent_folder, $draft_folder, $imapServerAddress, $imapPort, $left_size,
83 $key, $delimiter, $color, $use_frames, $location_of_bar,
84 $auto_create_special, $date_format, $hour_format, $collapse_folders, $boxes;
85 if ($use_frames) return;
86 if ($location_of_bar == 'left' ||
$location_of_bar != 'right') {
87 echo "</td></tr></table>\n";
88 echo "</body></html>";
90 $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 10); // the 10 is to hide the output
91 echo "</td><td><img src='" . SM_PATH
. "images/blank.gif' width=15 height=1 border=0></td></td><td valign=top>\n\n";
92 do_hook('left_main_before');
93 echo "<table cellpadding=0 width='100%'><tr><td><table cellpadding=1 cellspacing=0 width='100%'><tr bgcolor='$color[0]'>";
94 echo "<td><table width='100%' border=0 cellpadding=3 cellspacing=0>\n";
95 echo "<tr><td BGCOLOR='".$color[9]."' align=center>\n";
96 echo "<B>" . _("Folders") . "</B></td></tr><tr bgcolor='$color[4]'><td>\n";
97 require_once(SM_PATH
. 'src/left_main.php');
98 echo "<br>\n</td></tr></table></td></tr></table></td></tr></table><br>\n";
99 do_hook('left_main_after');
100 echo "</td></tr></table>\n";
101 echo "</body></html>\n";