get_user_by_email($_POST['auth_email_address'])) { $mail_body = ''; $middle_name = $user['middle_name'] == '' ? '' : $user['middle_name'].' '; $user_name = $middle_name.$user['last_name']; $middle_name = $profile['middle_name'] == '' ? '' : $profile['middle_name'].' '; $profile_name = $profile['first_name'].' '.$middle_name.$profile['last_name']; $mail_body .= $ac_salutation.' '.$sir_madam[$user['sex']].' '.$user_name.',

'; $mail_body .= $profile_name.' '.$ac_request_auth.'

'; $mail_body .= ''.$ac_accept.'   '; $mail_body .= ''.$ac_decline.'   '; $mail_body .= ''; if(!sendmail($user['email'], $profile['email'], $GO_CONFIG->title, $ac_request_auth_mail_title, $mail_body,'3 (Normal)', 'text/html')) { $feedback = '

'.$strEmailFail.'

'; $task = 'add_user'; } }else { $feedback = '

'.$ac_invalid_email.'

'; $task = 'add_user'; } }else { $feedback = '

'.$strDataError.'

'; $task = 'add_user'; } } if (isset($feedback)) { echo $feedback; } switch($task) { case 'add_user': echo ''; echo ''; echo '
'.$ac_auth_text.'

'.$strEmail.':

'; $button = new button($cmdOk, "javascript:send_request()"); echo '  '; $button = new button($cmdCancel, "javascript:document.forms[0].task.value='privacy';document.forms[0].submit()"); echo '
'; echo ' '; break; case 'authorize': echo $ac_request_mail_body_prefix.' '.$user['first_name'].' '.$user_name.' '.$ac_request_mail_body_suffix.'

'; $button = new button($cmdContinue, "javascript:document.forms[0].task.value='privacy';document.forms[0].submit()"); break; default: echo ''.$ac_add_user.'

'; echo $privacy_text."

"; print_acl($profile['acl_id'], false); //echo '
'; //$button = new button($cmdClose, "javascript:document.location='".$return_to ."'"); break; } ?>