コード例 #1
0
 function generic_zones_mod($zone_id, $heding = true)
 {
     $this->zone_id = $zone_id;
     $cText = new gtext_front();
     $this->main_array = $cText->get_zone_data($zone_id);
     $this->zones_array = $cText->get_entries($zone_id, true, false);
 }
コード例 #2
0
ファイル: left_column.php プロジェクト: enigma1/i-metrics-cms
 function display_ingtext_box()
 {
     global $current_gtext_id;
     $cStrings =& $this->strings;
     $result = false;
     $cText = new gtext_front();
     $zones_array = $cText->get_zone_entries($current_gtext_id);
     if (count($zones_array)) {
         $i = 0;
         $total_array = array();
         foreach ($zones_array as $id => $zone) {
             $total_array[$i] = array('id' => $zone['abstract_zone_id'], 'name' => $zone['abstract_zone_name'], 'href' => tep_href_link(FILENAME_GENERIC_PAGES, 'abz_id=' . $id), 'text' => $zone['abstract_zone_desc'], 'entries' => array());
             $text_array = $cText->get_entries($zone['abstract_zone_id'], true, false);
             $i2 = 0;
             foreach ($text_array as $key => $value) {
                 $total_array[$i]['entries'][$i2] = array('id' => $key, 'name' => $value['gtext_title'], 'href' => tep_href_link(FILENAME_GENERIC_PAGES, 'gtext_id=' . $key));
                 $i2++;
             }
             $i++;
         }
         require $this->box_text;
         $result = true;
     }
     return $result;
 }
コード例 #3
0
ファイル: css_menu.php プロジェクト: enigma1/i-metrics-cms
 function get_text_css_tree($id, &$max_drop, &$max_width)
 {
     $sub_array = array();
     $count = $swidth = 0;
     $cText = new gtext_front();
     $text_entries = $cText->get_entries($id, true, false);
     if (!count($text_entries)) {
         return $sub_array;
     }
     foreach ($text_entries as $key => $value) {
         $value['gtext_title'] = strtoupper($value['gtext_title']);
         $tmp_value = str_replace(' ', '', $value['gtext_title']);
         $awidth = tep_string_length($tmp_value) * 9 + 16;
         $value['gtext_title'] = htmlspecialchars(stripslashes($value['gtext_title']));
         if ($awidth > $max_width) {
             $string_length = (int) ($max_width / 9);
             $value['gtext_title'] = substr($value['gtext_title'], 0, $string_length) . '...';
             $awidth = $max_width;
         }
         if ($awidth > $swidth) {
             $swidth = $awidth;
         }
         $sub_array[] = '<div class="css_sub hideflow"[<<<MAX_WIDTH>>>]><a href="' . tep_href_link(FILENAME_GENERIC_PAGES, 'gtext_id=' . $value['gtext_id']) . '">' . $value['gtext_title'] . '</a></div>' . "\n";
         $count++;
         if ($count > $max_drop) {
             $max_drop = $count;
             //$max_width = $swidth;
             //return $sub_array;
         }
     }
     $max_width = $swidth;
     return $sub_array;
 }