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


PHP search::count_active_pro_list方法代码示例

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


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

示例1: search_handler

function search_handler($query, $config)
{
    $result = 0;
    $stand = 32;
    $lim1 = 0;
    $lim2 = 32;
    extract($query);
    if (isset($p)) {
        if ($p != '1') {
            $lim1 = $stand * ($p - 1);
            $lim2 = $lim1 + $stand;
        }
    }
    $sear = new search(new dbc($config), $filterby);
    $products = new product(new dbc($config));
    //new search
    if (isset($search1)) {
        if (empty($searchkey1)) {
            if ($sub_category == '*' && $supplier == '*') {
                $count = $sear->count_new_pro_list();
                $result = $sear->search10_subcat10_supp10($lim1, $lim2);
            }
            if ($sub_category != '*' && $supplier == '*') {
                $count = $sear->count_search10_subcat11_supp10($sub_category);
                $result = $sear->search10_subcat11_supp10($sub_category, $lim1, $lim2);
            }
            if ($sub_category == '*' && $supplier != '*') {
                $count = $sear->count_search10_subcat10_supp11($supplier);
                $result = $sear->search10_subcat10_supp11($supplier, $lim1, $lim2);
            }
            if ($sub_category != '*' && $supplier != '*') {
                $count = $sear->count_search10_subcat11_supp11($sub_category, $supplier);
                $result = $sear->search10_subcat11_supp11($sub_category, $supplier, $lim1, $lim2);
            }
        }
        //active search
        if (!empty($searchkey1)) {
            if ($sub_category == '*' && $supplier == '*') {
                $count = $sear->count_search11_subcat10_supp10($searchkey1);
                $result = $sear->search11_subcat10_supp10($searchkey1, $lim1, $lim2);
            }
            if ($sub_category != '*' && $supplier == '*') {
                $count = $sear->count_search11_subcat11_supp10($sub_category, $searchkey1);
                $result = $sear->search11_subcat11_supp10($sub_category, $searchkey1, $lim1, $lim2);
            }
            if ($sub_category == '*' && $supplier != '*') {
                $count = $sear->count_search11_subcat10_supp11($supplier, $searchkey1);
                $result = $sear->search11_subcat10_supp11($supplier, $searchkey1, $lim1, $lim2);
            }
            if ($sub_category != '*' && $supplier != '*') {
                $count = $sear->count_search11_subcat11_supp11($sub_category, $supplier, $searchkey1);
                $result = $sear->search11_subcat11_supp11($sub_category, $supplier, $searchkey1, $lim1, $lim2);
            }
        }
    }
    if (isset($search2)) {
        if (empty($searchkey2)) {
            if ($category == '*' && $supplier == '*') {
                $count = $sear->count_active_pro_list();
                $result = $sear->search20_subcat20_supp20($lim1, $lim2);
            }
            if ($category != '*' && $supplier == '*') {
                $count = $sear->count_search20_subcat21_supp20($category);
                $result = $sear->search20_subcat21_supp20($category, $lim1, $lim2);
            }
            if ($category == '*' && $supplier != '*') {
                $count = $sear->count_search20_subcat20_supp21($supplier);
                $result = $sear->search20_subcat20_supp21($supplier, $lim1, $lim2);
            }
            if ($category != '*' && $supplier != '*') {
                $count = $sear->count_search20_subcat21_supp21($category, $supplier);
                $result = $sear->search20_subcat21_supp21($category, $supplier, $lim1, $lim2);
            }
        }
        if (!empty($searchkey2)) {
            if ($category == '*' && $supplier == '*') {
                $count = $sear->count_search21_subcat20_supp20($searchkey2);
                $result = $sear->search21_subcat20_supp20($searchkey2, $lim1, $lim2);
            }
            if ($category != '*' && $supplier == '*') {
                $count = $sear->count_search21_subcat21_supp20($category, $searchkey2);
                $result = $sear->search21_subcat21_supp20($category, $searchkey2, $lim1, $lim2);
            }
            if ($category == '*' && $supplier != '*') {
                $count = $sear->count_search21_subcat20_supp21($supplier, $searchkey2);
                $result = $sear->search21_subcat20_supp21($supplier, $searchkey2, $lim1, $lim2);
            }
            if ($category != '*' && $supplier != '*') {
                $count = $sear->count_search21_subcat21_supp21($category, $supplier, $searchkey2);
                $result = $sear->search21_subcat21_supp21($category, $supplier, $searchkey2, $lim1, $lim2);
            }
        }
    }
    //archived search
    if (isset($search3)) {
        if (empty($searchkey3)) {
            if ($category == '*' && $supplier == '*') {
                $count = $sear->count_archived_pro_list();
                $result = $sear->search30_subcat30_supp30($lim1, $lim2);
            }
//.........这里部分代码省略.........
开发者ID:Chilldev,项目名称:Crawl,代码行数:101,代码来源:search.php

示例2: elseif

    if (isset($_GET['r2'])) {
        echo $_GET['r2'];
    }
    $product->view_edit_category('2', $_GET['catid'], $_GET['editcat']);
    die;
} else {
    $stand = 32;
    $limit1 = 0;
    $limit2 = 32;
    if (isset($_GET['p'])) {
        if ($_GET['p'] != '1') {
            $limit1 = $stand * ($_GET['p'] - 1);
            $limit2 = $limit1 + $stand;
        }
    }
    $count = $sear->count_active_pro_list();
    $count = mysqli_fetch_row($count);
    $count = $count[0];
    $noPag = $count / $stand;
    if ($noPag == '0') {
        $noPag = 1;
    }
    if ($count < $stand) {
        $noPag = 1;
    } elseif ($count % $stand == true) {
        $noPag += 1;
    }
    if ($count < $limit2) {
        $limit2 = $count;
    }
    $result = $sear->search20_subcat20_supp20($limit1, $limit2);
开发者ID:Chilldev,项目名称:Crawl,代码行数:31,代码来源:active.php


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