X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Forder.php;h=915500d4d7aba0bf78abef0429f65ad1d269ac77;hp=f8c5585af565de4c8b01bf9f2ec20a726f05fc29;hb=8fad776382e63b3f73f8dbe289f229d79cfc2c22;hpb=e1653405d28923c78b2e292125306ccf61138f24 diff --git a/inc/modules/order.php b/inc/modules/order.php index f8c5585af5..915500d4d7 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] ?>