SUB_POINTS('transfer', getUserId(), REQUEST_POST('points'));
// First send email to recipient
- $msg = LOAD_EMAIL_TEMPLATE('member_transfer_recipient', '', constant('__RECIPIENT_UID'));
- sendEmail(constant('__RECIPIENT_EMAIL'), getMessage('TRANSFER_MEMBER_RECIPIENT_SUBJ') . ': ' . $SENDER, $msg);
+ $message = LOAD_EMAIL_TEMPLATE('member_transfer_recipient', '', constant('__RECIPIENT_UID'));
+ sendEmail(constant('__RECIPIENT_EMAIL'), getMessage('TRANSFER_MEMBER_RECIPIENT_SUBJ') . ': ' . $SENDER, $message);
// Second send email to sender
- $msg = LOAD_EMAIL_TEMPLATE('member_transfer_sender', '', constant('__SENDER_UID'));
- sendEmail(constant('__SENDER_EMAIL'), getMessage('TRANSFER_MEMBER_SENDER_SUBJ') . ': ' . $RECIPIENT, $msg);
+ $message = LOAD_EMAIL_TEMPLATE('member_transfer_sender', '', constant('__SENDER_UID'));
+ sendEmail(constant('__SENDER_EMAIL'), getMessage('TRANSFER_MEMBER_SENDER_SUBJ') . ': ' . $RECIPIENT, $message);
// At last send admin mail(s)
$ADMIN_SUBJ = sprintf("%s (%s->%s)", getMessage('TRANSFER_ADMIN_SUBJECT'), $SENDER, $RECIPIENT);
//
// First of all create the temporary table
$result = SQL_QUERY("CREATE TEMPORARY TABLE `{!_MYSQL_PREFIX!}_transfers_tmp` (
-trans_id VARCHAR(12) NOT NULL DEFAULT '',
-party_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
-points BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
-reason VARCHAR(255) NOT NULL DEFAULT '',
-time_trans VARCHAR(10) NOT NULL DEFAULT '0',
-trans_type ENUM('IN','OUT') NOT NULL DEFAULT 'IN',
-KEY(party_uid)
+`trans_id` VARCHAR(12) NOT NULL DEFAULT '',
+`party_uid` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
+`points` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
+`reason` VARCHAR(255) NOT NULL DEFAULT '',
+`time_trans` VARCHAR(10) NOT NULL DEFAULT '0',
+`trans_type` ENUM('IN','OUT') NOT NULL DEFAULT 'IN',
+KEY(`party_uid`)
) TYPE=HEAP", __FILE__, __LINE__);
// Let's begin with the incoming list
$DATA[] = 'IN';
$DATA = implode("','", $DATA);
$res_temp = SQL_QUERY("INSERT INTO `{!_MYSQL_PREFIX!}_transfers_tmp` (`trans_id`, `party_uid`, `points`, `reason`, `time_trans`, `trans_type`) VALUES ('".$DATA."')", __FILE__, __LINE__);
- }
+ } // END - while
// Free memory
SQL_FREERESULT($result);