function get_mixed_css_tree($id, &$max_drop, &$max_width) { $sub_array = array(); $count = $swidth = 0; $cSuper = new super_front(); $super_entries = $cSuper->get_entries($id, true); if (!count($super_entries)) { return $sub_array; } foreach ($super_entries as $key => $value) { $value['sub_alt_title'] = strtoupper($value['sub_alt_title']); $tmp_value = str_replace(' ', '', $value['sub_alt_title']); $awidth = tep_string_length($tmp_value) * 9 + 16; $value['sub_alt_title'] = htmlspecialchars(stripslashes($value['sub_alt_title'])); if ($awidth > $max_width) { $string_length = (int) ($max_width / 9); $value['sub_alt_title'] = substr($value['sub_alt_title'], 0, $string_length) . '...'; $awidth = $max_width; } if ($awidth > $swidth) { $swidth = $awidth; } $zone_class = $cSuper->get_zone_class($key); $script = FILENAME_COLLECTIONS; switch ($zone_class) { case 'image_zones': $process_function = 'tep_get_image_css_tree'; break; case 'super_zones': $process_function = 'tep_get_mixed_css_tree'; break; default: $process_function = 'tep_get_text_css_tree'; break; } $sub_array[] = '<div class="css_sub floater"[<<<MAX_WIDTH>>>]><a href="' . tep_href_link($script, 'abz_id=' . $value['subzone_id']) . '">' . $value['sub_alt_title'] . '</a></div>' . "\n"; $count++; if ($count > $max_drop) { $max_drop = $count; //$max_width = $swidth; //return $sub_array; } } $max_width = $swidth; return $sub_array; }
function display_filter_box() { extract(tep_load('defs')); $cStrings =& $this->strings; $result = false; $cSuper = new super_front(); $zones_array = $cSuper->get_parent_zones($cDefs->abstract_id); if (count($zones_array)) { $total_array = array(); for ($i = 0, $j = count($zones_array); $i < $j; $i++) { $zone_id = $zones_array[$i]['abstract_zone_id']; $text_data = $cSuper->get_zone_data($zone_id); $total_array[$i] = array('id' => $zone_id, 'name' => $text_data['abstract_zone_name'], 'href' => tep_href_link(FILENAME_COLLECTIONS, 'abz_id=' . $zone_id), 'text' => tep_truncate_string($text_data['abstract_zone_desc'])); } require $this->box_collection; $result = true; } return $result; }
require 'includes/application_top.php'; if (!$current_abstract_id) { tep_redirect(); } $cAbstract = new abstract_front(); if (!$cAbstract->is_zone_type($current_abstract_id, 'super_zones')) { tep_redirect(); } $cSuper = new super_front(); $abstract_array = $cSuper->get_zone_data($current_abstract_id); $breadcrumb->add($abstract_array['abstract_zone_name'], tep_href_link($g_script, 'abz_id=' . $current_abstract_id)); require 'includes/objects/html_start_sub1.php'; require 'includes/objects/html_start_sub2.php'; $heading_row = true; require 'includes/objects/html_body_header.php'; $cSuper = new super_front(); $abstract_array = $cSuper->get_zone_data($current_abstract_id); ?> <div><h1><?php echo $abstract_array['abstract_zone_name']; ?> </h1></div> <div><?php echo $abstract_array['abstract_zone_desc']; ?> </div> <?php $zones_array = $cSuper->get_entries($current_abstract_id); // Setup the best fit arrays $length_array = array(); for ($i = 0, $j = DEFAULT_COLUMN_SUPER_SPLIT; $i < $j; $i++) {