a72c6faace39d3f50e307636b7ba51a2f16867c2
1 <?php
/* Modified at 6 places by ri_once */ ?
>
6 ** Adds a "taken" address to the address book. Takes addresses from
7 ** incoming mail -- the body, To, From, Cc, or Reply-To.
12 if(!isset($username)) {
13 echo "You need a valid user and password to access this page!";
18 if (!isset($config_php))
19 /* '_once' Added by ri_once */ include_once("../config/config.php");
20 if (!isset($i18n_php))
21 /* '_once' Added by ri_once */ include_once("../functions/i18n.php");
22 if (!isset($page_header_php))
23 /* '_once' Added by ri_once */ include_once("../functions/page_header.php");
24 if (!isset($addressbook_php))
25 /* '_once' Added by ri_once */ include_once("../functions/addressbook.php");
26 if (!isset($strings_php))
27 /* '_once' Added by ri_once */ include_once("../functions/strings.php");
29 /* '_once' Added by ri_once */ include_once("../src/load_prefs.php");
31 displayPageHeader($color, "None");
33 $abook_take_verify = getPref($data_dir, $username, 'abook_take_verify');
36 <FORM ACTION
="../../src/addressbook.php" NAME
=f_add METHOD
="POST">
37 <TABLE WIDTH
=100% COLS
=1 ALIGN
=CENTER
>
38 <TR
><TH BGCOLOR
="<?PHP
40 ?>" ALIGN
=CENTER
><?PHP
41 // open address book, trash errors, skip LDAP
42 $abook = addressbook_init(false, true);
43 printf(_("Add to %s"), $abook->localbackendname
);
46 <TABLE BORDER
=0 CELLPADDING
=1 COLS
=2 WIDTH
="90%" ALIGN
=center
>
50 printf("<TR><TD WIDTH=50 BGCOLOR=\"$color[4]\" ALIGN=RIGHT>%s:</TD>",
52 printf("<TD BGCOLOR=\"%s\" ALIGN=left>".
53 "<INPUT NAME=\"%s[nickname]\" SIZE=15 VALUE=\"\">".
54 " <SMALL>%s</SMALL></TD></TR>\n",
55 $color[4], $name, _("Must be unique"));
56 printf("<TR><TD WIDTH=50 BGCOLOR=\"$color[4]\" ALIGN=RIGHT>%s:</TD>",
59 echo "<TD BGCOLOR=\"$color[4]\" ALIGN=left>\n";
60 echo '<select name="' . $name . "[email]\">\n";
61 foreach ($email as $Val)
63 if (valid_email($Val, $abook_take_verify))
65 echo '<option value="' . htmlspecialchars($Val) .
66 '">' . htmlspecialchars($Val) . "</option>\n";
71 printf("<TR><TD WIDTH=50 BGCOLOR=\"$color[4]\" ALIGN=RIGHT>%s:</TD>",
73 printf("<TD BGCOLOR=\"%s\" ALIGN=left>".
74 "<INPUT NAME=\"%s[firstname]\" SIZE=45 VALUE=\"\"></TD></TR>\n",
76 printf("<TR><TD WIDTH=50 BGCOLOR=\"$color[4]\" ALIGN=RIGHT>%s:</TD>",
78 printf("<TD BGCOLOR=\"%s\" ALIGN=left>".
79 "<INPUT NAME=\"%s[lastname]\" SIZE=45 VALUE=\"\"></TD></TR>\n",
81 printf("<TR><TD WIDTH=50 BGCOLOR=\"$color[4]\" ALIGN=RIGHT>%s:</TD>",
82 _("Additional info"));
83 printf("<TD BGCOLOR=\"%s\" ALIGN=left>".
84 "<INPUT NAME=\"%s[label]\" SIZE=45 VALUE=\"\"></TD></TR>\n",
87 printf("<TR><TD COLSPAN=2 BGCOLOR=\"%s\" ALIGN=center>\n".
88 "<INPUT TYPE=submit NAME=\"%s[SUBMIT]\" VALUE=\"%s\"></TD></TR>\n",
89 $color[4], $name, _("Add address"));