return $ret;
}
-
/*
* Create a new address from $userdata, in backend $bnum.
* Return the backend number that the/ address was added
}
+/* Sort array by the key "name" */
+function alistcmp($a,$b) {
+ if ($a['backend'] > $b['backend']) {
+ return 1;
+ } else {
+ if ($a['backend'] < $b['backend']) {
+ return -1;
+ }
+ }
+ return (strtolower($a['name']) > strtolower($b['name'])) ? 1 : -1;
+}
+
?>
$res = $abook->list_addr($backend);
if(is_array($res)) {
+ usort($res,'alistcmp');
display_result($res, false);
} else {
echo '<P ALIGN=center><STRONG>' .
}
} else {
$res = $abook->list_addr();
+ usort($res,'alistcmp');
display_result($res, true);
}
$res = $abook->list_addr($backend);
if (is_array($res)) {
+ usort($res,'alistcmp');
addr_display_result($res, false);
} else {
echo '<P ALIGN=center><STRONG>' .
} else {
$res = $abook->list_addr();
+ usort($res,'alistcmp');
addr_display_result($res, true);
}
exit;
require_once('../functions/display_messages.php');
require_once('../functions/addressbook.php');
-/* Sort array by the key "name" */
-function alistcmp($a,$b) {
- if($a['backend'] > $b['backend']) {
- return 1;
- } else {
- if($a['backend'] < $b['backend']) {
- return -1;
- }
- }
- return (strtolower($a['name']) > strtolower($b['name'])) ? 1 : -1;
-}
-
/* Make an input field */
function adressbook_inp_field($label, $field, $name, $size, $values, $add) {
global $color;