当前位置: 首页>>代码示例>>PHP>>正文


PHP mslib_fe::getSubcatsOnly方法代码示例

本文整理汇总了PHP中mslib_fe::getSubcatsOnly方法的典型用法代码示例。如果您正苦于以下问题:PHP mslib_fe::getSubcatsOnly方法的具体用法?PHP mslib_fe::getSubcatsOnly怎么用?PHP mslib_fe::getSubcatsOnly使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在mslib_fe的用法示例。


在下文中一共展示了mslib_fe::getSubcatsOnly方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

if ($this->ms['MODULES']['CACHE_FRONT_END'] and !$this->ms['MODULES']['CACHE_TIME_OUT_CATEGORIES_NAVIGATION_MENU']) {
    $this->ms['MODULES']['CACHE_FRONT_END'] = 0;
}
if ($this->ms['MODULES']['CACHE_FRONT_END']) {
    $this->cacheLifeTime = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'cacheLifeTime', 's_advanced');
    if (!$this->cacheLifeTime) {
        $this->cacheLifeTime = $this->ms['MODULES']['CACHE_TIME_OUT_CATEGORIES_NAVIGATION_MENU'];
    }
    $options = array('caching' => true, 'cacheDir' => $this->DOCUMENT_ROOT . 'uploads/tx_multishop/tmp/cache/', 'lifeTime' => $this->cacheLifeTime);
    $Cache_Lite = new Cache_Lite($options);
    //	$string='search_by_category_'.$categories_id;
    $string = serialize($GLOBALS['TYPO3_CONF_VARS']['tx_multishop_data']['user_crumbar']) . $this->cObj->data['uid'];
}
if (!$this->ms['MODULES']['CACHE_FRONT_END'] or !($categories = $Cache_Lite->get($string))) {
    $categories = '';
    $cats = mslib_fe::getSubcatsOnly(0);
    foreach ($cats as $cat) {
        if (!$cat['categories_external_url']) {
            $categories .= '<option value="' . $cat['categories_id'] . '" ' . ($cat['categories_id'] == $categories_id ? 'selected' : '') . '>' . $cat['categories_name'] . '</option>';
        }
    }
    if ($this->ms['MODULES']['CACHE_FRONT_END']) {
        $Cache_Lite->save($categories);
    }
}
$content .= '
<form action="index.php" method="get"  enctype="application/x-www-form-urlencoded" role="search">
<input name="id" type="hidden" value="' . $this->shop_pid . '" />
<input name="tx_multishop_pi1[page_section]" type="hidden" value="products_search" />
<input name="page" id="page" type="hidden" value="0" />
<input name="L" type="hidden" value="' . $this->sys_language_uid . '" />
开发者ID:bvbmedia,项目名称:multishop,代码行数:31,代码来源:searchform_with_keyword_and_category_dropdown_menu.php

示例2: htmlspecialchars

		} else {
			$(selectbox_id).removeAttr("disabled");
			if ($(childrens).length > 0) {
				$(childrens).each(function(i,v){
					var c_current_id = $(v).attr("id");
					var c_selectbox_id= "#" + c_current_id.replace("cb-", "sl-");
					$(v).removeAttr("disabled");
					$(c_selectbox_id).removeAttr("disabled");
				});
			}
		}
	});
});
</script>';
$counter = 0;
$categories = mslib_fe::getSubcatsOnly($this->categoriesStartingPoint, 1);
$cat_selectbox = '';
$contentItem = '';
foreach ($categories as $category) {
    $counter++;
    if ($category['categories_image']) {
        $image = '<img src="' . mslib_befe::getImagePath($category['categories_image'], 'categories', 'normal') . '" alt="' . htmlspecialchars($category['categories_name']) . '">';
    } else {
        $image = '<div class="no_image"></div>';
    }
    // get all cats to generate multilevel fake url
    $level = 0;
    $cats = mslib_fe::Crumbar($category['categories_id']);
    $cats = array_reverse($cats);
    $where = '';
    if (count($cats) > 0) {
开发者ID:bvbmedia,项目名称:multishop,代码行数:31,代码来源:admin_categories.php

示例3: array

 $parent_id = $this->categoriesStartingPoint;
 if ($this->filterCategoriesFormByCategoriesIdGetParam) {
     if (isset($this->get['categories_id']) && is_numeric($this->get['categories_id'])) {
         $parent_id = $this->get['categories_id'];
     }
 } else {
     if (isset($this->get['categories_id']) && is_numeric($this->get['categories_id'])) {
         if (!is_array($this->post['tx_multishop_pi1']['categories'])) {
             $this->post['tx_multishop_pi1']['categories'] = array();
         }
         if (!in_array($this->get['categories_id'], $this->post['tx_multishop_pi1']['categories'])) {
             $this->post['tx_multishop_pi1']['categories'][] = $this->get['categories_id'];
         }
     }
 }
 $categories = mslib_fe::getSubcatsOnly($parent_id);
 if (!is_array($categories)) {
     $count_select = count($formField['elements']);
     unset($formField);
     continue;
 } else {
     $options = array();
     $formFieldItem = array();
     $count_select = count($formField['elements']);
     switch ($list_type) {
         case 'list':
         case 'select':
             $formField['type'] = "div";
             $formField['class'] = "ui-dform-selectbox";
             $formFieldItem[$count_select]['type'] = 'select';
             $formFieldItem[$count_select]['name'] = 'tx_multishop_pi1[categories][]';
开发者ID:bvbmedia,项目名称:multishop,代码行数:31,代码来源:default.php

示例4: switch

         if ($page[0]['name']) {
             $content .= '<div class="main-title"><h1>' . $page[0]['name'] . '</h1></div>';
         } else {
             $content .= $this->pi_getLL('no_products_available');
         }
         if ($page[0]['content']) {
             $content .= $page[0]['content'];
         }
     } else {
         $parent_id = $this->categoriesStartingPoint;
         $this->get['categories_id'] = $this->categoriesStartingPoint;
         $display_listing = true;
     }
 }
 if ($display_listing) {
     $subCats = mslib_fe::getSubcatsOnly($parent_id);
     if ($this->ADMIN_USER and $this->get['sort_by']) {
         if (is_array($subCats) and count($subCats) > 0) {
             switch ($this->get['sort_by']) {
                 case 'alphabet':
                     if (is_numeric($parent_id)) {
                         $str = "SELECT * from tx_multishop_categories c, tx_multishop_categories_description cd where c.status=1 and c.parent_id='" . $parent_id . "' and c.page_uid='" . $this->showCatalogFromPage . "' and cd.language_id='" . $this->sys_language_uid . "' and c.categories_id=cd.categories_id order by cd.categories_name";
                         $qry = $GLOBALS['TYPO3_DB']->sql_query($str);
                         $counter = 0;
                         while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($qry)) {
                             $updateArray = array();
                             $updateArray['sort_order'] = $counter;
                             $query = $GLOBALS['TYPO3_DB']->UPDATEquery('tx_multishop_categories', 'categories_id=' . $row['categories_id'], $updateArray);
                             $res = $GLOBALS['TYPO3_DB']->sql_query($query);
                             $counter++;
                         }
开发者ID:bvbmedia,项目名称:multishop,代码行数:31,代码来源:products_listing.php

示例5: makeMenuArray

 function makeMenuArray()
 {
     $cats = mslib_fe::getSubcatsOnly($this->categoriesStartingPoint, 0, $this->conf['catalog_shop_pid'], 0);
     $menuArr = array();
     $tel = 0;
     foreach ($cats as $cat) {
         $menuArr[$tel]['title'] = $cat['categories_name'];
         $menuArr[$tel]['uid'] = '9999' . $cat['categories_id'];
         $menuArr[$tel]['description'] = $cat['meta_description'];
         $menuArr[$tel]['keywords'] = $cat['meta_keywords'];
         $menuArr[$tel]['image'] = '';
         if ($cat['categories_image']) {
             $menuArr[$tel]['image'] = '<img src="uploads/tx_multishop/images/categories/normal' . mslib_befe::getImagePath($cat['categories_image'], 'categories', 'normal') . '" alt="' . htmlspecialchars($cat['categories_name']) . '">';
         }
         // get all cats to generate multilevel fake url
         $level = 0;
         $cats = mslib_fe::Crumbar($cat['categories_id']);
         $cats = array_reverse($cats);
         $where = '';
         if (count($cats) > 0) {
             foreach ($cats as $tmp) {
                 $where .= "categories_id[" . $level . "]=" . $tmp['id'] . "&";
                 $level++;
             }
             $where = substr($where, 0, strlen($where) - 1);
         }
         $link = mslib_fe::typolink($this->conf['shop_pid'], '&' . $where . '&tx_multishop_pi1[page_section]=products_listing');
         $menuArr[$tel]['_OVERRIDE_HREF'] = $link;
         if ($error = $GLOBALS['TYPO3_DB']->sql_error()) {
             $GLOBALS['TT']->setTSlogMessage($error, 3);
         } else {
             $dataArray = mslib_fe::getSitemap($cat['categories_id'], array(), 0, 0);
             $menuArr[$tel]['_SUB_MENU'] = array();
             if (count($dataArray)) {
                 $sub_content = self::subMenuArray($dataArray);
                 $menuArr[$tel]['_SUB_MENU'] = $sub_content;
             }
         }
         $tel++;
     }
     return $menuArr;
 }
开发者ID:bvbmedia,项目名称:multishop,代码行数:42,代码来源:class.user_msMenuFunc.php

示例6: foreach

                 foreach ($manufacturers as $row) {
                     $content .= '<input type="checkbox" name="brands[]"  class="brands-click"  value="' . $row['manufacturers_id'] . '"><span>' . $row['manufacturers_name'] . '</span>';
                 }
                 break;
         }
     }
     $content .= '</div>';
     //end div brands-ultrasearch
     continue;
 } elseif ($key == "categories") {
     $array = explode(":", $field);
     $list_type = $array[1];
     if (!isset($this->get['categories_id'])) {
         $this->get['categories_id'] = 0;
     }
     $catlist = mslib_fe::getSubcatsOnly($this->get['categories_id']);
     //print_r($catlist);
     if (count($catlist)) {
         //print_r($catlist);
         if ($this->get['categories_id'] == 0 and $catlist[0]['categories_id'] == 50) {
             unset($catlist[0]);
         }
         //print_r($catlist);
         $content .= '<div class="categories-ultrasearch">';
         $content .= '<label id="lbl-brands">' . $this->pi_getLL('categories') . ':</label>';
         if ($list_type == 'list' or $list_type == 'select') {
             if (count($catlist) > 0) {
                 $content .= '<select name="categories_id_extra" id="categories_id_extra" class="categories_id_extra-change option-attributes">';
                 $content .= '<option value="">' . $this->pi_getLL('all') . '</option>';
                 foreach ($catlist as $row) {
                     $content .= '
开发者ID:bvbmedia,项目名称:multishop,代码行数:31,代码来源:v1ultrasearch.php

示例7: foreach

                                            if ($this->get['categories_id'] == $cat['categories_id'] or $this->maxDEPTH == $nested_level + 1) {
                                                $act = 1;
                                            }
                                            if ($user_crumbar[$nested_level + 1]) {
                                                $actifsub = 1;
                                            }
                                        }
                                        foreach ($user_crumbar as $item) {
                                            if ($item['id'] == $cat['categories_id']) {
                                                $act = 1;
                                            }
                                        }
                                        if ($actifsub or mslib_fe::hasCats($cat['categories_id'], 0)) {
                                            $hasChild = 1;
                                        }
                                        $catlist3 = mslib_fe::getSubcatsOnly($cat['categories_id']);
                                        //level submenu 2 start
                                        if (count($catlist3) > 0 and $this->maxDEPTH > 2) {
                                            $this->class = array();
                                            if ($hasChild) {
                                                $this->class[] = 'hasChild';
                                            }
                                            if ($act) {
                                                $this->class[] = 'active';
                                            }
                                            if ($actifsub) {
                                                $this->class[] = 'actifsub active';
                                            }
                                            $content .= '<li class="' . implode(' ', $this->class) . '">
											<a href="' . $link . '" title="' . htmlspecialchars($meta_description) . '"' . $target . '><span>' . $categories_name . '</span></a>
											<ul>';
开发者ID:bvbmedia,项目名称:multishop,代码行数:31,代码来源:categories_default.php


注:本文中的mslib_fe::getSubcatsOnly方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。