'; ?>

A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z  

'.$ab_search_for.':'; $_COOKIE['ab_search_addressbook_id'] = isset($_COOKIE['ab_search_addressbook_id']) ? $_COOKIE['ab_search_addressbook_id'] : '0'; $search_addressbook_id = isset($_REQUEST['search_addressbook_id']) ? $_REQUEST['search_addressbook_id'] : $_COOKIE['ab_search_addressbook_id']; if ($search_type != 'users' && $ab->get_subscribed_addressbooks($GO_SECURITY->user_id) > 1) { $subscribed_addressbooks = new dropbox(); $subscribed_addressbooks->add_value('0', $ab_all_your_addressbooks); while ($ab->next_record()) { $subscribed_addressbooks->add_value($ab->f('id'), $ab->f('name')); } echo ''; }else { echo ''; } $_COOKIE['ab_search_companies_field'] = isset($_COOKIE['ab_search_companies_field']) ? $_COOKIE['ab_search_companies_field'] : 'name'; $_COOKIE['ab_search_contacts_field'] = isset($_COOKIE['ab_search_contacts_field']) ? $_COOKIE['ab_search_contacts_field'] : 'first_name'; $search_field = ($search_type == 'contacts' || $search_type == 'users') ? $_COOKIE['ab_search_contacts_field'] : $_COOKIE['ab_search_companies_field']; $dropbox = new dropbox(); if ($search_type == 'companies') { $dropbox->add_value('name', $strName); $dropbox->add_value('email', $strEmail); $dropbox->add_value('address',$strAddress); $dropbox->add_value('city', $strCity); $dropbox->add_value('zip',$strZip); $dropbox->add_value('state',$strState); $dropbox->add_value('country', $strCountry); }else { $dropbox->add_value('first_name', $strFirstName); $dropbox->add_value('last_name', $strLastName); $dropbox->add_value('email', $strEmail); $dropbox->add_value('department',$strDepartment); $dropbox->add_value('function',$strFunction); $dropbox->add_value('address',$strAddress); $dropbox->add_value('city', $strCity); $dropbox->add_value('zip',$strZip); $dropbox->add_value('state',$strState); $dropbox->add_value('country', $strCountry); $dropbox->add_value('comment', $ab_comment); } echo '
'; $_COOKIE['ab_search_type'] = isset($_COOKIE['ab_search_type']) ? $_COOKIE['ab_search_type'] : 'contacts'; $search_type = isset($_POST['search_type']) ? $_POST['search_type'] : $_COOKIE['ab_search_type']; $dropbox = new dropbox(); $dropbox->add_value('contacts', $contacts_contacts); $dropbox->add_value('companies', $ab_companies); $dropbox->add_value('users', $contacts_members); $dropbox->print_dropbox('search_type', $search_type, 'onchange="javascript:document.forms[0].submit()"'); echo ''.$ab_search_in.' '; $subscribed_addressbooks->print_dropbox('search_addressbook_id', $search_addressbook_id); echo ''.$ab_search_on.' '; $dropbox->print_dropbox('search_field', $search_field); echo '
:

get_contact($_POST['contact'][$i]); if ($GO_SECURITY->has_permission($GO_SECURITY->user_id, $contact['acl_write'])) { $ab->delete_contact($_POST['contact'][$i]); $GO_SECURITY->delete_acl($contact['acl_write']); $GO_SECURITY->delete_acl($contact['acl_read']); } } } if (isset($_POST['companies'])) { for ($i=0;$iget_company($_POST['companies'][$i]); if ($GO_SECURITY->has_permission($GO_SECURITY->user_id, $company['acl_write'])) { $ab->delete_company($_POST['companies'][$i]); $GO_SECURITY->delete_acl($company['acl_write']); $GO_SECURITY->delete_acl($company['acl_read']); } } } if ($_POST['task'] != 'show_letter') { $query = '%'.$_POST['query'].'%'; }else { $query = $_POST['query'].'%'; } $count = 0; $results = ''; switch($search_type) { case 'contacts': $ab->search_contacts($GO_SECURITY->user_id, $query, $search_field, $search_addressbook_id); while ($ab->next_record()) { if ($GO_SECURITY->has_permission($GO_SECURITY->user_id, $ab->f('acl_write')) || $GO_SECURITY->has_permission($GO_SECURITY->user_id, $ab->f('acl_read'))) { $count++; if ($ab->f('color') != '') { $style = ' style="color: '.$ab->f('color').';"'; }else { $style = ''; } $middle_name = $ab->f('middle_name') == '' ? '' : $ab->f('middle_name').' '; $name = $ab->f('first_name').' '.$middle_name.$ab->f('last_name'); $results .= ''; $results .= ''; $results .= "f("id")."&return_to=".$GO_MODULES->url."index.php\" title=\"".$strShowProfile."\">".empty_to_stripe($name)."  \n"; $results .= "".mail_to(empty_to_stripe($ab->f("email")), empty_to_stripe($ab->f("email")),'normal',true, $ab->f("id"))."  \n"; $results .= ''.empty_to_stripe($ab->f('home_phone')).'  '; $results .= ''.empty_to_stripe($ab->f('work_phone')).'  '; $results .= "\n"; $results .= ''; } } $result_str = ($count == 1) ? $count.' '.$contacts_result : $count.' '.$contacts_results; echo '

'.$result_str.'

'; if ($count > 0) { echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo $results; echo '
'.$strName.''.$strEmail.''.$strPhone.''.$strWorkphone.'
'; } break; case 'companies': $ab->search_companies($GO_SECURITY->user_id, $query, $search_field, $search_addressbook_id); while ($ab->next_record()) { if ($GO_SECURITY->has_permission($GO_SECURITY->user_id, $ab->f('acl_write')) || $GO_SECURITY->has_permission($GO_SECURITY->user_id, $ab->f('acl_read'))) { $count++; $results .= ''; $results .= ''; $results .= ''.$ab->f('name').'  '; $results .= ''.empty_to_stripe($ab->f('city')).'  '; $results .= "".mail_to(empty_to_stripe($ab->f("email")), empty_to_stripe($ab->f("email")),'normal',true, $ab->f("id"))."  \n"; $results .= ''.empty_to_stripe($ab->f('phone')).'  '; $results .= ''.$ab->f('homepage').'  '; $results .= "\n"; $results .= ''; } } $result_str = ($count == 1) ? $count.' '.$contacts_result : $count.' '.$contacts_results; echo '

'.$result_str.'

'; if ($count > 0) { echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo $results; echo '
'.$strName.''.$strCity.''.$strEmail.''.$strPhone.''.$strHomepage.'
'; } break; case 'users': require_once($GO_CONFIG->class_path.'users.class.inc'); $users = new users(); $users->search($query, $search_field, $GO_SECURITY->user_id); while ($users->next_record()) { if ($GO_SECURITY->has_permission($GO_SECURITY->user_id, $users->f('acl_id'))) { $middle_name = $users->f('middle_name') == '' ? '' : $users->f('middle_name').' '; $name = $users->f('first_name').' '.$middle_name.$users->f('last_name'); $results .= ''.show_profile($users->f('id'), $name).' '; $results .= "".mail_to(empty_to_stripe($users->f("email")))." \n"; $results .= "\n"; $results .= ''; $count++; } } $result_str = ($count == 1) ? $count.' '.$contacts_result : $count.' '.$contacts_results; echo '

'.$result_str.'

'; if ($count > 0) { echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo $results; echo '
'.$strName.''.$strEmail.''.$strPhone.''.$strWorkphone.'
'; } break; } } ?>