X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Forder.php;h=469590e29407d473973b2fdf5f35ff80b58e6151;hp=f8c5585af565de4c8b01bf9f2ec20a726f05fc29;hb=cf3765c38cf0a76f396aca291f71858936e92956;hpb=e1653405d28923c78b2e292125306ccf61138f24 diff --git a/inc/modules/order.php b/inc/modules/order.php index f8c5585af5..469590e294 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); - } + $add = ''; + if (getConfig('order_max_full') == 'ORDER') $add = ', mail_orders=mail_orders+1'; + subtractPoints('order', getMemberId(), $usedPoints); // 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(), '{--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('{--ADMIN_NEW_QUEUE--}', 'order-admin', $content, getMemberId()); + + // Create new task (we ignore the task id here) + 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] ?>