示例#1
0
	</table>
	<br />

	<?php 
        if ($task == 'search' || $task == 'show_letter') {
            if ($task == 'show_letter') {
                $query = smart_addslashes($_POST['query']) . '%';
            } else {
                $query = '%' . smart_addslashes($_POST['query']) . '%';
            }
            if ($search_type == 'contacts' || $search_type == 'users') {
                if ($search_type == 'users') {
                    $click_type = 'user';
                    $array_name = 'users[]';
                    $ab1 = new GO_USERS();
                    $ab1->search($query, $search_field, $GO_SECURITY->user_id);
                } else {
                    $click_type = 'contact';
                    $array_name = 'contacts[]';
                    $ab1->search_contacts($GO_SECURITY->user_id, $query, $search_field, $ab_settings['search_addressbook_id']);
                }
                $search_results = '';
                while ($ab1->next_record()) {
                    if ((!$require_email_address || $ab1->f("email") != '') && ($search_type == 'users' && $GO_SECURITY->has_permission($GO_SECURITY->user_id, $ab1->f('acl_id')) || $search_type != 'users' && ($GO_SECURITY->has_permission($GO_SECURITY->user_id, $ab1->f('acl_read')) || $GO_SECURITY->has_permission($GO_SECURITY->user_id, $ab1->f('acl_write'))))) {
                        $class = "Table1";
                        $check = "";
                        if ($pass_value == 'email') {
                            if ($ab1->f("email") != "") {
                                $key = array_search($ab1->f("email"), $addresses);
                            } else {
                                $key = false;