'Deny', text=>'Deny'); $restrict_array[] = array('id'=>'Allow', text=>'Allow'); if ($_GET['action']=='switch_status') { $status = $db->Execute("select coupon_restrict from " . TABLE_COUPON_RESTRICT . " where restrict_id = '" . $_GET['info'] . "'"); $new_status = 'N'; if ($status->fields['coupon_restrict'] == 'N') $new_status = 'Y'; $db->Execute("update " . TABLE_COUPON_RESTRICT . " set coupon_restrict = '" . $new_status . "' where restrict_id = '" . $_GET['info'] . "'"); } if ($_GET['action']=='add_category' && isset($_POST['cPath'])) { if ($_POST['cPath'] == 0) $_POST['cPath'] = -1; $test_query=$db->Execute("select * from " . TABLE_COUPON_RESTRICT . " where coupon_id = '" . $_GET['cid'] . "' and category_id = '" . $_POST['cPath'] . "'"); if ($test_query->RecordCount() < 1) { $status = 'N'; if ($_POST['restrict_status']=='Deny') $status = 'Y'; $db->Execute("insert into " . TABLE_COUPON_RESTRICT . " (coupon_id, category_id, coupon_restrict) values ('" . $_GET['cid'] . "', '" . $_POST['cPath'] . "', '" . $status . "')"); } } if ($_GET['action']=='add_product' && $_POST['products_drop']) { $test_query=$db->Execute("select * from " . TABLE_COUPON_RESTRICT . " where coupon_id = '" . $_GET['cid'] . "' and product_id = '" . $_POST['products_drop'] . "'"); if ($test_query->RecordCount() < 1) { $status = 'N'; if ($_POST['restrict_status']=='Deny') $status = 'Y'; $db->Execute("insert into " . TABLE_COUPON_RESTRICT . " (coupon_id, product_id, coupon_restrict) values ('" . $_GET['cid'] . "', '" . $_POST['products_drop'] . "', '" . $status . "')"); } } if ($_GET['action']=='remove' && $_GET['info']) { $db->Execute("delete from " . TABLE_COUPON_RESTRICT . " where restrict_id = '" . $_GET['info'] . "'"); } ?> > <?php echo TITLE; ?>
Execute($cr_query_raw); while (!$cr_list->EOF) { $rows++; if (strlen($rows) < 2) { $rows = '0' . $rows; } if (((!$_GET['cid']) || (@$_GET['cid'] == $cr_list->fields['restrict_id'])) && (!$cInfo)) { $cInfo = new objectInfo($cr_list->fields); } echo ' ' . "\n"; if ($cr_list->fields['category_id'] != -1) { $coupon = $db->Execute("select coupon_name from " . TABLE_COUPONS_DESCRIPTION . " where coupon_id = '" . $_GET['cid'] . "' and language_id = '" . $_SESSION['languages_id'] . "'"); $category_name = zen_get_category_name($cr_list->fields['category_id'], $_SESSION['languages_id']); } else { $category_name = TEXT_ALL_CATEGORIES; } ?> fields['coupon_restrict']=='N') { echo ''; } else { echo ''; } if ($cr_list->fields['coupon_restrict']=='Y') { echo ''; } else { echo ''; } echo ''; ?> MoveNext(); } ?>
fields['coupon_name']; ?> fields['category_id']; ?> ' . zen_image(DIR_WS_IMAGES . 'icon_status_green.gif', IMAGE_ALLOW) . '' . zen_image(DIR_WS_IMAGES . 'icon_status_red.gif', IMAGE_DENY) . '' . zen_image(DIR_WS_IMAGES . 'icon_status_green.gif', IMAGE_ALLOW) . '' . zen_image(DIR_WS_IMAGES . 'icon_status_red.gif', IMAGE_DENY) . '' . zen_image(DIR_WS_IMAGES . 'icons/delete.gif', IMAGE_REMOVE) . '
display_count($cr_query_numrows, MAX_DISPLAY_RESTRICT_ENTRIES, $_GET['cpage'], TEXT_DISPLAY_NUMBER_OF_CATEGORIES); ?> display_links($cr_query_numrows, MAX_DISPLAY_RESTRICT_ENTRIES, MAX_DISPLAY_PAGE_LINKS, $_GET['cpage'],zen_get_all_get_params(array('cpage','action', 'x', 'y')),'cpage'); ?>
   
Execute($pr_query_raw); while (!$pr_list->EOF) { $rows++; if (strlen($rows) < 2) { $rows = '0' . $rows; } if (((!$_GET['cid']) || (@$_GET['cid'] == $cr_list->fields['restrict_id'])) && (!$pInfo)) { $pInfo = new objectInfo($pr_list); } echo ' ' . "\n"; $coupon = $db->Execute("select coupon_name from " . TABLE_COUPONS_DESCRIPTION . " where coupon_id = '" . $_GET['cid'] . "' and language_id = '" . $_SESSION['languages_id'] . "'"); $product_name = zen_get_products_name($pr_list->fields['product_id'], $_SESSION['languages_id']); ?> fields['coupon_restrict']=='N') { echo ''; } else { echo ''; } if ($pr_list->fields['coupon_restrict']=='Y') { echo ''; } else { echo ''; } echo ''; ?> MoveNext(); } ?>
fields['coupon_name']; ?> fields['product_id']; ?> ' . zen_image(DIR_WS_IMAGES . 'icon_status_green.gif', IMAGE_ALLOW) . '' . zen_image(DIR_WS_IMAGES . 'icon_status_red.gif', IMAGE_DENY) . '' . zen_image(DIR_WS_IMAGES . 'icon_status_green.gif', IMAGE_DENY) . '' . zen_image(DIR_WS_IMAGES . 'icon_status_red.gif', IMAGE_ALLOW) . '' . zen_image(DIR_WS_IMAGES . 'icons/delete.gif', IMAGE_REMOVE) . '
display_count($pr_query_numrows, MAX_DISPLAY_RESTRICT_ENTRIES, $_GET['ppage'], TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?> display_links($pr_query_numrows, MAX_DISPLAY_RESTRICT_ENTRIES, MAX_DISPLAY_PAGE_LINKS, $_GET['ppage'],zen_get_all_get_params(array('ppage','action', 'x', 'y')),'ppage'); ?>
Execute("select p.products_id, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = pd.products_id and pd.language_id = '" . $_SESSION['languages_id'] . "' and p.products_id = p2c.products_id and p2c.categories_id = '" . $_POST['cPath_prod'] . "' order by pd.products_name"); $products_array = array(); while (!$products->EOF) { $products_array[] = array('id'=>$products->fields['products_id'], 'text'=>$products->fields['products_name']); $products->MoveNext(); } ?> 0) { ?>
     
coupon_id) ? $cInfo->coupon_id : $_GET['cid']) . (isset($_GET['status']) ? '&status=' . $_GET['status'] : '')) . '">' . zen_image_button('button_back.gif', IMAGE_BACK) . ''; ?>