示例#1
0
 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;
 }
示例#2
0
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++) {
    $length_array[] = 0;
    $content_array[] = '';
}
foreach ($zones_array as $id => $zone) {
    if (!$cSuper->is_enabled($id)) {
        continue;
    }
    $zone_class = $cSuper->get_zone_class($id);
    $module = DIR_WS_MODULES . $zone_class . '_mod.php';
    $module_class = $zone_class . '_mod';
    if (file_exists($module)) {
        require_once $module;