X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Forder.php;h=998cb06bb449dacf13529cbae7676355941505be;hp=4b7259f2e1f2e28d548e1b71f41dd8effb51d9cf;hb=49acdb7a7adbcf25a8e8683b5581bfcec72b23bd;hpb=60494e212a67fe360bfbb481eb4928480a6f379b diff --git a/inc/modules/order.php b/inc/modules/order.php index 4b7259f2e1..998cb06bb4 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); - } + // Update used points + $add = ''; + if ((isExtensionInstalledAndNewer('order', '0.1.1')) && (getOrderMaxFull() == '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] ?>