[ Index ]
 

Code source de Zen Cart E-Commerce Shopping Cart 1.3.7.1

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/admin/includes/modules/ -> sidebox_delete_product.php (source)

   1  <?php
   2  /**

   3   * @package admin

   4   * @copyright Copyright 2003-2006 Zen Cart Development Team

   5   * @copyright Portions Copyright 2003 osCommerce

   6   * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0

   7   * @version $Id: sidebox_delete_product.php 3358 2006-04-03 04:33:32Z ajeh $

   8   */
   9  if (!defined('IS_ADMIN_FLAG')) {
  10    die('Illegal Access');
  11  }
  12  
  13          $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_PRODUCT . '</b>');
  14  
  15          $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));
  16          $contents[] = array('text' => TEXT_DELETE_PRODUCT_INTRO);
  17          $contents[] = array('text' => '<br /><b>' . $pInfo->products_name . ' ID#' . $pInfo->products_id . '</b>');
  18  
  19          // zen_get_category_name(zen_get_parent_category_id($pInfo->products_id), (int)$_SESSION['languages_id'])

  20  
  21          $product_categories_string = '';
  22          $product_categories = zen_generate_category_path($pInfo->products_id, 'product');
  23  
  24          if (sizeof($product_categories) > 1) {
  25            $contents[] = array('text' => '<br /><b><span class="alert">' . TEXT_MASTER_CATEGORIES_ID . '</span>' . '</b>');
  26          }
  27          for ($i = 0, $n = sizeof($product_categories); $i < $n; $i++) {
  28            $category_path = '';
  29            for ($j = 0, $k = sizeof($product_categories[$i]); $j < $k; $j++) {
  30              $category_path .= $product_categories[$i][$j]['text'] . '&nbsp;&gt;&nbsp;';
  31            }
  32            $category_path = substr($category_path, 0, -16);
  33            if (sizeof($product_categories) > 1 && zen_get_parent_category_id($pInfo->products_id) == $product_categories[$i][sizeof($product_categories[$i])-1]['id']) {
  34              $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 />';
  35            } else {
  36              $product_categories_string .= zen_draw_checkbox_field('product_categories[]', $product_categories[$i][sizeof($product_categories[$i])-1]['id'], true) . '&nbsp;' . $category_path . '<br />';
  37            }
  38          }
  39          $product_categories_string = substr($product_categories_string, 0, -4);
  40  
  41          $contents[] = array('text' => '<br />' . $product_categories_string);
  42          $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>');
  43  ?>


Généré le : Mon Nov 26 16:45:43 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics