5 * Functions to make working with address books easier
7 * @copyright © 1999-2006 The SquirrelMail Project Team
8 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
10 * @package squirrelmail
11 * @subpackage templates
15 * Display a column header with sort buttons
17 * @param string $field which field to display
21 function addAbookSort ($field) {
22 global $abook_sort_order;
27 $alt = _("sort by nickname");
34 $alt = _("sort by name");
41 $alt = _("sort by email");
48 $alt = _("sort by info");
54 return 'BAD SORT FIELD GIVEN: "'.$field.'"';
57 return $str . ($has_sort ?
show_abook_sort_button($abook_sort_order, $alt, $down, $up) : '');
61 * Create a link to compose an email to the email address given.
63 * @param array $row contact as given to the addressbook_list.tpl template
67 function composeLink ($row) {
68 return makeComposeLink('src/compose.php?send_to=' .
69 rawurlencode($row['FullAddress']),
70 htmlspecialchars($row['Email']));