- $mailfetch['cypher'] = getPref($data_dir, $username, "mailfetch_cypher");
- for ($i = 0; $i < $mailfetch['server_number']; $i++) {
- $mailfetch[$i]['server'] = getPref($data_dir, $username, "mailfetch_server_$i");
- $mailfetch[$i]['port'] = getPref($data_dir, $username, "mailfetch_port_$i");
- $mailfetch[$i]['alias'] = getPref($data_dir, $username, "mailfetch_alias_$i");
- $mailfetch[$i]['user'] = getPref($data_dir, $username, "mailfetch_user_$i");
- $mailfetch[$i]['pass'] = getPref($data_dir, $username, "mailfetch_pass_$i");
- if($mailfetch['cypher'] == 'on') {
- $mailfetch[$i]['pass'] = decrypt($mailfetch[$i]['pass']);
- }
- if ($mailfetch[$i]['pass'] == '') {
- sqgetGlobalVar("pass_$i", $mailfetch[$i]['pass'], SQ_POST);
- }
- $mailfetch[$i]['lmos'] = getPref($data_dir, $username, "mailfetch_lmos_$i");
- $mailfetch[$i]['login'] = getPref($data_dir, $username, "mailfetch_login_$i");
- $mailfetch[$i]['uidl'] = getPref($data_dir, $username, "mailfetch_uidl_$i");
- $mailfetch[$i]['subfolder'] = getPref($data_dir, $username, "mailfetch_subfolder_$i");
- if($mailfetch[$i]['alias'] == '') {
- $mailfetch[$i]['alias'] == $mailfetch[$i]['server'];
- }
- }
- return $mailfetch;
- }
-
- function Mail_Fetch_Select_Server($mailfetch) {
- global $PHP_SELF;
-
- echo '<font size="-5"><br /></font>' .
- '<form action="'.$PHP_SELF.'" method="post" target="_self">' .
- html_tag( 'table', '', 'center', '', 'width="70%" cols="2"' ) .
- html_tag( 'tr' ) .
- html_tag( 'td', _("Select Server:") . ' ', 'right' ) .
- html_tag( 'td', '', 'left' ) .
- '<select name="server_to_fetch" size="1">' .
- '<option value="all" selected="selected">..' . _("All") . "...\n";
- for ($i = 0;$i < $mailfetch['server_number'];$i++) {
- echo "<option value=\"$i\">" .
- htmlspecialchars($mailfetch[$i]['alias']) .
- '</option>' . "\n";