Browse Source

Back out support for using SM without Frames

Jimmy Conner 21 năm trước cách đây
mục cha
commit
9d5770a2ea
51 tập tin đã thay đổi với 192 bổ sung513 xóa
  1. 0 1
      AUTHORS
  2. 0 1
      ChangeLog
  3. 42 82
      config/conf.pl
  4. 2 2
      functions/global.php
  5. 6 15
      functions/mailbox_display.php
  6. 0 105
      functions/noframes.php
  7. 4 12
      functions/page_header.php
  8. 0 1
      include/validate.php
  9. 2 3
      plugins/abook_take/take.php
  10. 1 3
      plugins/administrator/options.php
  11. 1 2
      plugins/bug_report/bug_report.php
  12. 1 1
      plugins/calendar/calendar.php
  13. 1 2
      plugins/calendar/day.php
  14. 1 2
      plugins/calendar/event_create.php
  15. 1 2
      plugins/calendar/event_delete.php
  16. 1 2
      plugins/calendar/event_edit.php
  17. 1 2
      plugins/filters/options.php
  18. 2 3
      plugins/filters/spamoptions.php
  19. 1 3
      plugins/info/options.php
  20. 2 4
      plugins/listcommands/mailout.php
  21. 3 2
      plugins/mail_fetch/fetch.php
  22. 3 2
      plugins/mail_fetch/options.php
  23. 1 1
      plugins/message_details/message_details_top.php
  24. 1 1
      plugins/message_details/setup.php
  25. 3 3
      plugins/newmail/newmail_opt.php
  26. 2 2
      plugins/spamcop/options.php
  27. 2 1
      plugins/spamcop/spamcop.php
  28. 1 1
      plugins/squirrelspell/sqspell_functions.php
  29. 2 2
      plugins/translate/options.php
  30. 6 6
      src/addrbook_search_html.php
  31. 4 3
      src/addressbook.php
  32. 1 2
      src/compose.php
  33. 1 4
      src/empty_trash.php
  34. 12 21
      src/folders.php
  35. 2 3
      src/help.php
  36. 2 2
      src/image.php
  37. 49 86
      src/left_main.php
  38. 1 34
      src/login.php
  39. 2 2
      src/move_messages.php
  40. 4 9
      src/options.php
  41. 1 2
      src/options_highlight.php
  42. 3 2
      src/options_identities.php
  43. 1 1
      src/options_order.php
  44. 3 2
      src/read_body.php
  45. 0 22
      src/redirect.php
  46. 3 2
      src/right_main.php
  47. 2 2
      src/search.php
  48. 3 3
      src/vcard.php
  49. 1 1
      src/view_header.php
  50. 3 3
      src/view_text.php
  51. 1 38
      src/webmail.php

+ 0 - 1
AUTHORS

@@ -17,7 +17,6 @@ THE SQUIRRELMAIL TEAM
    Seth E. Randall	<sethr@missoulafcu.org>
    Thijs Kinkhorst	<kink@squirrelmail.org>
    Tomas Kuliavas	<tokul@users.sourceforge.net>	http://www.topolis.lt
-   Jimmy Conner		<jimmy@advcs.org>		http://sqmail.org
 
  Past Developers, now retired:
  -----------------------------

+ 0 - 1
ChangeLog

@@ -110,7 +110,6 @@ Version 1.5.0 -- CVS
     accidentally disappeared in the past.
   - Disabled Quick-email-reporting feature in spamcop plugin. Bug.809452. Admin
     can enable it by setting variable in plugins/spamcop/setup.php
-  - Added support for using Squirrelmail without frames
 
 **************************************
 *** SquirrelMail Stable Series 1.4 ***

+ 42 - 82
config/conf.pl

@@ -354,9 +354,6 @@ if (!$session_name ) {
 if (!$show_alternative_names ) {
 	$show_alternative_names = 'false';
 }
-if ( !$allow_frames ) {
-    $allow_frames = 1;
-}
 
 if (!$available_languages ) {
 	$available_languages = 'all';
@@ -445,7 +442,7 @@ while ( ( $command ne "q" ) && ( $command ne "Q" ) ) {
         print "8.  Provider name          : $WHT$provider_name$NRM\n";
 
         print "\n";
-        print "R.  Return to Main Menu\n";
+        print "R   Return to Main Menu\n";
     } elsif ( $menu == 2 ) {
         print $WHT. "Server Settings\n\n" . $NRM;
         print $WHT . "General" . $NRM . "\n";
@@ -509,7 +506,7 @@ while ( ( $command ne "q" ) && ( $command ne "Q" ) ) {
         }
         
         print "\n";
-        print "R.  Return to Main Menu\n";
+        print "R   Return to Main Menu\n";
     } elsif ( $menu == 3 ) {
         print $WHT. "Folder Defaults\n" . $NRM;
         print "1.  Default Folder Prefix         : $WHT$default_folder_prefix$NRM\n";
@@ -531,7 +528,7 @@ while ( ( $command ne "q" ) && ( $command ne "Q" ) ) {
         print "17. Folder Delete Bypasses Trash  : $WHT$delete_folder$NRM\n";
         print "18. Enable /NoSelect folder fix   : $WHT$noselect_fix_enable$NRM\n";
         print "\n";
-        print "R.  Return to Main Menu\n";
+        print "R   Return to Main Menu\n";
     } elsif ( $menu == 4 ) {
         print $WHT. "General Options\n" . $NRM;
         print "1.  Data Directory              : $WHT$data_dir$NRM\n";
@@ -542,13 +539,13 @@ while ( ( $command ne "q" ) && ( $command ne "Q" ) ) {
         print "6.  Allow use of priority       : $WHT$default_use_priority$NRM\n";
         print "7.  Hide SM attributions        : $WHT$hide_sm_attributions$NRM\n";
         print "8.  Allow use of receipts       : $WHT$default_use_mdn$NRM\n";
-        print "9.  Allow editing of identity   : $WHT$edit_identity$NRM/$WHT$edit_name$NRM\n";
+        print "9. Allow editing of identity   : $WHT$edit_identity$NRM/$WHT$edit_name$NRM\n";
         print "10. Allow server thread sort    : $WHT$allow_thread_sort$NRM\n";
         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 "13. PHP session name            : $WHT$session_name$NRM\n";
         print "\n";
-        print "R.  Return to Main Menu\n";
+        print "R   Return to Main Menu\n";
     } elsif ( $menu == 5 ) {
         print $WHT. "Themes\n" . $NRM;
         print "1.  Change Themes\n";
@@ -560,7 +557,7 @@ while ( ( $command ne "q" ) && ( $command ne "Q" ) ) {
         }
         print "2.  CSS File : $WHT$theme_css$NRM\n";
         print "\n";
-        print "R.  Return to Main Menu\n";
+        print "R   Return to Main Menu\n";
     } elsif ( $menu == 6 ) {
         print $WHT. "Address Books (LDAP)\n" . $NRM;
         print "1.  Change Servers\n";
@@ -570,14 +567,14 @@ while ( ( $command ne "q" ) && ( $command ne "Q" ) ) {
         print
           "2.  Use Javascript Address Book Search  : $WHT$default_use_javascript_addr_book$NRM\n";
         print "\n";
-        print "R.  Return to Main Menu\n";
+        print "R   Return to Main Menu\n";
     } elsif ( $menu == 7 ) {
         print $WHT. "Message of the Day (MOTD)\n" . $NRM;
         print "\n$motd\n";
         print "\n";
         print "1   Edit the MOTD\n";
         print "\n";
-        print "R.  Return to Main Menu\n";
+        print "R   Return to Main Menu\n";
     } elsif ( $menu == 8 ) {
         print $WHT. "Plugins\n" . $NRM;
         print "  Installed Plugins\n";
@@ -613,7 +610,7 @@ while ( ( $command ne "q" ) && ( $command ne "Q" ) ) {
         closedir DIR;
 
         print "\n";
-        print "R.  Return to Main Menu\n";
+        print "R   Return to Main Menu\n";
     } elsif ( $menu == 9 ) {
         print $WHT. "Database\n" . $NRM;
         print "1.  DSN for Address Book   : $WHT$addrbook_dsn$NRM\n";
@@ -625,46 +622,34 @@ while ( ( $command ne "q" ) && ( $command ne "Q" ) ) {
         print "6.  Field for prefs key    : $WHT$prefs_key_field$NRM\n";
         print "7.  Field for prefs value  : $WHT$prefs_val_field$NRM\n";
         print "\n";
-        print "R.  Return to Main Menu\n";
+        print "R   Return to Main Menu\n";
     } elsif ( $menu == 10 ) {
-        print $WHT. "Language settings\n" . $NRM;
-        print "1.  Default Language                : $WHT$squirrelmail_default_language$NRM\n";
-        print "2.  Default Charset                 : $WHT$default_charset$NRM\n";
-        print "3.  Show alternative language names : $WHT$show_alternative_names$NRM\n";
-        print "4.  Available languages             : $WHT$available_languages$NRM\n";
-        print "5.  Use agresive decoding           : $WHT$agresive_decoding$NRM\n";
-        print "\n";
-        print "R.  Return to Main Menu\n";
+	print $WHT. "Language settings\n" . $NRM;
+	print "1.  Default Language                : $WHT$squirrelmail_default_language$NRM\n";
+	print "2.  Default Charset                 : $WHT$default_charset$NRM\n";
+	print "3.  Show alternative language names : $WHT$show_alternative_names$NRM\n";
+	print "4.  Available languages             : $WHT$available_languages$NRM\n";
+	print "5.  Use agresive decoding           : $WHT$agresive_decoding$NRM\n";
+	print "\n";
+        print "R   Return to Main Menu\n";
     } elsif ( $menu == 11 ) {
-        print $WHT. "Interface tweaks\n" . $NRM;
-        print "1.  Advanced tree            : $WHT$advanced_tree$NRM\n";
-        print "2.  Oldway                   : $WHT$oldway$NRM\n";
-        print "3.  HTML Frame Settings      : $WHT";
-        if ( $allow_frames == 1) {
-           print "Force Frames Only";
-        } elsif ( $allow_frames == 2) {
-           print "Force No Frames Only";
-        } elsif ( $allow_frames == 3) {
-           print "User Select, Default to Frames";
-        } elsif ( $allow_frames == 4) {
-           print "User Select, Default to No Frames";
-        }
-        print "$NRM\n";
-
-        print "\n";
-        print $WHT. "PHP tweaks\n" . $NRM;
-        print "4.  Use php recode functions : $WHT$use_php_recode$NRM\n";
-        print "5.  Use php iconv functions  : $WHT$use_php_iconv$NRM\n";
-        print "\n";
-        print "R.  Return to Main Menu\n";
+	print $WHT. "Interface tweaks\n" . $NRM;
+	print "1.  Advanced tree            : $WHT$advanced_tree$NRM\n";
+	print "2.  Oldway                   : $WHT$oldway$NRM\n";
+	print "\n";
+	print $WHT. "PHP tweaks\n" . $NRM;
+	print "3.  Use php recode functions : $WHT$use_php_recode$NRM\n";
+	print "4.  Use php iconv functions  : $WHT$use_php_iconv$NRM\n";
+	print "\n";
+        print "R   Return to Main Menu\n";
     }
     if ( $config_use_color == 1 ) {
         print "C.  Turn color off\n";
     } else {
         print "C.  Turn color on\n";
     }
-    print "S.  Save data\n";
-    print "Q.  Quit\n";
+    print "S   Save data\n";
+    print "Q   Quit\n";
 
     print "\n";
     print "Command >> " . $WHT;
@@ -773,7 +758,7 @@ while ( ( $command ne "q" ) && ( $command ne "Q" ) ) {
             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 ( $menu == 5 ) {
             if ( $command == 1 ) { command41(); }
             elsif ( $command == 2 ) { $theme_css = command42(); }
@@ -795,15 +780,14 @@ while ( ( $command ne "q" ) && ( $command ne "Q" ) ) {
         } elsif ( $menu == 10 ) {
             if    ( $command == 1 ) { $squirrelmail_default_language = commandA1(); }
             elsif ( $command == 2 ) { $default_charset  	     = commandA2(); }
-            elsif ( $command == 3 ) { $show_alternative_names    = commandA3(); }
+            elsif ( $command == 3 ) { $show_alternative_names        = commandA3(); }
             elsif ( $command == 4 ) { $available_languages	     = commandA4(); }
             elsif ( $command == 5 ) { $agresive_decoding	     = commandA5(); }
         } elsif ( $menu == 11 ) {
             if    ( $command == 1 ) { $advanced_tree  = commandB1(); }
             elsif ( $command == 2 ) { $oldway  	      = commandB2(); }
-            elsif ( $command == 3 ) { $allow_frames   = commandB5(); }
-            elsif ( $command == 4 ) { $use_php_recode = commandB3(); }
-            elsif ( $command == 5 ) { $use_php_iconv  = commandB4(); }
+            elsif ( $command == 3 ) { $use_php_recode = commandB3(); }
+            elsif ( $command == 4 ) { $use_php_iconv  = commandB4(); }
         }
     }
 }
@@ -1384,7 +1368,8 @@ sub command113 {
 sub command71 {
     print "\nYou can now create the welcome message that is displayed\n";
     print "every time a user logs on.  You can use HTML or just plain\n";
-    print "text.  If you do not wish to have one, just make it blank.\n\n(Type @ on a blank line to exit)\n";
+    print
+"text.  If you do not wish to have one, just make it blank.\n\n(Type @ on a blank line to exit)\n";
 
     $new_motd = "";
     do {
@@ -2223,28 +2208,7 @@ sub command316 {
     return $new_session_name;
 }
 
-sub commandB5 {
-    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.  User Select, Default to Frames\n";
-    if ($allow_frames == 4) { print "--> "; }else{print "    ";}
-    print "4.  User Select, 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 ";
@@ -3132,16 +3096,12 @@ sub save_data {
 		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 "\$session_name = '$session_name';\n";
+	    print CF "\$use_imap_tls = $use_imap_tls;\n";
+		print CF "\$use_smtp_tls = $use_smtp_tls;\n";
 
-	print CF "\n";
-
-	print CF "\$allow_frames = $allow_frames;\n";
+		print CF "\$session_name = '$session_name';\n";
 
-	print CF "\n";
+	    print CF "\n";
 
 	# boolean
 	print CF "\$advanced_tree = $advanced_tree;\n";
@@ -3453,7 +3413,7 @@ sub detect_auth_support {
 
 	# So at this point, we have a response, and it is (hopefully) valid.
 	if ($service eq 'SMTP') {
-		if ( $response =~ /^(535|502|504)/ ) {
+		if (($response =~ /^535/) or ($response =~/^502/)) {
 			# Not supported
 			close $sock;
 			return 'NO';

+ 2 - 2
functions/global.php

@@ -155,7 +155,7 @@ function sqsession_register ($var, $name) {
     else {
         $_SESSION["$name"] = $var; 
     }
-    @session_register("$name");
+    session_register("$name");
 }
 
 /**
@@ -174,7 +174,7 @@ function sqsession_unregister ($name) {
     else {
         unset($_SESSION[$name]);
     }
-    @session_unregister("$name");
+    session_unregister("$name");
 }
 
 /**

+ 6 - 15
functions/mailbox_display.php

@@ -1001,15 +1001,11 @@ function get_msgcnt_str($start_msg, $end_msg, $num_msgs) {
  * Generate a paginator link.
  */
 function get_paginator_link($box, $start_msg, $use, $text) {
-    global $PHP_SELF, $use_frames;
-    if ($use_frames)
-        $target = 'right';
-    else
-        $target = '';
+    global $PHP_SELF;
 
     $result = "<A HREF=\"right_main.php?use_mailbox_cache=$use"
             . "&amp;startMessage=$start_msg&amp;mailbox=$box\" "
-            . "TARGET=\"$target\">$text</A>";
+            . "TARGET=\"right\">$text</A>";
     return ($result);
 /*
     if (preg_match('/^(.+)\?.+$/',$PHP_SELF,$regs)) {
@@ -1020,7 +1016,7 @@ function get_paginator_link($box, $start_msg, $use, $text) {
 
     $result = '<A HREF="'. $source_url . "?use_mailbox_cache=$use"
             . "&amp;startMessage=$start_msg&amp;mailbox=$box\" "
-            . "TARGET=\"$target\">$text</A>";
+            . "TARGET=\"right\">$text</A>";
     return ($result);
 */
 }
@@ -1030,7 +1026,7 @@ function get_paginator_link($box, $start_msg, $use, $text) {
  */
 function get_paginator_str($box, $start_msg, $end_msg, $num_msgs,
                            $show_num, $sort) {
-    global $username, $data_dir, $use_mailbox_cache, $color, $PG_SHOWNUM, $use_frames;
+    global $username, $data_dir, $use_mailbox_cache, $color, $PG_SHOWNUM;
 
     /* Initialize paginator string chunks. */
     $prv_str = '';
@@ -1039,11 +1035,6 @@ function get_paginator_str($box, $start_msg, $end_msg, $num_msgs,
     $all_str = '';
     $tgl_str = '';
 
-    if ($use_frames)
-        $target = 'right';
-    else
-        $target = '';
-
     $box = urlencode($box);
 
     /* Create simple strings that will be creating the paginator. */
@@ -1197,14 +1188,14 @@ function get_paginator_str($box, $start_msg, $end_msg, $num_msgs,
     } else if ($PG_SHOWNUM == 999999) {
         $pg_str = "<A HREF=\"right_main.php?PG_SHOWALL=0"
                 . "&amp;use_mailbox_cache=$use&amp;startMessage=1&amp;mailbox=$box\" "
-                . "TARGET=\"$target\">" ._("Paginate") . '</A>' . $spc;
+                . "TARGET=\"right\">" ._("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"
                  . "&amp;use_mailbox_cache=$use&amp;startMessage=1&amp;mailbox=$box\" "
-                 . "TARGET=\"$target\">" . _("Show All") . '</A>';
+                 . "TARGET=\"right\">" . _("Show All") . '</A>';
     }
 
     /* Last but not least, get the value for the toggle all link. */

+ 0 - 105
functions/noframes.php

@@ -1,105 +0,0 @@
-<?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
- *
- * $Id$
- * @package squirrelmail
- */
-
-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 or the left folder list
- * if not using frames
- *
- * @return void
- */
-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');
-        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 bottom html header or the right folder list
- * if not using frames
- *
- * @return void
- */
-
-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";
-    }
-}
-
-?>

+ 4 - 12
functions/page_header.php

@@ -87,14 +87,10 @@ ECHO;
  * @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 (isset($use_frames) && $use_frames) {
-        if ($target != '')
-            $target = " target=\"$target\"";
-    } else 
-       $target='';
-
+    if ($target != '') {
+        $target = " target=\"$target\"";
+    }
     $hooktext = do_hook_function('internal_link',$text);
     if ($hooktext != '')
         $text = $hooktext;
@@ -279,8 +275,6 @@ function displayPageHeader($color, $mailbox, $xtra='', $session=false) {
     }
 
     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));
@@ -404,8 +398,6 @@ function compose_Header($color, $mailbox) {
     }
 
     echo "<body text=\"$color[8]\" bgcolor=\"$color[4]\" link=\"$color[7]\" vlink=\"$color[7]\" alink=\"$color[7]\" $onload>\n\n";
-
-
 }
 
-?>
+?>

+ 0 - 1
include/validate.php

@@ -43,7 +43,6 @@ require_once(SM_PATH . 'class/mime.class.php');
 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) {

+ 2 - 3
plugins/abook_take/take.php

@@ -113,6 +113,5 @@ echo '<form action="../../src/addressbook.php" name="f_add" method="post">' ."\n
     '</table>';
     }
 ?>
-</form>
-<?php noframes_bottom(); ?>
-
+</form></body>
+</html>

+ 1 - 3
plugins/administrator/options.php

@@ -606,6 +606,4 @@ if( $fp = @fopen( $cfgfile, 'w' ) ) {
          _("Config file can't be opened. Please check config.php.").
          '</font>';
 }
-noframes_bottom();
-
-?>
+?>

+ 1 - 2
plugins/bug_report/bug_report.php

@@ -196,5 +196,4 @@ $body = htmlspecialchars($body_top . $body);
    </tr>
    </table>
    </form>
-<?php noframes_bottom(); ?>
-
+</body></html>

+ 1 - 1
plugins/calendar/calendar.php

@@ -176,5 +176,5 @@ startcalendar();
 drawmonthview();
 endcalendar();
 
-noframes_bottom();
 ?>
+</body></html>

+ 1 - 2
plugins/calendar/day.php

@@ -179,5 +179,4 @@ initialize_events();
 display_events();
 ?>
 </table></td></tr></table>
-<?php noframes_bottom(); ?>
-
+</body></html>

+ 1 - 2
plugins/calendar/event_create.php

@@ -208,5 +208,4 @@ if(!isset($event_text)){
 
 ?>
 </table></td></tr></table>
-<? php noframes_bottom(); ?>
-
+</body></html>

+ 1 - 2
plugins/calendar/event_delete.php

@@ -177,5 +177,4 @@ if (isset($dyear) && isset($dmonth) && isset($dday) && isset($dhour) && isset($d
 
 ?>
 </table></td></tr></table>
-<?php noframes_bottom(); ?>
-
+</body></html>

+ 1 - 2
plugins/calendar/event_edit.php

@@ -327,5 +327,4 @@ if (!isset($updated)){
 
 ?>
 </table></td></tr></table>
-<?php noframes_bottom(); ?>
-
+</body></html>

+ 1 - 2
plugins/filters/options.php

@@ -239,6 +239,5 @@ sqgetGlobalVar('action', $action, SQ_GET);
                 html_tag( 'td', '&nbsp;', 'left' )
             ) ,
         'center', '', 'width="80%" border="0" cellpadding="2" cellspacing="0"' );
-    noframes_bottom();
-
+    echo '</body></html>';
 ?>

+ 2 - 3
plugins/filters/spamoptions.php

@@ -178,8 +178,7 @@ if (isset($action) && $action == 'spam') {
         '</table>'.
         '</center>'.
         '</form>';
-        noframes_bottom();
-
+    echo '</body></html>';
 }
 
 if (! isset($_GET['action']) || $_GET['action'] != 'spam') {
@@ -222,7 +221,7 @@ if (! isset($_GET['action']) || $_GET['action'] != 'spam') {
         echo "</td></tr>\n";
     }
     echo '</table>';
-    noframes_bottom();
+    echo '</body></html>';
 }
 
 ?>

+ 1 - 3
plugins/info/options.php

@@ -157,9 +157,7 @@ if ($submit == 'submit') {
         print "</TD><TR></TABLE></CENTER><BR>\n";
     }
 }
-    print "</TD></TR></TABLE></CENTER>";
-    noframes_bottom();
-
+    print "</TD></TR></TABLE></CENTER></BODY></HTML>";
     sqimap_logout($imap_stream);
     do_hook('info_bottom');
 ?>

+ 2 - 4
plugins/listcommands/mailout.php

@@ -76,7 +76,5 @@ echo '<br />'
 . '<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>';
-noframes_bottom();
-
-?>
+. '</form></td></tr></table></p></body></html>';
+?>

+ 3 - 2
plugins/mail_fetch/fetch.php

@@ -127,7 +127,7 @@ sqgetGlobalVar('delimiter',  $delimiter,  SQ_SESSION);
         echo '<p>' . _("No POP3 servers configured yet.") . '</p>';
         displayInternalLink('plugins/mail_fetch/options.php',
             _("Click here to go to the options page.") );
-        noframes_bottom();
+        echo '</body></html>';
         exit();
     }
 
@@ -321,4 +321,5 @@ sqgetGlobalVar('delimiter',  $delimiter,  SQ_SESSION);
 
 ?>
 </center>
-<?php noframes_bottom(); ?>
+</body>
+</html>

+ 3 - 2
plugins/mail_fetch/options.php

@@ -384,5 +384,6 @@ sqgetGlobalVar('submit_mailfetch', $submit_mailfetch, SQ_POST);
             ) ,
         'center', '', 'width="70%"' );
     }
-    noframes_bottom();
-?>
+
+    ?>
+</body></html>

+ 1 - 1
plugins/message_details/message_details_top.php

@@ -47,4 +47,4 @@ echo "<body text=\"$color[8]\" bgcolor=\"$color[3]\" link=\"$color[7]\" vlink=\"
      '</b>'.
      '</body>'.
      "</html>\n";
-?>
+?>

+ 1 - 1
plugins/message_details/setup.php

@@ -52,4 +52,4 @@ function show_message_details() {
     echo $result;
 }
  
-?>
+?>

+ 3 - 3
plugins/newmail/newmail_opt.php

@@ -158,7 +158,7 @@ if ($allowsound == "true") {
                  ) . "\n" .
       '</table>'. "\n" .
    '</form>'. "\n" .
-   '</td></tr></table>'. "\n";
-   noframes_bottom();
+   '</td></tr></table>'. "\n" .
+'</body></html>';
 
-?>
+?>

+ 2 - 2
plugins/spamcop/options.php

@@ -172,5 +172,5 @@ echo "</p>\n";
 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";
-noframes_bottom();
-?>
+?>
+</body></html>

+ 2 - 1
plugins/spamcop/spamcop.php

@@ -189,4 +189,5 @@ echo "</p>";
 </td>
 </tr>
 </table>
-<?php noframes_bottom(); ?>
+  </body>
+</html>

+ 1 - 1
plugins/squirrelspell/sqspell_functions.php

@@ -76,7 +76,7 @@ function sqspell_makePage($title, $scriptsrc, $body){
     . html_tag( 'tr',
           html_tag( 'td', 'SquirrelSpell ' . $SQSPELL_VERSION, 'center', $color[9] )
       ) . "\n</table>\n";
-  noframes_bottom();
+  echo '</body></html>';
 }
 
 /**

+ 2 - 2
plugins/translate/options.php

@@ -185,7 +185,7 @@ require_once(SM_PATH . 'include/load_prefs.php');
         '<input type="submit" value="' . _("Submit") . '" name="submit_translate">'.
         '</td></tr>'.
    '</table>'.
-   '</form>';
-   noframes_bottom();
+   '</form>'.
+"</body></html>\n";
 
 ?>

+ 6 - 6
src/addrbook_search_html.php

@@ -276,14 +276,14 @@ else {
             echo html_tag( 'p', '<b><br>' .
                              _("Your search failed with the following error(s)") .
                             ':<br>' . $abook->error . "</b>\n" ,
-                   'center' );
-            noframes_bottom();
+                   'center' ) .
+            "\n</BODY></HTML>\n";
         } else {
             if (sizeof($res) == 0) {
                 echo html_tag( 'p', '<br><b>' .
                                  _("No persons matching your search was found") . "</b>\n" ,
-                       'center' );
-                noframes_bottom();
+                       'center' ) .
+                "\n</BODY></HTML>\n";
             } else {
                 addr_display_result($res);
             }
@@ -299,5 +299,5 @@ if ($addrquery == '' || sizeof($res) == 0) {
          '</form></center></nobr>';
 }
 
-noframes_bottom();
-?>
+?>
+</body></html>

+ 4 - 3
src/addressbook.php

@@ -282,7 +282,7 @@ if(sqgetGlobalVar('REQUEST_METHOD', $req_method, SQ_SERVER) && $req_method == 'P
 
     // Some times we end output before forms are printed
     if($abortform) {
-       noframes_bottom();
+       echo "</BODY></HTML>\n";
        exit();
     }
 }
@@ -436,5 +436,6 @@ echo '</FORM>';
 
 /* Add hook for anything that wants on the bottom */
 do_hook('addressbook_bottom');
-noframes_bottom();
-?>
+?>
+
+</BODY></HTML>

+ 1 - 2
src/compose.php

@@ -1166,8 +1166,7 @@ function showInputForm ($session, $values=false) {
     }
 
     do_hook('compose_bottom');
-    if ($compose_new_win != '1')
-       noframes_bottom();
+    echo '</BODY></HTML>' . "\n";
 }
 
 

+ 1 - 4
src/empty_trash.php

@@ -67,10 +67,7 @@ for ($i = 0; $i < $numboxes; $i++) {
 walkTreeInPreOrderEmptyTrash(0, $imap_stream, $foldersTree);
 
 $location = get_location();
-if (isset($use_frames) && !$use_frames)
-    header ("Location: $location/right_main.php");
-else
-    header ("Location: $location/left_main.php");
+header ("Location: $location/left_main.php");
 
 sqimap_logout($imap_stream);
 ?>

+ 12 - 21
src/folders.php

@@ -72,25 +72,15 @@ if ( isset($success) && $success ) {
 
     $td_str .= '</b><br>';        
 
-    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 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"' );
 }
 
 echo "\n<br>";
@@ -346,5 +336,6 @@ do_hook('folders_bottom');
 
 <?php
    sqimap_logout($imapConnection);
-   noframes_bottom();
-?>
+?>
+
+</body></html>

+ 2 - 3
src/help.php

@@ -208,6 +208,5 @@ do_hook('help_bottom');
 echo html_tag( 'tr',
             html_tag( 'td', '&nbsp;', 'left', $color[0] )
         ).
-       '</table>';
-       noframes_bottom();
-?>
+       '</table></body></html>';
+?>

+ 2 - 2
src/image.php

@@ -61,6 +61,6 @@ echo '</b></td></tr>' . "\n" .
     '<img src="' . $DownloadLink . '">' .
 
     '</TD></TR></TABLE>' . "\n";
-    noframes_bottom();
+    '</body></html>' . "\n";
 
-?>
+?>

+ 49 - 86
src/left_main.php

@@ -14,9 +14,7 @@
  */
 
 /** Path for SquirrelMail required files. */
-if (!defined('SM_PATH'))
-   define('SM_PATH','../');
-
+define('SM_PATH','../');
 
 /* SquirrelMail required files. */
 require_once(SM_PATH . 'include/validate.php');
@@ -38,14 +36,11 @@ function formatMailboxName($imapConnection, $box_array) {
            $color, $move_to_sent, $move_to_trash,
            $unseen_notify, $unseen_type, $collapse_folders,
            $draft_folder, $save_as_draft,
-           $use_special_folder_color, $use_frames;
+           $use_special_folder_color;
     $real_box = $box_array['unformatted'];
     $mailbox = str_replace('&nbsp;','',$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];
@@ -70,8 +65,8 @@ function formatMailboxName($imapConnection, $box_array) {
 
     /* Create the link for this folder. */
     if ($status !== false) {
-    $line .= '<a href="' . SM_PATH . 'src/right_main.php?PG_SHOWALL=0&amp;sort=0&amp;startMessage=1&amp;mailbox='.
-                $mailboxURL.'" TARGET="' . $target . '" STYLE="text-decoration:none">';
+    $line .= '<a href="right_main.php?PG_SHOWALL=0&amp;sort=0&amp;startMessage=1&amp;mailbox='.
+                $mailboxURL.'" TARGET="right" STYLE="text-decoration:none">';
     }
     if ($special_color) {
         $line .= "<font color=\"$color[11]\">";
@@ -104,7 +99,7 @@ function formatMailboxName($imapConnection, $box_array) {
         if (($numMessages > 0) or ($box_array['parent'] == 1)) {
             $urlMailbox = urlencode($real_box);
             $line .= "\n<small>\n" .
-                    "&nbsp;&nbsp;(<A HREF=\"" . SM_PATH . "src/empty_trash.php\" style=\"text-decoration:none\">"._("purge")."</A>)" .
+                    "&nbsp;&nbsp;(<A HREF=\"empty_trash.php\" style=\"text-decoration:none\">"._("purge")."</A>)" .
                     "</small>";
         } else {
 	   $line .= concat_hook_function('left_main_after_each_folder',
@@ -175,12 +170,9 @@ function create_collapse_link($boxnum) {
     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="' . SM_PATH . 'src/left_main.php?';
-
+            'href="left_main.php?';
     if ($boxes[$boxnum]['collapse'] == SM_BOX_COLLAPSED) {
         $link .= "unfold=$mailbox\">+";
     } else {
@@ -295,7 +287,7 @@ function is_parent_box($curbox_name, $parbox_name) {
 
 function ListBoxes ($boxes, $j=0 ) {
     global $data_dir, $username, $startmessage, $color, $unseen_notify, $unseen_type,
-           $move_to_trash, $trash_folder, $collapse_folders, $imapConnection, $use_frames;
+           $move_to_trash, $trash_folder, $collapse_folders, $imapConnection;
 
     $pre = '<nobr>';
     $end = '';
@@ -351,10 +343,8 @@ function ListBoxes ($boxes, $j=0 ) {
         if (isset($boxes->mbxs[0]) && $collapse_folders) {
             $collapse = getPref($data_dir, $username, 'collapse_folder_' . $mailbox);
             $collapse = ($collapse == '' ? SM_BOX_UNCOLLAPSED : $collapse);
-            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?';
+
+            $link = '<a target="left" style="text-decoration:none" ' .'href="left_main.php?';
             if ($collapse) {
                 $link .= "unfold=$mailboxURL\">$leader+&nbsp;</tt>";
             } else {
@@ -366,11 +356,6 @@ function ListBoxes ($boxes, $j=0 ) {
             $pre.= $leader . '&nbsp;&nbsp;</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)) {
@@ -379,7 +364,7 @@ function ListBoxes ($boxes, $j=0 ) {
             if ($unseen > 0) {
                 $pre .= '<b>';
             }
-            $pre .= "<a href=\"" . SM_PATH . "src/right_main.php?PG_SHOWALL=0&amp;sort=0;startMessage=1&amp;mailbox=$mailboxURL\" target=\"$target\" style=\"text-decoration:none\">";
+            $pre .= "<a href=\"right_main.php?PG_SHOWALL=0&amp;sort=0;startMessage=1&amp;mailbox=$mailboxURL\" target=\"right\" style=\"text-decoration:none\">";
             if ($unseen > 0) {
                 $end .= '</b>';
             }
@@ -388,7 +373,7 @@ function ListBoxes ($boxes, $j=0 ) {
                 if ($unseen > 0) {
                     $pre .= '<b>';
                 }
-                $pre .= "<a href=\"" . SM_PATH . "src/right_main.php?PG_SHOWALL=0&amp;sort=0;startMessage=1&amp;mailbox=$mailboxURL\" target=\"$target\" style=\"text-decoration:none\">";
+                $pre .= "<a href=\"right_main.php?PG_SHOWALL=0&amp;sort=0;startMessage=1&amp;mailbox=$mailboxURL\" target=\"right\" style=\"text-decoration:none\">";
                 if ($unseen > 0) {
                     $end .= '</b>';
                 }
@@ -397,7 +382,7 @@ function ListBoxes ($boxes, $j=0 ) {
                     $end .= "&nbsp;<small>$unseen_string</small>";
                 }
                 $end .= "\n<small>\n" .
-                        "&nbsp;&nbsp;(<a href=\"" . SM_PATH . "src/empty_trash.php\" style=\"text-decoration:none\">"._("purge")."</a>)" .
+                        "&nbsp;&nbsp;(<a href=\"empty_trash.php\" style=\"text-decoration:none\">"._("purge")."</a>)" .
                         "</small>";
             }
         } else {
@@ -405,7 +390,7 @@ function ListBoxes ($boxes, $j=0 ) {
                 if ($unseen > 0) {
                     $pre .= '<b>';
                 }
-                $pre .= "<a href=\"" . SM_PATH . "src/right_main.php?PG_SHOWALL=0&amp;sort=0&amp;startMessage=1&amp;mailbox=$mailboxURL\" target=\"$target\" style=\"text-decoration:none\">";
+                $pre .= "<a href=\"right_main.php?PG_SHOWALL=0&amp;sort=0&amp;startMessage=1&amp;mailbox=$mailboxURL\" target=\"right\" style=\"text-decoration:none\">";
                 if ($unseen > 0) {
                     $end .= '</b>';
                 }
@@ -441,16 +426,11 @@ function ListBoxes ($boxes, $j=0 ) {
 
 function ListAdvancedBoxes ($boxes, $mbx, $j='ID.0000' ) {
     global $data_dir, $username, $startmessage, $color, $unseen_notify, $unseen_type,
-           $move_to_trash, $trash_folder, $collapse_folders, $use_frames;
+           $move_to_trash, $trash_folder, $collapse_folders;
 
     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;
 
@@ -517,17 +497,17 @@ function ListAdvancedBoxes ($boxes, $mbx, $j='ID.0000' ) {
         if (! isset($numMessages)) {
             $numMessages = $boxes->total;
         }
-        $pre = "<a class=\"mbx_link\" href=\"" . SM_PATH . "src/right_main.php?PG_SHOWALL=0&amp;sort=0&amp;startMessage=1&amp;mailbox=$mailboxURL\" target=\"$target\">" . $pre;
+        $pre = "<a class=\"mbx_link\" href=\"right_main.php?PG_SHOWALL=0&amp;sort=0&amp;startMessage=1&amp;mailbox=$mailboxURL\" target=\"right\">" . $pre;
         $end .= '</a>';
         if ($numMessages > 0) {
             $urlMailbox = urlencode($mailbox);
             $end .= "\n<small>\n" .
-                    "&nbsp;&nbsp;(<a class=\"mbx_link\" href=\"" . SM_PATH . "src/empty_trash.php\">"._("purge")."</a>)" .
+                    "&nbsp;&nbsp;(<a class=\"mbx_link\" href=\"empty_trash.php\">"._("purge")."</a>)" .
                     "</small>";
         }
     } else {
         if (!$boxes->is_noselect) { /* \Noselect boxes can't be selected */
-            $pre = "<a class=\"mbx_link\" href=\"" . SM_PATH . "src/right_main.php?PG_SHOWALL=0&amp;sort=0&amp;startMessage=1&amp;mailbox=$mailboxURL\" target=\"$target\">" . $pre;
+            $pre = "<a class=\"mbx_link\" href=\"right_main.php?PG_SHOWALL=0&amp;sort=0&amp;startMessage=1&amp;mailbox=$mailboxURL\" target=\"right\">" . $pre;
             $end .= '</a>';
         }
     }
@@ -607,9 +587,6 @@ sqgetGlobalVar('unfold', $unfold, SQ_GET);
 /* 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
 
 /**
@@ -619,7 +596,7 @@ if (isset($left_refresh) && ($left_refresh != '') &&
     !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=" . SM_PATH . "src/left_main.php\" />\n";
+             "<meta http-equiv=\"REFRESH\" content=\"$left_refresh;URL=left_main.php\" />\n";
 } else {
     $xtra = '';
 }
@@ -915,10 +892,10 @@ ECHO;
 }
 
 
-if ($use_frames)
-displayHtmlHeader( 'SquirrelMail', $xtra );
 
 
+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);
@@ -936,30 +913,29 @@ if ($auto_create_special && !isset($auto_create_done)) {
     $auto_create_done = TRUE;
     sqsession_register($auto_create_done, 'auto_create_done');
 }
-if ($use_frames) {
-   if ($advanced_tree)
-     echo "\n<body" .
+
+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' );
-    if ($use_frames != 1)
-       '<center><font size="4"><b>'. _("Folders") . "</b><br /></font>\n\n";
+    html_tag( 'td', '', 'left' ) .
+    '<center><font size="4"><b>'. _("Folders") . "</b><br /></font>\n\n";
 
 if ($date_format != 6) {
     /* First, display the clock. */
@@ -997,17 +973,9 @@ if ($date_format != 6) {
 }
 
 /* Next, display the refresh button. */
-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;
-}
+echo '<small>(<a href="../src/left_main.php" target="left">'.
+     _("refresh folder list") . '</a>)</small></center><br />';
 
-global $data_dir;
 /* Lastly, display the folder list. */
 if ( $collapse_folders ) {
     /* If directed, collapse or uncollapse a folder. */
@@ -1097,7 +1065,7 @@ for ($i = 0; $i < count($boxes); $i++) {
 } else {  /* expiremental code */
     $boxes = sqimap_mailbox_tree($imapConnection);
     if (isset($advanced_tree) && $advanced_tree) {
-        echo '<form name="collapse" action="' . SM_PATH . 'src/left_main.php" method="post" ' .
+        echo '<form name="collapse" action="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 />';
@@ -1113,15 +1081,10 @@ for ($i = 0; $i < count($boxes); $i++) {
         ListBoxes($boxes);
     }
 } /* if ($oldway) else ... */
-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";
+do_hook('left_main_after');
+sqimap_logout($imapConnection);
+
+echo '</td></tr></table>' . "\n".
+    "</div></body></html>\n";
 
-?>
+?>

+ 1 - 34
src/login.php

@@ -175,43 +175,10 @@ echo html_tag( 'table',
         '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";
-?>
+?>

+ 2 - 2
src/move_messages.php

@@ -238,5 +238,5 @@ if ($exception) {
     header("Location: $location");
     exit;
 }
-noframes_bottom();
-?>
+?>
+</BODY></HTML>

+ 4 - 9
src/options.php

@@ -291,10 +291,7 @@ if ($optpage == SMOPT_PAGE_MAIN) {
         /* If $max_refresh != SMOPT_REFRESH_NONE, provide a refresh link. */
         if ( !isset( $max_refresh ) ) {
         } else if ($max_refresh == SMOPT_REFRESH_FOLDERLIST) {
-            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>';
+            echo '<a href="../src/left_main.php" target="left">' . _("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>';
         }
@@ -454,9 +451,7 @@ if ($optpage == SMOPT_PAGE_MAIN) {
 echo        '</td></tr>' .
         '</table>'.
         '</td></tr>'.
-     '</table>';
+     '</table>' .
+     '</body></html>';
 
-noframes_bottom();
-
-
-?>
+?>

+ 1 - 2
src/options_highlight.php

@@ -469,5 +469,4 @@ if ($action == 'edit' || $action == 'add') {
 }
 do_hook('options_highlight_bottom');
 ?>
-</table>
-<?php noframes_bottom(); ?>
+</table></body></html>

+ 3 - 2
src/options_identities.php

@@ -88,8 +88,9 @@ if (!empty($_POST)) {
                '', '', 'width="100%" border="0" cellpadding="1" cellspacing="1"' ) ,
            'center', $color[0] )
        ) ,
-   'center', '', 'width="95%" border="0" cellpadding="2" cellspacing="0"' );
-   noframes_bottom();
+   'center', '', 'width="95%" border="0" cellpadding="2" cellspacing="0"' ) .
+
+   '</body></html>';
 
     function SaveUpdateFunction() {
         global $username, $data_dir, $full_name, $email_address, $reply_to, $signature;

+ 1 - 1
src/options_order.php

@@ -149,4 +149,4 @@ displayPageHeader($color, 'None');
 
 </td></tr>
 </table>
-<?php noframes_bottom(); ?>
+</body></html>

+ 3 - 2
src/read_body.php

@@ -846,5 +846,6 @@ sqimap_logout($imapConnection);
    them at the end so we avoid double session_register calls */
 sqsession_register($messages,'messages');
 
-noframes_bottom();
-?>
+?>
+</body>
+</html>

+ 0 - 22
src/redirect.php

@@ -94,28 +94,6 @@ if (!sqsession_is_registered('user_is_logged_in')) {
     $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');
 
 }

+ 3 - 2
src/right_main.php

@@ -237,6 +237,7 @@ if ($use_mailbox_cache && sqsession_is_registered('msgs')) {
 }
 do_hook('right_main_bottom');
 sqimap_logout ($imapConnection);
-noframes_bottom();
 
-?>
+echo '</body></html>';
+
+?>

+ 2 - 2
src/search.php

@@ -1082,6 +1082,6 @@ if ($submit == $search_button_text) {
 
 do_hook('search_bottom');
 sqimap_logout($imapConnection);
-noframes_bottom();
+echo '</body></html>';
 
-?>
+?>

+ 3 - 3
src/vcard.php

@@ -218,7 +218,7 @@ echo '</select>' .
 
         '<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=2 ALIGN=CENTER>' .
         '<TR><TD BGCOLOR="' . $color[4] . '">' .
-        '</TD></TR></TABLE>';
-        noframes_bottom();
+        '</TD></TR></TABLE>' .
+        '</body></html>';
 
-?>
+?>

+ 1 - 1
src/view_header.php

@@ -103,7 +103,7 @@ function view_header($header, $mailbox, $color) {
            '</tt></nobr>',
            '</td></tr></table>'."\n" 
          ) );
-    noframes_bottom();
+    echo '</body></html>';
 }
 
 /* get global vars */

+ 3 - 3
src/view_text.php

@@ -86,6 +86,6 @@ echo '<BR><TABLE WIDTH="100%" BORDER=0 CELLSPACING=0 CELLPADDING=2 ALIGN=CENTER>
      '</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>';
-     noframes_bottom();
-?>
+     $body . '</TT></TD></TR></TABLE>' .
+     '</body></html>';
+?>

+ 1 - 38
src/webmail.php

@@ -37,30 +37,12 @@ sqsession_is_active();
 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 = '';
 }
@@ -83,25 +65,6 @@ if ($my_language != $squirrelmail_language) {
 
 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&amp;sort=$sort&amp;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".