}
}
- // Send email to admin
+ // Choose the right admin template
$templ = "admin_rallye_no_notify";
if ($notify == "Y") $templ = "admin_rallye_notify";
- if (GET_EXT_VERSION("admins") < "0.4.1")
- {
- // Use old method to send out
- $msg = LOAD_EMAIL_TEMPLATE($templ, $prices, 0);
- SEND_ADMIN_EMAILS(RALLYE_ADMIN_NOTIFY.$title, $msg);
- }
- else
- {
- // Use new system to send out
- SEND_ADMIN_EMAILS_PRO(RALLYE_ADMIN_NOTIFY.$title, $templ, $prices, "0");
- }
+
+ // Send email to admin
+ SEND_ADMIN_NOTIFICATION(RALLYE_ADMIN_NOTIFY.$title, $templ, $prices, "0");
// Free memory
SQL_FREERESULT($result_user);
}
// Send mail to admin
- if (GET_EXT_VERSION("admins") < "0.4.1")
- {
- // Use old method to send out
- $msg = LOAD_EMAIL_TEMPLATE($templ, $cnt, 0);
- SEND_ADMIN_EMAILS(RALLYE_ADMIN_EXPIRED.": ".$title, $msg);
- }
- else
- {
- // Use new system to send out
- SEND_ADMIN_EMAILS_PRO(RALLYE_ADMIN_EXPIRED.": ".$title, $templ, $cnt, 0);
- }
+ SEND_ADMIN_NOTIFICATION(RALLYE_ADMIN_EXPIRED.": ".$title, $templ, $cnt, 0);
// Add task
$result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_task_system (status, task_type, subject, text, task_created)
$DATA['now_t'] = MAKE_DATETIME(time(), "1");
// Send mail to admin
- if (GET_EXT_VERSION("admins") < "0.4.1")
- {
- // Use old method to send out
- $msg = LOAD_EMAIL_TEMPLATE("admin_rallye_purged", "", 0);
- SEND_ADMIN_EMAILS(RALLYE_ADMIN_PURGED.": ".$title, $msg);
- }
- else
- {
- // Use new system to send out
- SEND_ADMIN_EMAILS_PRO(RALLYE_ADMIN_PURGED.": ".$title, "admin_rallye_purged", "", 0);
- }
+ SEND_ADMIN_NOTIFICATION(RALLYE_ADMIN_PURGED.": ".$title, "admin_rallye_purged", "", 0);
// Purge whole rallye
$result_purge = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_rallye_data WHERE id=%d LIMIT 1",