} $contents[] = array('text' => '<br />' . TEXT_CATEGORIES_DESCRIPTION . $category_inputs_string); $contents[] = array('text' => '<br />' . TEXT_EDIT_CATEGORIES_IMAGE . '<br />' . zen_draw_file_field('categories_image')); $dir = @dir(DIR_FS_CATALOG_IMAGES); $dir_info[] = array('id' => '', 'text' => "Main Directory"); while ($file = $dir->read()) { if (is_dir(DIR_FS_CATALOG_IMAGES . $file) && strtoupper($file) != 'CVS' && $file != "." && $file != "..") { $dir_info[] = array('id' => $file . '/', 'text' => $file); } } $dir->close(); sort($dir_info); $default_directory = substr($cInfo->categories_image, 0, strpos($cInfo->categories_image, '/') + 1); $contents[] = array('text' => TEXT_CATEGORIES_IMAGE_DIR . ' ' . zen_draw_pull_down_menu('img_dir', $dir_info, $default_directory)); $contents[] = array('text' => '<br />' . TEXT_CATEGORIES_IMAGE_MANUAL . ' ' . zen_draw_input_field('categories_image_manual')); $contents[] = array('text' => '<br />' . zen_info_image($cInfo->categories_image, $cInfo->categories_name)); $contents[] = array('text' => '<br />' . $cInfo->categories_image); $contents[] = array('text' => '<br />' . TEXT_IMAGES_DELETE . ' ' . zen_draw_radio_field('image_delete', '0', $off_image_delete) . ' ' . TABLE_HEADING_NO . ' ' . zen_draw_radio_field('image_delete', '1', $on_image_delete) . ' ' . TABLE_HEADING_YES); $contents[] = array('text' => '<br />' . TEXT_EDIT_SORT_ORDER . '<br />' . zen_draw_input_field('sort_order', $cInfo->sort_order, 'size="6"')); $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>'); $contents[] = array('text' => TEXT_RESTRICT_PRODUCT_TYPE . ' ' . zen_draw_pull_down_menu('restrict_type', $type_array) . ' <input type="submit" name="add_type_all" value="' . BUTTON_ADD_PRODUCT_TYPES_SUBCATEGORIES_ON . '">' . ' <input type="submit" name="add_type" value="' . BUTTON_ADD_PRODUCT_TYPES_SUBCATEGORIES_OFF . '">'); $sql = "select * from " . TABLE_PRODUCT_TYPES_TO_CATEGORY . "\n where category_id = '" . $cInfo->categories_id . "'"; $restrict_types = $db->Execute($sql); if ($restrict_types->RecordCount() > 0) { $contents[] = array('text' => '<br />' . TEXT_CATEGORY_HAS_RESTRICTIONS . '<br />'); while (!$restrict_types->EOF) { $sql = "select type_name from " . TABLE_PRODUCT_TYPES . " where type_id = '" . $restrict_types->fields['product_type_id'] . "'"; $type = $db->Execute($sql); $contents[] = array('text' => '<a href="' . zen_href_link(FILENAME_CATEGORIES, 'action=remove_type&cPath=' . $cPath . '&cID=' . $cInfo->categories_id . '&type_id=' . $restrict_types->fields['product_type_id']) . '">' . zen_image_button('button_delete.gif', IMAGE_DELETE) . '</a> ' . $type->fields['type_name'] . '<br />'); $restrict_types->MoveNext(); }
case 'delete': $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_REVIEW . '</b>'); $contents = array('form' => zen_draw_form('reviews', FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $rInfo->reviews_id . '&action=deleteconfirm')); $contents[] = array('text' => TEXT_INFO_DELETE_REVIEW_INTRO); $contents[] = array('text' => '<br><b>' . $rInfo->products_name . '</b>'); $contents[] = array('align' => 'center', 'text' => '<br>' . zen_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . zen_href_link(FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $rInfo->reviews_id) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); break; default: if (isset($rInfo) && is_object($rInfo)) { $heading[] = array('text' => '<b>' . $rInfo->products_name . '</b>'); $contents[] = array('align' => 'center', 'text' => '<a href="' . zen_href_link(FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $rInfo->reviews_id . '&action=edit') . '">' . zen_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . zen_href_link(FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $rInfo->reviews_id . '&action=delete') . '">' . zen_image_button('button_delete.gif', IMAGE_DELETE) . '</a> ' . ' <a href="' . zen_href_link(FILENAME_CATEGORIES, 'cPath=' . zen_get_products_category_id($rInfo->products_id) . '&pID=' . $rInfo->products_id) . '">' . zen_image_button('button_details.gif', IMAGE_DETAILS) . '</a>'); $contents[] = array('text' => '<br>' . TEXT_INFO_DATE_ADDED . ' ' . zen_date_short($rInfo->date_added)); if (zen_not_null($rInfo->last_modified)) { $contents[] = array('text' => TEXT_INFO_LAST_MODIFIED . ' ' . zen_date_short($rInfo->last_modified)); } $contents[] = array('text' => '<br>' . zen_info_image($rInfo->products_image, $rInfo->products_name, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT)); $contents[] = array('text' => '<br>' . TEXT_INFO_REVIEW_AUTHOR . ' ' . $rInfo->customers_name); $contents[] = array('text' => TEXT_INFO_REVIEW_RATING . ' ' . zen_image(DIR_WS_TEMPLATE_IMAGES . 'stars_' . $rInfo->reviews_rating . '.gif')); $contents[] = array('text' => TEXT_INFO_REVIEW_READ . ' ' . $rInfo->reviews_read); $contents[] = array('text' => '<br>' . TEXT_INFO_REVIEW_SIZE . ' ' . $rInfo->reviews_text_size . ' bytes'); $contents[] = array('text' => '<br>' . TEXT_INFO_PRODUCTS_AVERAGE_RATING . ' ' . number_format($rInfo->average_rating, 2) . '%'); } break; } if (zen_not_null($heading) && zen_not_null($contents)) { echo ' <td width="25%" valign="top">' . "\n"; $box = new box(); echo $box->infoBox($heading, $contents); echo ' </td>' . "\n"; } ?>
$contents[] = array('text' => '<br>' . zen_draw_checkbox_field('delete_image', '', true) . ' ' . TEXT_DELETE_IMAGE); if ($mInfo->products_count > 0) { $contents[] = array('text' => '<br>' . zen_draw_checkbox_field('delete_products') . ' ' . TEXT_DELETE_PRODUCTS); $contents[] = array('text' => '<br>' . sprintf(TEXT_DELETE_WARNING_PRODUCTS, $mInfo->products_count)); } $contents[] = array('align' => 'center', 'text' => '<br>' . zen_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . zen_href_link(FILENAME_MANUFACTURERS, 'page=' . $_GET['page'] . '&mID=' . $mInfo->manufacturers_id) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); break; default: if (isset($mInfo) && is_object($mInfo)) { $heading[] = array('text' => '<b>' . $mInfo->manufacturers_name . '</b>'); $contents[] = array('align' => 'center', 'text' => '<a href="' . zen_href_link(FILENAME_MANUFACTURERS, 'page=' . $_GET['page'] . '&mID=' . $mInfo->manufacturers_id . '&action=edit') . '">' . zen_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . zen_href_link(FILENAME_MANUFACTURERS, 'page=' . $_GET['page'] . '&mID=' . $mInfo->manufacturers_id . '&action=delete') . '">' . zen_image_button('button_delete.gif', IMAGE_DELETE) . '</a>'); $contents[] = array('text' => '<br>' . TEXT_DATE_ADDED . ' ' . zen_date_short($mInfo->date_added)); if (zen_not_null($mInfo->last_modified)) { $contents[] = array('text' => TEXT_LAST_MODIFIED . ' ' . zen_date_short($mInfo->last_modified)); } $contents[] = array('text' => '<br>' . zen_info_image($mInfo->manufacturers_image, $mInfo->manufacturers_name)); $contents[] = array('text' => '<br>' . TEXT_PRODUCTS . ' ' . $mInfo->products_count); } break; } if (zen_not_null($heading) && zen_not_null($contents)) { echo ' <td width="25%" valign="top">' . "\n"; $box = new box(); echo $box->infoBox($heading, $contents); echo ' </td>' . "\n"; } ?> </tr> </table></td> </tr> </table></td>
$contents[] = array('text' => '<br>' . zen_draw_checkbox_field('delete_image', '', true) . ' ' . TEXT_DELETE_IMAGE); if ($aInfo->products_count > 0) { $contents[] = array('text' => '<br>' . zen_draw_checkbox_field('delete_products') . ' ' . TEXT_DELETE_PRODUCTS); $contents[] = array('text' => '<br>' . sprintf(TEXT_DELETE_WARNING_PRODUCTS, $aInfo->products_count)); } $contents[] = array('align' => 'center', 'text' => '<br>' . zen_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . zen_href_link(FILENAME_RECORD_ARTISTS, 'page=' . $_GET['page'] . '&mID=' . $aInfo->artists_id) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); break; default: if (isset($aInfo) && is_object($aInfo)) { $heading[] = array('text' => '<b>' . $aInfo->artists_name . '</b>'); $contents[] = array('align' => 'center', 'text' => '<a href="' . zen_href_link(FILENAME_RECORD_ARTISTS, 'page=' . $_GET['page'] . '&mID=' . $aInfo->artists_id . '&action=edit') . '">' . zen_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . zen_href_link(FILENAME_RECORD_ARTISTS, 'page=' . $_GET['page'] . '&mID=' . $aInfo->artists_id . '&action=delete') . '">' . zen_image_button('button_delete.gif', IMAGE_DELETE) . '</a>'); $contents[] = array('text' => '<br>' . TEXT_DATE_ADDED . ' ' . zen_date_short($aInfo->date_added)); if (zen_not_null($aInfo->last_modified)) { $contents[] = array('text' => TEXT_LAST_MODIFIED . ' ' . zen_date_short($aInfo->last_modified)); } $contents[] = array('text' => '<br>' . zen_info_image($aInfo->artists_image, $aInfo->artists_name)); $contents[] = array('text' => '<br>' . TEXT_PRODUCTS . ' ' . $aInfo->products_count); } break; } if (zen_not_null($heading) && zen_not_null($contents)) { echo ' <td width="25%" valign="top">' . "\n"; $box = new box(); echo $box->infoBox($heading, $contents); echo ' </td>' . "\n"; } ?> </tr> </table></td> </tr> </table></td>
$contents[] = array('text' => '<br />' . TEXT_PRE_ADD_PRODUCTS_ID . '<br>' . zen_draw_input_field('pre_add_products_id', '', zen_set_field_length(TABLE_SPECIALS, 'products_id'))); $contents[] = array('align' => 'center', 'text' => '<br>' . zen_image_submit('button_confirm.gif', IMAGE_CONFIRM) . ' <a href="' . zen_href_link(FILENAME_SPECIALS, 'page=' . $_GET['page'] . '&sID=' . $sInfo->specials_id) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); break; default: if (is_object($sInfo)) { $heading[] = array('text' => '<b>' . $sInfo->products_name . '</b>'); if ($sInfo->products_priced_by_attribute == '1') { $specials_current_price = zen_get_products_base_price($sInfo->products_id); } else { $specials_current_price = $sInfo->products_price; } $contents[] = array('align' => 'center', 'text' => '<a href="' . zen_href_link(FILENAME_SPECIALS, 'page=' . $_GET['page'] . '&sID=' . $sInfo->specials_id . '&action=edit') . '">' . zen_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . zen_href_link(FILENAME_SPECIALS, 'page=' . $_GET['page'] . '&sID=' . $sInfo->specials_id . '&action=delete') . '">' . zen_image_button('button_delete.gif', IMAGE_DELETE) . '</a>'); $contents[] = array('align' => 'center', 'text' => '<a href="' . zen_href_link(FILENAME_PRODUCTS_PRICE_MANAGER, 'action=edit&products_filter=' . $sInfo->products_id) . '">' . zen_image_button('button_products_price_manager.gif', IMAGE_PRODUCTS_PRICE_MANAGER) . '</a>'); $contents[] = array('text' => '<br>' . TEXT_INFO_DATE_ADDED . ' ' . zen_date_short($sInfo->specials_date_added)); $contents[] = array('text' => '' . TEXT_INFO_LAST_MODIFIED . ' ' . zen_date_short($sInfo->specials_last_modified)); $contents[] = array('align' => 'center', 'text' => '<br>' . zen_info_image($sInfo->products_image, $sInfo->products_name, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT)); $contents[] = array('text' => '<br>' . TEXT_INFO_ORIGINAL_PRICE . ' ' . $currencies->format($specials_current_price)); $contents[] = array('text' => '' . TEXT_INFO_NEW_PRICE . ' ' . $currencies->format($sInfo->specials_new_products_price)); $contents[] = array('text' => '' . TEXT_INFO_DISPLAY_PRICE . ' ' . zen_get_products_display_price($sInfo->products_id)); $contents[] = array('text' => '<br>' . TEXT_INFO_AVAILABLE_DATE . ' <b>' . (($specials->fields['specials_date_available'] != '0001-01-01' and $specials->fields['specials_date_available'] != '') ? zen_date_short($specials->fields['specials_date_available']) : TEXT_NONE) . '</b>'); $contents[] = array('text' => '<br>' . TEXT_INFO_EXPIRES_DATE . ' <b>' . (($specials->fields['expires_date'] != '0001-01-01' and $specials->fields['expires_date'] != '') ? zen_date_short($specials->fields['expires_date']) : TEXT_NONE) . '</b>'); $contents[] = array('text' => '' . TEXT_INFO_STATUS_CHANGE . ' ' . zen_date_short($sInfo->date_status_change)); $contents[] = array('align' => 'center', 'text' => '<a href="' . zen_href_link(FILENAME_CATEGORIES, '&action=new_product' . '&cPath=' . zen_get_product_path($sInfo->products_id, 'override') . '&pID=' . $sInfo->products_id . '&product_type=' . zen_get_products_type($sInfo->products_id)) . '">' . zen_image_button('button_edit_product.gif', IMAGE_EDIT_PRODUCT) . '<br />' . TEXT_PRODUCT_EDIT . '</a>'); $contents[] = array('align' => 'center', 'text' => '<a href="' . zen_href_link(FILENAME_SPECIALS, 'action=pre_add') . '">' . zen_image_button('button_select.gif', IMAGE_SELECT) . '<br />' . TEXT_INFO_MANUAL . '</a><br /><br />'); } break; } if (zen_not_null($heading) && zen_not_null($contents)) { echo ' <td width="25%" valign="top">' . "\n"; $box = new box(); echo $box->infoBox($heading, $contents);
<br /> <?php echo MODULE_EASY_ADMIN_PRODUCTS_CATEGORIES_IMAGE_DIR; $dir = @dir(DIR_FS_CATALOG_IMAGES); $dir_info[] = array('id' => '', 'text' => "Main Directory"); while ($file = $dir->read()) { if (is_dir(DIR_FS_CATALOG_IMAGES . $file) && strtoupper($file) != 'CVS' && $file != "." && $file != "..") { $dir_info[] = array('id' => $file . '/', 'text' => $file); } } $default_directory = substr($category['categories_image'], 0, strpos($category['categories_image'], '/') + 1); echo zen_draw_pull_down_menu('img_dir', $dir_info, $default_directory); ?> <br /> <?php echo zen_info_image($category['categories_image'], $category['categories_name']); ?> <br /> <?php echo $category['categories_image']; ?> </td> </tr> <tr> <th><?php echo MODULE_EASY_ADMIN_PRODUCTS_CATEGORIES_DESCRIPTION; ?> </th> <td> <?php foreach ($category['categories_description_categories_description'] as $k => $v) {
$contents[] = array('text' => '<br>' . zen_draw_checkbox_field('delete_image', '', true) . ' ' . TEXT_DELETE_IMAGE); if ($aInfo->products_count > 0) { $contents[] = array('text' => '<br>' . zen_draw_checkbox_field('delete_products') . ' ' . TEXT_DELETE_PRODUCTS); $contents[] = array('text' => '<br>' . sprintf(TEXT_DELETE_WARNING_PRODUCTS, $aInfo->products_count)); } $contents[] = array('align' => 'center', 'text' => '<br>' . zen_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . zen_href_link_admin(FILENAME_RECORD_COMPANY, 'page=' . $_GET['page'] . '&mID=' . $aInfo->record_company_id) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); break; default: if (isset($aInfo) && is_object($aInfo)) { $heading[] = array('text' => '<b>' . $aInfo->record_company_name . '</b>'); $contents[] = array('align' => 'center', 'text' => '<a href="' . zen_href_link_admin(FILENAME_RECORD_COMPANY, 'page=' . $_GET['page'] . '&mID=' . $aInfo->record_company_id . '&action=edit') . '">' . zen_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . zen_href_link_admin(FILENAME_RECORD_COMPANY, 'page=' . $_GET['page'] . '&mID=' . $aInfo->record_company_id . '&action=delete') . '">' . zen_image_button('button_delete.gif', IMAGE_DELETE) . '</a>'); $contents[] = array('text' => '<br>' . TEXT_DATE_ADDED . ' ' . zen_date_short($aInfo->date_added)); if (zen_not_null($aInfo->last_modified)) { $contents[] = array('text' => TEXT_LAST_MODIFIED . ' ' . zen_date_short($aInfo->last_modified)); } $contents[] = array('text' => '<br>' . zen_info_image($aInfo->record_company_image, $aInfo->record_company_name)); $contents[] = array('text' => '<br>' . TEXT_PRODUCTS . ' ' . $aInfo->products_count); } break; } if (zen_not_null($heading) && zen_not_null($contents)) { echo ' <td width="25%" valign="top">' . "\n"; $box = new box(); echo $box->infoBox($heading, $contents); echo ' </td>' . "\n"; } ?> </tr> </table></td> </tr> </table></td>
case 'delete': $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_REVIEW . '</b>'); $contents = array('form' => zen_draw_form('reviews', FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $rInfo->reviews_id . '&action=deleteconfirm')); $contents[] = array('text' => TEXT_INFO_DELETE_REVIEW_INTRO); $contents[] = array('text' => '<br><b>' . $rInfo->products_name . '</b>'); $contents[] = array('align' => 'center', 'text' => '<br>' . zen_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . zen_href_link(FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $rInfo->reviews_id) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); break; default: if (isset($rInfo) && is_object($rInfo)) { $heading[] = array('text' => '<b>' . $rInfo->products_name . '</b>'); $contents[] = array('align' => 'center', 'text' => '<a href="' . zen_href_link(FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $rInfo->reviews_id . '&action=edit') . '">' . zen_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . zen_href_link(FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $rInfo->reviews_id . '&action=delete') . '">' . zen_image_button('button_delete.gif', IMAGE_DELETE) . '</a> ' . ' <a href="' . zen_href_link(FILENAME_CATEGORIES, 'cPath=' . zen_get_products_category_id($rInfo->products_id) . '&pID=' . $rInfo->products_id) . '">' . zen_image_button('button_details.gif', IMAGE_DETAILS) . '</a>'); $contents[] = array('text' => '<br>' . TEXT_INFO_DATE_ADDED . ' ' . zen_date_short($rInfo->date_added)); if (zen_not_null($rInfo->last_modified)) { $contents[] = array('text' => TEXT_INFO_LAST_MODIFIED . ' ' . zen_date_short($rInfo->last_modified)); } $contents[] = array('text' => '<br>' . zen_info_image(substr($rInfo->products_image, 0, strpos($rInfo->products_image, ',')), $rInfo->products_name, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT)); $contents[] = array('text' => '<br>' . TEXT_INFO_REVIEW_AUTHOR . ' ' . $rInfo->customers_name); $contents[] = array('text' => TEXT_INFO_REVIEW_RATING . ' ' . zen_image(DIR_WS_TEMPLATE_IMAGES . 'stars_' . $rInfo->reviews_rating . '.gif')); $contents[] = array('text' => TEXT_INFO_REVIEW_READ . ' ' . $rInfo->reviews_read); $contents[] = array('text' => '<br>' . TEXT_INFO_REVIEW_SIZE . ' ' . $rInfo->reviews_text_size . ' bytes'); $contents[] = array('text' => '<br>' . TEXT_INFO_PRODUCTS_AVERAGE_RATING . ' ' . number_format($rInfo->average_rating, 2) . '%'); } break; } if (zen_not_null($heading) && zen_not_null($contents)) { echo ' <td width="25%" valign="top">' . "\n"; $box = new box(); echo $box->infoBox($heading, $contents); echo ' </td>' . "\n"; } ?>
} //--></script> <?php // echo $type_admin_handler; echo zen_draw_form('new_product', $type_admin_handler, 'cPath=' . $cPath . (isset($_GET['product_type']) ? '&product_type=' . $_GET['product_type'] : '') . (isset($_GET['pID']) ? '&pID=' . $_GET['pID'] : '') . '&action=new_product_preview' . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '') . (isset($_GET['search']) && !empty($_GET['search']) ? '&search=' . $_GET['search'] : '') . (isset($_POST['search']) && !empty($_POST['search']) && empty($_GET['search']) ? '&search=' . $_POST['search'] : ''), 'post', 'enctype="multipart/form-data"'); ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo sprintf(TEXT_NEW_PRODUCT, zen_output_generated_category_path($current_category_id)); ?> </td> <td class="pageHeading" align="right"><?php echo zen_info_image($cInfo->categories_image, $cInfo->categories_name, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?> </td> </tr> </table></td> </tr> <tr> <td><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?> </td> </tr> <tr> <td class="main" align="right"><?php echo zen_draw_hidden_field('products_date_added', zen_not_null($pInfo->products_date_added) ? $pInfo->products_date_added : date('Y-m-d')) . zen_image_submit('button_preview.gif', IMAGE_PREVIEW) . ' <a href="' . zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . (isset($_GET['pID']) ? '&pID=' . $_GET['pID'] : '') . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '') . (isset($_GET['search']) && !empty($_GET['search']) ? '&search=' . $_GET['search'] : '') . (isset($_POST['search']) && !empty($_POST['search']) && empty($_GET['search']) ? '&search=' . $_POST['search'] : '')) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'; ?>
break; case 'delete': $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_LINK_CATEGORY . '</b>'); $contents = array('form' => zen_draw_form('delete_link_categories', FILENAME_LINK_CATEGORIES, 'action=delete_confirm') . zen_draw_hidden_field('link_categories_id', $cInfo->link_categories_id)); $contents[] = array('text' => TEXT_DELETE_LINK_CATEGORIES_INTRO); $contents[] = array('text' => '<br /><b>' . $cInfo->link_categories_name . '</b>'); if ($cInfo->link_categories_count > 0) { $contents[] = array('text' => '<br />' . sprintf(TEXT_DELETE_WARNING_LINKS, $cInfo->link_categories_count)); } $contents[] = array('align' => 'center', 'text' => '<br />' . zen_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . zen_href_link(FILENAME_LINK_CATEGORIES, 'cID=' . $cInfo->link_categories_id) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); break; default: if (isset($cInfo) && is_object($cInfo)) { $heading[] = array('text' => '<b>' . $cInfo->link_categories_name . '</b>'); $contents[] = array('align' => 'center', 'text' => '<a href="' . zen_href_link(FILENAME_LINK_CATEGORIES, zen_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->link_categories_id . '&action=edit') . '">' . zen_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . zen_href_link(FILENAME_LINK_CATEGORIES, zen_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->link_categories_id . '&action=delete') . '">' . zen_image_button('button_delete.gif', IMAGE_DELETE) . '</a>'); $contents[] = array('text' => '<br />' . zen_info_image($cInfo->link_categories_image, $cInfo->link_categories_name, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT) . '<br />' . $cInfo->link_categories_image); $contents[] = array('text' => '<br />' . TEXT_INFO_LINK_CATEGORY_DESCRIPTION . ' ' . $cInfo->link_categories_description); $contents[] = array('text' => '<br />' . TEXT_DATE_LINK_CATEGORY_CREATED . ' ' . zen_date_short($cInfo->link_categories_date_added)); if (zen_not_null($cInfo->link_categories_last_modified)) { $contents[] = array('text' => '<br />' . TEXT_DATE_LINK_CATEGORY_LAST_MODIFIED . ' ' . zen_date_short($cInfo->link_categories_last_modified)); } $contents[] = array('text' => '<br />' . TEXT_INFO_LINK_CATEGORY_COUNT . ' ' . $cInfo->link_categories_count); $contents[] = array('text' => '<br />' . TEXT_INFO_LINK_CATEGORY_SORT_ORDER . ' ' . $cInfo->link_categories_sort_order); } break; } if (zen_not_null($heading) && zen_not_null($contents)) { echo ' <td width="25%" valign="top">' . "\n"; $box = new box(); echo $box->infoBox($heading, $contents); echo ' </td>' . "\n";
$contents[] = array('text' => '<br>' . zen_draw_checkbox_field('delete_image', '', true) . ' ' . TEXT_DELETE_IMAGE); if ($mInfo->products_count > 0) { $contents[] = array('text' => '<br>' . zen_draw_checkbox_field('delete_products') . ' ' . TEXT_DELETE_PRODUCTS); $contents[] = array('text' => '<br>' . sprintf(TEXT_DELETE_WARNING_PRODUCTS, $mInfo->products_count)); } $contents[] = array('align' => 'center', 'text' => '<br>' . zen_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . zen_href_link_admin(FILENAME_SUPPLIERS, 'page=' . $_GET['page'] . '&mID=' . $mInfo->suppliers_id) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); break; default: if (isset($mInfo) && is_object($mInfo)) { $heading[] = array('text' => '<b>' . $mInfo->suppliers_name . '</b>'); $contents[] = array('align' => 'center', 'text' => '<a href="' . zen_href_link_admin(FILENAME_SUPPLIERS, 'page=' . $_GET['page'] . '&mID=' . $mInfo->suppliers_id . '&action=edit') . '">' . zen_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . zen_href_link_admin(FILENAME_SUPPLIERS, 'page=' . $_GET['page'] . '&mID=' . $mInfo->suppliers_id . '&action=delete') . '">' . zen_image_button('button_delete.gif', IMAGE_DELETE) . '</a>'); $contents[] = array('text' => '<br>' . TEXT_DATE_ADDED . ' ' . zen_date_short($mInfo->date_added)); if (zen_not_null($mInfo->last_modified)) { $contents[] = array('text' => TEXT_LAST_MODIFIED . ' ' . zen_date_short($mInfo->last_modified)); } $contents[] = array('text' => '<br>' . zen_info_image($mInfo->suppliers_image, $mInfo->suppliers_name)); $contents[] = array('text' => '<br>' . TEXT_PRODUCTS . ' ' . $mInfo->products_count); } break; } if (zen_not_null($heading) && zen_not_null($contents)) { echo ' <td width="25%" valign="top">' . "\n"; $box = new box(); echo $box->infoBox($heading, $contents); echo ' </td>' . "\n"; } ?> </tr> </table></td> </tr> </table></td>
/** * @desc displays the filtered product-rows * * Passed Options * $SearchBoxOnly * $ReturnedPage * $NumberRecordsShown */ function displayFilteredRows($SearchBoxOnly = null, $NumberRecordsShown = null, $ReturnedProductID = null) { global $db; if (isset($_SESSION['languages_id'])) { $language_id = $_SESSION['languages_id']; } else { $language_id = 1; } if (isset($_GET['search']) && $_GET['search']) { // mc12345678 Why was $_GET['search'] omitted? $s = zen_db_input($_GET['search']); //$w = "(p.products_id = '$s' OR d.products_name LIKE '%$s%' OR p.products_model LIKE '%$s%') AND " ;//original version of search //$w = "( p.products_id = '$s' OR d.products_name LIKE '%$s%' OR p.products_model LIKE '$s%' ) AND " ;//changed search to products_model 'startes with'. //$w = "( p.products_id = '$s' OR d.products_name LIKE '%$s%' ) AND " ;//removed products_model from search $w = " AND ( p.products_id = '{$s}' OR d.products_name LIKE '%{$s}%' OR p.products_model LIKE '{$s}%' ) "; //changed search to products_model 'startes with'. } else { $w = ''; $s = ''; } //Show last edited record or Limit number of records displayed on page $SearchRange = null; if ($ReturnedProductID != null && !isset($_GET['search'])) { $ReturnedProductID = zen_db_input($ReturnedProductID); //$w = "( p.products_id = '$ReturnedProductID' ) AND " ;//sets returned record to display $w = " AND ( p.products_id = '{$ReturnedProductID}' ) "; //sets returned record to display $SearchRange = "limit 1"; //show only selected record } elseif ($NumberRecordsShown > 0 && $SearchBoxOnly == 'false') { $NumberRecordsShown = zen_db_input($NumberRecordsShown); $SearchRange = " limit {$NumberRecordsShown}"; //sets start record and total number of records to display } elseif ($SearchBoxOnly == 'true' && !isset($_GET['search'])) { $SearchRange = "limit 0"; //hides all records } $retArr = array(); /* $query_products = 'select distinct pa.products_id, d.products_name, p.products_quantity, p.products_model, p.products_image, p.products_type, p.master_categories_id FROM '.TABLE_PRODUCTS_ATTRIBUTES.' pa left join '.TABLE_PRODUCTS_DESCRIPTION.' d on (pa.products_id = d.products_id) left join '.TABLE_PRODUCTS.' p on (pa.products_id = p.products_id) WHERE d.language_id='.$language_id.' ' . $w . ' order by d.products_name '.$SearchRange.'';*/ if (isset($_GET['page']) && $_GET['page'] > 1) { $rows = $_GET['page'] * STOCK_SET_SBA_NUMRECORDS - STOCK_SET_SBA_NUMRECORDS; } $query_products = "select distinct pa.products_id, d.products_name, p.products_quantity, p.products_model, p.products_image, p.products_type, p.master_categories_id FROM " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_DESCRIPTION . " d, " . TABLE_PRODUCTS . " p WHERE d.language_id='" . $language_id . "' and pa.products_id = d.products_id and pa.products_id = p.products_id " . $w . " order by d.products_name " . $SearchRange . ""; if (!isset($_GET['seachPID']) && !isset($_GET['pwas-search-button']) && !isset($_GET['updateReturnedPID'])) { $products_split = new splitPageResults($_GET['page'], STOCK_SET_SBA_NUMRECORDS, $query_products, $products_query_numrows); } $products = $db->Execute($query_products); $html = ''; if (!isset($_GET['seachPID']) && !isset($_GET['pwas-search-button']) && !isset($_GET['updateReturnedPID'])) { $html .= '<table border="0" width="100%" cellspacing="0" cellpadding="2" class="pageResults">'; $html .= '<tr>'; $html .= '<td class="smallText" valign="top">'; $html .= $products_split->display_count($products_query_numrows, STOCK_SET_SBA_NUMRECORDS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_PRODUCTS); $html .= '</td>'; $html .= '<td class="smallText" align="right">'; $html .= $products_split->display_links($products_query_numrows, STOCK_SET_SBA_NUMRECORDS, MAX_DISPLAY_PAGE_LINKS, $_GET['page']); $html .= '</td>'; $html .= '</tr>'; $html .= '</table>'; } $html .= zen_draw_form('stock_update', FILENAME_PRODUCTS_WITH_ATTRIBUTES_STOCK . '_ajax', 'save=1&pid=' . $ReturnedProductID . '&page=' . $_GET['page'], 'post'); $html .= zen_image_submit('button_save.gif', IMAGE_SAVE) . ' Hint: To quickly edit click in the "Quantity in Stock" field.'; $html .= '<br/>'; $html .= ' <table id="mainProductTable"> <tr> <th class="thProdId">' . PWA_PRODUCT_ID . '</th> <th class="thProdName">' . PWA_PRODUCT_NAME . '</th>'; if (STOCK_SHOW_IMAGE == 'true') { $html .= '<th class="thProdImage">' . PWA_PRODUCT_IMAGE . '</th>'; } $html .= '<th class="thProdModel">' . PWA_PRODUCT_MODEL . '</th> <th class="thProdQty">' . PWA_QUANTITY_FOR_ALL_VARIANTS . '</th> <th class="thProdAdd">' . PWA_ADD_QUANTITY . '</th> <th class="thProdSync">' . PWA_SYNC_QUANTITY . '</th> </tr>'; while (!$products->EOF) { $html .= '<tr>' . "\n"; $html .= '<td colspan="7">' . "\n"; $html .= '<div class="productGroup">' . "\n"; $html .= '<table>' . "\n"; $html .= '<tr class="productRow">' . "\n"; $html .= '<td class="tdProdId">' . $products->fields['products_id'] . '</td>'; $html .= '<td class="tdProdName">' . $products->fields['products_name'] . '</td>'; if (STOCK_SHOW_IMAGE == 'true') { $html .= '<td class="tdProdImage">' . zen_info_image(zen_output_string($products->fields['products_image']), zen_output_string($products->fields['products_name']), "60", "60") . '</td>'; } //product.php? page=1 & product_type=1 & cPath=13 & pID=1042 & action=new_product //$html .= '<td class="tdProdModel">'.$products->fields['products_model'] .' </td>'; $html .= '<td class="tdProdModel">' . $products->fields['products_model'] . '<br /><a href="' . zen_href_link(FILENAME_PRODUCT, "page=1&product_type=" . $products->fields['products_type'] . "&cPath=" . $products->fields['master_categories_id'] . "&pID=" . $products->fields['products_id'] . "&action=new_product", 'NONSSL') . '">Link</a> </td>'; $html .= '<td class="tdProdQty">' . $products->fields['products_quantity'] . '</td>'; $html .= '<td class="tdProdAdd"><a href="' . zen_href_link(FILENAME_PRODUCTS_WITH_ATTRIBUTES_STOCK, "action=add&products_id=" . $products->fields['products_id'], 'NONSSL') . '">' . PWA_ADD_QUANTITY . '</a><br /><br /><a href="' . zen_href_link(FILENAME_PRODUCTS_WITH_ATTRIBUTES_STOCK, "action=delete_all&products_id=" . $products->fields['products_id'], 'NONSSL') . '">' . PWA_DELETE_VARIANT_ALL . '</a></td>'; $html .= '<td class="tdProdSync"><a href="' . zen_href_link(FILENAME_PRODUCTS_WITH_ATTRIBUTES_STOCK, "action=resync&products_id=" . $products->fields['products_id'], 'NONSSL') . '">' . PWA_SYNC_QUANTITY . '</a></td>'; $html .= '</tr>' . "\n"; $html .= '</table>' . "\n"; // SUB $query = 'select * from ' . TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK . ' where products_id="' . $products->fields['products_id'] . '" order by sort ASC;'; $attribute_products = $db->Execute($query); if ($attribute_products->RecordCount() > 0) { $html .= '<table class="stockAttributesTable">'; $html .= '<tr>'; $html .= '<th class="stockAttributesHeadingStockId">' . PWA_STOCK_ID . '</th> <th class="stockAttributesHeadingComboId" title="This number is the Product ID and related Attributes (Unique Combo).">' . PWA_PAC . '</th> <th class="stockAttributesHeadingVariant">' . PWA_VARIANT . '</th> <th class="stockAttributesHeadingQuantity">' . PWA_QUANTITY_IN_STOCK . '</th> <th class="stockAttributesHeadingSort">' . PWA_SORT_ORDER . '</th> <th class="stockAttributesHeadingCustomid" title="The Custom ID MUST be Unique, no duplicates allowed!">' . PWA_CUSTOM_ID . '</th> <th class="stockAttributesHeadingSKUTitleId">' . PWA_SKU_TITLE . '</th> <th class="stockAttributesHeadingEdit">' . PWA_EDIT . '</th> <th class="stockAttributesHeadingDelete">' . PWA_DELETE . '</th>'; $html .= '</tr>'; while (!$attribute_products->EOF) { $html .= '<tr id="sid-' . $attribute_products->fields['stock_id'] . '">'; $html .= '<td class="stockAttributesCellStockId">' . "\n"; $html .= $attribute_products->fields['stock_id']; $html .= '</td>' . "\n"; $html .= '<td>' . $attribute_products->fields['product_attribute_combo'] . '</td>' . "\n"; $html .= '<td class="stockAttributesCellVariant">' . "\n"; $sort2_query = "SELECT DISTINCT pa.products_attributes_id \n FROM " . TABLE_PRODUCTS_ATTRIBUTES . " pa\n\t\t\t LEFT JOIN " . TABLE_PRODUCTS_OPTIONS . " po on (po.products_options_id = pa.options_id) \n WHERE pa.products_attributes_id in (" . $attribute_products->fields['stock_attributes'] . ")\n ORDER BY po.products_options_sort_order ASC;"; $sort_class = $db->Execute($sort2_query); $array_temp_sorted_array = array(); $attributes_of_stock = array(); while (!$sort_class->EOF) { $attributes_of_stock[] = $sort_class->fields['products_attributes_id']; $sort_class->MoveNext(); } $attributes_output = array(); foreach ($attributes_of_stock as $attri_id) { $stock_attribute = $this->get_attributes_name($attri_id, $_SESSION['languages_id']); if ($stock_attribute['option'] == '' && $stock_attribute['value'] == '') { // delete stock attribute $db->Execute("DELETE FROM " . TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK . " WHERE stock_id = " . $attribute_products->fields['stock_id'] . " LIMIT 1;"); } else { $attributes_output[] = '<strong>' . $stock_attribute['option'] . ':</strong> ' . $stock_attribute['value'] . '<br />'; } } // sort($attributes_output); $html .= implode("\n", $attributes_output); $html .= '</td>' . "\n"; $html .= '<td class="stockAttributesCellQuantity" id="stockid2-' . $attribute_products->fields['stock_id'] . '">' . $attribute_products->fields['quantity'] . '</td>' . "\n"; $html .= '<td class="stockAttributesCellSort" id="stockid3-' . $attribute_products->fields['stock_id'] . '">' . $attribute_products->fields['sort'] . '</td>' . "\n"; $html .= '<td class="stockAttributesCellCustomid" id="stockid4-' . $attribute_products->fields['stock_id'] . '">' . $attribute_products->fields['customid'] . '</td>' . "\n"; $html .= '<td class="stockAttributesCellTitle" id="stockid1-' . $attribute_products->fields['stock_id'] . '">' . $attribute_products->fields['title'] . '</td>' . "\n"; $html .= '<td class="stockAttributesCellEdit">' . "\n"; $html .= '<a href="' . zen_href_link(FILENAME_PRODUCTS_WITH_ATTRIBUTES_STOCK, "action=edit&products_id=" . $products->fields['products_id'] . '&attributes=' . $attribute_products->fields['stock_attributes'] . '&q=' . $attribute_products->fields['quantity'], 'NONSSL') . '">' . PWA_EDIT_QUANTITY . '</a>'; //s_mack:prefill_quantity $html .= '</td>' . "\n"; $html .= '<td class="stockAttributesCellDelete">' . "\n"; $html .= '<a href="' . zen_href_link(FILENAME_PRODUCTS_WITH_ATTRIBUTES_STOCK, "action=delete&products_id=" . $products->fields['products_id'] . '&attributes=' . $attribute_products->fields['stock_attributes'], 'NONSSL') . '">' . PWA_DELETE_VARIANT . '</a>'; $html .= '</td>' . "\n"; $html .= '</tr>' . "\n"; $attribute_products->MoveNext(); } $html .= '</table>'; } $html .= '</div>' . "\n"; $products->MoveNext(); } $html .= '</table>' . "\n"; $html .= zen_image_submit('button_save.gif', IMAGE_SAVE); $html .= '</form>' . "\n"; if (!isset($_GET['seachPID']) && !isset($_GET['pwas-search-button']) && !isset($_GET['updateReturnedPID'])) { $html .= '<table border="0" width="100%" cellspacing="0" cellpadding="2" class="pageResults">'; $html .= '<tr>'; $html .= '<td class="smallText" valign="top">'; $html .= $products_split->display_count($products_query_numrows, STOCK_SET_SBA_NUMRECORDS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_PRODUCTS); $html .= '</td>'; $html .= '<td class="smallText" align="right">'; $html .= $products_split->display_links($products_query_numrows, STOCK_SET_SBA_NUMRECORDS, MAX_DISPLAY_PAGE_LINKS, $_GET['page']); $html .= '</td>'; $html .= '</tr>'; $html .= '</table>'; } return $html; }
$heading[] = array('text' => '<b>' . TEXT_HEADING_DELETE_FEATURE . '</b>'); $contents = array('form' => zen_draw_form('feature', FILENAME_ADDON_MODULES_ADMIN, 'module=feature_area&page=' . $_GET['page'] . '&fID=' . $fInfo->id . '&action=deleteconfirm')); $contents[] = array('text' => TEXT_DELETE_INTRO); $contents[] = array('text' => '<br><b>' . feature_area_get_name($fInfo->id, $_SESSION['languages_id']) . '</b>'); $contents[] = array('text' => '<br>' . zen_draw_checkbox_field('delete_image', '', true) . ' ' . TEXT_DELETE_IMAGE); $contents[] = array('align' => 'center', 'text' => '<br>' . zen_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . zen_href_link(FILENAME_ADDON_MODULES_ADMIN, 'module=feature_area&page=' . $_GET['page'] . '&fID=' . $fInfo->id) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); break; default: if (isset($fInfo) && is_object($fInfo)) { $heading[] = array('text' => '<b>' . feature_area_get_name($fInfo->id, $_SESSION['languages_id']) . '</b>'); $contents[] = array('align' => 'center', 'text' => '<a href="' . zen_href_link(FILENAME_ADDON_MODULES_ADMIN, 'module=feature_area&page=' . $_GET['page'] . '&fID=' . $fInfo->id . '&action=edit') . '">' . zen_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . zen_href_link(FILENAME_ADDON_MODULES_ADMIN, 'module=feature_area&page=' . $_GET['page'] . '&fID=' . $fInfo->id . '&action=delete') . '">' . zen_image_button('button_delete.gif', IMAGE_DELETE) . '</a>'); $contents[] = array('text' => '<br>' . TEXT_DATE_ADDED . ' ' . zen_date_short($fInfo->date_added)); if (zen_not_null($fInfo->last_modified)) { $contents[] = array('text' => TEXT_LAST_MODIFIED . ' ' . zen_date_short($fInfo->last_modified)); } $contents[] = array('text' => '<br />' . zen_info_image($fInfo->thumb_image, $fInfo->link_url)); } break; } if (zen_not_null($heading) && zen_not_null($contents)) { echo ' <td width="25%" valign="top">' . "\n"; $box = new box(); echo $box->infoBox($heading, $contents); echo ' </td>' . "\n"; } ?> </tr> </table></td> </tr> </table></td> <!-- body_text_eof //-->
} else { $category_inputs_string .= zen_draw_textarea_field('categories_description[' . $languages[$i]['id'] . ']', 'soft', '100%', '20', zen_get_category_description($_REQUEST['cID'], $languages[$i]['id'])); } } $contents[] = array('text' => '<br />' . TEXT_CATEGORIES_DESCRIPTION . $category_inputs_string); $contents[] = array('text' => '<br />' . TEXT_EDIT_CATEGORIES_IMAGE . '<br />' . zen_draw_file_field('categories_image')); $dir = @dir(DIR_FS_CATALOG_IMAGES); $dir_info[] = array('id' => '', 'text' => "Main Directory"); while ($file = $dir->read()) { if (is_dir(DIR_FS_CATALOG_IMAGES . $file) && strtoupper($file) != 'CVS' && $file != "." && $file != "..") { $dir_info[] = array('id' => $file . '/', 'text' => $file); } } $default_directory = substr($category->getField('categories_image'), 0, strpos($category->getField('categories_image'), '/') + 1); $contents[] = array('text' => TEXT_CATEGORIES_IMAGE_DIR . ' ' . zen_draw_pull_down_menu('img_dir', $dir_info, $default_directory)); $contents[] = array('text' => '<br>' . zen_info_image($category->getField('categories_image'), $category->getField('categories_name'))); $contents[] = array('text' => '<br>' . $category->getField('categories_image')); $contents[] = array('text' => '<br />' . TEXT_EDIT_SORT_ORDER . '<br />' . zen_draw_input_field('sort_order', $category->getField('sort_order'), 'size="6"')); $contents[] = array('align' => 'center', 'text' => '<br />' . zen_image_submit('button_save.gif', IMAGE_SAVE) . ' <a href="' . zen_href_link_admin(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $category->getField('categories_id')) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); $contents[] = array('text' => TEXT_RESTRICT_PRODUCT_TYPE . ' ' . zen_draw_pull_down_menu('restrict_type', $type_array) . ' <input type="submit" name="add_type_all" value="' . BUTTON_ADD_PRODUCT_TYPES_SUBCATEGORIES_ON . '">' . ' <input type="submit" name="add_type" value="' . BUTTON_ADD_PRODUCT_TYPES_SUBCATEGORIES_OFF . '">'); $sql = "select * from " . TABLE_PRODUCT_TYPES_TO_CATEGORY . " where `category_id` = '" . $category->getField('categories_id') . "'"; $restrict_types = $gBitDb->Execute($sql); if ($restrict_types->RecordCount() > 0) { $contents[] = array('text' => '<br />' . TEXT_CATEGORY_HAS_RESTRICTIONS . '<br />'); while (!$restrict_types->EOF) { $sql = "select `type_name` from " . TABLE_PRODUCT_TYPES . " where `type_id` = '" . $restrict_types->fields['product_type_id'] . "'"; $type = $gBitDb->Execute($sql); $contents[] = array('text' => '<a href="' . zen_href_link_admin(FILENAME_CATEGORIES, 'action=remove_type&cPath=' . $cPath . '&cID=' . $category->getField('categories_id') . '&type_id=' . $restrict_types->fields['product_type_id']) . '">' . zen_image_button('button_delete.gif', IMAGE_DELETE) . '</a> ' . $type->fields['type_name'] . '<br />'); $restrict_types->MoveNext(); } }