ZenCart_Documentation  1.5.0
http://www.collinsharper.com
C:/xampp/htdocs/zen-cart/admin/includes/modules/sidebox_delete_product.php
Go to the documentation of this file.
00001 <?php
00009 if (!defined('IS_ADMIN_FLAG')) {
00010   die('Illegal Access');
00011 }
00012 
00013         $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_PRODUCT . '</b>');
00014 
00015         $contents = array('form' => zen_draw_form('products', $type_admin_handler, 'action=delete_product_confirm&product_type=' . $product_type . '&cPath=' . $cPath . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '')) . zen_draw_hidden_field('products_id', $pInfo->products_id));
00016         $contents[] = array('text' => TEXT_DELETE_PRODUCT_INTRO);
00017         $contents[] = array('text' => '<br /><b>' . $pInfo->products_name . ' ID#' . $pInfo->products_id . '</b>');
00018 
00019         // zen_get_category_name(zen_get_parent_category_id($pInfo->products_id), (int)$_SESSION['languages_id'])
00020 
00021         $product_categories_string = '';
00022         $product_categories = zen_generate_category_path($pInfo->products_id, 'product');
00023 
00024         if (sizeof($product_categories) > 1) {
00025           $contents[] = array('text' => '<br /><b><span class="alert">' . TEXT_MASTER_CATEGORIES_ID . '</span>' . '</b>');
00026         }
00027         for ($i = 0, $n = sizeof($product_categories); $i < $n; $i++) {
00028           $category_path = '';
00029           for ($j = 0, $k = sizeof($product_categories[$i]); $j < $k; $j++) {
00030             $category_path .= $product_categories[$i][$j]['text'] . '&nbsp;&gt;&nbsp;';
00031           }
00032           $category_path = substr($category_path, 0, -16);
00033           if (sizeof($product_categories) > 1 && zen_get_parent_category_id($pInfo->products_id) == $product_categories[$i][sizeof($product_categories[$i])-1]['id']) {
00034             $product_categories_string .= '<strong><span class="alert">' . zen_draw_checkbox_field('product_categories[]', $product_categories[$i][sizeof($product_categories[$i])-1]['id'], true) . '&nbsp;' . $category_path . '</strong></span><br />';
00035           } else {
00036             $product_categories_string .= zen_draw_checkbox_field('product_categories[]', $product_categories[$i][sizeof($product_categories[$i])-1]['id'], true) . '&nbsp;' . $category_path . '<br />';
00037           }
00038         }
00039         $product_categories_string = substr($product_categories_string, 0, -4);
00040 
00041         $contents[] = array('text' => '<br />' . $product_categories_string);
00042         $contents[] = array('align' => 'center', 'text' => '<br />' . zen_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '')) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
00043 ?>
 All Data Structures Namespaces Files Functions Variables Enumerations