X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Forder.php;h=68509930dbf9633d25a8fa1653d185468dc545da;hb=5ab0d021f3e96722af5d96d2b9036430200c06cb;hp=f64f69be1d55430c86af0f5198e4f19a31d4ae0b;hpb=307a4e11763f0914e73dc756b219356e1c29ab25;p=mailer.git diff --git a/inc/modules/order.php b/inc/modules/order.php index f64f69be1d..68509930db 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 ((isExtensionInstalledAndNewer('order', '0.1.1')) && (getConfig('order_max_full') == 'ORDER')) { + $add = ',`mail_orders`=`mail_orders`+1'; + } // END - if // 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('member_order_normal', $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--}', 'admin_order_normal', $content, getMemberId()); + + // Create new task (we ignore the task id here) + createNewTask( + '{--ADMIN_NEW_QUEUE--}', + '
' . loadEmailTemplate('admin_order_normal', $content, getMemberId()) . '
', + 'MEMBER_ORDER', + getMemberId(), + 0, + false + ); // Output back bottom - LOAD_TEMPLATE("member_order-back", false); + loadTemplate('member_order_thanks'); + } 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] ?>