[ 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/ -> document_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: document_product.php 4279 2006-08-26 03:31:29Z 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  
  25          zen_redirect(zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $_GET['cPath'] . '&pID=' . $_GET['pID'] . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '')));
  26          break;
  27  
  28        case 'delete_product_confirm':
  29          if (file_exists(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/delete_product_confirm.php')) {
  30            require(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/delete_product_confirm.php');
  31           } else {
  32            require(DIR_WS_MODULES . 'delete_product_confirm.php');
  33           }
  34          break;
  35        case 'move_product_confirm':
  36          if (file_exists(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/move_product_confirm.php')) {
  37            require(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/move_product_confirm.php');
  38           } else {
  39            require(DIR_WS_MODULES . 'move_product_confirm.php');
  40           }
  41          break;
  42        case 'insert_product_meta_tags':
  43        case 'update_product_meta_tags':
  44          if (file_exists(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/update_product_meta_tags.php')) {
  45            require(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/update_product_meta_tags.php');
  46           } else {
  47            require(DIR_WS_MODULES . 'update_product_meta_tags.php');
  48           }
  49          break;
  50        case 'insert_product':
  51        case 'update_product':
  52          if (file_exists(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/update_product.php')) {
  53            require(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/update_product.php');
  54           } else {
  55            require(DIR_WS_MODULES . 'update_product.php');
  56           }
  57          break;
  58        case 'copy_to_confirm':
  59          if (file_exists(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/copy_to_confirm.php')) {
  60            require(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/copy_to_confirm.php');
  61           } else {
  62            require(DIR_WS_MODULES . 'copy_to_confirm.php');
  63           }
  64          break;
  65        case 'new_product_preview_meta_tags':
  66          if (file_exists(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/new_product_preview_meta_tags.php')) {
  67            require(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/new_product_preview_meta_tags.php');
  68           } else {
  69            require(DIR_WS_MODULES . 'new_product_preview_meta_tags.php');
  70           }
  71          break;
  72        case 'new_product_preview':
  73          if (file_exists(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/new_product_preview.php')) {
  74            require(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/new_product_preview.php');
  75           } else {
  76            require(DIR_WS_MODULES . 'new_product_preview.php');
  77           }
  78          break;
  79  
  80      }
  81    }
  82  
  83  // check if the catalog image directory exists

  84    if (is_dir(DIR_FS_CATALOG_IMAGES)) {
  85      if (!is_writeable(DIR_FS_CATALOG_IMAGES)) $messageStack->add(ERROR_CATALOG_IMAGE_DIRECTORY_NOT_WRITEABLE, 'error');
  86    } else {
  87      $messageStack->add(ERROR_CATALOG_IMAGE_DIRECTORY_DOES_NOT_EXIST, 'error');
  88    }
  89  ?>
  90  <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
  91  <html <?php echo HTML_PARAMS; ?>>
  92  <head>
  93  <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
  94  <title><?php echo TITLE; ?></title>
  95  <link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
  96  <link rel="stylesheet" type="text/css" href="includes/cssjsmenuhover.css" media="all" id="hoverJS">
  97  <script language="javascript" src="includes/menu.js"></script>
  98  <script language="javascript" src="includes/general.js"></script>
  99  <script type="text/javascript">
 100    <!--
 101    function init()
 102    {
 103      cssjsmenu('navbar');
 104      if (document.getElementById)
 105      {
 106        var kill = document.getElementById('hoverJS');
 107        kill.disabled = true;
 108      }
 109  if (typeof _editor_url == "string") HTMLArea.replaceAll();
 110   }
 111   // -->

 112  </script>
 113  <?php if ($action != 'new_product_meta_tags' && $editor_handler != '') include ($editor_handler); ?>
 114  </head>
 115  <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onLoad="init()">
 116  <div id="spiffycalendar" class="text"></div>
 117  <!-- header //-->
 118  <?php require(DIR_WS_INCLUDES . 'header.php'); ?>
 119  <!-- header_eof //-->
 120  
 121  <!-- body //-->
 122  <table border="0" width="100%" cellspacing="2" cellpadding="2">
 123    <tr>
 124  <!-- body_text //-->
 125      <td width="100%" valign="top">
 126  <?php
 127    if ($action == 'new_product' or $action == 'new_product_meta_tags') {
 128  
 129      if ($action == 'new_product_meta_tags') {
 130        require(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/collect_info_metatags.php');
 131      } else {
 132        require(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/collect_info.php');
 133      }
 134  
 135    } elseif ($action == 'new_product_preview' or $action == 'new_product_preview_meta_tags') {
 136      if ($action == 'new_product_preview_meta_tags') {
 137        require(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/preview_info_meta_tags.php');
 138      } else {
 139        require(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/preview_info.php');
 140      }
 141  
 142    } else {
 143  
 144    require(DIR_WS_MODULES . 'category_product_listing.php');
 145  
 146      $heading = array();
 147      $contents = array();
 148      switch ($action) {
 149        case 'new_category':
 150          $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_NEW_CATEGORY . '</b>');
 151  
 152          $contents = array('form' => zen_draw_form('newcategory', FILENAME_CATEGORIES, 'action=insert_category&cPath=' . $cPath, 'post', 'enctype="multipart/form-data"'));
 153          $contents[] = array('text' => TEXT_NEW_CATEGORY_INTRO);
 154  
 155          $category_inputs_string = '';
 156          $languages = zen_get_languages();
 157          for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
 158            $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'));
 159          }
 160  
 161          $contents[] = array('text' => '<br />' . TEXT_CATEGORIES_NAME . $category_inputs_string);
 162          $contents[] = array('text' => '<br />' . TEXT_CATEGORIES_IMAGE . '<br />' . zen_draw_file_field('categories_image'));
 163  
 164          $dir = @dir(DIR_FS_CATALOG_IMAGES);
 165          $dir_info[] = array('id' => '', 'text' => "Main Directory");
 166          while ($file = $dir->read()) {
 167            if (is_dir(DIR_FS_CATALOG_IMAGES . $file) && strtoupper($file) != 'CVS' && $file != "." && $file != "..") {
 168              $dir_info[] = array('id' => $file . '/', 'text' => $file);
 169            }
 170          }
 171  
 172          $default_directory = substr( $cInfo->categories_image, 0,strpos( $cInfo->categories_image, '/')+1);
 173          $contents[] = array('text' => TEXT_CATEGORIES_IMAGE_DIR . ' ' . zen_draw_pull_down_menu('img_dir', $dir_info, $default_directory));
 174  
 175          $contents[] = array('text' => '<br />' . TEXT_SORT_ORDER . '<br />' . zen_draw_input_field('sort_order', '', 'size="4"'));
 176          $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>');
 177          break;
 178        case 'edit_category':
 179          $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_EDIT_CATEGORY . '</b>');
 180  
 181          $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));
 182          $contents[] = array('text' => TEXT_EDIT_INTRO);
 183  
 184          $category_inputs_string = '';
 185          $languages = zen_get_languages();
 186          for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
 187            $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_get_category_name($cInfo->categories_id, $languages[$i]['id']), zen_set_field_length(TABLE_CATEGORIES_DESCRIPTION, 'categories_name'));
 188          }
 189          $contents[] = array('text' => '<br />' . TEXT_EDIT_CATEGORIES_NAME . $category_inputs_string);
 190          $contents[] = array('text' => '<br />' . TEXT_EDIT_CATEGORIES_IMAGE . '<br />' . zen_draw_file_field('categories_image'));
 191  
 192          $dir = @dir(DIR_FS_CATALOG_IMAGES);
 193          $dir_info[] = array('id' => '', 'text' => "Main Directory");
 194          while ($file = $dir->read()) {
 195            if (is_dir(DIR_FS_CATALOG_IMAGES . $file) && strtoupper($file) != 'CVS' && $file != "." && $file != "..") {
 196              $dir_info[] = array('id' => $file . '/', 'text' => $file);
 197            }
 198          }
 199  
 200          $default_directory = substr( $cInfo->categories_image, 0,strpos( $cInfo->categories_image, '/')+1);
 201          $contents[] = array('text' => TEXT_CATEGORIES_IMAGE_DIR . ' ' . zen_draw_pull_down_menu('img_dir', $dir_info, $default_directory));
 202          $contents[] = array('text' => '<br>' . zen_info_image($cInfo->categories_image, $cInfo->categories_name));
 203          $contents[] = array('text' => '<br>' . $cInfo->categories_image);
 204  
 205          $contents[] = array('text' => '<br />' . TEXT_EDIT_SORT_ORDER . '<br />' . zen_draw_input_field('sort_order', $cInfo->sort_order, 'size="2"'));
 206          $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>');
 207          break;
 208        case 'delete_product':
 209          if (file_exists(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/sidebox_delete_product.php')) {
 210            require(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/sidebox_delete_product.php');
 211           } else {
 212            require(DIR_WS_MODULES . 'sidebox_delete_product.php');
 213           }
 214          break;
 215        case 'move_product':
 216          if (file_exists(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/sidebox_move_product.php')) {
 217            require(DIR_WS_MODULES . $zc_products->get_handler($product_type) . '/sidebox_move_product.php');
 218           } else {
 219            require(DIR_WS_MODULES . 'sidebox_move_product.php');
 220           }
 221          break;
 222        case 'copy_to':
 223          $copy_attributes_delete_first = '0';
 224          $copy_attributes_duplicates_skipped = '0';
 225          $copy_attributes_duplicates_overwrite = '0';
 226          $copy_attributes_include_downloads = '1';
 227          $copy_attributes_include_filename = '1';
 228  
 229          $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_COPY_TO . '</b>');
 230  // WebMakers.com Added: Split Page

 231          if (empty($pInfo->products_id)) {
 232            $pInfo->products_id= $pID;
 233          }
 234  
 235          $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));
 236          $contents[] = array('text' => TEXT_INFO_COPY_TO_INTRO);
 237          $contents[] = array('text' => '<br />' . TEXT_INFO_CURRENT_PRODUCT . '<br /><b>' . $pInfo->products_name  . ' ID#' . $pInfo->products_id . '</b>');
 238          $contents[] = array('text' => '<br />' . TEXT_INFO_CURRENT_CATEGORIES . '<br /><b>' . zen_output_generated_category_path($pInfo->products_id, 'product') . '</b>');
 239          $contents[] = array('text' => '<br />' . TEXT_CATEGORIES . '<br />' . zen_draw_pull_down_menu('categories_id', zen_get_category_tree(), $current_category_id));
 240          $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);
 241  
 242          // only ask about attributes if they exist

 243          if (zen_has_product_attributes($pInfo->products_id, 'false')) {
 244            $contents[] = array('text' => '<br />' . zen_image(DIR_WS_IMAGES . 'pixel_black.gif','','100%','3'));
 245            $contents[] = array('text' => '<br />' . TEXT_COPY_ATTRIBUTES_ONLY);
 246            $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);
 247  // future          $contents[] = array('align' => 'center', 'text' => '<br />' . ATTRIBUTES_NAMES_HELPER . '<br />' . zen_draw_separator('pixel_trans.gif', '1', '10'));

 248            $contents[] = array('text' => '<br />' . zen_image(DIR_WS_IMAGES . 'pixel_black.gif','','100%','3'));
 249          }
 250  
 251          $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>');
 252          $contents[] = array('text' => '</form>');
 253  
 254          $contents[] = array('text' => '<br />' . zen_image(DIR_WS_IMAGES . 'pixel_black.gif','','100%','3'));
 255          $contents[] = array('text' => '<form action="' . FILENAME_PRODUCTS_TO_CATEGORIES . '.php' . '?products_filter=' . $pInfo->products_id . '" method="post">');
 256          $contents[] = array('align' => 'center', 'text' => '<input type="submit" value="' . BUTTON_PRODUCTS_TO_CATEGORIES . '"></form>');
 257  
 258          break;
 259  // attribute features

 260      case 'attribute_features':
 261          $copy_attributes_delete_first = '0';
 262          $copy_attributes_duplicates_skipped = '0';
 263          $copy_attributes_duplicates_overwrite = '0';
 264          $copy_attributes_include_downloads = '1';
 265          $copy_attributes_include_filename = '1';
 266          $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_ATTRIBUTE_FEATURES . $pInfo->products_id . '</b>');
 267  
 268          $contents[] = array('align' => 'center', 'text' => '<br />' . '<strong>' . TEXT_PRODUCTS_ATTRIBUTES_INFO . '</strong>' . '<br />');
 269  
 270          $contents[] = array('align' => 'center', 'text' => '<br />' . '<strong>' . zen_get_products_name($pInfo->products_id, $languages_id) . ' ID# ' . $pInfo->products_id . '</strong><br /><br />' .
 271                                                             '<a href="' . zen_href_link(FILENAME_ATTRIBUTES_CONTROLLER, '&action=attributes_preview' . '&products_filter=' . $pInfo->products_id) . '">' . zen_image_button('button_preview.gif', IMAGE_PREVIEW) . '</a>' .
 272                                                             '&nbsp;&nbsp;' . '<a href="' . zen_href_link(FILENAME_ATTRIBUTES_CONTROLLER, 'products_filter=' . $pInfo->products_id) . '">' . zen_image_button('button_edit_attribs.gif', IMAGE_EDIT_ATTRIBUTES) . '</a>' .
 273                                                             '<br /><br />');
 274          $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));
 275          $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>');
 276          $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>');
 277          $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>');
 278          $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>');
 279  
 280          $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>');
 281          break;
 282  
 283  // attribute copier to product

 284      case 'attribute_features_copy_to_product':
 285        $_GET['products_update_id'] = '';
 286        // excluded current product from the pull down menu of products

 287        $products_exclude_array = array();
 288        $products_exclude_array[] = $pInfo->products_id;
 289  
 290        $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_ATTRIBUTE_FEATURES . $pInfo->products_id . '</b>');
 291        $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']));
 292        $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);
 293        $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>');
 294        break;
 295  
 296  // attribute copier to product

 297      case 'attribute_features_copy_to_category':
 298        $_GET['categories_update_id'] = '';
 299  
 300        $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_ATTRIBUTE_FEATURES . $pInfo->products_id . '</b>');
 301        $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']));
 302        $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);
 303        $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>');
 304        break;
 305  
 306      } // switch

 307  
 308      if ( (zen_not_null($heading)) && (zen_not_null($contents)) ) {
 309        echo '            <td width="25%" valign="top">' . "\n";
 310  
 311        $box = new box;
 312        echo $box->infoBox($heading, $contents);
 313  
 314        echo '            </td>' . "\n";
 315      }
 316  ?>
 317  
 318            </tr>
 319            <tr>
 320  <?php
 321  // Split Page

 322  if ($products_query_numrows > 0) {
 323    if (empty($pInfo->products_id)) {
 324      $pInfo->products_id= $pID;
 325    }
 326  ?>
 327              <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>
 328  
 329  <?php
 330  }
 331  // Split Page

 332  ?>
 333            </tr>
 334          </table></td>
 335        </tr>
 336      </table>
 337  <?php
 338    }
 339  ?>
 340      </td>
 341  <!-- body_text_eof //-->
 342    </tr>
 343  </table>
 344  <!-- body_eof //-->
 345  
 346  <!-- footer //-->
 347  <?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
 348  <!-- footer_eof //-->
 349  <br />
 350  </body>
 351  </html>
 352  <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>


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