X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=plugins%2Fmail_fetch%2Foptions.php;h=7dd615d1eb1644909a2a3913409e12a2f7a366ea;hp=6bd8ce846a74dbfee4d35cc47b432216d0837252;hb=8d6a115b0ef06dbcf9b149ba2509208f09b3a2ab;hpb=5e7f6ef6843f2218e1b87532dd0ae69b155834fa diff --git a/plugins/mail_fetch/options.php b/plugins/mail_fetch/options.php index 6bd8ce84..7dd615d1 100644 --- a/plugins/mail_fetch/options.php +++ b/plugins/mail_fetch/options.php @@ -1,20 +1,21 @@ 'on' ) setPref($data_dir,$username,"mailfetch_cypher", 'on'); - setPref($data_dir,$username,"mailfetch_lmos_$mf_sn", getPref($data_dir, $username, "mailfetch_lmos_$tmp")); - setPref($data_dir,$username,"mailfetch_login_$mf_sn", getPref($data_dir, $username, "mailfetch_login_$tmp")); - setPref($data_dir,$username,"mailfetch_fref_$mf_sn", getPref($data_dir, $username, "mailfetch_fref_$tmp")); - setPref($data_dir,$username,"mailfetch_subfolder_$mf_sn", getPref($data_dir, $username, "mailfetch_subfolder_$tmp")); + setPref($data_dir,$username,"mailfetch_lmos_$i", getPref($data_dir, $username, "mailfetch_lmos_$tmp")); + setPref($data_dir,$username,"mailfetch_login_$i", getPref($data_dir, $username, "mailfetch_login_$tmp")); + setPref($data_dir,$username,"mailfetch_fref_$i", getPref($data_dir, $username, "mailfetch_fref_$tmp")); + setPref($data_dir,$username,"mailfetch_subfolder_$i", getPref($data_dir, $username, "mailfetch_subfolder_$tmp")); } setPref($data_dir,$username,"mailfetch_server_number", $mailfetch_server_number); } @@ -102,32 +103,67 @@ echo '
' . - "
" . _("Remote POP server settings") . '
' . - '' . - '' . - '
' . - _("You should be aware that the encryption used to store your password is not perfectly secure. However, if you are using pop, there is inherently no encryption anyway. Additionally, the encryption that we do to save it on the server can be undone by a hacker reading the source to this file." ) . - '
' . - _("If you leave password empty, it will be required when you fetch mail.") . - '
':'>') . - _("Encrypt passwords (informative only)") . '
'; + html_tag( 'table', + html_tag( 'tr', + html_tag( 'td', + '' . _("Remote POP server settings") . '', + 'center', $color[0] ) + ), + 'center', '', 'width="95%" cols="1"' ) . + html_tag( 'table', + html_tag( 'tr', + html_tag( 'td', + _("You should be aware that the encryption used to store your password is not perfectly secure. However, if you are using pop, there is inherently no encryption anyway. Additionally, the encryption that we do to save it on the server can be undone by a hacker reading the source to this file." ) , + 'left' ) + ) . + html_tag( 'tr', + html_tag( 'td', + _("If you leave password empty, it will be required when you fetch mail.") , + 'left' ) + ) . + html_tag( 'tr', + html_tag( 'td', + '':'>') . + _("Encrypt passwords (informative only)") , + 'right' ) + ) , + 'center', '', 'width="95%" cols="1"' ); switch( $mf_action ) { case 'config': - echo '' . - " ' . - "
" . _("Add Server") . '
" . + echo html_tag( 'table', '', 'center', '', 'width="70%" cols="1" cellpadding="5" cellspacing="1"' ) . + html_tag( 'tr', + html_tag( 'td', '' . _("Add Server") . '', 'center', $color[9] ) + ) . + html_tag( 'tr' ) . + html_tag( 'td', '', 'center', $color[0] ) . + "" . - '' . - '' . - '' . - '' . - '' . - '' . - '' . - '' . - '' . - '' . - '
' . _("Server:") . '
' . _("Alias:") . '
' . _("Username:") . '
' . _("Password:") . '
' . _("Store in Folder:") . ''; + '' . + html_tag( 'table' ) . + html_tag( 'tr', + html_tag( 'th', _("Server:"), 'right' ) . + html_tag( 'td', '', 'left' ) + ) . + html_tag( 'tr', + html_tag( 'th', _("Alias:"), 'right' ) . + html_tag( 'td', '', 'left' ) + ) . + html_tag( 'tr', + html_tag( 'th', _("Username:"), 'right' ) . + html_tag( 'td', '', 'left' ) + ) . + html_tag( 'tr', + html_tag( 'th', _("Password:"), 'right' ) . + html_tag( 'td', '', 'left' ) + ) . + html_tag( 'tr' ) . + html_tag( 'th', _("Store in Folder:"), 'right' ) . + html_tag( 'td', '', 'left' ); $imapConnection = sqimap_login ($username, $key, $imapServerAddress, $imapPort, 0); $boxes = sqimap_mailbox_list($imapConnection); - echo ''; $boxes = sqimap_mailbox_list($imapConnection); for ($i = 0; $i < count($boxes); $i++) { if (!in_array('noselect', $boxes[$i]['flags'])) { @@ -136,75 +172,116 @@ if ( strtolower( $box2 ) == 'inbox' ) { $box2 = _("INBOX"); } - echo "\n"; + echo "\n"; } } - echo '
 ' . _("Leave Mail on Server") . '
 ' . _("Check mail during login") . '
 ' . _("Check mail during folder refresh") . '
'; + echo '' . + html_tag( 'tr', + html_tag( 'th', ' ', 'right' ) . + html_tag( 'td', '' . _("Leave Mail on Server"), 'left' ) + ) . + html_tag( 'tr', + html_tag( 'th', ' ', 'right' ) . + html_tag( 'td', '' . _("Check mail during login"), 'left' ) + ) . + html_tag( 'tr', + html_tag( 'th', ' ', 'right' ) . + html_tag( 'td', '' . _("Check mail during folder refresh"), 'left' ) + ) . + html_tag( 'tr', + html_tag( 'td', + '', + 'center', '', 'colspan="2"' ) + ) . + ''; // Modify Server echo '
' . - '' . - "' . - "
" . _("Modify Server") . '
"; + html_tag( 'table', '', 'center', '', 'width="70%" cols="1" cellpadding="5" cellspacing="1"' ) . + html_tag( 'tr', + html_tag( 'td', '' . _("Modify Server") . '', 'center', $color[9] ) + ) . + html_tag( 'tr' ) . + html_tag( 'td', '', 'center', $color[0] ); if ($mailfetch_server_number>0) { - echo "
"; - echo '' . _("Server Name:") . ' '; for ($i=0;$i<$mailfetch_server_number;$i++) { - echo ">"; + echo ">"; } - echo ''. + echo ''. '  '. '  '. '
'; } else { echo _("No-one server in use. Try to add."); } - echo '
'; + echo ''; break; case _("Delete"): //erase confirmation about a server - echo '' . - "' . - '
" . _("Fetching Servers") . '
' . - '
' . - '' . - "' . - "
" . _("Confirm Deletion of a Server") . '
" . - "" . - '' . - '
' . _("Selected Server:") . "$mailfetch_server_[$mf_sn]
" . - _("Confirm delete of selected server?") . '

' . - '' . - '
'; + echo html_tag( 'table', + html_tag( 'tr', + html_tag( 'td', '' . _("Fetching Servers") . '', 'center', $color[0] ) + ) , + 'center', '', 'width="95%" cols="1" cellpadding="5" cellspacing="1"' ) . + '
' . + html_tag( 'table', + html_tag( 'tr', + html_tag( 'td', '' . _("Confirm Deletion of a Server") . '', 'center', $color[9] ) + ) . + html_tag( 'tr', + html_tag( 'td', + "" . + '' . + '
' . _("Selected Server:") . " $mailfetch_server_[$mf_sn]
" . + _("Confirm delete of selected server?") . '

' . + '' . + '
' , + 'center', $color[9] ) + ) , + 'center', '', 'width="70%" cols="1" cellpadding="5" cellspacing="1"' ); break; //modify a server case _("Modify"): - echo '' . - "' . - '
" . _("Fetching Servers") . '
' . - '
' . - '' . - "' . - "
" . _("Mofify a Server") . '
" . + echo html_tag( 'table', + html_tag( 'tr', + html_tag( 'td', '' . _("Fetching Servers") . '', 'center', $color[0] ) + ) , + 'center', '', 'width="95%" cols="1" cellpadding="5" cellspacing="1"' ) . + '
' . + html_tag( 'table', '', 'center', '', 'width="70%" cols="1" cellpadding="5" cellspacing="1"' ) . + html_tag( 'tr', + html_tag( 'td', '' . _("Mofify a Server") . '', 'center', $color[9] ) + ) . + html_tag( 'tr' ) . + html_tag( 'td', '', 'center', $color[0] ) . + "" . '' . - '' . - '' . - "" . - '' . - "" . - '' . - "" . - '' . - "" . - '' . - '' . - '' . - '' . - '' . - '' . - '
' . _("Server:") . '
' . _("Alias:") . '
' . _("Username:") . '
' . _("Password:") . '
' . _("Store in Folder:") . ''; + html_tag( 'table' ) . + html_tag( 'tr', + html_tag( 'th', _("Server:"), 'right' ) . + html_tag( 'td', '', 'left' ) + ) . + html_tag( 'tr', + html_tag( 'th', _("Alias:"), 'right' ) . + html_tag( 'td', '', 'left' ) + ) . + html_tag( 'tr', + html_tag( 'th', _("Username:"), 'right' ) . + html_tag( 'td', '', 'left' ) + ) . + html_tag( 'tr', + html_tag( 'th', _("Password:"), 'right' ) . + html_tag( 'td', '', 'left' ) + ) . + html_tag( 'tr' ) . + html_tag( 'th', _("Store in Folder:"), 'right' ) . + html_tag( 'td', '', 'left' ); + $imapConnection = sqimap_login ($username, $key, $imapServerAddress, $imapPort, 0); $boxes = sqimap_mailbox_list($imapConnection); - echo "'; $boxes = sqimap_mailbox_list($imapConnection); for ($i = 0; $i < count($boxes); $i++) { if (!in_array('noselect', $boxes[$i]['flags'])) { @@ -213,30 +290,56 @@ if ( strtolower( $box2 ) == 'inbox' ) { $box2 = _("INBOX"); } - echo '\n"; + echo '\n"; } } - echo '
 ' . _("Leave Mail on Server") . '
 ' . _("Check mail during login") . '
 ' . _("Check mail during folder refresh") . '
'; + echo '' . + + html_tag( 'tr', + html_tag( 'th', ' ', 'right' ) . + html_tag( 'td', + '' . _("Leave Mail on Server") , + 'left' ) + ) . + html_tag( 'tr', + html_tag( 'th', ' ', 'right' ) . + html_tag( 'td', + '' . _("Check mail during login"), + 'left' ) + ) . + html_tag( 'tr', + html_tag( 'th', ' ', 'right' ) . + html_tag( 'td', + '' . _("Check mail during folder refresh") , + 'left' ) + ) . + html_tag( 'tr', + html_tag( 'td', + '', + 'center', '', 'colspan="2"' ) + ) . + + ''; break; default: //unsupported action - echo '' . - "' . - '
" . _("Fetching Servers") . '

' . - '' . - "' . - "
" . _("Undefined Function") . '
" . - _("Hey! Wath do You are looking for?") . '
'; + echo '' . + html_tag( 'table', + html_tag( 'tr', + html_tag( 'td', '' . _("Fetching Servers") . '', 'center', $color[0] ) + ) , + 'center', '', 'width="95%" cols="1"' ) . + '
' . + html_tag( 'table', + html_tag( 'tr', + html_tag( 'td', '' . _("Undefined Function") . '', 'center', $color[9] ) . + html_tag( 'td', '' . _("Hey! Wath do You are looking for?") . '', 'center', $color[0] ) + ) , + 'center', '', 'width="70%" cols="1"' ); } ?>