148 |
148 |
FROM " . TABLE_COUPONS . "
|
149 |
149 |
WHERE
|
150 |
150 |
coupon_start_date <= now() AND
|
151 |
|
coupon_code='" . xtc_db_input($_POST['gv_redeem_code']) . "'");
|
|
151 |
coupon_code='" . xtc_db_input($_POST['gv_redeem_code']) . "'
|
|
152 |
AND coupon_active = 'Y'");
|
152 |
153 |
|
153 |
154 |
if(xtc_db_num_rows($date_query) == 0)
|
154 |
155 |
{
|
... | ... | |
159 |
160 |
FROM " . TABLE_COUPONS . "
|
160 |
161 |
WHERE
|
161 |
162 |
coupon_expire_date >= now() AND
|
162 |
|
coupon_code='" . xtc_db_input($_POST['gv_redeem_code']) . "'");
|
|
163 |
coupon_code='" . xtc_db_input($_POST['gv_redeem_code']) . "'
|
|
164 |
AND coupon_active = 'Y'");
|
163 |
165 |
|
164 |
166 |
if(xtc_db_num_rows($date_query) == 0)
|
165 |
167 |
{
|
... | ... | |
240 |
242 |
restrict_to_categories,
|
241 |
243 |
coupon_type
|
242 |
244 |
FROM " . TABLE_COUPONS . "
|
243 |
|
WHERE coupon_code = '" . $coupon_result['coupon_code'] . "'");
|
|
245 |
WHERE coupon_code = '" . $coupon_result['coupon_code'] . "'
|
|
246 |
AND coupon_active = 'Y'");
|
244 |
247 |
$get_result = xtc_db_fetch_array($coupon_get);
|
245 |
248 |
$c_deduct = $get_result['coupon_amount'];
|
246 |
249 |
|
... | ... | |
461 |
464 |
restrict_to_categories,
|
462 |
465 |
coupon_type
|
463 |
466 |
FROM " . TABLE_COUPONS . "
|
464 |
|
WHERE coupon_code = '" . $coupon_result['coupon_code'] . "'");
|
|
467 |
WHERE coupon_code = '" . $coupon_result['coupon_code'] . "'
|
|
468 |
AND coupon_active = 'Y'");
|
465 |
469 |
$get_result = xtc_db_fetch_array($coupon_get);
|
466 |
470 |
$_SESSION['gm_coupon_type'] = $get_result['coupon_type'];
|
467 |
471 |
|
... | ... | |
1059 |
1063 |
restrict_to_categories,
|
1060 |
1064 |
coupon_type
|
1061 |
1065 |
FROM " . TABLE_COUPONS . "
|
1062 |
|
WHERE coupon_code = '" . $coupon_result['coupon_code'] . "'");
|
|
1066 |
WHERE coupon_code = '" . $coupon_result['coupon_code'] . "'
|
|
1067 |
AND coupon_active = 'Y'");
|
1063 |
1068 |
$get_result = xtc_db_fetch_array($coupon_get);
|
1064 |
1069 |
|
1065 |
1070 |
$in_cat = true;
|