當前位置: 首頁>>代碼示例>>PHP>>正文


PHP mslib_fe::hasCats方法代碼示例

本文整理匯總了PHP中mslib_fe::hasCats方法的典型用法代碼示例。如果您正苦於以下問題:PHP mslib_fe::hasCats方法的具體用法?PHP mslib_fe::hasCats怎麽用?PHP mslib_fe::hasCats使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在mslib_fe的用法示例。


在下文中一共展示了mslib_fe::hasCats方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: foreach

    if ($GLOBALS['TYPO3_DB']->sql_num_rows($qry2) == 0) {
        $products[$row['products_id']] = $row;
    }
}
$content .= '<div class="main-heading"><h2>' . $this->pi_getLL('admin_label_check_2') . '</h2></div>';
foreach ($products as $row) {
    $products_id = $row['products_id'];
    $query = $GLOBALS['TYPO3_DB']->DELETEquery('tx_multishop_products_to_categories', 'products_id=' . $products_id);
    $res = $GLOBALS['TYPO3_DB']->sql_query($query);
}
$content .= '<strong>' . count($products) . '</strong> ' . $this->pi_getLL('admin_label_x_orphanned_products_to_categories_relations_has_been_deleted') . '.<br />';
$str = "SELECT categories_id from tx_multishop_categories";
$qry = $GLOBALS['TYPO3_DB']->sql_query($str);
$cats = array();
while (($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($qry)) != false) {
    if (!mslib_fe::hasProducts($row['categories_id']) and !mslib_fe::hasCats($row['categories_id'])) {
        $cats[$row['categories_id']] = $row;
    }
}
foreach ($cats as $row) {
    if ($row['categories_id']) {
        mslib_befe::deleteCategory($row['categories_id']);
    }
}
$content .= '<strong>' . count($cats) . '</strong> ' . $this->pi_getLL('admin_label_x_orphanned_categories_has_been_deleted') . '.<br />';
// chk 3 the unused options
$content .= '<div class="main-heading"><h2>' . $this->pi_getLL('admin_label_check_3') . '</h2></div>';
$str = "SELECT products_options_values_id from tx_multishop_products_options_values";
$qry = $GLOBALS['TYPO3_DB']->sql_query($str);
$option_values = array();
while (($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($qry)) != false) {
開發者ID:bvbmedia,項目名稱:multishop,代碼行數:31,代碼來源:admin_system_consistency_checker.php

示例2: htmlspecialchars

         $link = $cat['categories_external_url'];
     }
     $categories_name = htmlspecialchars($cat['categories_name']);
     $meta_description = htmlspecialchars($cat['meta_description']);
     $actifsub = 0;
     $act = 0;
     $hasChild = 0;
     if ($user_crumbar[$nested_level]['id'] == $cat['categories_id']) {
         if ($this->get['categories_id'] == $cat['categories_id'] or $this->maxDEPTH == $nested_level + 1) {
             $act = 1;
         }
         if ($user_crumbar[$nested_level + 1]) {
             $actifsub = 1;
         }
     }
     if ($actifsub or mslib_fe::hasCats($cat['categories_id'], 0)) {
         $hasChild = 1;
     }
     $this->class = array();
     if ($hasChild) {
         $this->class[] = 'hasChild';
     }
     if ($act) {
         $this->class[] = 'active';
     }
     if ($actifsub) {
         $this->class[] = 'actifsub active';
     }
     $cat_level_3 .= '<li class="' . implode(' ', $this->class) . '"><a href="' . $link . '" title="' . htmlspecialchars($meta_description) . '"' . $target . '><span>' . $categories_name . '</span></a></li>';
 }
 // hide in menu
開發者ID:bvbmedia,項目名稱:multishop,代碼行數:31,代碼來源:categories_default.php


注:本文中的mslib_fe::hasCats方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。