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


PHP mslib_fe::getSitemap方法代码示例

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


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

示例1: 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

示例2: foreach

    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['products_listing_page_pid'], '&' . $where . '&tx_multishop_pi1[page_section]=products_listing');
    $cat_selectbox .= '<option value="' . $category['categories_id'] . '" id="sl-cat_' . $category['categories_id'] . '">+ ' . $category['categories_name'] . ' (ID: ' . $category['categories_id'] . ')</option>';
    $category_action_icon = '<div class="action_icons">
	<a href="' . mslib_fe::typolink($this->shop_pid . ',2003', 'tx_multishop_pi1[page_section]=edit_category&cid=' . $category['categories_id']) . '&action=edit_category" class="text-success msadmin_edit_icon"><i class="fa fa-pencil"></i></a>
	<a href="' . mslib_fe::typolink($this->shop_pid . ',2003', 'tx_multishop_pi1[page_section]=delete_category&cid=' . $category['categories_id'] . '&action=delete_category') . '" class="text-danger msadmin_delete_icon" alt="' . $this->pi_getLL('admin_label_alt_remove') . '"><i class="fa fa-trash-o"></i></a>
	<a href="' . $link . '" target="_blank" class="text-primary msadmin_view"><i class="fa fa-eye"></i></a>
	</div>';
    $subcat_list = '';
    $dataArray = mslib_fe::getSitemap($category['categories_id'], array(), 1, 0);
    if (count($dataArray)) {
        $sub_content = mslib_fe::displayAdminCategories($dataArray, false, 0, $category['categories_id']);
        if ($sub_content) {
            $subcat_list .= '<ul class="sub_categories_ul">';
            $subcat_list .= $sub_content;
            $subcat_list .= '</ul>';
        }
        $cat_selectbox .= mslib_fe::displayAdminCategories($dataArray, true, 1, $category['categories_id']);
    }
    $markerArray = array();
    $markerArray['COUNTER'] = $counter;
    $markerArray['EXTRA_CLASS'] = !$category['status'] ? 'msAdminCategoryDisabled' : '';
    $markerArray['CATEGORY_ID'] = $category['categories_id'];
    $markerArray['CATEGORY_EDIT_LINK'] = mslib_fe::typolink($this->shop_pid . ',2003', 'tx_multishop_pi1[page_section]=edit_category&cid=' . $category['categories_id']) . '&action=edit_category';
    $markerArray['CATEGORY_NAME'] = $category['categories_name'] . ' (ID: ' . $category['categories_id'] . ')';
开发者ID:bvbmedia,项目名称:multishop,代码行数:31,代码来源:admin_categories.php

示例3: getSitemap

 public function getSitemap($categories_id, $array = array(), $include_disabled_categories = 0, $include_products = 1)
 {
     $str = "SELECT * from tx_multishop_categories c, tx_multishop_categories_description cd where c.page_uid='" . $this->showCatalogFromPage . "' ";
     if (!$include_disabled_categories) {
         $str .= "and c.status=1 ";
     }
     $str .= "and c.parent_id='" . $categories_id . "' and cd.language_id='" . $this->sys_language_uid . "' and c.categories_id=cd.categories_id order by c.sort_order";
     $qry = $GLOBALS['TYPO3_DB']->sql_query($str);
     if ($GLOBALS['TYPO3_DB']->sql_num_rows($qry)) {
         // cats
         while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($qry)) {
             $array['subs'][] = mslib_fe::getSitemap($row['categories_id'], $row, $include_disabled_categories, $include_products);
         }
     } else {
         if ($include_products) {
             // products
             $products = mslib_fe::getProducts('', $categories_id);
             if (is_array($products)) {
                 if (!count($array)) {
                     // starting point doesnt have subcats, but products instead.
                     $array['subs'][0]['products'] = $products;
                 } else {
                     $array['products'] = $products;
                 }
             }
         }
     }
     return $array;
 }
开发者ID:bvbmedia,项目名称:multishop,代码行数:29,代码来源:class.mslib_fe.php


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