• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP tep_childs_in_category_count函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中tep_childs_in_category_count函数的典型用法代码示例。如果您正苦于以下问题:PHP tep_childs_in_category_count函数的具体用法?PHP tep_childs_in_category_count怎么用?PHP tep_childs_in_category_count使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: tep_db_prepare_input

    $rows = 0;
    if (isset($HTTP_GET_VARS['search'])) {
        $search = tep_db_prepare_input($HTTP_GET_VARS['search']);
        $categories_query = tep_db_query("select c.categories_status,c.categories_id, cd.categories_name, c.categories_image, c.parent_id, c.sort_order, c.date_added, c.last_modified from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = cd.categories_id and cd.language_id = '" . (int) $languages_id . "' and cd.categories_name like '%" . tep_db_input($search) . "%' order by c.sort_order, cd.categories_name");
    } else {
        $categories_query = tep_db_query("select c.categories_status,c.categories_id, cd.categories_name, c.categories_image, c.parent_id, c.sort_order, c.date_added, c.last_modified from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int) $current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int) $languages_id . "' order by c.sort_order, cd.categories_name");
    }
    while ($categories = tep_db_fetch_array($categories_query)) {
        $categories_count++;
        $rows++;
        // Get parent_id for subcategories if search
        if (isset($HTTP_GET_VARS['search'])) {
            $cPath = $categories['parent_id'];
        }
        if ((!isset($HTTP_GET_VARS['cID']) && !isset($HTTP_GET_VARS['pID']) || isset($HTTP_GET_VARS['cID']) && $HTTP_GET_VARS['cID'] == $categories['categories_id']) && !isset($cInfo) && substr($action, 0, 3) != 'new') {
            $category_childs = array('childs_count' => tep_childs_in_category_count($categories['categories_id']));
            $category_products = array('products_count' => tep_products_in_category_count($categories['categories_id']));
            $cInfo_array = array_merge($categories, $category_childs, $category_products);
            $cInfo = new objectInfo($cInfo_array);
        }
        if (isset($cInfo) && is_object($cInfo) && $categories['categories_id'] == $cInfo->categories_id) {
            echo '              <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CATEGORIES, tep_get_path($categories['categories_id'])) . '\'">' . "\n";
        } else {
            echo '              <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $categories['categories_id']) . '\'">' . "\n";
        }
        ?>
                <td class="dataTableContent"><?php 
        echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, tep_get_path($categories['categories_id'])) . '">' . tep_image(DIR_WS_ICONS . 'folder.gif', ICON_FOLDER) . '</a>&nbsp;<b>' . $categories['categories_name'] . '</b>';
        ?>
</td>
                <td class="dataTableContent" align="center">
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:31,代码来源:categories.php


示例2: tep_childs_in_category_count

function tep_childs_in_category_count($categories_id)
{
    $categories_count = 0;
    $categories_query = tep_db_query("select categories_id from " . TABLE_CATEGORIES . " where parent_id = '" . (int) $categories_id . "'");
    while ($categories = tep_db_fetch_array($categories_query)) {
        $categories_count++;
        $categories_count += tep_childs_in_category_count($categories['categories_id']);
    }
    return $categories_count;
}
开发者ID:tapwag,项目名称:oscommerce_deutsch,代码行数:10,代码来源:general.php


示例3: tep_childs_in_category_count

function tep_childs_in_category_count($categories_id)
{
    global $osC_Database;
    $categories_count = 0;
    $Qcategories = $osC_Database->query('select categories_id from :table_categories where parent_id = :parent_id');
    $Qcategories->bindTable(':table_categories', TABLE_CATEGORIES);
    $Qcategories->bindInt(':parent_id', $categories_id);
    $Qcategories->execute();
    while ($Qcategories->next()) {
        $categories_count++;
        $categories_count += tep_childs_in_category_count($Qcategories->valueInt('categories_id'));
    }
    return $categories_count;
}
开发者ID:itnovator,项目名称:oscommerce_cvs,代码行数:14,代码来源:general.php


示例4: set_time_limit

<?php

require 'includes/application_top.php';
set_time_limit(0);
// OPRUIMEN LEGE CATEGORIEËN EN SUBCATEGORIEËN
$categories_id = 0;
$categories = tep_get_category_tree($categories_id, '', '0', '', true);
// 'snoeit' tot 4 subcategorieën diep
for ($t = 0; $t <= 4; $t++) {
    for ($i = 0, $n = sizeof($categories); $i < $n; $i++) {
        if (tep_childs_in_category_count($categories[$i]['id']) == 0) {
            if (tep_products_in_category_count($categories[$i]['id'], $include_deactivated = true) == 0) {
                tep_remove_category($categories[$i]['id']);
            }
        }
    }
}
// OPRUIMEN LEGE MERKEN
$manuf_query = tep_db_query("SELECT manufacturers_id FROM " . TABLE_MANUFACTURERS);
$row = mysql_fetch_array($manuf_query);
while ($row) {
    $manuf_id[] = $row[0];
    $row = mysql_fetch_array($manuf_query);
}
sort($manuf_id);
// array met alle manufacturers-id's
$aantal = count($manuf_id);
$prod_manufs_query = tep_db_query("SELECT DISTINCT manufacturers_id FROM " . TABLE_PRODUCTS);
$row2 = mysql_fetch_array($prod_manufs_query);
while ($row2) {
    $prod_manufs[] = $row2[0];
开发者ID:CristianCCIT,项目名称:shop4office,代码行数:31,代码来源:snoei.php


示例5: while

}
?>
    </tr>
  </thead>
<?php 
if ($displayCategories && $categories_entries > 0) {
    ?>
  <tbody class="categories_tbody">
<?php 
    //FIND CATEGORIES
    $anwkatwteleia = $bool_count_products || $bool_count_subcategories ? ' : ' : '';
    $comma = $bool_count_products && $bool_count_subcategories ? ' , ' : '';
    while ($categories = tep_db_fetch_array($categories_query)) {
        //The next two lines slow execution down if count_products=true or/and count_subcategories=true. By default they are set to false.
        $bcp = $bool_count_products ? tep_products_in_category_count($categories['categories_id'], true) . '<span class="cat_products_count" id="catid_' . $categories['categories_id'] . '">' . AAS_HEADING_PRODUCTS_COUNT . '</span>' : '';
        $bcs = $bool_count_subcategories ? tep_childs_in_category_count($categories['categories_id']) . AAS_HEADING_SUBCATEGORIES_COUNT : '';
        ?>
    <tr class="folder gradeX" id="cat_<?php 
        echo $categories['categories_id'];
        ?>
">
      <td class="nojedit centerAlign checkboxen" ><input type="checkbox" id="category_<?php 
        echo $categories['categories_id'];
        ?>
" disabled="disabled"></td>
      <td class="nojedit centerAlign previewPage" style="padding:0px;"><?php 
        echo '<a href="' . tep_href_link(FILENAME_AAS, 'cPath=' . $categories['categories_id']) . '">' . tep_image(DIR_WS_ICONS . 'folder.gif', ICON_FOLDER) . '</a>';
        ?>

        <a target="_blank" class="view_category_class" title="<?php 
        echo AAS_VIEW_CATEGORYS_PAGE;
开发者ID:othreed,项目名称:osCommerce-234-bootstrap-wADDONS,代码行数:31,代码来源:aas.php


示例6: while

if (!empty($_GET['search'])) {
    $Qcategories->appendQuery('and cd.categories_name like :categories_name');
    $Qcategories->bindValue(':categories_name', '%' . $_GET['search'] . '%');
} else {
    $Qcategories->appendQuery('and c.parent_id = :parent_id');
    $Qcategories->bindInt(':parent_id', $current_category_id);
}
$Qcategories->appendQuery('order by c.sort_order, cd.categories_name');
$Qcategories->bindTable(':table_categories', TABLE_CATEGORIES);
$Qcategories->bindTable(':table_categories_description', TABLE_CATEGORIES_DESCRIPTION);
$Qcategories->bindInt(':language_id', $osC_Language->getID());
$Qcategories->setBatchLimit($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS);
$Qcategories->execute();
while ($Qcategories->next()) {
    if (!isset($cInfo) && (!isset($_GET['cID']) && !isset($_GET['pID']) || isset($_GET['cID']) && $_GET['cID'] == $Qcategories->valueInt('categories_id')) && $action != 'cNew') {
        $cInfo_extra = array('childs_count' => tep_childs_in_category_count($Qcategories->valueInt('categories_id')), 'products_count' => tep_products_in_category_count($Qcategories->valueInt('categories_id')));
        $cInfo = new objectInfo(array_merge($Qcategories->toArray(), $cInfo_extra));
    }
    if (isset($cInfo) && $Qcategories->valueInt('categories_id') == $cInfo->categories_id) {
        echo '      <tr class="selected">' . "\n";
    } else {
        echo '      <tr onMouseOver="rowOverEffect(this);" onMouseOut="rowOutEffect(this);" onClick="document.location.href=\'' . tep_href_link(FILENAME_CATEGORIES, 'page=' . $_GET['page'] . '&cPath=' . $cPath . '&search=' . $_GET['search'] . '&cID=' . $Qcategories->valueInt('categories_id')) . '\';">' . "\n";
    }
    ?>
        <td><?php 
    echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $osC_CategoryTree->buildBreadcrumb($Qcategories->valueInt('categories_id'))) . '">' . tep_image('images/icons/folder.gif', ICON_FOLDER) . '&nbsp;<b>' . $Qcategories->value('categories_name') . '</b></a>';
    ?>
</td>
        <td align="center"><?php 
    echo tep_image('templates/' . $template . '/images/icons/checkbox_ticked.gif');
    ?>
开发者ID:itnovator,项目名称:oscommerce_cvs,代码行数:31,代码来源:categories.php


示例7: array

        ?>
      <tr>
        <td align="right" class="smallText"><?php 
        echo HTML::button(OSCOM::getDef('image_back'), 'fa fa-chevron-left', OSCOM::link($back_url, $back_url_params));
        ?>
</td>
      </tr>
    </table>

<?php 
    } else {
        $heading = $contents = [];
        if (isset($_GET['cID']) && is_numeric($_GET['cID']) && $_GET['cID'] > 0) {
            $Qcategory = $OSCOM_Db->get(['categories c', 'categories_description cd'], ['c.categories_id', 'cd.categories_name', 'c.categories_image', 'c.parent_id', 'c.sort_order', 'c.date_added', 'c.last_modified'], ['c.categories_id' => ['val' => (int) $_GET['cID'], 'rel' => 'cd.categories_id'], 'cd.language_id' => $OSCOM_Language->getId()]);
            if ($Qcategory->fetch() !== false) {
                $category_childs = array('childs_count' => tep_childs_in_category_count($Qcategory->valueInt('categories_id')));
                $category_products = array('products_count' => tep_products_in_category_count($Qcategory->valueInt('categories_id')));
                $cInfo_array = array_merge($Qcategory->toArray(), $category_childs, $category_products);
                $cInfo = new objectInfo($cInfo_array);
            }
        } elseif (isset($_GET['pID']) && is_numeric($_GET['pID']) && $_GET['pID'] > 0) {
            $Qproduct = $OSCOM_Db->get(['products p', 'products_description pd'], ['p.products_id', 'pd.products_name', 'p.products_quantity', 'p.products_image', 'p.products_price', 'p.products_date_added', 'p.products_last_modified', 'p.products_date_available', 'p.products_status'], ['p.products_id' => ['val' => (int) $_GET['pID'], 'rel' => ['pd.products_id']], 'pd.language_id' => $OSCOM_Language->getId()]);
            if ($Qproduct->fetch() !== false) {
                $Qreviews = $OSCOM_Db->get('reviews', '(avg(reviews_rating) / 5 * 100) as average_rating', ['products_id' => $Qproduct->valueInt('products_id')]);
                $pInfo_array = array_merge($Qproduct->toArray(), $Qreviews->toArray());
                $pInfo = new objectInfo($pInfo_array);
            }
        }
        switch ($action) {
            case 'new_category':
                $heading[] = array('text' => OSCOM::getDef('text_info_heading_new_category'));
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:31,代码来源:categories.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP tep_class_exists函数代码示例发布时间:2022-05-23
下一篇:
PHP tep_check_stock函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap