$search_field = $ab_settings['search_contacts_field']; $dropbox->add_value('ab_contacts.first_name', $strFirstName); $dropbox->add_value('ab_contacts.last_name', $strLastName); $dropbox->add_value('ab_contacts.email', $strEmail); $dropbox->add_value('ab_contacts.department', $strDepartment); $dropbox->add_value('ab_contacts.function', $strFunction); $dropbox->add_value('ab_contacts.address', $strAddress); $dropbox->add_value('ab_contacts.city', $strCity); $dropbox->add_value('ab_contacts.zip', $strZip); $dropbox->add_value('ab_contacts.state', $strState); $dropbox->add_value('ab_contacts.country', $strCountry); $dropbox->add_value('ab_contacts.comment', $ab_comment); if ($custom_fields_plugin) { require_once $custom_fields_plugin['class_path'] . 'custom_fields.class.inc'; $cf = new custom_fields('ab_custom_contact_fields'); if ($cf->get_fields()) { while ($cf->next_record()) { $dropbox->add_value('ab_custom_contact_fields.`' . $cf->f('field') . '`', $cf->f('field')); } } } break; case 'users': $_search_field = isset($_POST['search_field']) ? $_POST['search_field'] : 'users.first_name'; $search_field = isset($ab_settings['search_users_field']) ? $ab_settings['search_users_field'] : $_search_field; $dropbox->add_value('users.first_name', $strFirstName); $dropbox->add_value('users.last_name', $strLastName); $dropbox->add_value('users.email', $strEmail); $dropbox->add_value('users.department', $strDepartment); $dropbox->add_value('users.function', $strFunction); $dropbox->add_value('users.address', $strAddress);