[phpBB Debug] PHP Warning: in file [ROOT]/includes/crs/crs_misc_functions.php on line 37: mime_content_type(): Empty filename or path
[phpBB Debug] PHP Warning: in file [ROOT]/includes/crs/crs_misc_functions.php on line 37: mime_content_type(): Empty filename or path
Zen Cart 源代码 product.php

Zen Cart 源代码 product.php




下载文件

文件名: product.php
文件类型: PHP文件
文件大小: 24.41 KiB
MD5: e4930ac54e4f6727d952b093da10097e

product.php - 关闭高亮
  1. <?php
  2. /**
  3.  * @package admin
  4.  * @copyright Copyright 2003-2011 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: product.php 19330 2011-08-07 06:32:56Z drbyte $
  8.  */
  9.  
  10.   require('includes/application_top.php');
  11.  
  12.   require(DIR_WS_MODULES . 'prod_cat_header_code.php');
  13.  
  14.   $action = (isset($_GET['action']) ? $_GET['action'] : '');
  15.     // Ultimate SEO URLs v2.200
  16.     // If the action will affect the cache entries
  17.     if (preg_match("/(insert|update|setflag)/i", $action)) {
  18.         include_once(DIR_WS_INCLUDES . 'reset_seo_cache.php');
  19.     }
  20.  
  21.   if (zen_not_null($action)) {
  22.     switch ($action) {
  23.       case 'setflag':
  24.         if ( ($_GET['flag'] == '0') || ($_GET['flag'] == '1') ) {
  25.           if (isset($_GET['pID'])) {
  26.             zen_set_product_status($_GET['pID'], $_GET['flag']);
  27.           }
  28.         }
  29.         zen_redirect(zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $_GET['cPath'] . '&pID=' . $_GET['pID'] . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '') . ((isset($_GET['search']) && !empty($_GET['search'])) ? '&search=' . $_GET['search'] : '')));
  30.         break;
  31.  
  32.       case 'delete_product_confirm':
  33.       $delete_linked = 'true';
  34.       if ($_POST['delete_linked'] == 'delete_linked_no') {
  35.         $delete_linked = 'false';
  36.       } else {
  37.         $delete_linked = 'true';
  38.       }
  39.       $product_type = zen_get_products_type($_POST['products_id']);
  40.         if (file_exists(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/delete_product_confirm.php')) {
  41.           require(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/delete_product_confirm.php');
  42.          } else {
  43.           require(DIR_WS_MODULES . 'delete_product_confirm.php');
  44.          }
  45.         break;
  46.       case 'move_product_confirm':
  47.         if (file_exists(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/move_product_confirm.php')) {
  48.           require(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/move_product_confirm.php');
  49.          } else {
  50.           require(DIR_WS_MODULES . 'move_product_confirm.php');
  51.          }
  52.         break;
  53.       case 'insert_product_meta_tags':
  54.       case 'update_product_meta_tags':
  55.         if (file_exists(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/update_product_meta_tags.php')) {
  56.           require(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/update_product_meta_tags.php');
  57.          } else {
  58.           require(DIR_WS_MODULES . 'update_product_meta_tags.php');
  59.          }
  60.         break;
  61.       case 'insert_product':
  62.       case 'update_product':
  63.         if (file_exists(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/update_product.php')) {
  64.           require(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/update_product.php');
  65.          } else {
  66.           require(DIR_WS_MODULES . 'update_product.php');
  67.          }
  68.         break;
  69.       case 'copy_to_confirm':
  70.         if (file_exists(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/copy_to_confirm.php')) {
  71.           require(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/copy_to_confirm.php');
  72.          } else {
  73.           require(DIR_WS_MODULES . 'copy_to_confirm.php');
  74.          }
  75.         break;
  76.       case 'new_product_preview_meta_tags':
  77.         if (file_exists(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/new_product_preview_meta_tags.php')) {
  78.           require(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/new_product_preview_meta_tags.php');
  79.          } else {
  80.           require(DIR_WS_MODULES . 'new_product_preview_meta_tags.php');
  81.          }
  82.         break;
  83.       case 'new_product_preview':
  84.         if (file_exists(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/new_product_preview.php')) {
  85.           require(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/new_product_preview.php');
  86.          } else {
  87.           require(DIR_WS_MODULES . 'new_product_preview.php');
  88.          }
  89.         break;
  90.  
  91.     }
  92.   }
  93.  
  94. // check if the catalog image directory exists
  95.   if (is_dir(DIR_FS_CATALOG_IMAGES)) {
  96.     if (!is_writeable(DIR_FS_CATALOG_IMAGES)) $messageStack->add(ERROR_CATALOG_IMAGE_DIRECTORY_NOT_WRITEABLE, 'error');
  97.   } else {
  98.     $messageStack->add(ERROR_CATALOG_IMAGE_DIRECTORY_DOES_NOT_EXIST, 'error');
  99.   }
  100. ?>
  101. <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
  102. <html <?php echo HTML_PARAMS; ?>>
  103. <head>
  104. <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
  105. <title><?php echo TITLE; ?></title>
  106. <link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
  107. <link rel="stylesheet" type="text/css" href="includes/cssjsmenuhover.css" media="all" id="hoverJS">
  108. <script language="javascript" src="includes/menu.js"></script>
  109. <script language="javascript" src="includes/general.js"></script>
  110. <script type="text/javascript">
  111.   <!--
  112.   function init()
  113.   {
  114.     cssjsmenu('navbar');
  115.     if (document.getElementById)
  116.     {
  117.       var kill = document.getElementById('hoverJS');
  118.       kill.disabled = true;
  119.     }
  120. if (typeof _editor_url == "string") HTMLArea.replaceAll();
  121.  }
  122.  // -->
  123. </script>
  124. <?php if ($action != 'new_product_meta_tags' && $editor_handler != '') include ($editor_handler); ?>
  125. </head>
  126. <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onload="init()">
  127. <div id="spiffycalendar" class="text"></div>
  128. <!-- header //-->
  129. <?php require(DIR_WS_INCLUDES . 'header.php'); ?>
  130. <!-- header_eof //-->
  131.  
  132. <!-- body //-->
  133. <table border="0" width="100%" cellspacing="2" cellpadding="2">
  134.   <tr>
  135. <!-- body_text //-->
  136.     <td width="100%" valign="top">
  137. <?php
  138.   if ($action == 'new_product' or $action == 'new_product_meta_tags') {
  139.  
  140.     if ($action == 'new_product_meta_tags') {
  141.       require(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/collect_info_metatags.php');
  142.     } else {
  143.       require(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/collect_info.php');
  144.     }
  145.  
  146.   } elseif ($action == 'new_product_preview' or $action == 'new_product_preview_meta_tags') {
  147.     if ($action == 'new_product_preview_meta_tags') {
  148.       require(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/preview_info_meta_tags.php');
  149.     } else {
  150.       require(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/preview_info.php');
  151.     }
  152.  
  153.   } else {
  154.  
  155.   require(DIR_WS_MODULES . 'category_product_listing.php');
  156.  
  157.     $heading = array();
  158.     $contents = array();
  159.     switch ($action) {
  160.       case 'new_category':
  161.         $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_NEW_CATEGORY . '</b>');
  162.  
  163.         $contents = array('form' => zen_draw_form('newcategory', FILENAME_CATEGORIES, 'action=insert_category&cPath=' . $cPath, 'post', 'enctype="multipart/form-data"'));
  164.         $contents[] = array('text' => TEXT_NEW_CATEGORY_INTRO);
  165.  
  166.         $category_inputs_string = '';
  167.         $languages = zen_get_languages();
  168.         for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
  169.           $category_inputs_string .= '<br />' . zen_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . zen_draw_input_field('categories_name[' . $languages[$i]['id'] . ']', '', zen_set_field_length(TABLE_CATEGORIES_DESCRIPTION, 'categories_name'));
  170.         }
  171.  
  172.         $contents[] = array('text' => '<br />' . TEXT_CATEGORIES_NAME . $category_inputs_string);
  173.         $contents[] = array('text' => '<br />' . TEXT_CATEGORIES_IMAGE . '<br />' . zen_draw_file_field('categories_image'));
  174.  
  175.         $dir = @dir(DIR_FS_CATALOG_IMAGES);
  176.         $dir_info[] = array('id' => '', 'text' => "Main Directory");
  177.         while ($file = $dir->read()) {
  178.           if (is_dir(DIR_FS_CATALOG_IMAGES . $file) && strtoupper($file) != 'CVS' && $file != "." && $file != "..") {
  179.             $dir_info[] = array('id' => $file . '/', 'text' => $file);
  180.           }
  181.         }
  182.         $dir->close();
  183.  
  184.         $default_directory = substr( $cInfo->categories_image, 0,strpos( $cInfo->categories_image, '/')+1);
  185.         $contents[] = array('text' => TEXT_CATEGORIES_IMAGE_DIR . ' ' . zen_draw_pull_down_menu('img_dir', $dir_info, $default_directory));
  186.  
  187.         $contents[] = array('text' => '<br />' . TEXT_SORT_ORDER . '<br />' . zen_draw_input_field('sort_order', '', 'size="4"'));
  188.         $contents[] = array('align' => 'center', 'text' => '<br />' . zen_image_submit('button_save.gif', IMAGE_SAVE) . ' <a href="' . zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
  189.         break;
  190.       case 'edit_category':
  191.         $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_EDIT_CATEGORY . '</b>');
  192.  
  193.         $contents = array('form' => zen_draw_form('categories', FILENAME_CATEGORIES, 'action=update_category&cPath=' . $cPath, 'post', 'enctype="multipart/form-data"') . zen_draw_hidden_field('categories_id', $cInfo->categories_id));
  194.         $contents[] = array('text' => TEXT_EDIT_INTRO);
  195.  
  196.         $category_inputs_string = '';
  197.         $languages = zen_get_languages();
  198.         for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
  199.           $category_inputs_string .= '<br />' . zen_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . zen_draw_input_field('categories_name[' . $languages[$i]['id'] . ']', htmlspecialchars(zen_get_category_name($cInfo->categories_id, $languages[$i]['id']), ENT_COMPAT, CHARSET, TRUE), zen_set_field_length(TABLE_CATEGORIES_DESCRIPTION, 'categories_name'));
  200.         }
  201.         $contents[] = array('text' => '<br />' . TEXT_EDIT_CATEGORIES_NAME . $category_inputs_string);
  202.         $contents[] = array('text' => '<br />' . TEXT_EDIT_CATEGORIES_IMAGE . '<br />' . zen_draw_file_field('categories_image'));
  203.  
  204.         $dir = @dir(DIR_FS_CATALOG_IMAGES);
  205.         $dir_info[] = array('id' => '', 'text' => "Main Directory");
  206.         while ($file = $dir->read()) {
  207.           if (is_dir(DIR_FS_CATALOG_IMAGES . $file) && strtoupper($file) != 'CVS' && $file != "." && $file != "..") {
  208.             $dir_info[] = array('id' => $file . '/', 'text' => $file);
  209.           }
  210.         }
  211.         $dir->close();
  212.  
  213.         $default_directory = substr( $cInfo->categories_image, 0,strpos( $cInfo->categories_image, '/')+1);
  214.         $contents[] = array('text' => TEXT_CATEGORIES_IMAGE_DIR . ' ' . zen_draw_pull_down_menu('img_dir', $dir_info, $default_directory));
  215.         $contents[] = array('text' => '<br>' . zen_info_image($cInfo->categories_image, $cInfo->categories_name));
  216.         $contents[] = array('text' => '<br>' . $cInfo->categories_image);
  217.  
  218.         $contents[] = array('text' => '<br />' . TEXT_EDIT_SORT_ORDER . '<br />' . zen_draw_input_field('sort_order', $cInfo->sort_order, 'size="2"'));
  219.         $contents[] = array('align' => 'center', 'text' => '<br />' . zen_image_submit('button_save.gif', IMAGE_SAVE) . ' <a href="' . zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $cInfo->categories_id) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
  220.         break;
  221.       case 'delete_product':
  222.         if (file_exists(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/sidebox_delete_product.php')) {
  223.           require(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/sidebox_delete_product.php');
  224.          } else {
  225.           require(DIR_WS_MODULES . 'sidebox_delete_product.php');
  226.          }
  227.         break;
  228.       case 'move_product':
  229.         if (file_exists(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/sidebox_move_product.php')) {
  230.           require(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/sidebox_move_product.php');
  231.          } else {
  232.           require(DIR_WS_MODULES . 'sidebox_move_product.php');
  233.          }
  234.         break;
  235.       case 'copy_to':
  236.         $copy_attributes_delete_first = '0';
  237.         $copy_attributes_duplicates_skipped = '0';
  238.         $copy_attributes_duplicates_overwrite = '0';
  239.         $copy_attributes_include_downloads = '1';
  240.         $copy_attributes_include_filename = '1';
  241.  
  242.         $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_COPY_TO . '</b>');
  243. // WebMakers.com Added: Split Page
  244.         if (empty($pInfo->products_id)) {
  245.           $pInfo->products_id= $pID;
  246.         }
  247.  
  248.         $contents = array('form' => zen_draw_form('copy_to', $type_admin_handler, 'action=copy_to_confirm&cPath=' . $cPath . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '')) . zen_draw_hidden_field('products_id', $pInfo->products_id));
  249.         $contents[] = array('text' => TEXT_INFO_COPY_TO_INTRO);
  250.         $contents[] = array('text' => '<br />' . TEXT_INFO_CURRENT_PRODUCT . '<br /><b>' . $pInfo->products_name  . ' ID#' . $pInfo->products_id . '</b>');
  251.         $contents[] = array('text' => '<br />' . TEXT_INFO_CURRENT_CATEGORIES . '<br /><b>' . zen_output_generated_category_path($pInfo->products_id, 'product') . '</b>');
  252.         $contents[] = array('text' => '<br />' . TEXT_CATEGORIES . '<br />' . zen_draw_pull_down_menu('categories_id', zen_get_category_tree(), $current_category_id));
  253.         $contents[] = array('text' => '<br />' . TEXT_HOW_TO_COPY . '<br />' . zen_draw_radio_field('copy_as', 'link', true) . ' ' . TEXT_COPY_AS_LINK . '<br />' . zen_draw_radio_field('copy_as', 'duplicate') . ' ' . TEXT_COPY_AS_DUPLICATE);
  254.  
  255.         $contents[] = array('text' => '<br />' . zen_image(DIR_WS_IMAGES . 'pixel_black.gif','','100%','3'));
  256.  
  257.         // only ask about attributes if they exist
  258.         if (zen_has_product_attributes($pInfo->products_id, 'false')) {
  259.           $contents[] = array('text' => '<br />' . TEXT_COPY_ATTRIBUTES_ONLY);
  260.           $contents[] = array('text' => '<br />' . TEXT_COPY_ATTRIBUTES . '<br />' . zen_draw_radio_field('copy_attributes', 'copy_attributes_yes', true) . ' ' . TEXT_COPY_ATTRIBUTES_YES . '<br />' . zen_draw_radio_field('copy_attributes', 'copy_attributes_no') . ' ' . TEXT_COPY_ATTRIBUTES_NO);
  261. // future          $contents[] = array('align' => 'center', 'text' => '<br />' . ATTRIBUTES_NAMES_HELPER . '<br />' . zen_draw_separator('pixel_trans.gif', '1', '10'));
  262.           $contents[] = array('text' => '<br />' . zen_image(DIR_WS_IMAGES . 'pixel_black.gif','','100%','3'));
  263.         }
  264.  
  265.         // only ask if product has discounts
  266.         if (zen_has_product_discounts($pInfo->products_id) == 'true') {
  267.           $contents[] = array('text' => '<br />' . TEXT_COPY_DISCOUNTS_ONLY);
  268.           $contents[] = array('text' => '<br />' . TEXT_COPY_DISCOUNTS . '<br />' . zen_draw_radio_field('copy_discounts', 'copy_discounts_yes', true) . ' ' . TEXT_COPY_DISCOUNTS_YES . '<br />' . zen_draw_radio_field('copy_discounts', 'copy_discounts_no') . ' ' . TEXT_COPY_DISCOUNTS_NO);
  269.           $contents[] = array('text' => '<br />' . zen_image(DIR_WS_IMAGES . 'pixel_black.gif','','100%','3'));
  270.         } else {
  271.           $contents[] = array('text' => '<br />' . 'NO DISCOUNTS');
  272.         }
  273.  
  274.         $contents[] = array('align' => 'center', 'text' => '<br />' . zen_image_submit('button_copy.gif', IMAGE_COPY) . ' <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>');
  275.         $contents[] = array('text' => '</form>');
  276.  
  277.         $contents[] = array('text' => '<br />' . zen_image(DIR_WS_IMAGES . 'pixel_black.gif','','100%','3'));
  278.         $contents[] = array('text' => '<form action="' . FILENAME_PRODUCTS_TO_CATEGORIES . '.php' . '?products_filter=' . $pInfo->products_id . '&current_category_id=' . $current_category_id . '" method="post">'  . zen_hide_session_id());
  279.         $contents[] = array('align' => 'center', 'text' => '<input type="submit" value="' . BUTTON_PRODUCTS_TO_CATEGORIES . '"></form>');
  280.  
  281.         break;
  282. // attribute features
  283.     case 'attribute_features':
  284.         $copy_attributes_delete_first = '0';
  285.         $copy_attributes_duplicates_skipped = '0';
  286.         $copy_attributes_duplicates_overwrite = '0';
  287.         $copy_attributes_include_downloads = '1';
  288.         $copy_attributes_include_filename = '1';
  289.         $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_ATTRIBUTE_FEATURES . $pInfo->products_id . '</b>');
  290.  
  291.         $contents[] = array('align' => 'center', 'text' => '<br />' . '<strong>' . TEXT_PRODUCTS_ATTRIBUTES_INFO . '</strong>' . '<br />');
  292.  
  293.         $contents[] = array('align' => 'center', 'text' => '<br />' . '<strong>' . zen_get_products_name($pInfo->products_id, $languages_id) . ' ID# ' . $pInfo->products_id . '</strong><br /><br />' .
  294.                                                            '<a href="' . zen_href_link(FILENAME_ATTRIBUTES_CONTROLLER, '&action=attributes_preview' . '&products_filter=' . $pInfo->products_id . '&current_category_id=' . $current_category_id) . '">' . zen_image_button('button_preview.gif', IMAGE_PREVIEW) . '</a>' .
  295.                                                            '&nbsp;&nbsp;' . '<a href="' . zen_href_link(FILENAME_ATTRIBUTES_CONTROLLER, 'products_filter=' . $pInfo->products_id . '&current_category_id=' . $current_category_id) . '">' . zen_image_button('button_edit_attribs.gif', IMAGE_EDIT_ATTRIBUTES) . '</a>' .
  296.                                                            '<br /><br />');
  297.         $contents[] = array('align' => 'left', 'text' => '<br />' . '<strong>' . TEXT_PRODUCT_ATTRIBUTES_DOWNLOADS . '</strong>' . zen_has_product_attributes_downloads($pInfo->products_id) . zen_has_product_attributes_downloads($pInfo->products_id, true));
  298.         $contents[] = array('align' => 'left', 'text' => '<br />' . TEXT_INFO_ATTRIBUTES_FEATURES_DELETE . '<strong>' . zen_get_products_name($pInfo->products_id) . ' ID# ' . $pInfo->products_id . '</strong><br /><a href="' . zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id . '&action=delete_attributes' . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '') . '&products_id=' . $pInfo->products_id) . '">' . zen_image_button('button_delete.gif', IMAGE_DELETE) . '</a>');
  299.         $contents[] = array('align' => 'left', 'text' => '<br />' . TEXT_INFO_ATTRIBUTES_FEATURES_UPDATES . '<strong>' . zen_get_products_name($pInfo->products_id, $languages_id) . ' ID# ' . $pInfo->products_id . '</strong><br /><a href="' . zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id . '&action=update_attributes_sort_order' . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '') . '&products_id=' . $pInfo->products_id) . '">' . zen_image_button('button_update.gif', IMAGE_UPDATE) . '</a>');
  300.         $contents[] = array('align' => 'left', 'text' => '<br />' . TEXT_INFO_ATTRIBUTES_FEATURES_COPY_TO_PRODUCT . '<strong>' . zen_get_products_name($pInfo->products_id, $languages_id) . ' ID# ' . $pInfo->products_id . '</strong><br /><a href="' . zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id . '&action=attribute_features_copy_to_product' . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '') . '&products_id=' . $pInfo->products_id) . '">' . zen_image_button('button_copy_to.gif', IMAGE_COPY_TO) . '</a>');
  301.         $contents[] = array('align' => 'left', 'text' => '<br />' . TEXT_INFO_ATTRIBUTES_FEATURES_COPY_TO_CATEGORY . '<strong>' . zen_get_products_name($pInfo->products_id, $languages_id) . ' ID# ' . $pInfo->products_id . '</strong><br /><a href="' . zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id . '&action=attribute_features_copy_to_category' . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '') . '&products_id=' . $pInfo->products_id) . '">' . zen_image_button('button_copy_to.gif', IMAGE_COPY_TO) . '</a>');
  302.  
  303.         $contents[] = array('align' => 'center', 'text' => '<br /><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>');
  304.         break;
  305.  
  306. // attribute copier to product
  307.     case 'attribute_features_copy_to_product':
  308.       $_GET['products_update_id'] = '';
  309.       // excluded current product from the pull down menu of products
  310.       $products_exclude_array = array();
  311.       $products_exclude_array[] = $pInfo->products_id;
  312.  
  313.       $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_ATTRIBUTE_FEATURES . $pInfo->products_id . '</b>');
  314.       $contents = array('form' => zen_draw_form('products', FILENAME_CATEGORIES, 'action=update_attributes_copy_to_product&cPath=' . $cPath . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '')) . zen_draw_hidden_field('products_id', $pInfo->products_id) . zen_draw_hidden_field('products_update_id', $_GET['products_update_id']) . zen_draw_hidden_field('copy_attributes', $_GET['copy_attributes']));
  315.       $contents[] = array('text' => '<br />' . TEXT_COPY_ATTRIBUTES_CONDITIONS . '<br />' . zen_draw_radio_field('copy_attributes', 'copy_attributes_delete', true) . ' ' . TEXT_COPY_ATTRIBUTES_DELETE . '<br />' . zen_draw_radio_field('copy_attributes', 'copy_attributes_update') . ' ' . TEXT_COPY_ATTRIBUTES_UPDATE . '<br />' . zen_draw_radio_field('copy_attributes', 'copy_attributes_ignore') . ' ' . TEXT_COPY_ATTRIBUTES_IGNORE);
  316.       $contents[] = array('align' => 'center', 'text' => '<br />' . zen_draw_products_pull_down('products_update_id', '', $products_exclude_array, true) . '<br /><br />' . zen_image_submit('button_copy_to.gif', IMAGE_COPY_TO). '&nbsp;&nbsp;<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>');
  317.       break;
  318.  
  319. // attribute copier to product
  320.     case 'attribute_features_copy_to_category':
  321.       $_GET['categories_update_id'] = '';
  322.  
  323.       $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_ATTRIBUTE_FEATURES . $pInfo->products_id . '</b>');
  324.       $contents = array('form' => zen_draw_form('products', FILENAME_CATEGORIES, 'action=update_attributes_copy_to_category&cPath=' . $cPath . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '')) . zen_draw_hidden_field('products_id', $pInfo->products_id) . zen_draw_hidden_field('categories_update_id', $_GET['categories_update_id']) . zen_draw_hidden_field('copy_attributes', $_GET['copy_attributes']));
  325.       $contents[] = array('text' => '<br />' . TEXT_COPY_ATTRIBUTES_CONDITIONS . '<br />' . zen_draw_radio_field('copy_attributes', 'copy_attributes_delete', true) . ' ' . TEXT_COPY_ATTRIBUTES_DELETE . '<br />' . zen_draw_radio_field('copy_attributes', 'copy_attributes_update') . ' ' . TEXT_COPY_ATTRIBUTES_UPDATE . '<br />' . zen_draw_radio_field('copy_attributes', 'copy_attributes_ignore') . ' ' . TEXT_COPY_ATTRIBUTES_IGNORE);
  326.       $contents[] = array('align' => 'center', 'text' => '<br />' . zen_draw_products_pull_down_categories('categories_update_id', '', '', true) . '<br /><br />' . zen_image_submit('button_copy_to.gif', IMAGE_COPY_TO) . '&nbsp;&nbsp;<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>');
  327.       break;
  328.  
  329.     } // switch
  330.  
  331.     if ( (zen_not_null($heading)) && (zen_not_null($contents)) ) {
  332.       echo '            <td width="25%" valign="top">' . "\n";
  333.  
  334.       $box = new box;
  335.       echo $box->infoBox($heading, $contents);
  336.  
  337.       echo '            </td>' . "\n";
  338.     }
  339. ?>
  340.  
  341.           </tr>
  342.           <tr>
  343. <?php
  344. // Split Page
  345. if ($products_query_numrows > 0) {
  346.   if (empty($pInfo->products_id)) {
  347.     $pInfo->products_id= $pID;
  348.   }
  349. ?>
  350.             <td class="smallText" align="right"><?php echo $products_split->display_count($products_query_numrows, MAX_DISPLAY_RESULTS_CATEGORIES, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_PRODUCTS) . '<br>' . $products_split->display_links($products_query_numrows, MAX_DISPLAY_RESULTS_CATEGORIES, MAX_DISPLAY_PAGE_LINKS, $_GET['page'], zen_get_all_get_params(array('page', 'info', 'x', 'y')) ); ?></td>
  351.  
  352. <?php
  353. }
  354. // Split Page
  355. ?>
  356.           </tr>
  357.         </table></td>
  358.       </tr>
  359.     </table>
  360. <?php
  361.   }
  362. ?>
  363.     </td>
  364. <!-- body_text_eof //-->
  365.   </tr>
  366. </table>
  367. <!-- body_eof //-->
  368.  
  369. <!-- footer //-->
  370. <?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
  371. <!-- footer_eof //-->
  372. <br />
  373. </body>
  374. </html>
  375. <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
  376.