">
';
echo '';
echo $phpgw->nextmatchs->show_sort_order($sort,$company_sortorder,$order,"index.php",lang("Company Name"));
echo '';
}
if ($phpgw_info["user"]["preferences"]["addressbook"]["lastname"]) {
echo '';
echo '';
echo $phpgw->nextmatchs->show_sort_order($sort,"ab_lastname",$order,"index.php",
lang("Last Name"));
echo ' | ';
}
if ($phpgw_info["user"]["preferences"]["addressbook"]["firstname"]) {
echo '';
echo '';
echo $phpgw->nextmatchs->show_sort_order($sort,"ab_firstname",$order,"index.php",
lang("First Name"));
echo ' | ';
}
if ($phpgw_info["user"]["preferences"]["addressbook"]["email"]) {
echo '';
echo '';
echo $phpgw->nextmatchs->show_sort_order($sort,"ab_email",$order,"index.php",
lang("Email"));
echo ' | ';
}
if ($phpgw_info["user"]["preferences"]["addressbook"]["wphone"]) {
echo '';
echo '';
echo $phpgw->nextmatchs->show_sort_order($sort,"ab_wphone",$order,"index.php",
lang("Work Phone"));
echo ' | ';
}
?>
|
|
db->query("SELECT a.ab_id,a.ab_owner,a.ab_firstname,a.ab_lastname,"
. "a.ab_email,a.ab_wphone,c.company_name "
. "from addressbook as a, customers as c where a.ab_company_id = c.company_id "
. "AND $filtermethod AND (a.ab_lastname like '"
. "%$query%' OR a.ab_firstname like '%$query%' OR a.ab_email like '%$query%' OR "
. "a.ab_street like '%$query%' OR a.ab_city like '%$query%' OR a.ab_state "
. "like '%$query%' OR a.ab_zip like '%$query%' OR a.ab_notes like "
. "'%$query%' OR c.company_name like '%$query%') $ordermethod limit $limit");
} else {
$phpgw->db->query("SELECT ab_id,ab_owner,ab_firstname,ab_lastname,"
. "ab_email,ab_wphone,ab_company "
. "from addressbook "
. "WHERE $filtermethod AND (ab_lastname like '"
. "%$query%' OR ab_firstname like '%$query%' OR ab_email like '%$query%' OR "
. "ab_street like '%$query%' OR ab_city like '%$query%' OR ab_state "
. "like '%$query%' OR ab_zip like '%$query%' OR ab_notes like "
. "'%$query%' OR ab_company like '%$query%') $ordermethod limit $limit");
}
} else {
if($phpgw_info["apps"]["timetrack"]["enabled"]){
$phpgw->db->query("SELECT a.ab_id,a.ab_owner,a.ab_firstname,a.ab_lastname,"
. "a.ab_email,a.ab_wphone,c.company_name "
. "from addressbook as a, customers as c where a.ab_company_id = c.company_id "
. "AND $filtermethod $ordermethod limit $limit");
} else {
$phpgw->db->query("SELECT ab_id,ab_owner,ab_firstname,ab_lastname,"
. "ab_email,ab_wphone,ab_company "
. "from addressbook "
. "WHERE $filtermethod $ordermethod limit $limit");
}
}
while ($phpgw->db->next_record()) {
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
$firstname = $phpgw->db->f("ab_firstname");
$lastname = $phpgw->db->f("ab_lastname");
$email = $phpgw->db->f("ab_email");
if ($phpgw_info["apps"]["timetrack"]["enabled"]) {
$company = $phpgw->db->f("company_name");
} else {
$company = $phpgw->db->f("company");
}
$wphone = $phpgw->db->f("ab_wphone");
$ab_id = $phpgw->db->f("ab_id");
if ($firstname == "") $firstname = " ";
if ($lastname == "") $lastname = " ";
if ($email == "") $email = " ";
if ($company == "") $company = " ";
if ($wphone == "") $wphone = " ";
?>
';
if ($phpgw_info["user"]["preferences"]["addressbook"]["company"]) {
echo '';
echo '';
echo $company;
echo ' | ';
};
if ($phpgw_info["user"]["preferences"]["addressbook"]["lastname"]) {
echo '';
echo '';
echo $lastname;
echo ' | ';
};
if ($phpgw_info["user"]["preferences"]["addressbook"]["firstname"]) {
echo '';
echo '';
echo $firstname;
echo ' | ';
};
if ($phpgw_info["user"]["preferences"]["addressbook"]["email"]) {
echo '';
echo '';
echo '' . $email . '';
echo ' | ';
};
if ($phpgw_info["user"]["preferences"]["addressbook"]["wphone"]) {
echo '';
echo '';
echo $wphone;
echo ' | ';
};
?>
">
|
common->check_owner($phpgw->db->f("ab_owner"),"edit.php",lang("edit"),"ab_id=" . $phpgw->db->f("ab_id")); ?>
|