From dcc1cc825e550711d0207a737f9ea3ac2b38e923 Mon Sep 17 00:00:00 2001 From: cigamit Date: Mon, 1 Dec 2003 21:56:59 +0000 Subject: [PATCH] Back out support for using SM without Frames git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@6228 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- AUTHORS | 1 - ChangeLog | 1 - config/conf.pl | 124 ++++++---------- functions/global.php | 4 +- functions/mailbox_display.php | 21 +-- functions/noframes.php | 105 -------------- functions/page_header.php | 16 +-- include/validate.php | 1 - plugins/abook_take/take.php | 5 +- plugins/administrator/options.php | 4 +- plugins/bug_report/bug_report.php | 3 +- plugins/calendar/calendar.php | 2 +- plugins/calendar/day.php | 3 +- plugins/calendar/event_create.php | 3 +- plugins/calendar/event_delete.php | 3 +- plugins/calendar/event_edit.php | 3 +- plugins/filters/options.php | 3 +- plugins/filters/spamoptions.php | 5 +- plugins/info/options.php | 4 +- plugins/listcommands/mailout.php | 6 +- plugins/mail_fetch/fetch.php | 5 +- plugins/mail_fetch/options.php | 5 +- .../message_details/message_details_top.php | 2 +- plugins/message_details/setup.php | 2 +- plugins/newmail/newmail_opt.php | 6 +- plugins/spamcop/options.php | 4 +- plugins/spamcop/spamcop.php | 3 +- plugins/squirrelspell/sqspell_functions.php | 2 +- plugins/translate/options.php | 4 +- src/addrbook_search_html.php | 12 +- src/addressbook.php | 7 +- src/compose.php | 3 +- src/empty_trash.php | 5 +- src/folders.php | 33 ++--- src/help.php | 5 +- src/image.php | 4 +- src/left_main.php | 135 +++++++----------- src/login.php | 35 +---- src/move_messages.php | 4 +- src/options.php | 13 +- src/options_highlight.php | 3 +- src/options_identities.php | 5 +- src/options_order.php | 2 +- src/read_body.php | 5 +- src/redirect.php | 22 --- src/right_main.php | 5 +- src/search.php | 4 +- src/vcard.php | 6 +- src/view_header.php | 2 +- src/view_text.php | 6 +- src/webmail.php | 39 +---- 51 files changed, 192 insertions(+), 513 deletions(-) delete mode 100644 functions/noframes.php diff --git a/AUTHORS b/AUTHORS index 4d54627a..849a704e 100644 --- a/AUTHORS +++ b/AUTHORS @@ -17,7 +17,6 @@ THE SQUIRRELMAIL TEAM Seth E. Randall Thijs Kinkhorst Tomas Kuliavas http://www.topolis.lt - Jimmy Conner http://sqmail.org Past Developers, now retired: ----------------------------- diff --git a/ChangeLog b/ChangeLog index 4c27bbe4..a1d2a08e 100644 --- a/ChangeLog +++ b/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 *** diff --git a/config/conf.pl b/config/conf.pl index 8990b0ec..f2cd4071 100755 --- a/config/conf.pl +++ b/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 = ; - $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'; diff --git a/functions/global.php b/functions/global.php index 8ef497c8..3b06a8e3 100644 --- a/functions/global.php +++ b/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"); } /** diff --git a/functions/mailbox_display.php b/functions/mailbox_display.php index e7b4c39c..aa15493b 100644 --- a/functions/mailbox_display.php +++ b/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 = "$text"; + . "TARGET=\"right\">$text"; return ($result); /* if (preg_match('/^(.+)\?.+$/',$PHP_SELF,$regs)) { @@ -1020,7 +1016,7 @@ function get_paginator_link($box, $start_msg, $use, $text) { $result = '$text"; + . "TARGET=\"right\">$text"; 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 = "" ._("Paginate") . '' . $spc; + . "TARGET=\"right\">" ._("Paginate") . '' . $spc; } /* If necessary, compute the 'show all' string. */ if (($prv_str != '') || ($nxt_str != '')) { $all_str = "" . _("Show All") . ''; + . "TARGET=\"right\">" . _("Show All") . ''; } /* Last but not least, get the value for the toggle all link. */ diff --git a/functions/noframes.php b/functions/noframes.php deleted file mode 100644 index 6c98bb8f..00000000 --- a/functions/noframes.php +++ /dev/null @@ -1,105 +0,0 @@ -\n"; - echo ""; - echo ""; - echo ""; - echo "\n"; - do_hook('left_main_before'); - echo "
"; - echo "
\n"; - echo "
\n"; - echo "" . _("Folders") . "
\n"; - require_once(SM_PATH . 'src/left_main.php'); - echo "
\n

\n"; - do_hook('left_main_after'); - echo "\n\n"; - } else { - echo "\n"; - echo ""; - echo ""; - echo "
\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 "
\n"; - echo ""; - } else { - $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 10); // the 10 is to hide the output - echo "\n\n"; - do_hook('left_main_before'); - echo "
"; - echo "
\n"; - echo "
\n"; - echo "" . _("Folders") . "
\n"; - require_once(SM_PATH . 'src/left_main.php'); - echo "
\n

\n"; - do_hook('left_main_after'); - echo "\n"; - echo "\n"; - } -} - -?> \ No newline at end of file diff --git a/functions/page_header.php b/functions/page_header.php index 9999df71..5aca335a 100644 --- a/functions/page_header.php +++ b/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 "\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 "\n\n"; - - } -?> \ No newline at end of file +?> diff --git a/include/validate.php b/include/validate.php index 00fbb9cd..8738cc35 100644 --- a/include/validate.php +++ b/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) { diff --git a/plugins/abook_take/take.php b/plugins/abook_take/take.php index ed18e8f6..8e5e5a88 100644 --- a/plugins/abook_take/take.php +++ b/plugins/abook_take/take.php @@ -113,6 +113,5 @@ echo '
' ."\n ''; } ?> -
- - + + diff --git a/plugins/administrator/options.php b/plugins/administrator/options.php index f5ba00d1..7f95e5b6 100644 --- a/plugins/administrator/options.php +++ b/plugins/administrator/options.php @@ -606,6 +606,4 @@ if( $fp = @fopen( $cfgfile, 'w' ) ) { _("Config file can't be opened. Please check config.php."). ''; } -noframes_bottom(); - -?> \ No newline at end of file +?> diff --git a/plugins/bug_report/bug_report.php b/plugins/bug_report/bug_report.php index 344b093b..ad8fb3bb 100644 --- a/plugins/bug_report/bug_report.php +++ b/plugins/bug_report/bug_report.php @@ -196,5 +196,4 @@ $body = htmlspecialchars($body_top . $body); - - + diff --git a/plugins/calendar/calendar.php b/plugins/calendar/calendar.php index 659738c3..8091cf9e 100644 --- a/plugins/calendar/calendar.php +++ b/plugins/calendar/calendar.php @@ -176,5 +176,5 @@ startcalendar(); drawmonthview(); endcalendar(); -noframes_bottom(); ?> + diff --git a/plugins/calendar/day.php b/plugins/calendar/day.php index e3a9a732..3eff1df7 100644 --- a/plugins/calendar/day.php +++ b/plugins/calendar/day.php @@ -179,5 +179,4 @@ initialize_events(); display_events(); ?> - - + diff --git a/plugins/calendar/event_create.php b/plugins/calendar/event_create.php index a439ffc1..c10aaed7 100644 --- a/plugins/calendar/event_create.php +++ b/plugins/calendar/event_create.php @@ -208,5 +208,4 @@ if(!isset($event_text)){ ?> - - + diff --git a/plugins/calendar/event_delete.php b/plugins/calendar/event_delete.php index b45863e9..eee5ab0f 100644 --- a/plugins/calendar/event_delete.php +++ b/plugins/calendar/event_delete.php @@ -177,5 +177,4 @@ if (isset($dyear) && isset($dmonth) && isset($dday) && isset($dhour) && isset($d ?> - - + diff --git a/plugins/calendar/event_edit.php b/plugins/calendar/event_edit.php index a5e6be16..9331262c 100644 --- a/plugins/calendar/event_edit.php +++ b/plugins/calendar/event_edit.php @@ -327,5 +327,4 @@ if (!isset($updated)){ ?> - - + diff --git a/plugins/filters/options.php b/plugins/filters/options.php index 74eb85f5..3d2f60ae 100644 --- a/plugins/filters/options.php +++ b/plugins/filters/options.php @@ -239,6 +239,5 @@ sqgetGlobalVar('action', $action, SQ_GET); html_tag( 'td', ' ', 'left' ) ) , 'center', '', 'width="80%" border="0" cellpadding="2" cellspacing="0"' ); - noframes_bottom(); - + echo ''; ?> \ No newline at end of file diff --git a/plugins/filters/spamoptions.php b/plugins/filters/spamoptions.php index 52c255bc..7f6491c7 100644 --- a/plugins/filters/spamoptions.php +++ b/plugins/filters/spamoptions.php @@ -178,8 +178,7 @@ if (isset($action) && $action == 'spam') { ''. ''. ''; - noframes_bottom(); - + echo ''; } if (! isset($_GET['action']) || $_GET['action'] != 'spam') { @@ -222,7 +221,7 @@ if (! isset($_GET['action']) || $_GET['action'] != 'spam') { echo "\n"; } echo ''; - noframes_bottom(); + echo ''; } ?> \ No newline at end of file diff --git a/plugins/info/options.php b/plugins/info/options.php index c5f2a352..9eb2ce69 100644 --- a/plugins/info/options.php +++ b/plugins/info/options.php @@ -157,9 +157,7 @@ if ($submit == 'submit') { print "
\n"; } } - print ""; - noframes_bottom(); - + print ""; sqimap_logout($imap_stream); do_hook('info_bottom'); ?> diff --git a/plugins/listcommands/mailout.php b/plugins/listcommands/mailout.php index 4af179fb..5d08b20b 100644 --- a/plugins/listcommands/mailout.php +++ b/plugins/listcommands/mailout.php @@ -76,7 +76,5 @@ echo '
' . '' . '' . '

' -. '

'; -noframes_bottom(); - -?> \ No newline at end of file +. '

'; +?> diff --git a/plugins/mail_fetch/fetch.php b/plugins/mail_fetch/fetch.php index 0a7c73ba..26260ed5 100644 --- a/plugins/mail_fetch/fetch.php +++ b/plugins/mail_fetch/fetch.php @@ -127,7 +127,7 @@ sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION); echo '

' . _("No POP3 servers configured yet.") . '

'; displayInternalLink('plugins/mail_fetch/options.php', _("Click here to go to the options page.") ); - noframes_bottom(); + echo ''; exit(); } @@ -321,4 +321,5 @@ sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION); ?> - + + diff --git a/plugins/mail_fetch/options.php b/plugins/mail_fetch/options.php index 58e036c8..5ac6ae26 100644 --- a/plugins/mail_fetch/options.php +++ b/plugins/mail_fetch/options.php @@ -384,5 +384,6 @@ sqgetGlobalVar('submit_mailfetch', $submit_mailfetch, SQ_POST); ) , 'center', '', 'width="70%"' ); } - noframes_bottom(); -?> \ No newline at end of file + + ?> + diff --git a/plugins/message_details/message_details_top.php b/plugins/message_details/message_details_top.php index a9e4b2c1..e2808f0e 100644 --- a/plugins/message_details/message_details_top.php +++ b/plugins/message_details/message_details_top.php @@ -47,4 +47,4 @@ echo "'. ''. "\n"; -?> \ No newline at end of file +?> diff --git a/plugins/message_details/setup.php b/plugins/message_details/setup.php index d0999e23..7977da8c 100644 --- a/plugins/message_details/setup.php +++ b/plugins/message_details/setup.php @@ -52,4 +52,4 @@ function show_message_details() { echo $result; } -?> \ No newline at end of file +?> diff --git a/plugins/newmail/newmail_opt.php b/plugins/newmail/newmail_opt.php index 01197b4f..edf59b1e 100644 --- a/plugins/newmail/newmail_opt.php +++ b/plugins/newmail/newmail_opt.php @@ -158,7 +158,7 @@ if ($allowsound == "true") { ) . "\n" . ''. "\n" . ''. "\n" . - ''. "\n"; - noframes_bottom(); + ''. "\n" . +''; -?> \ No newline at end of file +?> diff --git a/plugins/spamcop/options.php b/plugins/spamcop/options.php index 5d3ef5b3..8c4c1e0e 100755 --- a/plugins/spamcop/options.php +++ b/plugins/spamcop/options.php @@ -172,5 +172,5 @@ echo "

\n"; echo "

"; echo _("For more information about SpamCop, it's services, spam in general, and many related topics, try reading through SpamCop's Help and Feedback section."); echo "

\n"; -noframes_bottom(); -?> \ No newline at end of file +?> + diff --git a/plugins/spamcop/spamcop.php b/plugins/spamcop/spamcop.php index 0fb65efa..c7b1397c 100644 --- a/plugins/spamcop/spamcop.php +++ b/plugins/spamcop/spamcop.php @@ -189,4 +189,5 @@ echo "

"; - + + diff --git a/plugins/squirrelspell/sqspell_functions.php b/plugins/squirrelspell/sqspell_functions.php index ffda1b3d..43a03133 100644 --- a/plugins/squirrelspell/sqspell_functions.php +++ b/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\n"; - noframes_bottom(); + echo ''; } /** diff --git a/plugins/translate/options.php b/plugins/translate/options.php index 1636bfb3..ed6170b7 100644 --- a/plugins/translate/options.php +++ b/plugins/translate/options.php @@ -185,7 +185,7 @@ require_once(SM_PATH . 'include/load_prefs.php'); ''. ''. ''. - ''; - noframes_bottom(); + ''. +"\n"; ?> diff --git a/src/addrbook_search_html.php b/src/addrbook_search_html.php index e9702ac5..887c9370 100644 --- a/src/addrbook_search_html.php +++ b/src/addrbook_search_html.php @@ -276,14 +276,14 @@ else { echo html_tag( 'p', '
' . _("Your search failed with the following error(s)") . ':
' . $abook->error . "
\n" , - 'center' ); - noframes_bottom(); + 'center' ) . + "\n\n"; } else { if (sizeof($res) == 0) { echo html_tag( 'p', '
' . _("No persons matching your search was found") . "\n" , - 'center' ); - noframes_bottom(); + 'center' ) . + "\n\n"; } else { addr_display_result($res); } @@ -299,5 +299,5 @@ if ($addrquery == '' || sizeof($res) == 0) { ''; } -noframes_bottom(); -?> \ No newline at end of file +?> + diff --git a/src/addressbook.php b/src/addressbook.php index d8d53bf1..a01466db 100644 --- a/src/addressbook.php +++ b/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 "\n"; exit(); } } @@ -436,5 +436,6 @@ echo ''; /* Add hook for anything that wants on the bottom */ do_hook('addressbook_bottom'); -noframes_bottom(); -?> \ No newline at end of file +?> + + diff --git a/src/compose.php b/src/compose.php index 36a1fb86..2bdacca4 100644 --- a/src/compose.php +++ b/src/compose.php @@ -1166,8 +1166,7 @@ function showInputForm ($session, $values=false) { } do_hook('compose_bottom'); - if ($compose_new_win != '1') - noframes_bottom(); + echo '' . "\n"; } diff --git a/src/empty_trash.php b/src/empty_trash.php index 8f2c322f..b34af88c 100644 --- a/src/empty_trash.php +++ b/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); ?> diff --git a/src/folders.php b/src/folders.php index 866f9d42..7e4966ee 100644 --- a/src/folders.php +++ b/src/folders.php @@ -72,25 +72,15 @@ if ( isset($success) && $success ) { $td_str .= '
'; - if (isset($use_frames) && $use_frames) { - echo html_tag( 'table', - html_tag( 'tr', - html_tag( 'td', $td_str . - '' . - _("refresh folder list") . '' , - 'center' ) - ) , - 'center', '', 'width="100%" cellpadding="4" cellspacing="0" border="0"' ); - } else { - echo html_tag( 'table', - html_tag( 'tr', - html_tag( 'td', $td_str . - '' . - _("refresh folder list") . '' , - 'center' ) - ) , - 'center', '', 'width="100%" cellpadding="4" cellspacing="0" border="0"' ); - } + + echo html_tag( 'table', + html_tag( 'tr', + html_tag( 'td', $td_str . + '' . + _("refresh folder list") . '' , + 'center' ) + ) , + 'center', '', 'width="100%" cellpadding="4" cellspacing="0" border="0"' ); } echo "\n
"; @@ -346,5 +336,6 @@ do_hook('folders_bottom'); \ No newline at end of file +?> + + diff --git a/src/help.php b/src/help.php index d37b1704..3d9fec9c 100644 --- a/src/help.php +++ b/src/help.php @@ -208,6 +208,5 @@ do_hook('help_bottom'); echo html_tag( 'tr', html_tag( 'td', ' ', 'left', $color[0] ) ). - ''; - noframes_bottom(); -?> \ No newline at end of file + ''; +?> diff --git a/src/image.php b/src/image.php index 11d26624..a91f96a4 100644 --- a/src/image.php +++ b/src/image.php @@ -61,6 +61,6 @@ echo '' . "\n" . '' . '' . "\n"; - noframes_bottom(); + '' . "\n"; -?> \ No newline at end of file +?> diff --git a/src/left_main.php b/src/left_main.php index 5a11258f..4282f5d8 100644 --- a/src/left_main.php +++ b/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(' ','',$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 .= ''; + $line .= ''; } if ($special_color) { $line .= ""; @@ -104,7 +99,7 @@ function formatMailboxName($imapConnection, $box_array) { if (($numMessages > 0) or ($box_array['parent'] == 1)) { $urlMailbox = urlencode($real_box); $line .= "\n\n" . - "  ("._("purge").")" . + "  ("._("purge").")" . ""; } 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 = '+"; } 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 = ''; $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 = '$leader+ "; } else { @@ -366,11 +356,6 @@ function ListBoxes ($boxes, $j=0 ) { $pre.= $leader . '  '; } - 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 .= ''; } - $pre .= ""; + $pre .= ""; if ($unseen > 0) { $end .= ''; } @@ -388,7 +373,7 @@ function ListBoxes ($boxes, $j=0 ) { if ($unseen > 0) { $pre .= ''; } - $pre .= ""; + $pre .= ""; if ($unseen > 0) { $end .= ''; } @@ -397,7 +382,7 @@ function ListBoxes ($boxes, $j=0 ) { $end .= " $unseen_string"; } $end .= "\n\n" . - "  ("._("purge").")" . + "  ("._("purge").")" . ""; } } else { @@ -405,7 +390,7 @@ function ListBoxes ($boxes, $j=0 ) { if ($unseen > 0) { $pre .= ''; } - $pre .= ""; + $pre .= ""; if ($unseen > 0) { $end .= ''; } @@ -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 = "" . $pre; + $pre = "" . $pre; $end .= ''; if ($numMessages > 0) { $urlMailbox = urlencode($mailbox); $end .= "\n\n" . - "  ("._("purge").")" . + "  ("._("purge").")" . ""; } } else { if (!$boxes->is_noselect) { /* \Noselect boxes can't be selected */ - $pre = "" . $pre; + $pre = "" . $pre; $end .= ''; } } @@ -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\n" . "\n". - "\n"; + "\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\n"; - else - echo "\n\n"; - - do_hook('left_main_before'); - if ($advanced_tree) { - /* nice future feature, needs layout !! volunteers? */ - $right_pos = $left_size - 20; - /* echo '
'; - echo ''; - echo ''; - echo '
'; - echo '


';*/ - } + " bgcolor=\"$color[3]\" text=\"$color[6]\" link=\"$color[6]\" vlink=\"$color[6]\" alink=\"$color[6]\">\n"; +else + echo "\n\n"; + +do_hook('left_main_before'); +if ($advanced_tree) { + /* nice future feature, needs layout !! volunteers? */ + $right_pos = $left_size - 20; +/* echo '
'; + echo ''; + echo ''; + echo '
'; + echo '


';*/ } + 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) - '
'. _("Folders") . "
\n\n"; + html_tag( 'td', '', 'left' ) . + '
'. _("Folders") . "
\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 '('. - _("refresh folder list") . ')

'; -} else { -// echo '('. -// _("refresh folder list") . ')

'; - echo '
'; - $collapse_folders = 0; -} +echo '('. + _("refresh folder list") . ')
'; -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 '
'; echo '

'; @@ -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 '
' . "\n"; -if ($use_frames) - echo "
\n"; -else - echo "
\n"; +do_hook('left_main_after'); +sqimap_logout($imapConnection); + +echo '' . "\n". + "\n"; -?> \ No newline at end of file +?> diff --git a/src/login.php b/src/login.php index fd41eafe..10584e20 100644 --- a/src/login.php +++ b/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 "
\n"; - echo " ' . _("Frames") . "\n"; - echo "\n"; - echo " ' . _("No Frames") . "\n"; - echo "
\n"; -} - do_hook('login_form'); echo '' . "\n"; do_hook('login_bottom'); echo "\n". "\n"; -?> \ No newline at end of file +?> diff --git a/src/move_messages.php b/src/move_messages.php index 2cd0f307..7a2ba7e1 100644 --- a/src/move_messages.php +++ b/src/move_messages.php @@ -238,5 +238,5 @@ if ($exception) { header("Location: $location"); exit; } -noframes_bottom(); -?> \ No newline at end of file +?> + diff --git a/src/options.php b/src/options.php index 9d9c45a1..1bf50510 100644 --- a/src/options.php +++ b/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 '' . _("Refresh Folder List") . '
'; - else - echo '' . _("Refresh Folder List") . '
'; + echo '' . _("Refresh Folder List") . '
'; } else if ($max_refresh) { echo '' . _("Refresh Page") . '
'; } @@ -454,9 +451,7 @@ if ($optpage == SMOPT_PAGE_MAIN) { echo '' . ''. ''. - ''; + '' . + ''; -noframes_bottom(); - - -?> \ No newline at end of file +?> diff --git a/src/options_highlight.php b/src/options_highlight.php index 37d9b28e..79e2d2ae 100644 --- a/src/options_highlight.php +++ b/src/options_highlight.php @@ -469,5 +469,4 @@ if ($action == 'edit' || $action == 'add') { } do_hook('options_highlight_bottom'); ?> - - + diff --git a/src/options_identities.php b/src/options_identities.php index bad3b3af..91744c79 100644 --- a/src/options_identities.php +++ b/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"' ) . + + ''; function SaveUpdateFunction() { global $username, $data_dir, $full_name, $email_address, $reply_to, $signature; diff --git a/src/options_order.php b/src/options_order.php index 32198397..20805e3d 100644 --- a/src/options_order.php +++ b/src/options_order.php @@ -149,4 +149,4 @@ displayPageHeader($color, 'None'); - + diff --git a/src/read_body.php b/src/read_body.php index 84144d6b..bc267c6b 100644 --- a/src/read_body.php +++ b/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(); -?> \ No newline at end of file +?> + + diff --git a/src/redirect.php b/src/redirect.php index 93d61fc6..4ffa1bae 100644 --- a/src/redirect.php +++ b/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'); } diff --git a/src/right_main.php b/src/right_main.php index 9558cdba..1d3ef5e5 100644 --- a/src/right_main.php +++ b/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(); -?> \ No newline at end of file +echo ''; + +?> diff --git a/src/search.php b/src/search.php index e3805a32..11538d92 100644 --- a/src/search.php +++ b/src/search.php @@ -1082,6 +1082,6 @@ if ($submit == $search_button_text) { do_hook('search_bottom'); sqimap_logout($imapConnection); -noframes_bottom(); +echo ''; -?> \ No newline at end of file +?> diff --git a/src/vcard.php b/src/vcard.php index 1d669d10..c6f3d112 100644 --- a/src/vcard.php +++ b/src/vcard.php @@ -218,7 +218,7 @@ echo '' . '' . '
' . - '
'; - noframes_bottom(); + '' . + ''; -?> \ No newline at end of file +?> diff --git a/src/view_header.php b/src/view_header.php index 29055934..4f86662d 100644 --- a/src/view_header.php +++ b/src/view_header.php @@ -103,7 +103,7 @@ function view_header($header, $mailbox, $color) { '
', ''."\n" ) ); - noframes_bottom(); + echo ''; } /* get global vars */ diff --git a/src/view_text.php b/src/view_text.php index e15000ad..88210f1c 100644 --- a/src/view_text.php +++ b/src/view_text.php @@ -86,6 +86,6 @@ echo '
'
' . '
' . '
' . - $body . '
'; - noframes_bottom(); -?> \ No newline at end of file + $body . '' . + ''; +?> diff --git a/src/webmail.php b/src/webmail.php index c4ef5b8c..9825da3d 100644 --- a/src/webmail.php +++ b/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&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 "\n". "\n" . "$org_title\n". -- 2.25.1