ADD_DESCR('admin', __FILE__);
// Check if admin has submitted form
-if (IS_FORM_SENT()) {
+if (isFormSent()) {
// Does he have selected at least one sponsor?
if (countSelection(REQUEST_POST('id')) > 0) {
// At least one entry selected
$result_main = SQL_QUERY_ESC("SELECT gender, surname, family, email, remote_addr, sponsor_created, points_amount, refid
FROM `{!_MYSQL_PREFIX!}_sponsor_data`
WHERE `status`='PENDING' AND id='%s' LIMIT 1",
- array($content['id']), __FILE__, __LINE__);
+ array($content['id']), __FILE__, __LINE__);
if (SQL_NUMROWS($result_main) == 1) {
// Load data
ON sp.id=so.payid
WHERE so.sponsorid='%s'
ORDER BY sp.pay_name",
- array($content['id']), __FILE__, __LINE__);
+ array($content['id']), __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// Payment does exist
while ($content2 = SQL_FETCHARRAY($result)) {
'stamp' => generateDateTime($content['pay_ordered'], '2'),
'pname' => $content['pay_name'],
);
-
+
// Load email template
$content['msg'] = LOAD_EMAIL_TEMPLATE("sponsor_unlock_sponsor_pay", $data, $content['id']);
}
// Unlock sponsor account
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_sponsor_data` SET `status`='CONFIRMED'
WHERE `id`='%s' AND `status`='PENDING' LIMIT 1",
- array($content['id']), __FILE__, __LINE__);
+ array($content['id']), __FILE__, __LINE__);
// Update, if applyable, referal count and points
if (($content['refid'] > 0) && ($content['refid'] != $content['id'])) {
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_sponsor_data`
SET points_amount=points_amount+%s, ref_count=ref_count+1
WHERE `id`='%s' LIMIT 1",
- array(getConfig('sponsor_ref_points'), bigintval($content['refid'])), __FILE__, __LINE__);
+ array(getConfig('sponsor_ref_points'), bigintval($content['refid'])), __FILE__, __LINE__);
// Whas that update fine?
if (SQL_AFFECTEDROWS() == 1) {
(points_amount - points_used) AS points, receive_warnings, ref_count AS refs
FROM `{!_MYSQL_PREFIX!}_sponsor_data`
WHERE `id`='%s' LIMIT 1",
- array(bigintval($content['refid'])), __FILE__, __LINE__);
+ array(bigintval($content['refid'])), __FILE__, __LINE__);
$REFERRAL = SQL_FETCHARRAY($result);
// Send warnings out?