当前位置: 首页>>代码示例>>PHP>>正文


PHP zen_delete_products_attributes函数代码示例

本文整理汇总了PHP中zen_delete_products_attributes函数的典型用法代码示例。如果您正苦于以下问题:PHP zen_delete_products_attributes函数的具体用法?PHP zen_delete_products_attributes怎么用?PHP zen_delete_products_attributes使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了zen_delete_products_attributes函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: zen_redirect

         }
     } else {
         $messageStack->add_session(ERROR_CANNOT_MOVE_CATEGORY_TO_CATEGORY_SELF . $cPath, 'error');
         zen_redirect(zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath));
     }
     break;
     // @@TODO where is move_product_confirm
     // @@TODO where is insert_product
     // @@TODO where is update_product
     // attribute features
 // @@TODO where is move_product_confirm
 // @@TODO where is insert_product
 // @@TODO where is update_product
 // attribute features
 case 'delete_attributes':
     zen_delete_products_attributes($_GET['products_id']);
     $messageStack->add_session(SUCCESS_ATTRIBUTES_DELETED . ' ID#' . $_GET['products_id'], 'success');
     $action = '';
     // reset products_price_sorter for searches etc.
     zen_update_products_price_sorter($_GET['products_id']);
     zen_redirect(zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $_GET['products_id'] . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '')));
     break;
 case 'update_attributes_sort_order':
     zen_update_attributes_products_option_values_sort_order($_GET['products_id']);
     $messageStack->add_session(SUCCESS_ATTRIBUTES_UPDATE . ' ID#' . $_GET['products_id'], 'success');
     $action = '';
     zen_redirect(zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $_GET['products_id'] . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '')));
     break;
     // attributes copy to product
 // attributes copy to product
 case 'update_attributes_copy_to_product':
开发者ID:andychang88,项目名称:daddy-store.com,代码行数:31,代码来源:categories.php

示例2: zen_redirect

         zen_redirect(zen_href_link(FILENAME_ATTRIBUTES_CONTROLLER, $_SESSION['page_info'] . '&current_category_id=' . $_POST['current_category_id']));
     }
     if (isset($_POST['delete_attribute_id'])) {
         $attribute_id = zen_db_prepare_input($_POST['delete_attribute_id']);
         $db->Execute("delete from " . TABLE_PRODUCTS_ATTRIBUTES . "\n                      where products_attributes_id = '" . (int) $attribute_id . "'");
         // added for DOWNLOAD_ENABLED. Always try to remove attributes, even if downloads are no longer enabled
         $db->Execute("delete from " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . "\n                      where products_attributes_id = '" . (int) $attribute_id . "'");
         // reset products_price_sorter for searches etc.
         zen_update_products_price_sorter($products_filter);
         zen_redirect(zen_href_link(FILENAME_ATTRIBUTES_CONTROLLER, $_SESSION['page_info'] . '&current_category_id=' . $_POST['current_category_id']));
     }
     break;
     // delete all attributes
 // delete all attributes
 case 'delete_all_attributes':
     zen_delete_products_attributes($_POST['products_filter']);
     $messageStack->add_session(SUCCESS_ATTRIBUTES_DELETED . ' ID#' . $products_filter, 'success');
     $action = '';
     $products_filter = (int) $_POST['products_filter'];
     // reset products_price_sorter for searches etc.
     zen_update_products_price_sorter($products_filter);
     zen_redirect(zen_href_link(FILENAME_ATTRIBUTES_CONTROLLER, 'products_filter=' . $products_filter . '&current_category_id=' . $_POST['current_category_id']));
     break;
 case 'delete_option_name_values':
     $delete_attributes_options_id = $db->Execute("select * from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id='" . $_POST['products_filter'] . "' and options_id='" . $_POST['products_options_id_all'] . "'");
     while (!$delete_attributes_options_id->EOF) {
         // remove any attached downloads
         $remove_downloads = $db->Execute("delete from " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " where products_attributes_id= '" . $delete_attributes_options_id->fields['products_attributes_id'] . "'");
         // remove all option values
         $delete_attributes_options_id_values = $db->Execute("delete from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id='" . $_POST['products_filter'] . "' and options_id='" . $_POST['products_options_id_all'] . "'");
         $delete_attributes_options_id->MoveNext();
开发者ID:quangn92,项目名称:visualyou,代码行数:31,代码来源:attributes_controller.php


注:本文中的zen_delete_products_attributes函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。