本文整理汇总了PHP中categories::set_category_recursive方法的典型用法代码示例。如果您正苦于以下问题:PHP categories::set_category_recursive方法的具体用法?PHP categories::set_category_recursive怎么用?PHP categories::set_category_recursive使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类categories
的用法示例。
在下文中一共展示了categories::set_category_recursive方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: switch
//this is used only by group_prices
if ($_GET['function']) {
switch ($_GET['function']) {
case 'delete':
vam_db_query("DELETE FROM " . TABLE_PERSONAL_OFFERS . (int) $_GET['statusID'] . "\n\t\t\t\t\t\t WHERE products_id = '" . (int) $_GET['pID'] . "'\n\t\t\t\t\t\t AND quantity = '" . (int) $_GET['quantity'] . "'");
break;
}
vam_redirect(vam_href_link(FILENAME_CATEGORIES, 'cPath=' . $_GET['cPath'] . '&action=new_product&pID=' . (int) $_GET['pID']));
}
// Multi-Status Change, separated from $_GET['action']
// --- MULTI STATUS ---
if (isset($_POST['multi_status_on'])) {
//set multi_categories status=on
if (is_array($_POST['multi_categories'])) {
foreach ($_POST['multi_categories'] as $category_id) {
$catfunc->set_category_recursive($category_id, '1');
}
}
//set multi_products status=on
if (is_array($_POST['multi_products'])) {
foreach ($_POST['multi_products'] as $product_id) {
$catfunc->set_product_status($product_id, '1');
}
}
vam_redirect(vam_href_link(FILENAME_CATEGORIES, 'cPath=' . $_GET['cPath'] . '&' . vam_get_all_get_params(array('cPath', 'action', 'pID', 'cID'))));
}
if (isset($_POST['multi_status_off'])) {
//set multi_categories status=off
if (is_array($_POST['multi_categories'])) {
foreach ($_POST['multi_categories'] as $category_id) {
$catfunc->set_category_recursive($category_id, "0");