[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.21 KiB
MD5: a49907979167f85ee258153d3a51a2ed

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


cron