- do_hook('options_identities_top');
- LoadInfo($full_name, $email_address, $reply_to, $signature, '');
- $td_str = '';
- $td_str .= '<form name="f" action="options_identities.php" method="post"><br />';
- $td_str .= ShowTableInfo($full_name, $email_address, $reply_to, $signature, '');
-
- $num = 1;
- while (LoadInfo($full_name, $email_address, $reply_to, $signature, $num)) {
- $td_str .= html_tag( 'tr',
- html_tag( 'th', sprintf (_("Alternate Identity %d"), $num), 'center', '', 'colspan="2"' ) ,
- '', $color[9]);
- $td_str .= ShowTableInfo($full_name, $email_address, $reply_to, $signature, $num);
- $num ++;
- }
-
- echo '<br />' .
- html_tag( 'table', "\n" .
- html_tag( 'tr', "\n" .
- html_tag( 'td', "\n" .
- '<b>'. _("Options") . ' - ' . _("Advanced Identities") .'</b><br />' .
- html_tag( 'table', "\n" .
- html_tag( 'tr', "\n" .
- html_tag( 'td', "\n" .
- html_tag( 'table', "\n" .
- html_tag( 'tr', "\n" .
- html_tag( 'th', _("Default Identity"), 'center', '', 'colspan="2"' ) ,
- '', $color[9]) . "\n" .
- $td_str . "\n" .
- html_tag( 'tr',
- html_tag( 'th', _("Add a New Identity") . ShowTableInfo('', '', '', '', $num), 'center', '', 'colspan="2"' ) ,
- '', $color[9]) ,
- '', '', 'width="80%" cellpadding="2" cellspacing="0" border="0"' ) ,
- 'center', $color[4] )
- ) ,
- '', '', 'width="100%" border="0" cellpadding="1" cellspacing="1"' ) ,
- 'center', $color[0] )
- ) ,
- 'center', '', 'width="95%" border="0" cellpadding="2" cellspacing="0"' ) .
-
- '</body></html>';
-
- function SaveUpdateFunction() {
- global $username, $data_dir, $full_name, $email_address, $reply_to, $signature;
-
- $i = 1;
- $fakeI = 1;
- $name = 'form_for_' . $i;
- global $$name;
- while (isset($$name))
- {
- $name = 'delete_' . $i;
- global $$name;
- if (isset($$name)) {
- $fakeI --;
- } else {
- do_hook('options_identities_renumber', $i, $fakeI);
- $filled = 0;
-
- $name = 'full_name' . $i;
- global $$name;
- if ($$name != '')
- $filled ++;
- setPref($data_dir, $username, 'full_name' . $fakeI, $$name);
-
- $name = 'email_address' . $i;
- global $$name;
- if ($$name != '')
- $filled ++;
- setPref($data_dir, $username, 'email_address' . $fakeI, $$name);
-
- $name = 'reply_to' . $i;
- global $$name;
- if ($$name != '')
- $filled ++;
- setPref($data_dir, $username, 'reply_to' . $fakeI, $$name);
-
- $name = 'signature' . $i;
- global $$name;
- if ($$name != '')
- $filled ++;
- setSig($data_dir, $username, $fakeI, $$name);
-
- if ($filled == 0)
- $fakeI --;
- }
-
- $fakeI ++;
- $i ++;
- $name = 'form_for_' . $i;
- global $$name;
- }