templates/de/emails/admin/admin_rallye_no_notify.tpl -text
templates/de/emails/admin/admin_rallye_notify.tpl -text
templates/de/emails/admin/admin_rallye_purged.tpl -text
+templates/de/emails/admin/admin_refback.tpl -text
templates/de/emails/admin/admin_reset_password.tpl -text
templates/de/emails/admin/admin_sponsor_change_data.tpl -text
templates/de/emails/admin/admin_sponsor_change_email.tpl -text
templates/de/emails/member/member_rallye_expired_gold.tpl -text
templates/de/emails/member/member_rallye_expired_silver.tpl -text
templates/de/emails/member/member_rallye_notify.tpl -text
+templates/de/emails/member/member_refback.tpl -text
templates/de/emails/member/member_stats_bonus.tpl -text
templates/de/emails/member/member_support-order.tpl -text
templates/de/emails/member/member_support-ordr.tpl -text
define('SERVER_URL', "http://www.mxchange.org");
// This current patch level
-define('CURR_SVN_REVISION', "413");
+define('CURR_SVN_REVISION', "415");
// Take a prime number which is long (if you know a longer one please try it out!)
define('_PRIME', 591623);
define('MEMBER_REFBACK_ERROR_NOT_UPDATED', "Ref-Back nicht aktualisiert.");
define('MEMBER_REFBACK_DONE', "Ref-Back eingestellt. Dieser ist ab jetzt gültig.");
+// Subject lines
+define('ADMIN_REFBACK_SUBJECT', "Es wurde Ref-Back eingestellt");
+define('MEMBER_REFBACK_SUBJECT', "Für Sie wurde Ref-Back eingestellt");
+
//
?>
$id = bigintval($id);
// Get entry from database
- $result = SQL_QUERY_ESC("SELECT id, refid, refback FROM "._MYSQL_PREFIX."_user_refs WHERE id=%s AND userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT id, refid, refback, level FROM "._MYSQL_PREFIX."_user_refs WHERE id=%s AND userid=%s LIMIT 1",
array($id, $GLOBALS['userid']), __FILE__, __LINE__);
// Is there an entry?
return $status;
} elseif ("".$id."" != "".bigintval($id)."") {
// No number!
- $status['message'] = MEMBER_REFBACK_INVALID_ID_NUMBER;
+ $status['message'] = MEMBER_REFBACK_ERROR_INVALID_ID_NUMBER;
return $status;
} elseif (($percents < 0) || ($percents > 100)) {
// Percentage is not valid!
- $status['message'] = MEMBER_REFBACK_INVALID_PERCENTAGE;
+ $status['message'] = MEMBER_REFBACK_ERROR_INVALID_PERCENTAGE;
return $status;
}
// Is this valid?
if (count($dummy) == 0) {
// ID does not belong to user!
- $status['message'] = MEMBER_REFBACK_ID_MISMATCH;
+ $status['message'] = MEMBER_REFBACK_ERROR_ID_MISMATCH;
return $status;
} // END - if
// Entry updated?
if (SQL_AFFECTEDROWS() < 1) {
// Entry not updated!
- $status['message'] = MEMBER_REFBACK_NOT_UPDATED;;
+ $status['message'] = MEMBER_REFBACK_ERROR_NOT_UPDATED;;
return $status;
} // END - if
+ // Prepare email content
+ $content = array(
+ 'percents' => TRANSLATE_COMMA($percents),
+ 'refid' => $dummy['refid'],
+ 'level' => $dummy['level']
+ );
+
+ // Load member email template
+ $mail = LOAD_EMAIL_TEMPLATE("member_refback", $content, $GLOBALS['userid']);
+
+ // Send email to user
+ SEND_EMAIL($dummy['refid'], MEMBER_REFBACK_SUBJECT, $mail);
+
+ // Send admin notification
+ SEND_ADMIN_NOTIFICATION(ADMIN_REFBACK_SUBJECT, "admin_refback", $content, $GLOBALS['userid']);
+
// All fine!
$status['ok'] = true;
--- /dev/null
+Hallo Administrator,
+
+Das Mitglied $UID hat soeben Ref-Back für ein anderes Mitglied eingestellt.
+
+------------------------------
+Mitglied-ID: $content[refid] (der den Ref-Back bekommt)
+------------------------------
+Ref-Back: $content[percents]%
+------------------------------
+
+Mit freundlichem Gruss,
+ Ihr {!MAIN_TITLE!} Team
+
+{!URL!}/login.php ({!WEBMASTER!})
--- /dev/null
+Hallo $content[gender] $content[surname] $content[family],
+
+Das Mitglied $UID hat Ihnen soeben Ref-Back eingestellt. Sie erhalten also anteilig {!POINTS!} von seinen Referal-Gutschriften die Sie ihm/ihr bringen ebenfalls gutgeschrieben.
+
+------------------------------
+Ihr Mitglieder-ID ist: $content[refid]
+------------------------------
+Ref-Back: $content[percents]%
+------------------------------
+
+Mit freundlichem Gruss,
+ Ihr {!MAIN_TITLE!} Team
+
+{!URL!}/login.php ({!WEBMASTER!})
\ No newline at end of file