*/
require_once('../src/validate.php');
+require_once('../functions/strings.php');
/* Function to include JavaScript code */
function insert_javascript() {
while (list($undef, $row) = each($res)) {
echo '<tr';
- if ($line % 2) { echo ' bgcolor="' . $color[0] . '"' }
+ if ($line % 2) { echo ' bgcolor="' . $color[0] . '"'; }
echo ' nowrap><td valign=top nowrap align=center width="5%">' .
'<small><a href="javascript:to_address(' .
"'" . $row['email'] . "');\">To</A> | " .
} else {
/* Show personal addressbook */
- if ($show == 'blank' || !empty($listall)) {
+ if ($show == 'blank' && empty($listall)) {
if($backend != -1 || $show == 'blank') {
if ($show == 'blank') {
$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);
}
} else {
+ if( !empty( $listall ) ){
+ $query = '*';
+ }
/* Do the search */
- if (!empty($query) && empty($listall)) {
+ if (!empty($query)) {
if($backend == -1) {
$res = $abook->s_search($query);