function staticCategoriesList($listIDs, $staticWord) { global $db, $currencies; $i = 0; $rows = 1; $listArray = explode(',', $listIDs); $listNum = count($listArray); $listNum = $listNum > 8 ? 8 : $listNum; echo '<ul class="wholesale">'; for ($i; $i < $listNum; $i++) { $listProducts = zen_get_products_ids_categories($listArray[$i]); if (count($listProducts) > 0) { $result = $db->Execute("SELECT products_image, products_price\n\t \t\t FROM " . TABLE_PRODUCTS . " p \n\t \t\t WHERE p.`products_id` = " . $listProducts[0]); if (is_int($rows / 4)) { echo '<li>'; } else { echo '<li class="border_r_dash">'; } echo '<a href="' . zen_href_link(FILENAME_DEFAULT, 'cPath=' . $listArray[$i]) . '" class="ih">'; echo zen_image(DIR_WS_IMAGES . str_replace('s/', 'l/', $result->fields['products_image']), zen_get_category_name($listArray[$i], $_SESSION['languages_id']), 113, 113); echo '</a>'; echo '<div class="margin_t pad_text">'; echo '<strong><a href="' . zen_href_link(FILENAME_DEFAULT, 'cPath=' . $listArray[$i]) . '" >' . zen_get_category_name($listArray[$i], $_SESSION['languages_id']) . '</a></strong>'; echo '<br/>' . zen_clipped_string(zen_get_category_bottom_description($listArray[$i], $_SESSION['languages_id']), ' ', 150) . '<br/>'; echo '<h4 class="red">Price: ' . $currencies->display_price($result->fields['products_price'], zen_get_tax_rate($listProducts[0])) . '</h4>'; echo '</div>'; echo '</li>'; $rows++; } else { //nothing } } echo '</ul>'; }
$category_inputs_bottom_string = ''; for ($i = 0, $n = sizeof($languages); $i < $n; $i++) { $category_inputs_bottom_string .= '<br />' . zen_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' '; if ($_SESSION['html_editor_preference_status'] == 'FCKEDITOR') { $oFCKeditor = new FCKeditor('categories_bottom_description[' . $languages[$i]['id'] . ']'); $oFCKeditor->Value = zen_get_category_bottom_description($cInfo->categories_id, $languages[$i]['id']); $oFCKeditor->Width = '90%'; $oFCKeditor->Height = '220'; // $oFCKeditor->Config['ToolbarLocation'] = 'Out:xToolbar' ; // $oFCKeditor->Create() ; $output = $oFCKeditor->CreateHtml(); $category_inputs_bottom_string .= '<br />' . $output; // $category_inputs_string .= '<IFRAME src= "' . DIR_WS_CATALOG . 'FCKeditor/fckeditor.html?FieldName=categories_description[' . $languages[$i]['id'] . ']&Upload=false&Browse=false&Toolbar=Short" width="97%" height="200" frameborder="no" scrolling="yes"></IFRAME>'; // $category_inputs_string .= '<INPUT type="hidden" name="categories_description[' . $languages[$i]['id'] . ']" ' . 'value=' . "'" . zen_get_category_description($cInfo->categories_id, $languages[$i]['id']) . "'>"; } else { $category_inputs_bottom_string .= zen_draw_textarea_field('categories_bottom_description[' . $languages[$i]['id'] . ']', 'soft', '100%', '20', zen_get_category_bottom_description($cInfo->categories_id, $languages[$i]['id'])); } } $contents[] = array('text' => '<br />' . TEXT_CATEGORIES_BOTTOM_DESCRIPTION . $category_inputs_bottom_string); $cInfo->categories_type = isset($cInfo->categories_type) ? $cInfo->categories_type : 1; $cInfo->categories_display_type = isset($cInfo->categories_display_type) ? $cInfo->categories_display_type : 1; $cInfo->categories_list_types = isset($cInfo->categories_list_types) ? $cInfo->categories_list_types : 1; switch ($cInfo->categories_type) { case 2: $contents[] = array('text' => '<br />' . TEXT_CATEGORIES_TYPES . ' ' . zen_draw_radio_field('categories_type', 1) . TEXT_CATEGORIES_TYPES_1 . ' ' . zen_draw_radio_field('categories_type', 2, true) . TEXT_CATEGORIES_TYPES_2 . ' ' . zen_draw_radio_field('categories_type', 3) . TEXT_CATEGORIES_TYPES_3); break; case 3: $contents[] = array('text' => '<br />' . TEXT_CATEGORIES_TYPES . ' ' . zen_draw_radio_field('categories_type', 1) . TEXT_CATEGORIES_TYPES_1 . ' ' . zen_draw_radio_field('categories_type', 2) . TEXT_CATEGORIES_TYPES_2 . ' ' . zen_draw_radio_field('categories_type', 3, true) . TEXT_CATEGORIES_TYPES_3); break; default: $contents[] = array('text' => '<br />' . TEXT_CATEGORIES_TYPES . ' ' . zen_draw_radio_field('categories_type', 1, true) . TEXT_CATEGORIES_TYPES_1 . ' ' . zen_draw_radio_field('categories_type', 2) . TEXT_CATEGORIES_TYPES_2 . ' ' . zen_draw_radio_field('categories_type', 3) . TEXT_CATEGORIES_TYPES_3);