print "3. Organization Title : $WHT$org_title$NRM\n";
print "4. Signout Page : $WHT$signout_page$NRM\n";
print "5. Default Language : $WHT$squirrelmail_default_language$NRM\n";
+ print "6. Top Frame : $WHT$frame_top$NRM\n";
print "\n";
print "R Return to Main Menu\n";
} elsif ($menu == 2) {
elsif ($command == 2) { $org_logo = command2 (); }
elsif ($command == 3) { $org_title = command3 (); }
elsif ($command == 4) { $signout_page = command4 (); }
- elsif ($command == 5) { $squirrelmail_default_language = command5(); }
+ elsif ($command == 5) { $squirrelmail_default_language = command5(); }
+ elsif ($command == 6) { $frame_top = command6(); }
} elsif ($menu == 2) {
if ($command == 1) { $domain = command11 (); }
elsif ($command == 2) { $imapServerAddress = command12 (); }
return $new_signout_page;
}
+# Default top frame
+sub command6 {
+ print "SquirrelMail defaults to using the whole of the browser window.\n";
+ print "This allows you to keep it within a specified frame. The default\n";
+ print "is '_top'\n";
+ print "\n";
+ print "[$WHT$frame_top$NRM]: $WHT";
+ $new_frame_top = <STDIN>;
+ if ($new_frame_top eq "\n") {
+ $new_frame_top = '_top';
+ } else {
+ $new_frame_top =~ s/[\r|\n]//g;
+ $new_frame_top =~ s/^\s+$//g;
+ }
+ return $new_frame_top;
+}
+
####################################################################################
# domain
print CF "\$config_use_color = $config_use_color;\n";
print CF "\n";
- print CF "global \$org_name, \$org_logo, \$org_title, \$signout_page;\n";
+ print CF "global \$org_name, \$org_logo, \$org_title, \$signout_page, \$frame_top;\n";
print CF "\$org_name = \"$org_name\";\n";
print CF "\$org_logo = '$org_logo';\n";
print CF "\$org_title = \"$org_title\";\n";
print CF "\$signout_page = '$signout_page';\n";
+ print CF "\$frame_top = '$frame_top';\n";
print CF "\n";
print CF "global \$motd;\n";
global $invert_time;
$invert_time = false;
+/**
+ * By default SquirrelMail takes up the whole browser window,
+ * this allows you to embed it within sites using frames. Set
+ * this to the frame you want it to stay in.
+ */
+
+global $frame_top;
+$frame_top = '_top';
+
global $plugins;
/**
* To install plugins, just add elements to this array that have
require_once( '../functions/page_header.php' );
function is_logged_in () {
- global $squirrelmail_language;
+ global $squirrelmail_language, $frame_top;
if ( session_is_registered('user_is_logged_in') ) {
return;
echo "<body bgcolor=\"ffffff\">\n" .
'<br><br><center><b>' .
_("You must be logged in to access this page.").'</b><br><br>' .
- "<a href=\"../src/login.php\" target=\"_top\">"._("Go to the login page")."</a>\n" .
+ "<a href=\"../src/login.php\" target=\"$frame_top\">"._("Go to the login page")."</a>\n" .
"</center></body></html>\n";
exit;
}
-?>
\ No newline at end of file
+?>
*/
function error_username_password_incorrect() {
+ global $frame_top;
echo '<BR>'.
'<TABLE COLS=1 WIDTH="75%" NOBORDER BGCOLOR="' . $color[4] . '" ALIGN=CENTER>'.
'</TR>' .
'<TR><TD>'.
'<CENTER><BR>' . _("Unknown user or password incorrect.") .
- '<BR><A HREF="login.php" TARGET=_top>' .
+ '<BR><A HREF="login.php" TARGET='.$frame_top.'>' .
_("Click here to try again") .
'</A>.</CENTER>'.
'</TD></TR>'.
function displayPageHeader($color, $mailbox) {
- global $delimiter, $hide_sm_attributions, $base_uri, $PHP_SELF;
+ global $delimiter, $hide_sm_attributions, $base_uri, $PHP_SELF, $frame_top;
displayHtmlHeader ();
}
echo " </TD>\n"
. " <TD ALIGN=right><b>\n";
- displayInternalLink ('src/signout.php', _("Sign Out"), '_top');
+ displayInternalLink ('src/signout.php', _("Sign Out"), $frame_top);
echo " </b></TD>\n"
. " </TR>\n"
. " <TR BGCOLOR=\"$color[4]\">\n"
if ($max_refresh == SMOPT_REFRESH_FOLDERLIST) {
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="_top">' . _("Refresh Page") . '</A><BR>';
+ echo '<A HREF="../src/webmail.php?right_frame=options.php" TARGET="$frame_top">' . _("Refresh Page") . '</A><BR>';
}
}
/******************************************/
<TD ALIGN="CENTER">
<?php do_hook('logout_above_text'); ?>
<?php echo _("You have been successfully signed out.") ?><BR>
- <A HREF="login.php" TARGET="_top">
+ <A HREF="login.php" TARGET="<?php echo $frame_top ?>">
<?php echo _("Click here to log back in.") ?>
</A><BR><BR>
</TD>