Tomas Kuliavas said:
>> Hello,
>>
>> Is there a frameless Squirrelmail Theme out there that I can get?
>
> People are working on frameless sm options. I think noframes patch is
not available for download and designed for 1.5.0cvs.
>
> And there is SquirrelMail Lite.
> http://rumkin.com/sm-lite/patch/readme.html
> http://www.topolis.lt/squirrelmail/sm-lite/
>
> There is also hack that adds such options to user preferences (designed
for 1.5.0cvs)
> http://www.topolis.lt/squirrelmail/patches/pending/layout/
>
> But it will not go into main SM, because it does not provide same
navigation options as provided by noframes patch made by Jimmy Conner
<jimmy at advcs.org>
>
I sent this email once, but it seems that the mailing list didn't like
the size of my attachment, so here goes again with a link instead....
It is definitely free for download, all you have to do is just ask.
The more testers, the better. It isn't in Devel CVS as of yet because I
would like to make it rock stable first. It appears to be there already,
but I still find a few things I missed every other day. If anyone would
like to test out the latest patch (from today) then I have put a link to
it at the bottom of this message. If you find an problems, or have
suggestions then please let me know.
As of the moment, folders are forced uncollapsed until I can resolve a few
issues. Any plugin that isn't in the core and has its own "options" page
will need to be patched to support it (only noticable if the folder menu
is on the right, all that is required is putting a noframes_bottom()
inplace of anywhere you have a "</body></html>" to close the tables,ect...
but only if you first call DisplayPageHeader() at the top)
I would also like to note that this patch is avaliable in part because of
Jason Wickers, who originally came up with the idea of how to do this. He
originally wrote it as a plugin with some core hacks. I have almost
completely rewritten it to fix multiple issues and to make it completely
core, but I still would like to give him all the props I can for his
original work on it.
Anyways, test it out and see if you like. Just to note, you will have to
change an option in config.pl to make it show up initially.
Jimmy
http://sqmail.org/nuke/downloads/noframes.diff
diff -Naur develold/AUTHORS devel/AUTHORS
--- develold/AUTHORS Mon Nov 10 12:08:37 2003
+++ devel/AUTHORS Fri Nov 21 14:06:27 2003
@@ -17,6 +17,7 @@
Seth E. Randall <[EMAIL PROTECTED]>
Thijs Kinkhorst <[EMAIL PROTECTED]>
Tomas Kuliavas <[EMAIL PROTECTED]> http://www.topolis.lt
+ Jimmy Conner <[EMAIL PROTECTED]> http://sqmail.org
Past Developers, now retired:
-----------------------------
diff -Naur develold/config/conf.pl devel/config/conf.pl
--- develold/config/conf.pl Mon Nov 10 12:08:37 2003
+++ devel/config/conf.pl Mon Nov 10 12:13:06 2003
@@ -354,6 +354,9 @@
if (!$show_alternative_names ) {
$show_alternative_names = 'false';
}
+if ( !$allow_frames ) {
+ $allow_frames = 1;
+}
if (!$available_languages ) {
$available_languages = 'all';
@@ -544,6 +547,20 @@
print "11. Allow server-side sorting : $WHT$allow_server_sort$NRM\n";
print "12. Allow server charset search : $WHT$allow_charset_search$NRM\n";
print "13. PHP session name : $WHT$session_name$NRM\n";
+ print "14. Frames Usage : $WHT";
+ if ( $allow_frames == 1) {
+ print "Force Frames Only";
+ }
+ if ( $allow_frames == 2) {
+ print "Force No Frames Only";
+ }
+ if ( $allow_frames == 3) {
+ print "Allow Both, Default to Frames";
+ }
+ if ( $allow_frames == 4) {
+ print "Allow Both, Default to No Frames";
+ }
+ print "$NRM\n";
print "\n";
print "R Return to Main Menu\n";
} elsif ( $menu == 5 ) {
@@ -758,7 +775,8 @@
elsif ( $command == 10 ) { $allow_thread_sort = command312(); }
elsif ( $command == 11 ) { $allow_server_sort = command313(); }
elsif ( $command == 12 ) { $allow_charset_search = command314(); }
- elsif ( $command == 13 ) { $session_name =
command316(); }
+ elsif ( $command == 13 ) { $session_name = command316(); }
+ elsif ( $command == 14 ) { $allow_frames = command317(); }
} elsif ( $menu == 5 ) {
if ( $command == 1 ) { command41(); }
elsif ( $command == 2 ) { $theme_css = command42(); }
@@ -2208,7 +2226,28 @@
return $new_session_name;
}
-
+sub command317 {
+ print "This option allows you to select whether to allow or disallow frames\n";
+ print "or no frames usage, and what to default to on the login screen.\n";
+ print "Note: When a user selects to use Frames or No Frames, it is stored\n";
+ print " in a cookie, which will override the site default when they\n";
+ print " next visit the login page.\n";
+ if ($allow_frames == 1) { print "--> "; }else{print " ";}
+ print "1. Force Frames Only\n";
+ if ($allow_frames == 2) { print "--> "; }else{print " ";}
+ print "2. Force No Frames Only\n";
+ if ($allow_frames == 3) { print "--> "; }else{print " ";}
+ print "3. Allow Both, Default to Frames\n";
+ if ($allow_frames == 4) { print "--> "; }else{print " ";}
+ print "4. Allow Both, Default to No Frames\n";
+ print "(1-4): ";
+ $new_allow_frames = <STDIN>;
+ $new_allow_frames =~ tr/1-4//cd; # only want digits!
+ if ( $new_allow_frames < 1 || $new_allow_frames > 4 ) {
+ $new_allow_frames = $allow_frames;
+ }
+ return $new_allow_frames;
+}
sub command41 {
print "\nDefine the themes that you wish to use. If you have added ";
@@ -3096,12 +3135,16 @@
print CF "\$smtp_auth_mech = '$smtp_auth_mech';\n";
print CF "\$imap_auth_mech = '$imap_auth_mech';\n";
# boolean
- print CF "\$use_imap_tls = $use_imap_tls;\n";
- print CF "\$use_smtp_tls = $use_smtp_tls;\n";
+ print CF "\$use_imap_tls = $use_imap_tls;\n";
+ print CF "\$use_smtp_tls = $use_smtp_tls;\n";
+
+ print CF "\$session_name = '$session_name';\n";
+
+ print CF "\n";
- print CF "\$session_name = '$session_name';\n";
+ print CF "\$allow_frames = $allow_frames;\n";
- print CF "\n";
+ print CF "\n";
# boolean
print CF "\$advanced_tree = $advanced_tree;\n";
diff -Naur develold/functions/global.php devel/functions/global.php
--- develold/functions/global.php Mon Nov 10 12:08:37 2003
+++ devel/functions/global.php Fri Nov 21 12:32:53 2003
@@ -155,7 +155,7 @@
else {
$_SESSION["$name"] = $var;
}
- session_register("$name");
+ @session_register("$name");
}
/**
@@ -174,7 +174,7 @@
else {
unset($_SESSION[$name]);
}
- session_unregister("$name");
+ @session_unregister("$name");
}
/**
diff -Naur develold/functions/mailbox_display.php devel/functions/mailbox_display.php
--- develold/functions/mailbox_display.php Mon Nov 10 12:08:37 2003
+++ devel/functions/mailbox_display.php Fri Nov 21 13:56:59 2003
@@ -1001,11 +1001,15 @@
* Generate a paginator link.
*/
function get_paginator_link($box, $start_msg, $use, $text) {
- global $PHP_SELF;
+ global $PHP_SELF, $use_frames;
+ if ($use_frames)
+ $target = 'right';
+ else
+ $target = '';
$result = "<A HREF=\"right_main.php?use_mailbox_cache=$use"
. "&startMessage=$start_msg&mailbox=$box\" "
- . "TARGET=\"right\">$text</A>";
+ . "TARGET=\"$target\">$text</A>";
return ($result);
/*
if (preg_match('/^(.+)\?.+$/',$PHP_SELF,$regs)) {
@@ -1016,7 +1020,7 @@
$result = '<A HREF="'. $source_url . "?use_mailbox_cache=$use"
. "&startMessage=$start_msg&mailbox=$box\" "
- . "TARGET=\"right\">$text</A>";
+ . "TARGET=\"$target\">$text</A>";
return ($result);
*/
}
@@ -1026,7 +1030,7 @@
*/
function get_paginator_str($box, $start_msg, $end_msg, $num_msgs,
$show_num, $sort) {
- global $username, $data_dir, $use_mailbox_cache, $color, $PG_SHOWNUM;
+ global $username, $data_dir, $use_mailbox_cache, $color, $PG_SHOWNUM, $use_frames;
/* Initialize paginator string chunks. */
$prv_str = '';
@@ -1035,6 +1039,11 @@
$all_str = '';
$tgl_str = '';
+ if ($use_frames)
+ $target = 'right';
+ else
+ $target = '';
+
$box = urlencode($box);
/* Create simple strings that will be creating the paginator. */
@@ -1188,14 +1197,14 @@
} else if ($PG_SHOWNUM == 999999) {
$pg_str = "<A HREF=\"right_main.php?PG_SHOWALL=0"
. "&use_mailbox_cache=$use&startMessage=1&mailbox=$box\" "
- . "TARGET=\"right\">" ._("Paginate") . '</A>' . $spc;
+ . "TARGET=\"$target\">" ._("Paginate") . '</A>' . $spc;
}
/* If necessary, compute the 'show all' string. */
if (($prv_str != '') || ($nxt_str != '')) {
$all_str = "<A HREF=\"right_main.php?PG_SHOWALL=1"
. "&use_mailbox_cache=$use&startMessage=1&mailbox=$box\"
"
- . "TARGET=\"right\">" . _("Show All") . '</A>';
+ . "TARGET=\"$target\">" . _("Show All") . '</A>';
}
/* Last but not least, get the value for the toggle all link. */
diff -Naur develold/functions/noframes.php devel/functions/noframes.php
--- develold/functions/noframes.php Wed Dec 31 16:00:00 1969
+++ devel/functions/noframes.php Fri Nov 21 12:43:03 2003
@@ -0,0 +1,104 @@
+<?php
+/**
+ * noframes.php
+ *
+ * Copyright (c) 1999-2003 The SquirrelMail Project Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * This code makes SM No Frames compatible
+ *
+ *
+ */
+
+require_once(SM_PATH . 'functions/imap.php');
+
+global $use_frames, $allow_frames;
+sqgetGlobalVar('use_frames', $use_frames, SQ_COOKIE);
+
+switch ($allow_frames) {
+ case 4: // if $use_frames unset, fall through to case 2
+ if (isset($use_frames))
+ break;
+ case 2: // Do not use frames
+ $use_frames = 0;
+ break;
+ case 3: // if $use_frames unset, fall through to case 1
+ if (isset($use_frames))
+ break;
+ default: // default is also to use frames
+ case 1: // use frames
+ $use_frames = 1;
+ break;
+}
+
+
+/**
+ * Displays the top html header and the left folder list
+ * if not using frames
+ *
+ */
+
+function noframes_top() {
+ global $onetimepad, $password, $username, $domain, $trash_folder, $imapConnection,
+ $sent_folder, $draft_folder, $imapServerAddress, $imapPort, $left_size,
+ $key, $delimiter, $color, $use_frames, $location_of_bar,
+ $auto_create_special, $date_format, $hour_format, $collapse_folders, $boxes;
+ if ($use_frames) return;
+ $size = $left_size - 20;
+ if ($location_of_bar == 'left' || $location_of_bar != 'right') {
+ $imapConnection = sqimap_login($username, $key, $imapServerAddress,
$imapPort, 10); // the 10 is to hide the output
+ echo "<table width='100%' cellpadding=3 cellspacing=5 border=0>\n";
+ echo "<tr><td width='$size'><img src='" . SM_PATH . "images/blank.gif'
width=$size height=1 border=0></td>";
+ echo "<td width='15'><img src='" . SM_PATH . "images/blank.gif' width=15
height=1 border=0></td>";
+ echo "<td width='100%'><img src='" . SM_PATH . "images/blank.gif' width=1
height=1 border=0></td></tr>";
+ echo "<tr><td valign=top>\n";
+ do_hook('left_main_before');
+ echo "<table cellpadding=0 width='100%'><tr><td><table cellpadding=1
cellspacing=0 width='100%'><tr bgcolor='$color[0]'>";
+ echo "<td><table width='100%' border=0 cellpadding=3 cellspacing=0>\n";
+ echo "<tr><td BGCOLOR='".$color[9]."' align=center>\n";
+ echo "<B>" . _("Folders") . "</B></td></tr><tr bgcolor='$color[4]'><td>\n";
+ require_once(SM_PATH . 'src/left_main.php');
+ echo "<br>\n</td></tr></table></td></tr></table></td></tr></table><br>\n";
+ do_hook('left_main_after');
+// $imapConnection = sqimap_login($username, $key, $imapServerAddress,
$imapPort, 10); // the 10 is to hide the output
+ echo "</td><td><img src='" . SM_PATH . "images/blank.gif' width=15 height=1
border=0></td></td><td valign=top>\n\n";
+ } else {
+ echo "<table width='100%' cellpadding=3 cellspacing=5 border=0>\n";
+ echo "<tr><td width='100%'></td><td width='15'><img src='" . SM_PATH .
"images/blank.gif' width=15 height=1 border=0></td>";
+ echo "<td width='$size'><img src='" . SM_PATH . "images/blank.gif' width=$size
height=1 border=0></td></tr>";
+ echo "<tr><td valign=top>\n\n";
+ }
+}
+
+/**
+ * Displays the top html header and the left folder list
+ * if not using frames
+ *
+ */
+
+function noframes_bottom() {
+ global $onetimepad, $password, $username, $domain, $trash_folder, $imapConnection,
+ $sent_folder, $draft_folder, $imapServerAddress, $imapPort, $left_size,
+ $key, $delimiter, $color, $use_frames, $location_of_bar,
+ $auto_create_special, $date_format, $hour_format, $collapse_folders, $boxes;
+ if ($use_frames) return;
+ if ($location_of_bar == 'left' || $location_of_bar != 'right') {
+ echo "</td></tr></table>\n";
+ echo "</body></html>";
+ } else {
+ $imapConnection = sqimap_login($username, $key, $imapServerAddress,
$imapPort, 10); // the 10 is to hide the output
+ echo "</td><td><img src='" . SM_PATH . "images/blank.gif' width=15 height=1
border=0></td></td><td valign=top>\n\n";
+ do_hook('left_main_before');
+ echo "<table cellpadding=0 width='100%'><tr><td><table cellpadding=1
cellspacing=0 width='100%'><tr bgcolor='$color[0]'>";
+ echo "<td><table width='100%' border=0 cellpadding=3 cellspacing=0>\n";
+ echo "<tr><td BGCOLOR='".$color[9]."' align=center>\n";
+ echo "<B>" . _("Folders") . "</B></td></tr><tr bgcolor='$color[4]'><td>\n";
+ require_once(SM_PATH . 'src/left_main.php');
+ echo "<br>\n</td></tr></table></td></tr></table></td></tr></table><br>\n";
+ do_hook('left_main_after');
+ echo "</td></tr></table>\n";
+ echo "</body></html>\n";
+ }
+}
+
+?>
\ No newline at end of file
diff -Naur develold/functions/page_header.php devel/functions/page_header.php
--- develold/functions/page_header.php Mon Nov 10 12:08:37 2003
+++ devel/functions/page_header.php Fri Nov 21 12:32:58 2003
@@ -87,10 +87,14 @@
* @param string target the target frame for this link
*/
function makeInternalLink($path, $text, $target='') {
+ global $use_frames;
sqgetGlobalVar('base_uri', $base_uri, SQ_SESSION);
- if ($target != '') {
- $target = " target=\"$target\"";
- }
+ if (isset($use_frames) && $use_frames) {
+ if ($target != '')
+ $target = " target=\"$target\"";
+ } else
+ $target='';
+
$hooktext = do_hook_function('internal_link',$text);
if ($hooktext != '')
$text = $hooktext;
@@ -275,6 +279,8 @@
}
echo "<body text=\"$color[8]\" bgcolor=\"$color[4]\" link=\"$color[7]\"
vlink=\"$color[7]\" alink=\"$color[7]\" $onload>\n\n";
+ noframes_top();
+
/** Here is the header and wrapping table **/
$shortBoxName = imap_utf7_decode_local(
readShortMailboxName($mailbox, $delimiter));
@@ -398,6 +404,8 @@
}
echo "<body text=\"$color[8]\" bgcolor=\"$color[4]\" link=\"$color[7]\"
vlink=\"$color[7]\" alink=\"$color[7]\" $onload>\n\n";
+
+
}
-?>
+?>
\ No newline at end of file
diff -Naur develold/include/validate.php devel/include/validate.php
--- develold/include/validate.php Mon Nov 10 12:08:37 2003
+++ devel/include/validate.php Fri Nov 21 12:34:28 2003
@@ -43,6 +43,7 @@
require_once(SM_PATH . 'functions/global.php');
require_once(SM_PATH . 'functions/strings.php');
require_once(SM_PATH . 'config/config.php');
+require_once(SM_PATH . 'functions/noframes.php');
/* set the name of the session cookie */
if(isset($session_name) && $session_name) {
diff -Naur develold/plugins/abook_take/take.php devel/plugins/abook_take/take.php
--- develold/plugins/abook_take/take.php Mon Nov 10 12:08:37 2003
+++ devel/plugins/abook_take/take.php Fri Nov 21 12:33:54 2003
@@ -113,5 +113,6 @@
'</table>';
}
?>
-</form></body>
-</html>
+</form>
+<?php noframes_bottom(); ?>
+
diff -Naur develold/plugins/administrator/options.php
devel/plugins/administrator/options.php
--- develold/plugins/administrator/options.php Mon Nov 10 12:08:37 2003
+++ devel/plugins/administrator/options.php Fri Nov 21 12:33:57 2003
@@ -606,4 +606,6 @@
_("Config file can't be opened. Please check config.php.").
'</font>';
}
-?>
+noframes_bottom();
+
+?>
\ No newline at end of file
diff -Naur develold/plugins/bug_report/bug_report.php
devel/plugins/bug_report/bug_report.php
--- develold/plugins/bug_report/bug_report.php Mon Nov 10 12:08:37 2003
+++ devel/plugins/bug_report/bug_report.php Fri Nov 21 12:33:58 2003
@@ -196,4 +196,5 @@
</tr>
</table>
</form>
-</body></html>
+<?php noframes_bottom(); ?>
+
diff -Naur develold/plugins/calendar/calendar.php devel/plugins/calendar/calendar.php
--- develold/plugins/calendar/calendar.php Mon Nov 10 12:08:37 2003
+++ devel/plugins/calendar/calendar.php Fri Nov 21 12:33:59 2003
@@ -176,5 +176,5 @@
drawmonthview();
endcalendar();
+noframes_bottom();
?>
-</body></html>
diff -Naur develold/plugins/calendar/day.php devel/plugins/calendar/day.php
--- develold/plugins/calendar/day.php Mon Nov 10 12:08:37 2003
+++ devel/plugins/calendar/day.php Fri Nov 21 12:33:58 2003
@@ -179,4 +179,5 @@
display_events();
?>
</table></td></tr></table>
-</body></html>
+<?php noframes_bottom(); ?>
+
diff -Naur develold/plugins/calendar/event_create.php
devel/plugins/calendar/event_create.php
--- develold/plugins/calendar/event_create.php Mon Nov 10 12:08:37 2003
+++ devel/plugins/calendar/event_create.php Fri Nov 21 12:33:59 2003
@@ -208,4 +208,5 @@
?>
</table></td></tr></table>
-</body></html>
+<? php noframes_bottom(); ?>
+
diff -Naur develold/plugins/calendar/event_delete.php
devel/plugins/calendar/event_delete.php
--- develold/plugins/calendar/event_delete.php Mon Nov 10 12:08:37 2003
+++ devel/plugins/calendar/event_delete.php Fri Nov 21 12:33:59 2003
@@ -177,4 +177,5 @@
?>
</table></td></tr></table>
-</body></html>
+<?php noframes_bottom(); ?>
+
diff -Naur develold/plugins/calendar/event_edit.php
devel/plugins/calendar/event_edit.php
--- develold/plugins/calendar/event_edit.php Mon Nov 10 12:08:37 2003
+++ devel/plugins/calendar/event_edit.php Fri Nov 21 12:34:01 2003
@@ -327,4 +327,5 @@
?>
</table></td></tr></table>
-</body></html>
+<?php noframes_bottom(); ?>
+
diff -Naur develold/plugins/filters/options.php devel/plugins/filters/options.php
--- develold/plugins/filters/options.php Mon Nov 10 12:08:37 2003
+++ devel/plugins/filters/options.php Fri Nov 21 12:34:05 2003
@@ -239,5 +239,6 @@
html_tag( 'td', ' ', 'left' )
) ,
'center', '', 'width="80%" border="0" cellpadding="2" cellspacing="0"' );
- echo '</body></html>';
+ noframes_bottom();
+
?>
\ No newline at end of file
diff -Naur develold/plugins/filters/spamoptions.php
devel/plugins/filters/spamoptions.php
--- develold/plugins/filters/spamoptions.php Mon Nov 10 12:08:37 2003
+++ devel/plugins/filters/spamoptions.php Fri Nov 21 12:34:04 2003
@@ -178,7 +178,8 @@
'</table>'.
'</center>'.
'</form>';
- echo '</body></html>';
+ noframes_bottom();
+
}
if (! isset($_GET['action']) || $_GET['action'] != 'spam') {
@@ -221,7 +222,7 @@
echo "</td></tr>\n";
}
echo '</table>';
- echo '</body></html>';
+ noframes_bottom();
}
?>
\ No newline at end of file
diff -Naur develold/plugins/info/options.php devel/plugins/info/options.php
--- develold/plugins/info/options.php Mon Nov 10 12:08:37 2003
+++ devel/plugins/info/options.php Fri Nov 21 12:34:05 2003
@@ -157,7 +157,9 @@
print "</TD><TR></TABLE></CENTER><BR>\n";
}
}
- print "</TD></TR></TABLE></CENTER></BODY></HTML>";
+ print "</TD></TR></TABLE></CENTER>";
+ noframes_bottom();
+
sqimap_logout($imap_stream);
do_hook('info_bottom');
?>
diff -Naur develold/plugins/listcommands/mailout.php
devel/plugins/listcommands/mailout.php
--- develold/plugins/listcommands/mailout.php Mon Nov 10 12:08:37 2003
+++ devel/plugins/listcommands/mailout.php Fri Nov 21 12:34:09 2003
@@ -76,5 +76,7 @@
. '<input type="hidden" name="body" value="' . htmlspecialchars($body) . '">'
. '<input type="hidden" name="mailbox" value="' . htmlspecialchars($mailbox) . '">'
. '<input type="submit" name="send" value="' . _("Send Mail") . '"><br /><br
/></center>'
-. '</form></td></tr></table></p></body></html>';
-?>
+. '</form></td></tr></table></p>';
+noframes_bottom();
+
+?>
\ No newline at end of file
diff -Naur develold/plugins/mail_fetch/fetch.php devel/plugins/mail_fetch/fetch.php
--- develold/plugins/mail_fetch/fetch.php Mon Nov 10 12:08:37 2003
+++ devel/plugins/mail_fetch/fetch.php Fri Nov 21 12:34:07 2003
@@ -127,7 +127,7 @@
echo '<p>' . _("No POP3 servers configured yet.") . '</p>';
displayInternalLink('plugins/mail_fetch/options.php',
_("Click here to go to the options page.") );
- echo '</body></html>';
+ noframes_bottom();
exit();
}
@@ -321,5 +321,4 @@
?>
</center>
-</body>
-</html>
+<?php noframes_bottom(); ?>
diff -Naur develold/plugins/mail_fetch/options.php devel/plugins/mail_fetch/options.php
--- develold/plugins/mail_fetch/options.php Mon Nov 10 12:08:37 2003
+++ devel/plugins/mail_fetch/options.php Fri Nov 21 12:34:10 2003
@@ -384,6 +384,5 @@
) ,
'center', '', 'width="70%"' );
}
-
- ?>
-</body></html>
+ noframes_bottom();
+?>
\ No newline at end of file
diff -Naur develold/plugins/message_details/message_details_top.php
devel/plugins/message_details/message_details_top.php
--- develold/plugins/message_details/message_details_top.php Mon Nov 10 12:08:37
2003
+++ devel/plugins/message_details/message_details_top.php Fri Nov 21 12:34:13
2003
@@ -47,4 +47,4 @@
'</b>'.
'</body>'.
"</html>\n";
-?>
+?>
\ No newline at end of file
diff -Naur develold/plugins/message_details/setup.php
devel/plugins/message_details/setup.php
--- develold/plugins/message_details/setup.php Mon Nov 10 12:08:37 2003
+++ devel/plugins/message_details/setup.php Fri Nov 21 12:34:14 2003
@@ -52,4 +52,4 @@
echo $result;
}
-?>
+?>
\ No newline at end of file
diff -Naur develold/plugins/newmail/newmail_opt.php
devel/plugins/newmail/newmail_opt.php
--- develold/plugins/newmail/newmail_opt.php Mon Nov 10 12:08:37 2003
+++ devel/plugins/newmail/newmail_opt.php Fri Nov 21 12:34:14 2003
@@ -158,7 +158,7 @@
) . "\n" .
'</table>'. "\n" .
'</form>'. "\n" .
- '</td></tr></table>'. "\n" .
-'</body></html>';
+ '</td></tr></table>'. "\n";
+ noframes_bottom();
-?>
+?>
\ No newline at end of file
diff -Naur develold/plugins/spamcop/options.php devel/plugins/spamcop/options.php
--- develold/plugins/spamcop/options.php Mon Nov 10 12:08:37 2003
+++ devel/plugins/spamcop/options.php Fri Nov 21 12:34:19 2003
@@ -168,5 +168,5 @@
echo "<p>";
echo _("<b>For more information</b> about SpamCop, it's services, spam in general,
and many related topics, try reading through SpamCop's <a
href=\"http://spamcop.net/help.shtml\">Help and Feedback</a> section.");
echo "</p>\n";
-?>
-</body></html>
+noframes_bottom();
+?>
\ No newline at end of file
diff -Naur develold/plugins/spamcop/spamcop.php devel/plugins/spamcop/spamcop.php
--- develold/plugins/spamcop/spamcop.php Mon Nov 10 12:08:37 2003
+++ devel/plugins/spamcop/spamcop.php Fri Nov 21 12:34:18 2003
@@ -189,5 +189,4 @@
</td>
</tr>
</table>
- </body>
-</html>
+<?php noframes_bottom(); ?>
diff -Naur develold/plugins/squirrelspell/sqspell_functions.php
devel/plugins/squirrelspell/sqspell_functions.php
--- develold/plugins/squirrelspell/sqspell_functions.php Mon Nov 10 12:08:37
2003
+++ devel/plugins/squirrelspell/sqspell_functions.php Fri Nov 21 12:34:27 2003
@@ -76,6 +76,7 @@
. html_tag( 'tr',
html_tag( 'td', 'SquirrelSpell ' . $SQSPELL_VERSION, 'center', $color[9] )
) . "\n</table>\n";
+ noframes_bottom();
}
/**
diff -Naur develold/plugins/translate/options.php devel/plugins/translate/options.php
--- develold/plugins/translate/options.php Mon Nov 10 12:08:37 2003
+++ devel/plugins/translate/options.php Fri Nov 21 12:34:26 2003
@@ -185,7 +185,7 @@
'<input type="submit" value="' . _("Submit") . '" name="submit_translate">'.
'</td></tr>'.
'</table>'.
- '</form>'.
-"</body></html>\n";
+ '</form>';
+ noframes_bottom();
?>
diff -Naur develold/src/addrbook_search_html.php devel/src/addrbook_search_html.php
--- develold/src/addrbook_search_html.php Mon Nov 10 12:08:37 2003
+++ devel/src/addrbook_search_html.php Fri Nov 21 12:33:44 2003
@@ -276,14 +276,14 @@
echo html_tag( 'p', '<b><br>' .
_("Your search failed with the following error(s)") .
':<br>' . $abook->error . "</b>\n" ,
- 'center' ) .
- "\n</BODY></HTML>\n";
+ 'center' );
+ noframes_bottom();
} else {
if (sizeof($res) == 0) {
echo html_tag( 'p', '<br><b>' .
_("No persons matching your search was found") .
"</b>\n" ,
- 'center' ) .
- "\n</BODY></HTML>\n";
+ 'center' );
+ noframes_bottom();
} else {
addr_display_result($res);
}
@@ -299,5 +299,5 @@
'</form></center></nobr>';
}
-?>
-</body></html>
+noframes_bottom();
+?>
\ No newline at end of file
diff -Naur develold/src/addressbook.php devel/src/addressbook.php
--- develold/src/addressbook.php Mon Nov 10 12:08:37 2003
+++ devel/src/addressbook.php Fri Nov 21 12:33:44 2003
@@ -282,7 +282,7 @@
// Some times we end output before forms are printed
if($abortform) {
- echo "</BODY></HTML>\n";
+ noframes_bottom();
exit();
}
}
@@ -436,6 +436,5 @@
/* Add hook for anything that wants on the bottom */
do_hook('addressbook_bottom');
-?>
-
-</BODY></HTML>
+noframes_bottom();
+?>
\ No newline at end of file
diff -Naur develold/src/compose.php devel/src/compose.php
--- develold/src/compose.php Mon Nov 10 12:08:37 2003
+++ devel/src/compose.php Fri Nov 21 12:33:45 2003
@@ -1157,7 +1157,8 @@
}
do_hook('compose_bottom');
- echo '</BODY></HTML>' . "\n";
+ if ($compose_new_win != '1')
+ noframes_bottom();
}
diff -Naur develold/src/empty_trash.php devel/src/empty_trash.php
--- develold/src/empty_trash.php Mon Nov 10 12:08:37 2003
+++ devel/src/empty_trash.php Fri Nov 21 12:33:44 2003
@@ -67,7 +67,10 @@
walkTreeInPreOrderEmptyTrash(0, $imap_stream, $foldersTree);
$location = get_location();
-header ("Location: $location/left_main.php");
+if (isset($use_frames) && !$use_frames)
+ header ("Location: $location/right_main.php");
+else
+ header ("Location: $location/left_main.php");
sqimap_logout($imap_stream);
?>
diff -Naur develold/src/folders.php devel/src/folders.php
--- develold/src/folders.php Mon Nov 10 12:08:37 2003
+++ devel/src/folders.php Fri Nov 21 12:33:45 2003
@@ -72,15 +72,25 @@
$td_str .= '</b><br>';
-
- echo html_tag( 'table',
- html_tag( 'tr',
- html_tag( 'td', $td_str .
- '<a href="../src/left_main.php" target=left>' .
- _("refresh folder list") . '</a>' ,
- 'center' )
- ) ,
- 'center', '', 'width="100%" cellpadding="4" cellspacing="0" border="0"' );
+ if (isset($use_frames) && $use_frames) {
+ echo html_tag( 'table',
+ html_tag( 'tr',
+ html_tag( 'td', $td_str .
+ '<a href="' . SM_PATH . 'src/left_main.php"
target=left>' .
+ _("refresh folder list") . '</a>' ,
+ 'center' )
+ ) ,
+ 'center', '', 'width="100%" cellpadding="4" cellspacing="0"
border="0"' );
+ } else {
+ echo html_tag( 'table',
+ html_tag( 'tr',
+ html_tag( 'td', $td_str .
+ '<a href="' . SM_PATH . 'src/folders.php">' .
+ _("refresh folder list") . '</a>' ,
+ 'center' )
+ ) ,
+ 'center', '', 'width="100%" cellpadding="4" cellspacing="0"
border="0"' );
+ }
}
echo "\n<br>";
@@ -336,6 +346,5 @@
<?php
sqimap_logout($imapConnection);
-?>
-
-</body></html>
+ noframes_bottom();
+?>
\ No newline at end of file
diff -Naur develold/src/help.php devel/src/help.php
--- develold/src/help.php Mon Nov 10 12:08:37 2003
+++ devel/src/help.php Fri Nov 21 12:33:48 2003
@@ -208,5 +208,6 @@
echo html_tag( 'tr',
html_tag( 'td', ' ', 'left', $color[0] )
).
- '</table></body></html>';
-?>
+ '</table>';
+ noframes_bottom();
+?>
\ No newline at end of file
diff -Naur develold/src/image.php devel/src/image.php
--- develold/src/image.php Mon Nov 10 12:08:37 2003
+++ devel/src/image.php Fri Nov 21 12:33:47 2003
@@ -61,6 +61,6 @@
'<img src="' . $DownloadLink . '">' .
'</TD></TR></TABLE>' . "\n";
- '</body></html>' . "\n";
+ noframes_bottom();
-?>
+?>
\ No newline at end of file
diff -Naur develold/src/left_main.php devel/src/left_main.php
--- develold/src/left_main.php Mon Nov 10 12:08:37 2003
+++ devel/src/left_main.php Fri Nov 21 12:33:48 2003
@@ -14,7 +14,9 @@
*/
/** Path for SquirrelMail required files. */
-define('SM_PATH','../');
+if (!defined('SM_PATH'))
+ define('SM_PATH','../');
+
/* SquirrelMail required files. */
require_once(SM_PATH . 'include/validate.php');
@@ -36,11 +38,14 @@
$color, $move_to_sent, $move_to_trash,
$unseen_notify, $unseen_type, $collapse_folders,
$draft_folder, $save_as_draft,
- $use_special_folder_color;
+ $use_special_folder_color, $use_frames;
$real_box = $box_array['unformatted'];
$mailbox = str_replace(' ','',$box_array['formatted']);
$mailboxURL = urlencode($real_box);
-
+ if ($use_frames)
+ $target = 'right';
+ else
+ $target = '';
/* Strip down the mailbox name. */
if (ereg("^( *)([^ ]*)$", $mailbox, $regs)) {
$mailbox = $regs[2];
@@ -65,8 +70,8 @@
/* Create the link for this folder. */
if ($status !== false) {
- $line .= '<a
href="right_main.php?PG_SHOWALL=0&sort=0&startMessage=1&mailbox='.
- $mailboxURL.'" TARGET="right" STYLE="text-decoration:none">';
+ $line .= '<a href="' . SM_PATH .
'src/right_main.php?PG_SHOWALL=0&sort=0&startMessage=1&mailbox='.
+ $mailboxURL.'" TARGET="' . $target . '"
STYLE="text-decoration:none">';
}
if ($special_color) {
$line .= "<font color=\"$color[11]\">";
@@ -99,7 +104,7 @@
if (($numMessages > 0) or ($box_array['parent'] == 1)) {
$urlMailbox = urlencode($real_box);
$line .= "\n<small>\n" .
- " (<A HREF=\"empty_trash.php\"
style=\"text-decoration:none\">"._("purge")."</A>)" .
+ " (<A HREF=\"" . SM_PATH . "src/empty_trash.php\"
style=\"text-decoration:none\">"._("purge")."</A>)" .
"</small>";
} else {
$line .= concat_hook_function('left_main_after_each_folder',
@@ -170,9 +175,12 @@
global $boxes, $imapConnection, $unseen_notify, $color;
$mailbox = urlencode($boxes[$boxnum]['unformatted']);
+
/* Create the link for this collapse link. */
+
$link = '<a target="left" style="text-decoration:none" ' .
- 'href="left_main.php?';
+ 'href="' . SM_PATH . 'src/left_main.php?';
+
if ($boxes[$boxnum]['collapse'] == SM_BOX_COLLAPSED) {
$link .= "unfold=$mailbox\">+";
} else {
@@ -287,7 +295,7 @@
function ListBoxes ($boxes, $j=0 ) {
global $data_dir, $username, $startmessage, $color, $unseen_notify, $unseen_type,
- $move_to_trash, $trash_folder, $collapse_folders, $imapConnection;
+ $move_to_trash, $trash_folder, $collapse_folders, $imapConnection,
$use_frames;
$pre = '<nobr>';
$end = '';
@@ -343,8 +351,10 @@
if (isset($boxes->mbxs[0]) && $collapse_folders) {
$collapse = getPref($data_dir, $username, 'collapse_folder_' . $mailbox);
$collapse = ($collapse == '' ? SM_BOX_UNCOLLAPSED : $collapse);
-
- $link = '<a target="left" style="text-decoration:none" '
.'href="left_main.php?';
+ if ($use_frames)
+ $link = '<a target="left" style="text-decoration:none" ' .'href="' .
SM_PATH . 'src/left_main.php?';
+ else
+ $link = '<a style="text-decoration:none" ' .'href="' . SM_PATH .
'src/right_main.php?';
if ($collapse) {
$link .= "unfold=$mailboxURL\">$leader+ </tt>";
} else {
@@ -356,6 +366,11 @@
$pre.= $leader . ' </tt>';
}
+ if ($use_frames)
+ $target = 'right';
+ else
+ $target = '';
+
/* If there are unseen message, bold the line. */
if (($move_to_trash) && ($mailbox == $trash_folder)) {
if (! isset($boxes->total)) {
@@ -364,7 +379,7 @@
if ($unseen > 0) {
$pre .= '<b>';
}
- $pre .= "<a
href=\"right_main.php?PG_SHOWALL=0&sort=0;startMessage=1&mailbox=$mailboxURL\"
target=\"right\" style=\"text-decoration:none\">";
+ $pre .= "<a href=\"" . SM_PATH .
"src/right_main.php?PG_SHOWALL=0&sort=0;startMessage=1&mailbox=$mailboxURL\"
target=\"$target\" style=\"text-decoration:none\">";
if ($unseen > 0) {
$end .= '</b>';
}
@@ -373,7 +388,7 @@
if ($unseen > 0) {
$pre .= '<b>';
}
- $pre .= "<a
href=\"right_main.php?PG_SHOWALL=0&sort=0;startMessage=1&mailbox=$mailboxURL\"
target=\"right\" style=\"text-decoration:none\">";
+ $pre .= "<a href=\"" . SM_PATH .
"src/right_main.php?PG_SHOWALL=0&sort=0;startMessage=1&mailbox=$mailboxURL\"
target=\"$target\" style=\"text-decoration:none\">";
if ($unseen > 0) {
$end .= '</b>';
}
@@ -382,7 +397,7 @@
$end .= " <small>$unseen_string</small>";
}
$end .= "\n<small>\n" .
- " (<a href=\"empty_trash.php\"
style=\"text-decoration:none\">"._("purge")."</a>)" .
+ " (<a href=\"" . SM_PATH . "src/empty_trash.php\"
style=\"text-decoration:none\">"._("purge")."</a>)" .
"</small>";
}
} else {
@@ -390,7 +405,7 @@
if ($unseen > 0) {
$pre .= '<b>';
}
- $pre .= "<a
href=\"right_main.php?PG_SHOWALL=0&sort=0&startMessage=1&mailbox=$mailboxURL\"
target=\"right\" style=\"text-decoration:none\">";
+ $pre .= "<a href=\"" . SM_PATH .
"src/right_main.php?PG_SHOWALL=0&sort=0&startMessage=1&mailbox=$mailboxURL\"
target=\"$target\" style=\"text-decoration:none\">";
if ($unseen > 0) {
$end .= '</b>';
}
@@ -426,11 +441,16 @@
function ListAdvancedBoxes ($boxes, $mbx, $j='ID.0000' ) {
global $data_dir, $username, $startmessage, $color, $unseen_notify, $unseen_type,
- $move_to_trash, $trash_folder, $collapse_folders;
+ $move_to_trash, $trash_folder, $collapse_folders, $use_frames;
if (!$boxes)
return;
+ if ($use_frames)
+ $target = 'right';
+ else
+ $target = '';
+
/* use_folder_images only works if the images exist in ../images */
$use_folder_images = true;
@@ -497,17 +517,17 @@
if (! isset($numMessages)) {
$numMessages = $boxes->total;
}
- $pre = "<a class=\"mbx_link\"
href=\"right_main.php?PG_SHOWALL=0&sort=0&startMessage=1&mailbox=$mailboxURL\"
target=\"right\">" . $pre;
+ $pre = "<a class=\"mbx_link\" href=\"" . SM_PATH .
"src/right_main.php?PG_SHOWALL=0&sort=0&startMessage=1&mailbox=$mailboxURL\"
target=\"$target\">" . $pre;
$end .= '</a>';
if ($numMessages > 0) {
$urlMailbox = urlencode($mailbox);
$end .= "\n<small>\n" .
- " (<a class=\"mbx_link\"
href=\"empty_trash.php\">"._("purge")."</a>)" .
+ " (<a class=\"mbx_link\" href=\"" . SM_PATH .
"src/empty_trash.php\">"._("purge")."</a>)" .
"</small>";
}
} else {
if (!$boxes->is_noselect) { /* \Noselect boxes can't be selected */
- $pre = "<a class=\"mbx_link\"
href=\"right_main.php?PG_SHOWALL=0&sort=0&startMessage=1&mailbox=$mailboxURL\"
target=\"right\">" . $pre;
+ $pre = "<a class=\"mbx_link\" href=\"" . SM_PATH .
"src/right_main.php?PG_SHOWALL=0&sort=0&startMessage=1&mailbox=$mailboxURL\"
target=\"$target\">" . $pre;
$end .= '</a>';
}
}
@@ -587,6 +607,9 @@
/* end globals */
// open a connection on the imap port (143)
+
+
+if (!$imapConnection)
$imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 10);
// the 10 is to hide the output
/**
@@ -596,7 +619,7 @@
!stristr($left_refresh, 'none')){
$xtra = "\n<meta http-equiv=\"Expires\" content=\"Thu, 01 Dec 1994 16:00:00
GMT\" />\n" .
"<meta http-equiv=\"Pragma\" content=\"no-cache\" />\n".
- "<meta http-equiv=\"REFRESH\"
content=\"$left_refresh;URL=left_main.php\" />\n";
+ "<meta http-equiv=\"REFRESH\" content=\"$left_refresh;URL=" . SM_PATH .
"src/left_main.php\" />\n";
} else {
$xtra = '';
}
@@ -892,10 +915,10 @@
}
-
-
+if ($use_frames)
displayHtmlHeader( 'SquirrelMail', $xtra );
+
/* If requested and not yet complete, attempt to autocreate folders. */
if ($auto_create_special && !isset($auto_create_done)) {
$autocreate = array($sent_folder, $trash_folder, $draft_folder);
@@ -913,29 +936,30 @@
$auto_create_done = TRUE;
sqsession_register($auto_create_done, 'auto_create_done');
}
-
-if ($advanced_tree)
- echo "\n<body" .
+if ($use_frames) {
+ if ($advanced_tree)
+ echo "\n<body" .
' onload="preload(\'../images/minus.png\',\'../images/plus.png\')"' .
- " bgcolor=\"$color[3]\" text=\"$color[6]\" link=\"$color[6]\" vlink=\"$color[6]\"
alink=\"$color[6]\">\n";
-else
- echo "\n<body bgcolor=\"$color[3]\" text=\"$color[6]\" link=\"$color[6]\"
vlink=\"$color[6]\" alink=\"$color[6]\">\n";
-
-do_hook('left_main_before');
-if ($advanced_tree) {
- /* nice future feature, needs layout !! volunteers? */
- $right_pos = $left_size - 20;
-/* echo '<div
style="position:absolute;top:0;border=solid;border-width:0.1em;border-color:blue;"><div
ID="hidef" style="width=20;font-size:12"><A
HREF="javascript:hideframe(true)"><b><<</b></a></div>';
- echo '<div ID="showf" style="width=20;font-size:12;display:none;"><a
href="javascript:hideframe(false)"><b>>></b></a></div>';
- echo '<div ID="incrf" style="width=20;font-size:12"><a
href="javascript:resizeframe(true)"><b>></b></a></div>';
- echo '<div ID="decrf" style="width=20;font-size:12"><a
href="javascript:resizeframe(false)"><b><</b></a></div></div>';
- echo '<div ID="leftframe"><br /><br />';*/
+ " bgcolor=\"$color[3]\" text=\"$color[6]\" link=\"$color[6]\"
vlink=\"$color[6]\" alink=\"$color[6]\">\n";
+ else
+ echo "\n<body bgcolor=\"$color[3]\" text=\"$color[6]\" link=\"$color[6]\"
vlink=\"$color[6]\" alink=\"$color[6]\">\n";
+
+ do_hook('left_main_before');
+ if ($advanced_tree) {
+ /* nice future feature, needs layout !! volunteers? */
+ $right_pos = $left_size - 20;
+ /* echo '<div
style="position:absolute;top:0;border=solid;border-width:0.1em;border-color:blue;"><div
ID="hidef" style="width=20;font-size:12"><A
HREF="javascript:hideframe(true)"><b><<</b></a></div>';
+ echo '<div ID="showf" style="width=20;font-size:12;display:none;"><a
href="javascript:hideframe(false)"><b>>></b></a></div>';
+ echo '<div ID="incrf" style="width=20;font-size:12"><a
href="javascript:resizeframe(true)"><b>></b></a></div>';
+ echo '<div ID="decrf" style="width=20;font-size:12"><a
href="javascript:resizeframe(false)"><b><</b></a></div></div>';
+ echo '<div ID="leftframe"><br /><br />';*/
+ }
}
-
echo "\n\n" . html_tag( 'table', '', 'left', '', 'border="0" cellspacing="0"
cellpadding="0" width="99%"' ) .
html_tag( 'tr' ) .
- html_tag( 'td', '', 'left' ) .
- '<center><font size="4"><b>'. _("Folders") . "</b><br /></font>\n\n";
+ html_tag( 'td', '', 'left' );
+ if ($use_frames != 1)
+ '<center><font size="4"><b>'. _("Folders") . "</b><br /></font>\n\n";
if ($date_format != 6) {
/* First, display the clock. */
@@ -973,9 +997,17 @@
}
/* Next, display the refresh button. */
-echo '<small>(<a href="../src/left_main.php" target="left">'.
- _("refresh folder list") . '</a>)</small></center><br />';
+if ($use_frames) {
+ echo '<small>(<a href="' . SM_PATH . 'src/left_main.php" target="left">'.
+ _("refresh folder list") . '</a>)</small></center><br />';
+} else {
+// echo '<small>(<a href="' . SM_PATH . 'src/left_main.php">'.
+// _("refresh folder list") . '</a>)</small></center><br />';
+ echo '</center><br />';
+ $collapse_folders = 0;
+}
+global $data_dir;
/* Lastly, display the folder list. */
if ( $collapse_folders ) {
/* If directed, collapse or uncollapse a folder. */
@@ -1065,7 +1097,7 @@
} else { /* expiremental code */
$boxes = sqimap_mailbox_tree($imapConnection);
if (isset($advanced_tree) && $advanced_tree) {
- echo '<form name="collapse" action="left_main.php" method="post" ' .
+ echo '<form name="collapse" action="' . SM_PATH . 'src/left_main.php"
method="post" ' .
'enctype="multipart/form-data"'."\n";
echo '<small>';
echo '<button type="submit" class="button"
onmouseover="buttonover(this,true)" onmouseout="buttonover(this,false)"
onmousedown="buttonclick(this,true)" onmouseup="buttonclick(this,false)">'. _("Save
folder tree") .'</button><br /><br />';
@@ -1081,10 +1113,15 @@
ListBoxes($boxes);
}
} /* if ($oldway) else ... */
-do_hook('left_main_after');
-sqimap_logout($imapConnection);
-
-echo '</td></tr></table>' . "\n".
- "</div></body></html>\n";
+if ($use_frames)
+ do_hook('left_main_after');
+if ($location_of_bar == right && !$use_frames)
+ sqimap_logout($imapConnection);
+
+echo '<br></td></tr></table>' . "\n";
+if ($use_frames)
+ echo "</div></body></html>\n";
+else
+ echo "</div>\n";
-?>
+?>
\ No newline at end of file
diff -Naur develold/src/login.php devel/src/login.php
--- develold/src/login.php Mon Nov 10 12:08:37 2003
+++ devel/src/login.php Fri Nov 21 12:33:50 2003
@@ -175,10 +175,43 @@
'center' )
) ,
'', $color[4], 'border="0" cellspacing="0" cellpadding="0" width="100%"' );
+
+switch ($allow_frames) {
+ case 4: // if $use_frames unset, fall through to case 2
+ if (isset($_COOKIE['set_use_frames'])) {
+ $use_frames = $_COOKIE['set_use_frames'];
+ break;
+ }
+ case 2: // Do not use frames
+ $use_frames = 0;
+ break;
+ case 3: // if $use_frames unset, fall through to case 1
+ if (isset($_COOKIE['set_use_frames'])) {
+ $use_frames = $_COOKIE['set_use_frames'];
+ break;
+ }
+ default: // default is also to use frames
+ case 1: // use frames
+ $use_frames = 1;
+ break;
+}
+
+if ($allow_frames > 2) {
+ echo "<center><table border=0><tr><td>\n";
+ echo "<small><input type=radio name=set_use_frames value=1";
+ if ($use_frames) echo " checked=true";
+ echo '> ' . _("Frames") . "\n";
+ echo "</small></td><td nowrap>\n";
+ echo "<small><input type=radio name=set_use_frames value=0";
+ if (!$use_frames) echo " checked=true";
+ echo '> ' . _("No Frames") . "\n";
+ echo "</td></tr></table></center>\n";
+}
+
do_hook('login_form');
echo '</form>' . "\n";
do_hook('login_bottom');
echo "</body>\n".
"</html>\n";
-?>
+?>
\ No newline at end of file
diff -Naur develold/src/move_messages.php devel/src/move_messages.php
--- develold/src/move_messages.php Mon Nov 10 12:08:37 2003
+++ devel/src/move_messages.php Fri Nov 21 12:33:48 2003
@@ -238,5 +238,5 @@
header("Location: $location");
exit;
}
-?>
-</BODY></HTML>
+noframes_bottom();
+?>
\ No newline at end of file
diff -Naur develold/src/options.php devel/src/options.php
--- develold/src/options.php Mon Nov 10 12:08:37 2003
+++ devel/src/options.php Fri Nov 21 12:33:49 2003
@@ -291,7 +291,10 @@
/* If $max_refresh != SMOPT_REFRESH_NONE, provide a refresh link. */
if ( !isset( $max_refresh ) ) {
} else if ($max_refresh == SMOPT_REFRESH_FOLDERLIST) {
- echo '<a href="../src/left_main.php" target="left">' . _("Refresh Folder
List") . '</a><br>';
+ if ($use_frames)
+ echo '<a href="../src/left_main.php" target="left">' . _("Refresh
Folder List") . '</a><br>';
+ else
+ echo '<a href="../src/options.php">' . _("Refresh Folder List") .
'</a><br>';
} else if ($max_refresh) {
echo '<a href="../src/webmail.php?right_frame=options.php" target="' .
$frame_top . '">' . _("Refresh Page") . '</a><br>';
}
@@ -451,7 +454,9 @@
echo '</td></tr>' .
'</table>'.
'</td></tr>'.
- '</table>' .
- '</body></html>';
+ '</table>';
-?>
+noframes_bottom();
+
+
+?>
\ No newline at end of file
diff -Naur develold/src/options_highlight.php devel/src/options_highlight.php
--- develold/src/options_highlight.php Mon Nov 10 12:08:37 2003
+++ devel/src/options_highlight.php Fri Nov 21 12:33:51 2003
@@ -469,4 +469,5 @@
}
do_hook('options_highlight_bottom');
?>
-</table></body></html>
+</table>
+<?php noframes_bottom(); ?>
diff -Naur develold/src/options_identities.php devel/src/options_identities.php
--- develold/src/options_identities.php Mon Nov 10 12:08:37 2003
+++ devel/src/options_identities.php Fri Nov 21 12:33:51 2003
@@ -88,9 +88,8 @@
'', '', 'width="100%" border="0" cellpadding="1" cellspacing="1"' ) ,
'center', $color[0] )
) ,
- 'center', '', 'width="95%" border="0" cellpadding="2" cellspacing="0"' ) .
-
- '</body></html>';
+ 'center', '', 'width="95%" border="0" cellpadding="2" cellspacing="0"' );
+ noframes_bottom();
function SaveUpdateFunction() {
global $username, $data_dir, $full_name, $email_address, $reply_to,
$signature;
diff -Naur develold/src/options_order.php devel/src/options_order.php
--- develold/src/options_order.php Mon Nov 10 12:08:37 2003
+++ devel/src/options_order.php Fri Nov 21 12:33:52 2003
@@ -149,4 +149,4 @@
</td></tr>
</table>
-</body></html>
+<?php noframes_bottom(); ?>
diff -Naur develold/src/read_body.php devel/src/read_body.php
--- develold/src/read_body.php Mon Nov 10 12:08:37 2003
+++ devel/src/read_body.php Fri Nov 21 12:33:51 2003
@@ -846,6 +846,5 @@
them at the end so we avoid double session_register calls */
sqsession_register($messages,'messages');
-?>
-</body>
-</html>
+noframes_bottom();
+?>
\ No newline at end of file
diff -Naur develold/src/redirect.php devel/src/redirect.php
--- develold/src/redirect.php Mon Nov 10 12:08:37 2003
+++ devel/src/redirect.php Fri Nov 21 12:33:51 2003
@@ -94,6 +94,28 @@
$username = $login_username;
sqsession_register ($username, 'username');
setcookie('key', $key, 0, $base_uri);
+
+ switch ($allow_frames) {
+ case 4: // if $use_frames unset, fall through to case 2
+ if (isset($_POST['set_use_frames'])) {
+ $use_frames = $_POST['set_use_frames'];
+ break;
+ }
+ case 2: // Do not use frames
+ $use_frames = 0;
+ break;
+ case 3: // if $use_frames unset, fall through to case 1
+ if (isset($_POST['set_use_frames'])) {
+ $use_frames = $_POST['set_use_frames'];
+ break;
+ }
+ default: // default is also to use frames
+ case 1: // use frames
+ $use_frames = 1;
+ break;
+ }
+
+ setcookie('use_frames', $use_frames, time()+2592000, $base_uri);
do_hook ('login_verified');
}
diff -Naur develold/src/right_main.php devel/src/right_main.php
--- develold/src/right_main.php Mon Nov 10 12:08:37 2003
+++ devel/src/right_main.php Fri Nov 21 12:33:53 2003
@@ -237,7 +237,6 @@
}
do_hook('right_main_bottom');
sqimap_logout ($imapConnection);
+noframes_bottom();
-echo '</body></html>';
-
-?>
+?>
\ No newline at end of file
diff -Naur develold/src/search.php devel/src/search.php
--- develold/src/search.php Mon Nov 10 12:08:37 2003
+++ devel/src/search.php Fri Nov 21 12:33:52 2003
@@ -1058,6 +1058,6 @@
do_hook('search_bottom');
sqimap_logout($imapConnection);
-echo '</body></html>';
+noframes_bottom();
-?>
+?>
\ No newline at end of file
diff -Naur develold/src/vcard.php devel/src/vcard.php
--- develold/src/vcard.php Mon Nov 10 12:08:37 2003
+++ devel/src/vcard.php Fri Nov 21 12:33:54 2003
@@ -218,7 +218,7 @@
'<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=2 ALIGN=CENTER>' .
'<TR><TD BGCOLOR="' . $color[4] . '">' .
- '</TD></TR></TABLE>' .
- '</body></html>';
+ '</TD></TR></TABLE>';
+ noframes_bottom();
-?>
+?>
\ No newline at end of file
diff -Naur develold/src/view_header.php devel/src/view_header.php
--- develold/src/view_header.php Mon Nov 10 12:08:37 2003
+++ devel/src/view_header.php Fri Nov 21 12:33:54 2003
@@ -103,7 +103,7 @@
'</tt></nobr>',
'</td></tr></table>'."\n"
) );
- echo '</body></html>';
+ noframes_bottom();
}
/* get global vars */
diff -Naur develold/src/view_text.php devel/src/view_text.php
--- develold/src/view_text.php Mon Nov 10 12:08:37 2003
+++ devel/src/view_text.php Fri Nov 21 12:33:53 2003
@@ -86,6 +86,6 @@
'</TD></TR></TABLE>' .
'<TABLE WIDTH="98%" BORDER=0 CELLSPACING=0 CELLPADDING=2 ALIGN=CENTER><TR><TD
BGCOLOR="' . $color[0] . '">' .
'<TR><TD BGCOLOR="' . $color[4] . '"><TT>' .
- $body . '</TT></TD></TR></TABLE>' .
- '</body></html>';
-?>
+ $body . '</TT></TD></TR></TABLE>';
+ noframes_bottom();
+?>
\ No newline at end of file
diff -Naur develold/src/webmail.php devel/src/webmail.php
--- develold/src/webmail.php Mon Nov 10 12:08:37 2003
+++ devel/src/webmail.php Fri Nov 21 12:33:53 2003
@@ -37,12 +37,30 @@
sqgetGlobalVar('username', $username, SQ_SESSION);
sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION);
sqgetGlobalVar('onetimepad', $onetimepad, SQ_SESSION);
-
+sqgetGlobalVar('use_frames', $use_frames, SQ_COOKIE);
sqgetGlobalVar('right_frame', $right_frame, SQ_GET);
if ( isset($_SESSION['session_expired_post']) ) {
sqsession_unregister('session_expired_post');
}
+global $plugins;
+
+switch ($allow_frames) {
+ case 4: // if $use_frames unset, fall through to case 2
+ if (isset($use_frames))
+ break;
+ case 2: // Do not use frames
+ $use_frames = 0;
+ break;
+ case 3: // if $use_frames unset, fall through to case 1
+ if (isset($use_frames))
+ break;
+ default: // default is also to use frames
+ case 1: // use frames
+ $use_frames = 1;
+ break;
+}
+
if(!sqgetGlobalVar('mailto', $mailto)) {
$mailto = '';
}
@@ -65,6 +83,25 @@
set_up_language(getPref($data_dir, $username, 'language'));
+if (isset($use_frames) && !$use_frames) {
+ if (!isset($right_frame))
+ $right_frame = '';
+ if ($right_frame == 'right_main.php') {
+ $urlMailbox = urlencode($mailbox);
+ $right_frame_url =
"right_main.php?mailbox=$urlMailbox&sort=$sort&startMessage=$startMessage";
+ } elseif ($right_frame == 'options.php') {
+ $right_frame_url = 'options.php';
+ } elseif ($right_frame == 'folders.php') {
+ $right_frame_url = 'folders.php';
+ } else if ($right_frame == '') {
+ $right_frame_url = 'right_main.php';
+ } else {
+ $right_frame_url = $right_frame;
+ }
+ header("Location: $right_frame_url");
+}
+
+
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Frameset//EN\">\n".
"<html><head>\n" .
"<title>$org_title</title>\n".