%s.'),forge_get_config('web_host')),'home'); } if (getStringFromRequest('send_mail')) { if (!form_key_is_valid(getStringFromRequest('form_key'))) { exit_form_double_submit('home'); } $valide = 1; if (!session_loggedin()) { $params['valide'] =& $valide; $params['warning_msg'] =& $warning_msg; plugin_hook('captcha_check', $params); } $subject = getStringFromRequest('subject'); $body = getStringFromRequest('body'); $name = getStringFromRequest('name'); $email = getStringFromRequest('email'); if ($valide) { if (!$subject || !$body || !$name || !$email) { /* force them to enter all vars */ form_release_key(getStringFromRequest('form_key')); exit_missing_param('', array(_('Subject'), _('Body'), _('Name'), _('Email')), 'home'); } // we remove the CRLF in all thoses vars. This is to make sure that there will be no CRLF Injection $name = util_remove_CRLF($name); // Really don't see what wrong could happen with CRLF in message body //$email = util_remove_CRLF($email); $subject = util_remove_CRLF($subject); if ($toaddress) { /* send it to the toaddress */ $to = preg_replace('/_maillink_/i', '@', $toaddress); $to = util_remove_CRLF($to); util_send_message($to, $subject, $body, $email, '', $name); $HTML->header(array('title' => forge_get_config('forge_name').' ' ._('Contact'))); echo '

'._('Message has been sent').'.

'; $HTML->footer(array()); exit; } elseif ($touser) { /* figure out the user's email and send it there */ $to = db_result($result,0,'email'); $to = util_remove_CRLF($to); util_send_message($to, $subject, $body, $email, '', $name); $HTML->header(array('title' => forge_get_config('forge_name').' '._('Contact'))); echo '

'._('Message has been sent').'

'; $HTML->footer(array()); exit; } } } if ($toaddress) { $titleaddress = $toaddress; } else { $titleaddress = db_result($result,0,'user_name'); } if (session_loggedin()) { $user =& session_get_user(); $name = $user->getRealName(); $email = $user->getEmail(); $is_logged = true; } else { $is_logged = false; if (!isset($valide)) { $name = ''; $email = ''; } } $subject = getStringFromRequest('subject'); $HTML->header(array('title' => forge_get_config('forge_name').' '._('Contact'))); ?>

IF YOU ARE WRITING FOR HELP: Did you read the site documentation? Did you include your user_id and user_name? If you are writing about a project, include your project id (group_id) and Project Name.'); ?>


'; echo ''; } else { echo ''; } ?>


'; echo ''; } else { echo ''; } ?>



footer(array()); // Local Variables: // mode: php // c-file-style: "bsd" // End: