15 define(
'SM_PATH',
'../../');
17 require_once(
SM_PATH .
'include/validate.php');
18 require_once(
SM_PATH .
'functions/imap.php');
19 require_once(
SM_PATH .
'include/load_prefs.php');
37 $mf_action =
'Modify';
40 $mf_action =
'Delete';
43 $mf_action =
'config';
66 switch( $mf_action ) {
69 $mf_action =
'config';
81 if ($mf_sn<1) $mf_sn=0;
88 if ( isset($mf_pass) ) {
89 if ( isset($mf_cypher) && $mf_cypher ==
'on' ) {
107 case 'confirm_modify':
113 $mf_action =
'Modify';
121 $mf_action =
'Modify';
131 if ( isset($mf_pass) ) {
132 if ( isset($mf_cypher) && $mf_cypher ==
'on' ) {
145 $mf_action =
'config';
147 case 'confirm_delete':
183 $mf_action =
'config';
207 echo
'<br><form method="post" action="'.$PHP_SELF.
'">' .
211 '<b>' .
_(
"Remote POP server settings") .
'</b>',
214 'center',
'',
'width="95%"' ) .
218 _(
"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." ) ,
223 _(
"If you leave password empty, it will be asked when you fetch mail.") ,
228 '<input type=checkbox name=mf_cypher ' .
230 _(
"Encrypt passwords (informative only)") ,
233 'center',
'',
'width="95%"' );
238 echo
html_tag(
'table',
'',
'center',
'',
'width="70%" cellpadding="5" cellspacing="1"' ) .
243 switch( $mf_action ) {
245 echo
html_tag(
'table',
'',
'center',
'',
'width="70%" cellpadding="5" cellspacing="1"' ) .
247 html_tag(
'td',
'<b>' .
_(
"Add Server") .
'</b>',
'center',
$color[9] )
252 "<INPUT TYPE=\"hidden\" NAME=\"mf_sn\" VALUE=\"$mailfetch_server_number\">" .
253 '<INPUT TYPE="hidden" NAME="mf_action" VALUE="add">' .
256 html_tag(
'th',
_(
"Server:"),
'right' ) .
257 html_tag(
'td',
'<input type=text name=mf_server value="" size=40>',
'left' )
261 html_tag(
'td',
'<input type=text name=mf_port value="110" size=20>',
'left')
265 html_tag(
'td',
'<input type=text name=mf_alias value="" size=20>',
'left' )
268 html_tag(
'th',
_(
"Username:"),
'right' ) .
269 html_tag(
'td',
'<input type=text name=mf_user value="" size=20>',
'left' )
272 html_tag(
'th',
_(
"Password:"),
'right' ) .
273 html_tag(
'td',
'<input type=password name=mf_pass value="" size=20>',
'left' )
276 html_tag(
'th',
_(
"Store in Folder:"),
'right' ) .
280 echo
'<select name="mf_subfolder">';
283 if ( isset($mf_subfolder) )
284 $selected = array(strtolower($mf_subfolder));
286 echo
'</select></td></tr>' .
288 html_tag(
'th',
' ',
'right' ) .
289 html_tag(
'td',
'<input type="checkbox" name="mf_lmos" checked>' .
_(
"Leave mail on server"),
'left' )
292 html_tag(
'th',
' ',
'right' ) .
293 html_tag(
'td',
'<input type="checkbox" name="mf_login">' .
_(
"Check mail at login"),
'left' )
296 html_tag(
'th',
' ',
'right' ) .
297 html_tag(
'td',
'<input type="checkbox" name="mf_fref">' .
_(
"Check mail at folder refresh"),
'left' )
301 '<input type=submit name="submit_mailfetch" value="' .
_(
"Add Server") .
'">',
302 'center',
'',
'colspan="2"' )
304 '</table></td></tr></table></form>';
307 echo
'<font size=-5><BR></font>' .
308 html_tag(
'table',
'',
'center',
'',
'width="70%" cellpadding="5" cellspacing="1"' ) .
310 html_tag(
'td',
'<b>' .
_(
"Modify Server") .
'</b>',
'center',
$color[9] )
315 echo
"<form action=\"$PHP_SELF\" method=\"post\" target=\"_self\">";
316 echo
'<b>' .
_(
"Server Name:") .
'</b> <select name="mf_sn">';
318 echo
"<option value=\"$i\">" .
319 htmlspecialchars( (($mailfetch_alias_[$i]==
'')?$mailfetch_server_[$i]:$mailfetch_alias_[$i])) .
"</option>";
322 ' <INPUT TYPE=submit name=mf_action_mod value="' .
_(
"Modify") .
'">'.
323 ' <INPUT TYPE=submit name=mf_action_del value="' .
_(
"Delete") .
'">'.
326 echo
_(
"No servers known.");
328 echo
'</td></tr></table>';
333 html_tag(
'td',
'<b>' .
_(
"Fetching Servers") .
'</b>',
'center',
$color[0] )
335 'center',
'',
'width="95%" cellpadding="5" cellspacing="1"' ) .
339 html_tag(
'td',
'<b>' .
_(
"Confirm Deletion of a Server") .
'</b>',
'center',
$color[9] )
343 "<INPUT TYPE=\"hidden\" NAME=\"mf_sn\" VALUE=\"$mf_sn\">" .
344 '<INPUT TYPE="hidden" NAME="mf_action" VALUE="confirm_delete">' .
345 '<br>' .
_(
"Selected Server:") .
" <b>" . htmlspecialchars($mailfetch_server_[$mf_sn]) .
"</b><br>" .
346 _(
"Confirm delete of selected server?") .
'<br><br>' .
347 '<input type=submit name=submit_mailfetch value="' .
_(
"Confirm Delete") .
'">' .
351 'center',
'',
'width="70%" cellpadding="5" cellspacing="1"' );
356 html_tag(
'td',
'<b>' .
_(
"Fetching Servers") .
'</b>',
'center',
$color[0] )
358 'center',
'',
'width="95%" cellpadding="5" cellspacing="1"' ) .
360 html_tag(
'table',
'',
'center',
'',
'width="70%" cellpadding="5" cellspacing="1"' ) .
362 html_tag(
'td',
'<b>' .
_(
"Modify Server") .
'</b>',
'center',
$color[9] )
367 "<INPUT TYPE=\"hidden\" NAME=\"mf_sn\" VALUE=\"$mf_sn\">" .
368 '<INPUT TYPE="hidden" NAME="mf_action" VALUE="confirm_modify">' .
371 html_tag(
'th',
_(
"Server:"),
'right' ) .
372 html_tag(
'td',
'<input type="text" name="mf_server" value="' . htmlspecialchars($mailfetch_server_[$mf_sn]) .
'" size="40">',
'left' )
376 html_tag(
'td',
'<input type="text" name="mf_port" value="' . htmlspecialchars($mailfetch_port_[$mf_sn]) .
'" size="40">',
'left' )
380 html_tag(
'td',
'<input type="text" name="mf_alias" value="' . htmlspecialchars($mailfetch_alias_[$mf_sn]) .
'" size="40">',
'left' )
383 html_tag(
'th',
_(
"Username:"),
'right' ) .
384 html_tag(
'td',
'<input type="text" name="mf_user" value="' . htmlspecialchars($mailfetch_user_[$mf_sn]) .
'" size="20">',
'left' )
387 html_tag(
'th',
_(
"Password:"),
'right' ) .
388 html_tag(
'td',
'<input type="password" name="mf_pass" value="' . htmlspecialchars($mailfetch_pass_[$mf_sn]) .
'" size="20">',
'left' )
391 html_tag(
'th',
_(
"Store in Folder:"),
'right' ) .
396 echo
'<select name="mf_subfolder">';
398 if ( isset($mailfetch_subfolder_[$mf_sn]) ) {
399 $selected = array(strtolower($mailfetch_subfolder_[$mf_sn]));
402 '</select></td></tr>' .
405 html_tag(
'th',
' ',
'right' ) .
407 '<input type=checkbox name=mf_lmos ' . (($mailfetch_lmos_[$mf_sn] ==
'on')?
'checked':
'') .
408 '>' .
_(
"Leave Mail on Server") ,
412 html_tag(
'th',
' ',
'right' ) .
414 '<input type=checkbox name=mf_login ' . ( ($mailfetch_login_[$mf_sn] ==
'on')?
'checked':
'') .
415 '>' .
_(
"Check mail at login"),
419 html_tag(
'th',
' ',
'right' ) .
421 '<input type=checkbox name=mf_fref ' . ( ($mailfetch_fref_[$mf_sn] ==
'on')?
'checked':
'') .
422 '>' .
_(
"Check mail at folder refresh") ,
427 '<input type=submit name="submit_mailfetch" value="' .
_(
"Modify Server") .
'">',
428 'center',
'',
'colspan="2"' )
431 '</table></form></td></tr></table>';
437 html_tag(
'td',
'<b>' .
_(
"Fetching Servers") .
'</b>',
'center',
$color[0] )
439 'center',
'',
'width="95%"' ) .
443 html_tag(
'td',
'<b>' .
_(
"Undefined Function") .
'</b>',
'center',
$color[9] ) .
444 html_tag(
'td',
'<b>' .
_(
"The function you requested is unknown.") .
'</b>',
'center',
$color[0] )
446 'center',
'',
'width="70%"' );