".i18n::translate('No recipient user was provided. Cannot continue.')."
"; print_simple_footer(); exit; } if ($to=="all" && !WT_USER_IS_ADMIN) { print "".i18n::translate('No recipient user was provided. Cannot continue.')."
"; print_simple_footer(); exit; } if (($action=="send")&&(isset($_SESSION["good_to_send"]))&&($_SESSION["good_to_send"]===true)) { $_SESSION["good_to_send"] = false; if (!empty($from_email)) $from = $from_email; if (!get_user_id($from)) { $mt = preg_match("/(.+)@(.+)/", $from, $match); if ($mt>0) { $host = trim($match[2]); if (function_exists("checkdnsrr")) { $ip = checkdnsrr($host); if ($ip === false) { $host = "www.".$host; $ip = checkdnsrr($host); if ($ip === false) { print "

".i18n::translate('Please enter a valid email address.')."\n"; print "

"; $action="compose"; //print_simple_footer(); //exit; } } } } else { print "

".i18n::translate('Please enter a valid email address.')."\n"; print "

"; $action="compose"; } } //-- check referer for possible spam attack if (!isset($_SERVER['HTTP_REFERER']) || stristr($_SERVER['HTTP_REFERER'],"message.php")===false) { print "

Invalid page referer.\n"; print "

"; AddToLog('Invalid page referer while trying to send a message. Possible spam attack.', 'auth'); $action="compose"; } if ($action!="compose") { $toarray = array($to); if ($to == "all") { $toarray = get_all_users(); } if ($to == "never_logged") { $toarray = array(); foreach (get_all_users() as $user_id=>$user_name) { // SEE Bug [ 1827547 ] Message to inactive users sent to newcomers if (get_user_setting($user_id,'verified_by_admin')=="yes" && get_user_setting($user_id, 'reg_timestamp') > get_user_setting($user_id, 'sessiontime')) { $toarray[$user_id] = $user_name; } } } if ($to == "last_6mo") { $toarray = array(); $sixmos = 60*60*24*30*6; //-- timestamp for six months foreach (get_all_users() as $user_id=>$user_name) { // SEE Bug [ 1827547 ] Message to inactive users sent to newcomers if (get_user_setting($user_id,'sessiontime')>0 && (time() - get_user_setting($user_id, 'sessiontime') > $sixmos)) { $toarray[$user_id] = $user_name; } //-- not verified by registration past 6 months else if (get_user_setting($user_id, 'verified_by_admin')!="yes" && (time() - get_user_setting($user_id, 'reg_timestamp') > $sixmos)) { $toarray[$user_id] = $user_name; } } } $i = 0; foreach($toarray as $indexval => $to) { $message = array(); $message["to"]=$to; $message["from"]=$from; if (!empty($from_name)) { $message["from_name"] = $from_name; $message["from_email"] = $from_email; } $message["subject"] = $subject; $url = preg_replace("/".session_name()."=.*/", "", $url); $message["body"] = $body; $message["created"] = $time; $message["method"] = $method; $message["url"] = $url.'&ged='.$GEDCOM; if ($i>0) $message["no_from"] = true; if (addMessage($message)){ $to_user_id=get_user_id($to); if ($to_user_id) { print i18n::translate('Message successfully sent to %s', "".getUserFullName($to_user_id).""); print "
"; } else { AddToLog('Invalid TO user.'.$to.' Possible spam attack.', 'auth'); } } else { AddToLog('Unable to send message. TO:'.$to.' FROM:'.$from, 'error'); } $i++; } } } else if ($action=="send") AddToLog('Invalid Compose Session while trying to send a message. Possible spam attack.', 'auth'); if ($action=="compose") { print ''.i18n::translate('Send Message').''; $_SESSION["good_to_send"] = true; ?>
".i18n::translate('Please Note: Private information of living individuals will only be given to family relatives and close friends. You will be asked to verify your relationship before you will receive any private data. Sometimes information of dead persons may also be private. If this is the case, it is because there is not enough information known about the person to determine whether they are alive or not and we probably do not have more information on this person.

Before asking a question, please verify that you are inquiring about the correct person by checking dates, places, and close relatives. If you are submitting changes to the genealogical data, please include the sources where you obtained the data.'); } print "
\n"; print "\n"; $to_user_id=get_user_id($to); if ($to_user_id) { echo "\n"; } if (!WT_USER_ID){ print ""; print "\n"; } print ""; print "\n"; print "\n"; print "\n"; print "
".i18n::translate('This message will be sent to %s', "".getUserFullName($to_user_id)."")."
"; echo i18n::translate('This user prefers to receive messages in %s', Zend_Locale::getTranslation(get_user_setting($to_user_id, 'language'), 'language', WT_LOCALE))."
".i18n::translate('Your Name:')."
".i18n::translate('Email Address:')."
".i18n::translate('Please provide your email address so that we may contact you in response to this message. If you do not provide your email address we will not be able to respond to your inquiry. Your email address will not be used in any other way besides responding to this inquiry.')."

".i18n::translate('Subject:').""; if (WT_USER_ID){ print "\n"; } print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "
".i18n::translate('Body:')."

\n"; print "
\n"; if ($method=="messaging2") print i18n::translate('When you send this message you will receive a copy sent via email to the address you provided.'); } else if ($action=="delete") { if (deleteMessage($id)) print i18n::translate('Message Deleted'); } print "


".i18n::translate('Close Window')."
"; print_simple_footer(); ?>