本文整理匯總了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");