$cascaded_prod_cat_for_delete = array();
                 $cascaded_prod_cat_for_delete[] = $categories[$i]['id'];
                 //echo 'processing product_id: ' . $cascaded_prod_id_for_delete . ' in category: ' . $cascaded_prod_cat_for_delete . '<br>';
                 // determine product-type-specific override script for this product
                 $product_type = zen_get_products_type($category_products->fields['products_id']);
                 // now loop thru the delete_product_confirm script for each product in the current category
                 if (file_exists(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/delete_product_confirm.php')) {
                     require DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/delete_product_confirm.php';
                 } else {
                     require DIR_WS_MODULES . 'delete_product_confirm.php';
                 }
                 // THIS LINE COMMENTED BECAUSE IT'S DONE ALREADY DURING DELETE_PRODUCT_CONFIRM.PHP:
                 //zen_remove_product($category_products->fields['products_id'], $delete_linked);
                 $category_products->MoveNext();
             }
             zen_remove_category($categories[$i]['id']);
         }
         // end for loop
     }
     zen_redirect(zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath));
     break;
     // eof delete new
     /////////////////////////////////
     // @@TODO where is delete_product_confirm
 // eof delete new
 /////////////////////////////////
 // @@TODO where is delete_product_confirm
 case 'move_category_confirm':
     if (isset($_POST['categories_id']) && $_POST['categories_id'] != $_POST['move_to_category_id']) {
         $categories_id = zen_db_prepare_input($_POST['categories_id']);
         $new_parent_id = zen_db_prepare_input($_POST['move_to_category_id']);
 function delete_category($categories_id)
 {
     global $db, $zc_products;
     // future cat specific deletion
     $delete_linked = 'true';
     if ($_POST['delete_linked'] == 'delete_linked_no') {
         $delete_linked = 'false';
     } else {
         $delete_linked = 'true';
     }
     // delete category and products
     $categories_id = zen_db_prepare_input($categories_id);
     // create list of any subcategories in the selected category,
     $categories = zen_get_category_tree($categories_id, '', '0', '', true);
     zen_set_time_limit(600);
     // loop through this cat and subcats for delete-processing.
     for ($i = 0, $n = sizeof($categories); $i < $n; $i++) {
         $sql = "select products_id from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id='" . $categories[$i]['id'] . "'";
         $category_products = $db->Execute($sql);
         while (!$category_products->EOF) {
             // determine product-type-specific override script for this product
             $product_type = zen_get_products_type($category_products->fields['products_id']);
             // now loop thru the delete_product_confirm script for each product in the current category
             if (file_exists(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/delete_product_confirm.php')) {
                 require DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/delete_product_confirm.php';
             } else {
                 require DIR_WS_MODULES . 'delete_product_confirm.php';
             }
             // THIS LINE COMMENTED BECAUSE IT'S DONE ALREADY DURING DELETE_PRODUCT_CONFIRM.PHP:
             //zen_remove_product($category_products->fields['products_id'], $delete_linked);
             $category_products->MoveNext();
         }
         zen_remove_category($categories[$i]['id']);
     }
     // end for loop
 }