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:
-----------------------------
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 ***
if (!$show_alternative_names ) {
$show_alternative_names = 'false';
}
+if ( !$allow_frames ) {
+ $allow_frames = 1;
+}
if (!$available_languages ) {
$available_languages = 'all';
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 "14. HTML Frame Settings : $WHT";
+ if ( $allow_frames == 1) {
+ print "Force Frames Only";
+ }
+ if ( $allow_frames == 2) {
+ print "Force No Frames Only";
+ }
+ if ( $allow_frames == 3) {
+ print "User Select, Default to Frames";
+ }
+ if ( $allow_frames == 4) {
+ print "User Select, Default to No Frames";
+ }
+ print "$NRM\n";
print "\n";
print "R Return to Main Menu\n";
} elsif ( $menu == 5 ) {
elsif ( $command == 10 ) { $allow_thread_sort = command312(); }
elsif ( $command == 11 ) { $allow_server_sort = command313(); }
elsif ( $command == 12 ) { $allow_charset_search = command314(); }
- elsif ( $command == 13 ) { $session_name = command316(); }
+ elsif ( $command == 13 ) { $session_name = command316(); }
+ elsif ( $command == 14 ) { $allow_frames = command317(); }
} elsif ( $menu == 5 ) {
if ( $command == 1 ) { command41(); }
elsif ( $command == 2 ) { $theme_css = command42(); }
return $new_session_name;
}
-
+sub command317 {
+ print "This option allows you to select whether to allow or disallow frames\n";
+ print "or no frames usage, and what to default to on the login screen.\n";
+ print "Note: When a user selects to use Frames or No Frames, it is stored\n";
+ print " in a cookie, which will override the site default when they\n";
+ print " next visit the login page.\n";
+ if ($allow_frames == 1) { print "--> "; }else{print " ";}
+ print "1. Force Frames Only\n";
+ if ($allow_frames == 2) { print "--> "; }else{print " ";}
+ print "2. Force No Frames Only\n";
+ if ($allow_frames == 3) { print "--> "; }else{print " ";}
+ print "3. 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 ";
print CF "\$smtp_auth_mech = '$smtp_auth_mech';\n";
print CF "\$imap_auth_mech = '$imap_auth_mech';\n";
# boolean
- print CF "\$use_imap_tls = $use_imap_tls;\n";
- print CF "\$use_smtp_tls = $use_smtp_tls;\n";
+ print CF "\$use_imap_tls = $use_imap_tls;\n";
+ print CF "\$use_smtp_tls = $use_smtp_tls;\n";
+
+ print CF "\$session_name = '$session_name';\n";
- print CF "\$session_name = '$session_name';\n";
+ print CF "\n";
+
+ print CF "\$allow_frames = $allow_frames;\n";
- print CF "\n";
+ print CF "\n";
# boolean
print CF "\$advanced_tree = $advanced_tree;\n";
else {
$_SESSION["$name"] = $var;
}
- session_register("$name");
+ @session_register("$name");
}
/**
else {
unset($_SESSION[$name]);
}
- session_unregister("$name");
+ @session_unregister("$name");
}
/**
* Generate a paginator link.
*/
function get_paginator_link($box, $start_msg, $use, $text) {
- global $PHP_SELF;
+ global $PHP_SELF, $use_frames;
+ if ($use_frames)
+ $target = 'right';
+ else
+ $target = '';
$result = "<A HREF=\"right_main.php?use_mailbox_cache=$use"
. "&startMessage=$start_msg&mailbox=$box\" "
- . "TARGET=\"right\">$text</A>";
+ . "TARGET=\"$target\">$text</A>";
return ($result);
/*
if (preg_match('/^(.+)\?.+$/',$PHP_SELF,$regs)) {
$result = '<A HREF="'. $source_url . "?use_mailbox_cache=$use"
. "&startMessage=$start_msg&mailbox=$box\" "
- . "TARGET=\"right\">$text</A>";
+ . "TARGET=\"$target\">$text</A>";
return ($result);
*/
}
*/
function get_paginator_str($box, $start_msg, $end_msg, $num_msgs,
$show_num, $sort) {
- global $username, $data_dir, $use_mailbox_cache, $color, $PG_SHOWNUM;
+ global $username, $data_dir, $use_mailbox_cache, $color, $PG_SHOWNUM, $use_frames;
/* Initialize paginator string chunks. */
$prv_str = '';
$all_str = '';
$tgl_str = '';
+ if ($use_frames)
+ $target = 'right';
+ else
+ $target = '';
+
$box = urlencode($box);
/* Create simple strings that will be creating the paginator. */
} else if ($PG_SHOWNUM == 999999) {
$pg_str = "<A HREF=\"right_main.php?PG_SHOWALL=0"
. "&use_mailbox_cache=$use&startMessage=1&mailbox=$box\" "
- . "TARGET=\"right\">" ._("Paginate") . '</A>' . $spc;
+ . "TARGET=\"$target\">" ._("Paginate") . '</A>' . $spc;
}
/* If necessary, compute the 'show all' string. */
if (($prv_str != '') || ($nxt_str != '')) {
$all_str = "<A HREF=\"right_main.php?PG_SHOWALL=1"
. "&use_mailbox_cache=$use&startMessage=1&mailbox=$box\" "
- . "TARGET=\"right\">" . _("Show All") . '</A>';
+ . "TARGET=\"$target\">" . _("Show All") . '</A>';
}
/* Last but not least, get the value for the toggle all link. */
* @param string target the target frame for this link
*/
function makeInternalLink($path, $text, $target='') {
+ global $use_frames;
sqgetGlobalVar('base_uri', $base_uri, SQ_SESSION);
- if ($target != '') {
- $target = " target=\"$target\"";
- }
+ if (isset($use_frames) && $use_frames) {
+ if ($target != '')
+ $target = " target=\"$target\"";
+ } else
+ $target='';
+
$hooktext = do_hook_function('internal_link',$text);
if ($hooktext != '')
$text = $hooktext;
}
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));
}
echo "<body text=\"$color[8]\" bgcolor=\"$color[4]\" link=\"$color[7]\" vlink=\"$color[7]\" alink=\"$color[7]\" $onload>\n\n";
+
+
}
-?>
+?>
\ No newline at end of file
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) {
'</table>';
}
?>
-</form></body>
-</html>
+</form>
+<?php noframes_bottom(); ?>
+
_("Config file can't be opened. Please check config.php.").
'</font>';
}
-?>
+noframes_bottom();
+
+?>
\ No newline at end of file
</tr>
</table>
</form>
-</body></html>
+<?php noframes_bottom(); ?>
+
drawmonthview();
endcalendar();
+noframes_bottom();
?>
-</body></html>
display_events();
?>
</table></td></tr></table>
-</body></html>
+<?php noframes_bottom(); ?>
+
?>
</table></td></tr></table>
-</body></html>
+<? php noframes_bottom(); ?>
+
?>
</table></td></tr></table>
-</body></html>
+<?php noframes_bottom(); ?>
+
?>
</table></td></tr></table>
-</body></html>
+<?php noframes_bottom(); ?>
+
html_tag( 'td', ' ', 'left' )
) ,
'center', '', 'width="80%" border="0" cellpadding="2" cellspacing="0"' );
- echo '</body></html>';
+ noframes_bottom();
+
?>
\ No newline at end of file
'</table>'.
'</center>'.
'</form>';
- echo '</body></html>';
+ noframes_bottom();
+
}
if (! isset($_GET['action']) || $_GET['action'] != 'spam') {
echo "</td></tr>\n";
}
echo '</table>';
- echo '</body></html>';
+ noframes_bottom();
}
?>
\ No newline at end of file
print "</TD><TR></TABLE></CENTER><BR>\n";
}
}
- print "</TD></TR></TABLE></CENTER></BODY></HTML>";
+ print "</TD></TR></TABLE></CENTER>";
+ noframes_bottom();
+
sqimap_logout($imap_stream);
do_hook('info_bottom');
?>
. '<input type="hidden" name="body" value="' . htmlspecialchars($body) . '">'
. '<input type="hidden" name="mailbox" value="' . htmlspecialchars($mailbox) . '">'
. '<input type="submit" name="send" value="' . _("Send Mail") . '"><br /><br /></center>'
-. '</form></td></tr></table></p></body></html>';
-?>
+. '</form></td></tr></table></p>';
+noframes_bottom();
+
+?>
\ No newline at end of file
echo '<p>' . _("No POP3 servers configured yet.") . '</p>';
displayInternalLink('plugins/mail_fetch/options.php',
_("Click here to go to the options page.") );
- echo '</body></html>';
+ noframes_bottom();
exit();
}
?>
</center>
-</body>
-</html>
+<?php noframes_bottom(); ?>
) ,
'center', '', 'width="70%"' );
}
-
- ?>
-</body></html>
+ noframes_bottom();
+?>
\ No newline at end of file
'</b>'.
'</body>'.
"</html>\n";
-?>
+?>
\ No newline at end of file
echo $result;
}
-?>
+?>
\ No newline at end of file
) . "\n" .
'</table>'. "\n" .
'</form>'. "\n" .
- '</td></tr></table>'. "\n" .
-'</body></html>';
+ '</td></tr></table>'. "\n";
+ noframes_bottom();
-?>
+?>
\ No newline at end of file
echo "<p>";
echo _("<b>For more information</b> about SpamCop, it's services, spam in general, and many related topics, try reading through SpamCop's <a href=\"http://spamcop.net/help.shtml\">Help and Feedback</a> section.");
echo "</p>\n";
-?>
-</body></html>
+noframes_bottom();
+?>
\ No newline at end of file
</td>
</tr>
</table>
- </body>
-</html>
+<?php noframes_bottom(); ?>
. html_tag( 'tr',
html_tag( 'td', 'SquirrelSpell ' . $SQSPELL_VERSION, 'center', $color[9] )
) . "\n</table>\n";
- echo '</body></html>';
+ noframes_bottom();
}
/**
'<input type="submit" value="' . _("Submit") . '" name="submit_translate">'.
'</td></tr>'.
'</table>'.
- '</form>'.
-"</body></html>\n";
+ '</form>';
+ noframes_bottom();
?>
echo html_tag( 'p', '<b><br>' .
_("Your search failed with the following error(s)") .
':<br>' . $abook->error . "</b>\n" ,
- 'center' ) .
- "\n</BODY></HTML>\n";
+ 'center' );
+ noframes_bottom();
} else {
if (sizeof($res) == 0) {
echo html_tag( 'p', '<br><b>' .
_("No persons matching your search was found") . "</b>\n" ,
- 'center' ) .
- "\n</BODY></HTML>\n";
+ 'center' );
+ noframes_bottom();
} else {
addr_display_result($res);
}
'</form></center></nobr>';
}
-?>
-</body></html>
+noframes_bottom();
+?>
\ No newline at end of file
// Some times we end output before forms are printed
if($abortform) {
- echo "</BODY></HTML>\n";
+ noframes_bottom();
exit();
}
}
/* Add hook for anything that wants on the bottom */
do_hook('addressbook_bottom');
-?>
-
-</BODY></HTML>
+noframes_bottom();
+?>
\ No newline at end of file
}
do_hook('compose_bottom');
- echo '</BODY></HTML>' . "\n";
+ if ($compose_new_win != '1')
+ noframes_bottom();
}
walkTreeInPreOrderEmptyTrash(0, $imap_stream, $foldersTree);
$location = get_location();
-header ("Location: $location/left_main.php");
+if (isset($use_frames) && !$use_frames)
+ header ("Location: $location/right_main.php");
+else
+ header ("Location: $location/left_main.php");
sqimap_logout($imap_stream);
?>
$td_str .= '</b><br>';
-
- echo html_tag( 'table',
- html_tag( 'tr',
- html_tag( 'td', $td_str .
- '<a href="../src/left_main.php" target=left>' .
- _("refresh folder list") . '</a>' ,
- 'center' )
- ) ,
- 'center', '', 'width="100%" cellpadding="4" cellspacing="0" border="0"' );
+ if (isset($use_frames) && $use_frames) {
+ echo html_tag( 'table',
+ html_tag( 'tr',
+ html_tag( 'td', $td_str .
+ '<a href="' . SM_PATH . 'src/left_main.php" target=left>' .
+ _("refresh folder list") . '</a>' ,
+ 'center' )
+ ) ,
+ 'center', '', 'width="100%" cellpadding="4" cellspacing="0" border="0"' );
+ } else {
+ echo html_tag( 'table',
+ html_tag( 'tr',
+ html_tag( 'td', $td_str .
+ '<a href="' . SM_PATH . 'src/folders.php">' .
+ _("refresh folder list") . '</a>' ,
+ 'center' )
+ ) ,
+ 'center', '', 'width="100%" cellpadding="4" cellspacing="0" border="0"' );
+ }
}
echo "\n<br>";
<?php
sqimap_logout($imapConnection);
-?>
-
-</body></html>
+ noframes_bottom();
+?>
\ No newline at end of file
echo html_tag( 'tr',
html_tag( 'td', ' ', 'left', $color[0] )
).
- '</table></body></html>';
-?>
+ '</table>';
+ noframes_bottom();
+?>
\ No newline at end of file
'<img src="' . $DownloadLink . '">' .
'</TD></TR></TABLE>' . "\n";
- '</body></html>' . "\n";
+ noframes_bottom();
-?>
+?>
\ No newline at end of file
*/
/** Path for SquirrelMail required files. */
-define('SM_PATH','../');
+if (!defined('SM_PATH'))
+ define('SM_PATH','../');
+
/* SquirrelMail required files. */
require_once(SM_PATH . 'include/validate.php');
$color, $move_to_sent, $move_to_trash,
$unseen_notify, $unseen_type, $collapse_folders,
$draft_folder, $save_as_draft,
- $use_special_folder_color;
+ $use_special_folder_color, $use_frames;
$real_box = $box_array['unformatted'];
$mailbox = str_replace(' ','',$box_array['formatted']);
$mailboxURL = urlencode($real_box);
-
+ if ($use_frames)
+ $target = 'right';
+ else
+ $target = '';
/* Strip down the mailbox name. */
if (ereg("^( *)([^ ]*)$", $mailbox, $regs)) {
$mailbox = $regs[2];
/* Create the link for this folder. */
if ($status !== false) {
- $line .= '<a href="right_main.php?PG_SHOWALL=0&sort=0&startMessage=1&mailbox='.
- $mailboxURL.'" TARGET="right" STYLE="text-decoration:none">';
+ $line .= '<a href="' . SM_PATH . 'src/right_main.php?PG_SHOWALL=0&sort=0&startMessage=1&mailbox='.
+ $mailboxURL.'" TARGET="' . $target . '" STYLE="text-decoration:none">';
}
if ($special_color) {
$line .= "<font color=\"$color[11]\">";
if (($numMessages > 0) or ($box_array['parent'] == 1)) {
$urlMailbox = urlencode($real_box);
$line .= "\n<small>\n" .
- " (<A HREF=\"empty_trash.php\" style=\"text-decoration:none\">"._("purge")."</A>)" .
+ " (<A HREF=\"" . SM_PATH . "src/empty_trash.php\" style=\"text-decoration:none\">"._("purge")."</A>)" .
"</small>";
} else {
$line .= concat_hook_function('left_main_after_each_folder',
global $boxes, $imapConnection, $unseen_notify, $color;
$mailbox = urlencode($boxes[$boxnum]['unformatted']);
+
/* Create the link for this collapse link. */
+
$link = '<a target="left" style="text-decoration:none" ' .
- 'href="left_main.php?';
+ 'href="' . SM_PATH . 'src/left_main.php?';
+
if ($boxes[$boxnum]['collapse'] == SM_BOX_COLLAPSED) {
$link .= "unfold=$mailbox\">+";
} else {
function ListBoxes ($boxes, $j=0 ) {
global $data_dir, $username, $startmessage, $color, $unseen_notify, $unseen_type,
- $move_to_trash, $trash_folder, $collapse_folders, $imapConnection;
+ $move_to_trash, $trash_folder, $collapse_folders, $imapConnection, $use_frames;
$pre = '<nobr>';
$end = '';
if (isset($boxes->mbxs[0]) && $collapse_folders) {
$collapse = getPref($data_dir, $username, 'collapse_folder_' . $mailbox);
$collapse = ($collapse == '' ? SM_BOX_UNCOLLAPSED : $collapse);
-
- $link = '<a target="left" style="text-decoration:none" ' .'href="left_main.php?';
+ if ($use_frames)
+ $link = '<a target="left" style="text-decoration:none" ' .'href="' . SM_PATH . 'src/left_main.php?';
+ else
+ $link = '<a style="text-decoration:none" ' .'href="' . SM_PATH . 'src/right_main.php?';
if ($collapse) {
$link .= "unfold=$mailboxURL\">$leader+ </tt>";
} else {
$pre.= $leader . ' </tt>';
}
+ if ($use_frames)
+ $target = 'right';
+ else
+ $target = '';
+
/* If there are unseen message, bold the line. */
if (($move_to_trash) && ($mailbox == $trash_folder)) {
if (! isset($boxes->total)) {
if ($unseen > 0) {
$pre .= '<b>';
}
- $pre .= "<a href=\"right_main.php?PG_SHOWALL=0&sort=0;startMessage=1&mailbox=$mailboxURL\" target=\"right\" style=\"text-decoration:none\">";
+ $pre .= "<a href=\"" . SM_PATH . "src/right_main.php?PG_SHOWALL=0&sort=0;startMessage=1&mailbox=$mailboxURL\" target=\"$target\" style=\"text-decoration:none\">";
if ($unseen > 0) {
$end .= '</b>';
}
if ($unseen > 0) {
$pre .= '<b>';
}
- $pre .= "<a href=\"right_main.php?PG_SHOWALL=0&sort=0;startMessage=1&mailbox=$mailboxURL\" target=\"right\" style=\"text-decoration:none\">";
+ $pre .= "<a href=\"" . SM_PATH . "src/right_main.php?PG_SHOWALL=0&sort=0;startMessage=1&mailbox=$mailboxURL\" target=\"$target\" style=\"text-decoration:none\">";
if ($unseen > 0) {
$end .= '</b>';
}
$end .= " <small>$unseen_string</small>";
}
$end .= "\n<small>\n" .
- " (<a href=\"empty_trash.php\" style=\"text-decoration:none\">"._("purge")."</a>)" .
+ " (<a href=\"" . SM_PATH . "src/empty_trash.php\" style=\"text-decoration:none\">"._("purge")."</a>)" .
"</small>";
}
} else {
if ($unseen > 0) {
$pre .= '<b>';
}
- $pre .= "<a href=\"right_main.php?PG_SHOWALL=0&sort=0&startMessage=1&mailbox=$mailboxURL\" target=\"right\" style=\"text-decoration:none\">";
+ $pre .= "<a href=\"" . SM_PATH . "src/right_main.php?PG_SHOWALL=0&sort=0&startMessage=1&mailbox=$mailboxURL\" target=\"$target\" style=\"text-decoration:none\">";
if ($unseen > 0) {
$end .= '</b>';
}
function ListAdvancedBoxes ($boxes, $mbx, $j='ID.0000' ) {
global $data_dir, $username, $startmessage, $color, $unseen_notify, $unseen_type,
- $move_to_trash, $trash_folder, $collapse_folders;
+ $move_to_trash, $trash_folder, $collapse_folders, $use_frames;
if (!$boxes)
return;
+ if ($use_frames)
+ $target = 'right';
+ else
+ $target = '';
+
/* use_folder_images only works if the images exist in ../images */
$use_folder_images = true;
if (! isset($numMessages)) {
$numMessages = $boxes->total;
}
- $pre = "<a class=\"mbx_link\" href=\"right_main.php?PG_SHOWALL=0&sort=0&startMessage=1&mailbox=$mailboxURL\" target=\"right\">" . $pre;
+ $pre = "<a class=\"mbx_link\" href=\"" . SM_PATH . "src/right_main.php?PG_SHOWALL=0&sort=0&startMessage=1&mailbox=$mailboxURL\" target=\"$target\">" . $pre;
$end .= '</a>';
if ($numMessages > 0) {
$urlMailbox = urlencode($mailbox);
$end .= "\n<small>\n" .
- " (<a class=\"mbx_link\" href=\"empty_trash.php\">"._("purge")."</a>)" .
+ " (<a class=\"mbx_link\" href=\"" . SM_PATH . "src/empty_trash.php\">"._("purge")."</a>)" .
"</small>";
}
} else {
if (!$boxes->is_noselect) { /* \Noselect boxes can't be selected */
- $pre = "<a class=\"mbx_link\" href=\"right_main.php?PG_SHOWALL=0&sort=0&startMessage=1&mailbox=$mailboxURL\" target=\"right\">" . $pre;
+ $pre = "<a class=\"mbx_link\" href=\"" . SM_PATH . "src/right_main.php?PG_SHOWALL=0&sort=0&startMessage=1&mailbox=$mailboxURL\" target=\"$target\">" . $pre;
$end .= '</a>';
}
}
/* 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
/**
!stristr($left_refresh, 'none')){
$xtra = "\n<meta http-equiv=\"Expires\" content=\"Thu, 01 Dec 1994 16:00:00 GMT\" />\n" .
"<meta http-equiv=\"Pragma\" content=\"no-cache\" />\n".
- "<meta http-equiv=\"REFRESH\" content=\"$left_refresh;URL=left_main.php\" />\n";
+ "<meta http-equiv=\"REFRESH\" content=\"$left_refresh;URL=" . SM_PATH . "src/left_main.php\" />\n";
} else {
$xtra = '';
}
}
-
-
+if ($use_frames)
displayHtmlHeader( 'SquirrelMail', $xtra );
+
/* If requested and not yet complete, attempt to autocreate folders. */
if ($auto_create_special && !isset($auto_create_done)) {
$autocreate = array($sent_folder, $trash_folder, $draft_folder);
$auto_create_done = TRUE;
sqsession_register($auto_create_done, 'auto_create_done');
}
-
-if ($advanced_tree)
- echo "\n<body" .
+if ($use_frames) {
+ if ($advanced_tree)
+ echo "\n<body" .
' onload="preload(\'../images/minus.png\',\'../images/plus.png\')"' .
- " bgcolor=\"$color[3]\" text=\"$color[6]\" link=\"$color[6]\" vlink=\"$color[6]\" alink=\"$color[6]\">\n";
-else
- echo "\n<body bgcolor=\"$color[3]\" text=\"$color[6]\" link=\"$color[6]\" vlink=\"$color[6]\" alink=\"$color[6]\">\n";
-
-do_hook('left_main_before');
-if ($advanced_tree) {
- /* nice future feature, needs layout !! volunteers? */
- $right_pos = $left_size - 20;
-/* echo '<div style="position:absolute;top:0;border=solid;border-width:0.1em;border-color:blue;"><div ID="hidef" style="width=20;font-size:12"><A HREF="javascript:hideframe(true)"><b><<</b></a></div>';
- echo '<div ID="showf" style="width=20;font-size:12;display:none;"><a href="javascript:hideframe(false)"><b>>></b></a></div>';
- echo '<div ID="incrf" style="width=20;font-size:12"><a href="javascript:resizeframe(true)"><b>></b></a></div>';
- echo '<div ID="decrf" style="width=20;font-size:12"><a href="javascript:resizeframe(false)"><b><</b></a></div></div>';
- echo '<div ID="leftframe"><br /><br />';*/
+ " bgcolor=\"$color[3]\" text=\"$color[6]\" link=\"$color[6]\" vlink=\"$color[6]\" alink=\"$color[6]\">\n";
+ else
+ echo "\n<body bgcolor=\"$color[3]\" text=\"$color[6]\" link=\"$color[6]\" vlink=\"$color[6]\" alink=\"$color[6]\">\n";
+
+ do_hook('left_main_before');
+ if ($advanced_tree) {
+ /* nice future feature, needs layout !! volunteers? */
+ $right_pos = $left_size - 20;
+ /* echo '<div style="position:absolute;top:0;border=solid;border-width:0.1em;border-color:blue;"><div ID="hidef" style="width=20;font-size:12"><A HREF="javascript:hideframe(true)"><b><<</b></a></div>';
+ echo '<div ID="showf" style="width=20;font-size:12;display:none;"><a href="javascript:hideframe(false)"><b>>></b></a></div>';
+ echo '<div ID="incrf" style="width=20;font-size:12"><a href="javascript:resizeframe(true)"><b>></b></a></div>';
+ echo '<div ID="decrf" style="width=20;font-size:12"><a href="javascript:resizeframe(false)"><b><</b></a></div></div>';
+ echo '<div ID="leftframe"><br /><br />';*/
+ }
}
-
echo "\n\n" . html_tag( 'table', '', 'left', '', 'border="0" cellspacing="0" cellpadding="0" width="99%"' ) .
html_tag( 'tr' ) .
- html_tag( 'td', '', 'left' ) .
- '<center><font size="4"><b>'. _("Folders") . "</b><br /></font>\n\n";
+ html_tag( 'td', '', 'left' );
+ if ($use_frames != 1)
+ '<center><font size="4"><b>'. _("Folders") . "</b><br /></font>\n\n";
if ($date_format != 6) {
/* First, display the clock. */
}
/* Next, display the refresh button. */
-echo '<small>(<a href="../src/left_main.php" target="left">'.
- _("refresh folder list") . '</a>)</small></center><br />';
+if ($use_frames) {
+ echo '<small>(<a href="' . SM_PATH . 'src/left_main.php" target="left">'.
+ _("refresh folder list") . '</a>)</small></center><br />';
+} else {
+// echo '<small>(<a href="' . SM_PATH . 'src/left_main.php">'.
+// _("refresh folder list") . '</a>)</small></center><br />';
+ echo '</center><br />';
+ $collapse_folders = 0;
+}
+global $data_dir;
/* Lastly, display the folder list. */
if ( $collapse_folders ) {
/* If directed, collapse or uncollapse a folder. */
} else { /* expiremental code */
$boxes = sqimap_mailbox_tree($imapConnection);
if (isset($advanced_tree) && $advanced_tree) {
- echo '<form name="collapse" action="left_main.php" method="post" ' .
+ echo '<form name="collapse" action="' . SM_PATH . 'src/left_main.php" method="post" ' .
'enctype="multipart/form-data"'."\n";
echo '<small>';
echo '<button type="submit" class="button" onmouseover="buttonover(this,true)" onmouseout="buttonover(this,false)" onmousedown="buttonclick(this,true)" onmouseup="buttonclick(this,false)">'. _("Save folder tree") .'</button><br /><br />';
ListBoxes($boxes);
}
} /* if ($oldway) else ... */
-do_hook('left_main_after');
-sqimap_logout($imapConnection);
-
-echo '</td></tr></table>' . "\n".
- "</div></body></html>\n";
+if ($use_frames)
+ do_hook('left_main_after');
+if ($location_of_bar == right && !$use_frames)
+ sqimap_logout($imapConnection);
+
+echo '<br></td></tr></table>' . "\n";
+if ($use_frames)
+ echo "</div></body></html>\n";
+else
+ echo "</div>\n";
-?>
+?>
\ No newline at end of file
'center' )
) ,
'', $color[4], 'border="0" cellspacing="0" cellpadding="0" width="100%"' );
+
+switch ($allow_frames) {
+ case 4: // if $use_frames unset, fall through to case 2
+ if (isset($_COOKIE['set_use_frames'])) {
+ $use_frames = $_COOKIE['set_use_frames'];
+ break;
+ }
+ case 2: // Do not use frames
+ $use_frames = 0;
+ break;
+ case 3: // if $use_frames unset, fall through to case 1
+ if (isset($_COOKIE['set_use_frames'])) {
+ $use_frames = $_COOKIE['set_use_frames'];
+ break;
+ }
+ default: // default is also to use frames
+ case 1: // use frames
+ $use_frames = 1;
+ break;
+}
+
+if ($allow_frames > 2) {
+ echo "<center><table border=0><tr><td>\n";
+ echo "<small><input type=radio name=set_use_frames value=1";
+ if ($use_frames) echo " checked=true";
+ echo '> ' . _("Frames") . "\n";
+ echo "</small></td><td nowrap>\n";
+ echo "<small><input type=radio name=set_use_frames value=0";
+ if (!$use_frames) echo " checked=true";
+ echo '> ' . _("No Frames") . "\n";
+ echo "</td></tr></table></center>\n";
+}
+
do_hook('login_form');
echo '</form>' . "\n";
do_hook('login_bottom');
echo "</body>\n".
"</html>\n";
-?>
+?>
\ No newline at end of file
header("Location: $location");
exit;
}
-?>
-</BODY></HTML>
+noframes_bottom();
+?>
\ No newline at end of file
/* If $max_refresh != SMOPT_REFRESH_NONE, provide a refresh link. */
if ( !isset( $max_refresh ) ) {
} else if ($max_refresh == SMOPT_REFRESH_FOLDERLIST) {
- echo '<a href="../src/left_main.php" target="left">' . _("Refresh Folder List") . '</a><br>';
+ if ($use_frames)
+ echo '<a href="../src/left_main.php" target="left">' . _("Refresh Folder List") . '</a><br>';
+ else
+ echo '<a href="../src/options.php">' . _("Refresh Folder List") . '</a><br>';
} else if ($max_refresh) {
echo '<a href="../src/webmail.php?right_frame=options.php" target="' . $frame_top . '">' . _("Refresh Page") . '</a><br>';
}
echo '</td></tr>' .
'</table>'.
'</td></tr>'.
- '</table>' .
- '</body></html>';
+ '</table>';
-?>
+noframes_bottom();
+
+
+?>
\ No newline at end of file
}
do_hook('options_highlight_bottom');
?>
-</table></body></html>
+</table>
+<?php noframes_bottom(); ?>
'', '', 'width="100%" border="0" cellpadding="1" cellspacing="1"' ) ,
'center', $color[0] )
) ,
- 'center', '', 'width="95%" border="0" cellpadding="2" cellspacing="0"' ) .
-
- '</body></html>';
+ 'center', '', 'width="95%" border="0" cellpadding="2" cellspacing="0"' );
+ noframes_bottom();
function SaveUpdateFunction() {
global $username, $data_dir, $full_name, $email_address, $reply_to, $signature;
</td></tr>
</table>
-</body></html>
+<?php noframes_bottom(); ?>
them at the end so we avoid double session_register calls */
sqsession_register($messages,'messages');
-?>
-</body>
-</html>
+noframes_bottom();
+?>
\ No newline at end of file
$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');
}
}
do_hook('right_main_bottom');
sqimap_logout ($imapConnection);
+noframes_bottom();
-echo '</body></html>';
-
-?>
+?>
\ No newline at end of file
do_hook('search_bottom');
sqimap_logout($imapConnection);
-echo '</body></html>';
+noframes_bottom();
-?>
+?>
\ No newline at end of file
'<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=2 ALIGN=CENTER>' .
'<TR><TD BGCOLOR="' . $color[4] . '">' .
- '</TD></TR></TABLE>' .
- '</body></html>';
+ '</TD></TR></TABLE>';
+ noframes_bottom();
-?>
+?>
\ No newline at end of file
'</tt></nobr>',
'</td></tr></table>'."\n"
) );
- echo '</body></html>';
+ noframes_bottom();
}
/* get global vars */
'</TD></TR></TABLE>' .
'<TABLE WIDTH="98%" BORDER=0 CELLSPACING=0 CELLPADDING=2 ALIGN=CENTER><TR><TD BGCOLOR="' . $color[0] . '">' .
'<TR><TD BGCOLOR="' . $color[4] . '"><TT>' .
- $body . '</TT></TD></TR></TABLE>' .
- '</body></html>';
-?>
+ $body . '</TT></TD></TR></TABLE>';
+ noframes_bottom();
+?>
\ No newline at end of file
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 = '';
}
set_up_language(getPref($data_dir, $username, 'language'));
+if (isset($use_frames) && !$use_frames) {
+ if (!isset($right_frame))
+ $right_frame = '';
+ if ($right_frame == 'right_main.php') {
+ $urlMailbox = urlencode($mailbox);
+ $right_frame_url = "right_main.php?mailbox=$urlMailbox&sort=$sort&startMessage=$startMessage";
+ } elseif ($right_frame == 'options.php') {
+ $right_frame_url = 'options.php';
+ } elseif ($right_frame == 'folders.php') {
+ $right_frame_url = 'folders.php';
+ } else if ($right_frame == '') {
+ $right_frame_url = 'right_main.php';
+ } else {
+ $right_frame_url = $right_frame;
+ }
+ header("Location: $right_frame_url");
+}
+
+
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Frameset//EN\">\n".
"<html><head>\n" .
"<title>$org_title</title>\n".