X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Forder.php;h=fc162145d81528195293f1d517d600a3cacda5da;hp=5d17312571599d36561bb3fe7cd7e613634df62e;hb=57227d33e870ec5cd271209c4a978a52b45c2dd6;hpb=dbd1bc95c8f89024118791dc3fb3633a90afa9cf diff --git a/inc/modules/order.php b/inc/modules/order.php index 5d17312571..fc162145d8 100644 --- a/inc/modules/order.php +++ b/inc/modules/order.php @@ -1,7 +1,7 @@ = "0.0.4") - { - // Update database - MEDIA_UPDATE_ENTRY(array("total_points"), "sub", $USED); - } + // Compile content + $content['payment'] = getPaymentTitlePrice($content['payment_id']); + $content['category'] = getCategory($content['cat_id']); // Send an email to the user - $msg_mem = LOAD_EMAIL_TEMPLATE("order-member", "", $GLOBALS['userid']); - SEND_EMAIL($email, MEMBER_NEW_QUEUE, $msg_mem); + $message_mem = loadEmailTemplate('order-member', $content, getMemberId()); + sendEmail(getMemberId(), getMessage('MEMBER_NEW_QUEUE'), $message_mem); // Notify admins about this - if (GET_EXT_VERSION("admins") >= "0.4.1") - { - SEND_ADMIN_EMAILS_PRO(ADMIN_NEW_QUEUE, "order-admin", "", $GLOBALS['userid']); - } - else - { - $msg_admin = LOAD_EMAIL_TEMPLATE("order-admin", "", $GLOBALS['userid']); - SEND_ADMIN_EMAILS(ADMIN_NEW_QUEUE, $msg_admin); - } + sendAdminNotification(getMessage('ADMIN_NEW_QUEUE'), 'order-admin', $content, getMemberId()); + + // Create new task + createNewTask( + '{--ADMIN_NEW_QUEUE--}', + '
'.loadEmailTemplate('order-admin', $content, getMemberId()).'
', + 'MEMBER_ORDER', + getMemberId(), + 0, + false + ); // Output back bottom - LOAD_TEMPLATE("member_order-back", false); + loadTemplate('member_order-back'); + } else { + // Matching line not found or already 'placed' in send queue + redirectToUrl('modules.php?module=login'); } - else - { - // Matching line not found or already "placed" in send queue - $URL = URL."/modules.php?module=login"; - LOAD_URL($URL); - } -} - else -{ +} else { // Redirect... - LOAD_URL($URL); + redirectToUrl($URL); } -// + +// [EOF] ?>