$tables["user"],$_SESSION["userid"])); $id = $req[0]; $userid = $req[1]; $userpassword = $req[2]; $emailcheck = $req[3]; */ } else { $userid = ''; $userpassword = ''; $emailcheck = ''; } if (isset($_REQUEST['id']) && $_REQUEST['id']) { $id = sprintf('%d', $_REQUEST['id']); } # make sure the subscribe page still exists $req = Sql_fetch_row_query(sprintf('select id from %s where id = %d', $tables['subscribepage'], $id)); $id = $req[0]; $msg = ''; if (!empty($_POST['sendpersonallocation'])) { if (isset($_POST['email']) && $_POST['email']) { $uid = Sql_Fetch_Assoc_Query(sprintf('select uniqid,email,id,blacklisted from %s where email = "%s"', $tables['user'], sql_escape($_POST['email']))); if ($uid['blacklisted']) { $msg .= $GLOBALS['strYouAreBlacklisted']; } elseif ($uid['uniqid']) { sendMail($uid['email'], getConfig('personallocation_subject'), getUserConfig('personallocation_message', $uid['id']), system_messageheaders(), $GLOBALS['envelope']); $msg = $GLOBALS['strPersonalLocationSent']; addSubscriberStatistics('personal location sent', 1); } else { $msg = $GLOBALS['strUserNotFound']; } }
function processBounceData($bounceid, $msgid, $userid) { global $tables; $useremailQ = Sql_fetch_row_query(sprintf('select email from %s where id = %d', $tables['user'], $userid)); $useremail = $useremailQ[0]; if ($msgid === "systemmessage" && !empty($userid)) { Sql_Query(sprintf('update %s set status = "bounced system message", comment = "%s marked unconfirmed" where id = %d', $tables["bounce"], $userid, $bounceid)); logEvent("{$userid} " . $GLOBALS['I18N']->get("system message bounced, user marked unconfirmed")); addUserHistory($useremail, $GLOBALS['I18N']->get("Bounced system message"), "\n <br/>" . $GLOBALS['I18N']->get("User marked unconfirmed") . "\n <br/><a href=\"./?page=bounce&id={$bounceid}\">" . $GLOBALS['I18N']->get("View Bounce") . "</a>\n\n "); Sql_Query(sprintf('update %s set confirmed = 0 where id = %d', $tables["user"], $userid)); } elseif (!empty($msgid) && !empty($userid)) { ## check if we already have this um as a bounce ## so that we don't double count "delayed" like bounces $exists = Sql_Fetch_Row_Query(sprintf('select count(*) from %s where user = %d and message = %d', $tables["user_message_bounce"], $userid, $msgid)); if (empty($exists[0])) { Sql_Query(sprintf('insert into %s set user = %d, message = %d, bounce = %d', $tables["user_message_bounce"], $userid, $msgid, $bounceid)); Sql_Query(sprintf('update %s set status = "bounced list message %d", comment = "%s bouncecount increased" where id = %d', $tables["bounce"], $msgid, $userid, $bounceid)); Sql_Query(sprintf('update %s set bouncecount = bouncecount + 1 where id = %d', $tables["message"], $msgid)); Sql_Query(sprintf('update %s set bouncecount = bouncecount + 1 where id = %d', $tables["user"], $userid)); } else { ## we create the relationship, but don't increase counters Sql_Query(sprintf('insert into %s set user = %d, message = %d, bounce = %d', $tables["user_message_bounce"], $userid, $msgid, $bounceid)); ## we cannot translate this text Sql_Query(sprintf('update %s set status = "duplicate bounce for %d", comment = "duplicate bounce for subscriber %d on message %d" where id = %d', $tables["bounce"], $userid, $userid, $msgid, $bounceid)); } } elseif ($userid) { Sql_Query(sprintf('update %s set status = "bounced unidentified message", comment = "%s bouncecount increased" where id = %d', $tables["bounce"], $userid, $bounceid)); Sql_Query(sprintf('update %s set bouncecount = bouncecount + 1 where id = %d', $tables["user"], $userid)); } elseif ($msgid === 'systemmessage') { Sql_Query(sprintf('update %s set status = "bounced system message", comment = "unknown user" where id = %d', $tables["bounce"], $bounceid)); logEvent("{$userid} " . $GLOBALS['I18N']->get("system message bounced, but unknown user")); } elseif ($msgid) { Sql_Query(sprintf('update %s set status = "bounced list message %d", comment = "unknown user" where id = %d', $tables["bounce"], $msgid, $bounceid)); Sql_Query(sprintf('update %s set bouncecount = bouncecount + 1 where id = %d', $tables["message"], $msgid)); } else { Sql_Query(sprintf('update %s set status = "unidentified bounce", comment = "not processed" where id = %d', $tables["bounce"], $bounceid)); return false; } return true; }