X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=inc%2Fmodules%2Forder.php;h=071e4db443b648bc74db94c3c5e6bd83d0a5cdcf;hb=0d42530a14870ff0e0a0a3f7bcc6bb9f7f909b88;hp=e51354e30e89598b5f833d2e416755d06795bd7f;hpb=c72c89ffa5f7f5444d7fd47021db520b77738d9e;p=mailer.git diff --git a/inc/modules/order.php b/inc/modules/order.php index e51354e30e..071e4db443 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')) && (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-back'); } else { - // Matching line not found or already "placed" in send queue - $URL = URL."/modules.php?module=login"; - LOAD_URL($URL); + // Matching line not found or already 'placed' in send queue + redirectToUrl('modules.php?module=login'); } } else { // Redirect... - LOAD_URL($URL); + redirectToUrl($url); } -// + +// [EOF] ?>