X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fright_main.php;h=fb68c39281d7740ca234857a4125f17583916049;hb=6206f6c455a6010f2bd3e7999043a4074e7eb2bf;hp=01d7634c428b410543a59abc12eaf0e5b3e0f7e3;hpb=e372ee8cced64bee1146279504849ed2bc236efa;p=squirrelmail.git
diff --git a/src/right_main.php b/src/right_main.php
index 01d7634c..fb68c392 100644
--- a/src/right_main.php
+++ b/src/right_main.php
@@ -19,6 +19,7 @@ require_once('../functions/array.php');
require_once('../functions/mime.php');
require_once('../functions/mailbox_display.php');
require_once('../functions/display_messages.php');
+require_once('../functions/html.php');
/***********************************************************
* incoming variables from URL: *
@@ -33,13 +34,23 @@ require_once('../functions/display_messages.php');
* $key pass *
***********************************************************/
-$bob = getHashedFile($username, $data_dir, "username.pref");
-
/* Open a connection on the imap port (143) */
$imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
-if( isset( $PG_SHOWNUM ) ) {
+global $PG_SHOWNUM;
+if (isset($PG_SHOWALL)) {
+ if ($PG_SHOWALL) {
+ $PG_SHOWNUM=999999;
+ $show_num=$PG_SHOWNUM;
+ session_register('PG_SHOWNUM');
+ }
+ else {
+ session_unregister('PG_SHOWNUM');
+ unset($PG_SHOWNUM);
+ }
+}
+else if( isset( $PG_SHOWNUM ) ) {
$show_num = $PG_SHOWNUM;
}
@@ -89,46 +100,38 @@ else {
}
global $color;
-if( isset($do_hook) && $do_hook ) {
- do_hook ("generic_header");
-}
+
+do_hook ("generic_header");
sqimap_mailbox_select($imapConnection, $mailbox);
-if (isset($composenew)) {
- $width= getPref($username, $data_dir, 'editor_size', 76);
- if ($width < 65) {
- $pix_width = 560;
- } else {
- $width = (.9*$width);
- $pix_width = intval($width).'0';
- }
- $features = "toolbar=no, width=$pix_width, height=650, scrollbars=yes, resizable=yes target=_blank";
- $location = 'compose.php?mailbox='. urlencode($mailbox).'&attachedmessages=true&session='."$session";
- $onload= "window.open(\"$location\",\"compose_window_$session\", \"$features\");";
- displayPageHeader($color, $mailbox, $onload);
+if (isset($composenew) && $composenew) {
+ $comp_uri = "../src/compose.php?mailbox=". urlencode($mailbox).
+ "&session=$composesession";
+ displayPageHeader($color, $mailbox, "comp_in_new('$comp_uri');", false);
} else {
displayPageHeader($color, $mailbox);
}
-echo "
\n";
-
do_hook('right_main_after_header');
if (isset($note)) {
- echo "
$note
\n";
+ echo html_tag( 'div', '' . $note .'', 'center' ) . "
\n";
}
if ($just_logged_in == true) {
$just_logged_in = false;
if (strlen(trim($motd)) > 0) {
- echo "
" .
- '' .
- "" .
- "$motd";
- do_hook('motd');
- echo ' | ' .
- ' ' .
- ' |
';
+ echo html_tag( 'table',
+ html_tag( 'tr',
+ html_tag( 'td',
+ html_tag( 'table',
+ html_tag( 'tr',
+ html_tag( 'td', $motd, 'center' )
+ ) ,
+ '', $color[4], 'width="100%" cellpadding="5" cellspacing="1" border="0"' )
+ )
+ ) ,
+ 'center', $color[9], 'width="70%" cellpadding="0" cellspacing="3" border="0"' );
}
}
@@ -191,6 +194,6 @@ if ($use_mailbox_cache && session_is_registered('msgs')) {
do_hook('right_main_bottom');
sqimap_logout ($imapConnection);
-echo '