]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-send_coupon.php
'order_points' and locked are now displayed, some array elements/language ids renamed
[mailer.git] / inc / modules / admin / what-send_coupon.php
index a3329ae3e3614f4a1518b46e324d44ed775fbece..b304dbe7bada516e5bf1f2f642d5d2af1ee3c620 100644 (file)
@@ -49,7 +49,7 @@ if (isFormSent()) {
        if (!isPostRequestParameterSet('points')) {
                // Points not entered
                displayMessage('{--ADMIN_SEND_COUPON_POINTS_NOT_ENTERED--}');
-       } elseif (!isPostRequestParameterSet('description')) {
+       } elseif (!isPostRequestParameterSet('coupon_description')) {
                // Description not entered
                displayMessage('{--ADMIN_SEND_COUPON_DESCRIPTION_NOT_ENTERED--}');
        } else {
@@ -63,12 +63,12 @@ if (isFormSent()) {
                        $expirationTime = time() + createEpocheTimeFromSelections('coupon_default_time', postRequestArray());
 
                        // Insert coupon data
-                       SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_coupon_data` (`timestamp_expired`, `total_created`, `points`, `coupon_description`) VALUES('{%%pipe,SQL_EPOCHE_TO_TIMESTAMP=%s%%}', %s,%s,'%s')",
+                       SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_coupon_data` (`coupon_expired`, `total_created`, `points`, `coupon_description`) VALUES('{%%pipe,SQL_EPOCHE_TO_TIMESTAMP=%s%%}', %s,%s,'%s')",
                                array(
                                        $expirationTime,
                                        SQL_NUMROWS($result),
                                        bigintval(postRequestParameter('points')),
-                                       postRequestParameter('description')
+                                       postRequestParameter('coupon_description')
                                ), __FILE__, __LINE__
                        );
 
@@ -104,7 +104,7 @@ if (isFormSent()) {
                                        'userid'         => $userid,
                                        'points'         => bigintval(postRequestParameter('points')),
                                        'coupon_code'    => $couponCode,
-                                       'coupon_expires' => generateDateTime($expirationTime, '0')
+                                       'coupon_expired' => generateDateTime($expirationTime, '0')
                                );
 
                                // Load member email template
@@ -123,12 +123,12 @@ if (isFormSent()) {
 
                // Prepare content for template
                $content = array(
-                       'userids'        => implode(',', $adminUserids),
-                       'userid_count'   => count($adminUserids),
-                       'coupon_id'      => $couponId,
-                       'points'         => bigintval(postRequestParameter('points')),
-                       'description'    => postRequestParameter('description'),
-                       'coupon_expires' => generateDateTime($expirationTime, '0')
+                       'userids'            => implode(',', $adminUserids),
+                       'userid_count'       => count($adminUserids),
+                       'coupon_id'          => $couponId,
+                       'points'             => bigintval(postRequestParameter('points')),
+                       'coupon_description' => postRequestParameter('coupon_description'),
+                       'coupon_expired'     => generateDateTime($expirationTime, '0')
                );
 
                // Send admin notification