$abook->addgroup($var['UserGroup'], $user); } // Record we have already read this user $tmp[$user]++; } } // Update any record if ($_REQUEST['update']) { $abook->update($var); $var['status'] = "Updated {$var['Email']} - "; } // Add a new record to the addressbook if (AtmailGlobal::isset_chk($_REQUEST['add'])) { // Update the users prefs to show images in messages from users within the abook if (AtmailGlobal::isset_chk($_REQUEST['AbookAllow'])) { $atmail->update_settings_displayimages(); } $var['AddRecipients'] = $_REQUEST['AddRecipients']; if ($var['AddRecipients']) { if (preg_match('/(;|,)/', $var['AddRecipients'], $m)) { $recipients = explode($m[1], $var['AddRecipients']); } else { $recipients = array($var['AddRecipients']); } foreach ($recipients as $addr) { $addr = html_entity_decode($addr); $exp = '/([^":\\s<>()\\/;]*@[^":\\s<>()\\/;]*)/'; // Load the users email address from the string preg_match($exp, $addr, $match); $email = $match[1]; if (!$email) {