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


PHP tep_get_categories函数代码示例

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


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

示例1: tep_draw_pull_down_menu

      </div>
    </div>

    <div class="row large-margin-top">
      <div class="col-sm-12 col-lg-12">
        <h3 class="large-margin-bottom margin-top"><?php 
echo HEADING_TITLE_1;
?>
</h3>
        <div class="form-group">
          <label class="control-label col-sm-3 col-lg-3 text-right"><?php 
echo ENTRY_CATEGORIES;
?>
</label>
          <div class="col-sm-9 col-lg-9"><?php 
echo tep_draw_pull_down_menu('categories_id', tep_get_categories(array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES))), null, 'class="form-control"');
?>
</div>
        </div>&nbsp;
        <div class="form-group">
          <label class="control-label col-sm-3 col-lg-3 text-right margin-top" style="padding-left:0px;"><?php 
echo ENTRY_INCLUDE_SUBCATEGORIES;
?>
</label>
          <div class="col-sm-9 col-lg-9"><?php 
echo tep_draw_checkbox_field('inc_subcat', null, null, 'class="form-control"', null);
?>
</div>
        </div>&nbsp;
        <div class="form-group">
          <label class="control-label col-sm-3 col-lg-3 text-right small-margin-top"><?php 
开发者ID:resultsonlyweb,项目名称:loaded6-template,代码行数:31,代码来源:advanced_search.tpl.php

示例2: tep_get_categories

function tep_get_categories($categories_array = '', $parent_id = '0', $indent = '')
{
    global $languages_id;
    if (!is_array($categories_array)) {
        $categories_array = array();
    }
    $categories_query = tep_db_query("select c.categories_id, cd.categories_name from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where parent_id = '" . (int) $parent_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int) $languages_id . "' order by sort_order, cd.categories_name");
    while ($categories = tep_db_fetch_array($categories_query)) {
        $categories_array[] = array('id' => $categories['categories_id'], 'text' => $indent . $categories['categories_name']);
        if ($categories['categories_id'] != $parent_id) {
            $categories_array = tep_get_categories($categories_array, $categories['categories_id'], $indent . '&nbsp;&nbsp;');
        }
    }
    return $categories_array;
}
开发者ID:katapofatico,项目名称:Responsive-osCommerce,代码行数:15,代码来源:general.php

示例3: tep_draw_separator

        <td><?php 
echo tep_draw_separator('pixel_trans.gif', '100%', '10');
?>
</td>
      </tr>
      <tr>
        <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
          <tr class="infoBoxContents">
            <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
              <tr>
                <td class="fieldKey"><?php 
echo ENTRY_CATEGORIES;
?>
</td>
                <td class="fieldValue"><?php 
echo tep_draw_pull_down_menu('categories_id', tep_get_categories(array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES))));
?>
</td>
              </tr>
              <tr>
                <td class="fieldKey">&nbsp;</td>
                <td class="smallText"><?php 
echo tep_draw_checkbox_field('inc_subcat', '1', true) . ' ' . ENTRY_INCLUDE_SUBCATEGORIES;
?>
</td>
              </tr>
              <tr>
                <td colspan="2"><?php 
echo tep_draw_separator('pixel_trans.gif', '100%', '10');
?>
</td>
开发者ID:pcchynoweth,项目名称:oscommerce2,代码行数:31,代码来源:advanced_search.php

示例4: tep_cache_categories_box2

    echo tep_cache_categories_box2();
} else {
    ?>
  <!-- categories2 //-->

  <script>
  $(document).ready(function() {
    $('.box-manufacturers-select').addClass('form-input-width');
  });
  $('.box-manufacturers-selection').addClass('form-group full-width');
  $('.box-manufacturers-select').addClass('form-control');
</script>
     <div class="well"  style="text-transform:uppercase">
      <div class="box-header small-margin-bottom small-margin-left"><?php 
    echo BOX_HEADING_CATEGORIES2;
    ?>
</div>

      <form role="form" class="form-inline no-margin-bottom"  action="<?php 
    echo tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false);
    ?>
" method="get">
			  <?php 
    echo '<ul class="box-information_pages-ul list-unstyled list-indent-large"><li>' . tep_draw_pull_down_menu('cPath', tep_get_categories(array(array('id' => '', 'text' => PULL_DOWN_DEFAULT))), $cPath, 'onchange="this.form.submit();"class="box-manufacturers-select form-control form-input-width"') . '<li></ul>';
    ?>

     </form>
</div>
  <!-- categories2_eof //-->
  <?php 
}
开发者ID:resultsonlyweb,项目名称:loaded6-template,代码行数:31,代码来源:categories2.php

示例5: tep_get_categories

function tep_get_categories($categories_array = '', $parent_id = '0', $indent = '')
{
    global $languages_id;
    if (!is_array($categories_array)) {
        $categories_array = array();
    }
    //    $categories_query = tep_db_query("select c.categories_id, cd.categories_name from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where parent_id = '" . (int)$parent_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");
    // BOF SPPC Hide categories for groups
    if (isset($_SESSION['sppc_customer_group_id']) && $_SESSION['sppc_customer_group_id'] != '0') {
        $customer_group_id = $_SESSION['sppc_customer_group_id'];
    } else {
        $customer_group_id = '0';
    }
    $categories_query = tep_db_query("select c.categories_id, cd.categories_name from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where parent_id = '" . (int) $parent_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int) $languages_id . "' and find_in_set('" . $customer_group_id . "', categories_hide_from_groups) = 0 order by sort_order, cd.categories_name");
    // EOF SPPC Hide categories for groups
    while ($categories = tep_db_fetch_array($categories_query)) {
        $categories_array[] = array('id' => $categories['categories_id'], 'text' => $indent . $categories['categories_name']);
        if ($categories['categories_id'] != $parent_id) {
            $categories_array = tep_get_categories($categories_array, $categories['categories_id'], $indent . '&nbsp;&nbsp;');
        }
    }
    return $categories_array;
}
开发者ID:digideskio,项目名称:oscmax2,代码行数:23,代码来源:general.php

示例6: tep_get_categories

function tep_get_categories($categories_array = '', $parent_id = 0, $level = 0, $products_types_id = 0)
{
    global $languages_id, $active_products_types_array;
    if (!is_array($categories_array)) {
        $categories_array = array();
    }
    if ($products_types_id == 0 && $parent_id == 0 && func_num_args() < 4) {
        $products_types_query = tep_db_query("select products_types_id, products_types_name, products_types_default_status from " . TABLE_PRODUCTS_TYPES . " where products_types_id in ('" . implode("', '", $active_products_types_array) . "') and language_id = '" . (int) DEFAULT_LANGUAGE_ID . "' order by sort_order, products_types_name");
        while ($products_types = tep_db_fetch_array($products_types_query)) {
            if ($products_types['products_types_default_status'] == 1) {
                $category_check = true;
            } else {
                $categories_check_query = tep_db_query("select products_id from " . TABLE_PRODUCTS . " where products_types_id = '" . (int) $products_types['products_types_id'] . "' and products_status = '1' limit 1");
                $categories_check_row = tep_db_fetch_array($categories_check_query);
                $category_check = $categories_check_row['products_id'] > 0;
            }
            if ($category_check) {
                if (sizeof($active_products_types_array) > 1) {
                    $categories_array[] = array('id' => $products_types['products_types_id'], 'text' => $products_types['products_types_name'], 'active' => false);
                } else {
                    $level = -1;
                }
                $categories_array = tep_get_categories($categories_array, $parent_id, $level + 1, $products_types['products_types_id']);
            }
        }
    } elseif ($level <= 2) {
        $categories_query = tep_db_query("select c.categories_id, cd.categories_name from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where parent_id = '" . (int) $parent_id . "'" . (strlen($products_types_id) > 0 ? " and c.products_types_id = '" . (int) $products_types_id . "'" : "") . " and c.categories_id = cd.categories_id and c.categories_status = '1' and cd.language_id = '" . (int) DEFAULT_LANGUAGE_ID . "' order by sort_order, cd.categories_name");
        if (tep_db_num_rows($categories_query) > 0) {
            while ($categories = tep_db_fetch_array($categories_query)) {
                $categories_array[] = array('id' => $categories['categories_id'], 'text' => str_repeat('&nbsp;&nbsp;&nbsp;', $level) . $categories['categories_name']);
                if ($categories['categories_id'] != $parent_id) {
                    $categories_array = tep_get_categories($categories_array, $categories['categories_id'], $level + 1, $products_types_id);
                }
            }
        }
    }
    return $categories_array;
}
开发者ID:rabbit-source,项目名称:setbook.ru,代码行数:38,代码来源:general_old.php

示例7: tep_cfg_select_multicategories

function tep_cfg_select_multicategories($key_value = '', $key)
{
    if (tep_not_null($key_value)) {
        $value_array = explode(', ', $key_value);
    } else {
        $value_array = array();
    }
    $name = (tep_not_null($key) ? 'configuration[' . $key . ']' : 'configuration_value') . '[]';
    $string = tep_draw_pull_multiselect_menu($name, tep_get_categories(), $value_array, ' size="8" ');
    return $string;
}
开发者ID:grum1965,项目名称:Plaster-Ceiling-Roses,代码行数:11,代码来源:general.php

示例8: tep_get_categories

</p>
          </div>
        </div>
      </div>
    </div>

    <hr>

    <div class="form-group">
      <label for="entryCategories" class="control-label col-sm-3"><?php 
echo OSCOM::getDef('entry_categories');
?>
</label>
      <div class="col-sm-9">
        <?php 
echo HTML::selectField('categories_id', tep_get_categories(array(array('id' => '', 'text' => OSCOM::getDef('text_all_categories')))), null, 'id="entryCategories"');
?>
      </div>
    </div>
    <div class="form-group">
      <label for="entryIncludeSubs" class="control-label col-sm-3"><?php 
echo OSCOM::getDef('entry_include_subcategories');
?>
</label>
      <div class="col-sm-9">
        <div class="checkbox">
          <label>
            <?php 
echo HTML::checkboxField('inc_subcat', '1', true, 'id="entryIncludeSubs"');
?>
	  </label>
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:31,代码来源:advanced_search.php

示例9: tep_get_categories

function tep_get_categories($categories_array = '', $parent_id = '0', $indent = '')
{
    $OSCOM_Db = Registry::get('Db');
    if (!is_array($categories_array)) {
        $categories_array = array();
    }
    $Qcategories = $OSCOM_Db->prepare('select c.categories_id, cd.categories_name from :table_categories c, :table_categories_description cd where c.parent_id = :parent_id and c.categories_id = cd.categories_id and cd.language_id = :language_id order by c.sort_order, cd.categories_name');
    $Qcategories->bindInt(':parent_id', $parent_id);
    $Qcategories->bindInt(':language_id', $_SESSION['languages_id']);
    $Qcategories->execute();
    while ($Qcategories->fetch()) {
        $categories_array[] = array('id' => $Qcategories->valueInt('categories_id'), 'text' => $indent . $Qcategories->value('categories_name'));
        if ($Qcategories->valueInt('categories_id') != $parent_id) {
            $categories_array = tep_get_categories($categories_array, $Qcategories->valueInt('categories_id'), $indent . '&nbsp;&nbsp;');
        }
    }
    return $categories_array;
}
开发者ID:Akofelaz,项目名称:oscommerce2,代码行数:18,代码来源:general.php

示例10: tep_draw_separator

        <td><?php 
echo tep_draw_separator('pixel_trans.gif', '100%', '10');
?>
</td>
      </tr>
      <tr>
        <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
          <tr class="infoBoxContents">
            <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
              <tr>
                <td class="fieldKey"><?php 
echo Translate('Categorieën');
?>
</td>
                <td class="fieldValue"><?php 
echo tep_draw_pull_down_menu('categories_id', tep_get_categories(array(array('id' => '', 'text' => Translate('Alle categorieën')))));
?>
</td>
              </tr>
              <tr>
                <td class="fieldKey">&nbsp;</td>
                <td class="smallText"><?php 
echo tep_draw_checkbox_field('inc_subcat', '1', true) . ' ' . Translate('Inclusief subcategorieën');
?>
</td>
              </tr>
              <tr>
                <td colspan="2"><?php 
echo tep_draw_separator('pixel_trans.gif', '100%', '10');
?>
</td>
开发者ID:CristianCCIT,项目名称:shop4office,代码行数:31,代码来源:advanced_search.php

示例11: tep_get_categories

        </div>
      </div>
    </div>



    <hr>

    <div class="form-group">
      <label for="entryCategories" class="control-label col-sm-3"><?php 
echo ENTRY_CATEGORIES;
?>
</label>
      <div class="col-sm-9">
        <?php 
echo HTML::selectField('categories_id', tep_get_categories(array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES))), null, 'id="entryCategories"');
?>
      </div>
    </div>
    <div class="form-group">
      <label for="entryIncludeSubs" class="control-label col-sm-3"><?php 
echo ENTRY_INCLUDE_SUBCATEGORIES;
?>
</label>
      <div class="col-sm-9">
        <div class="checkbox">
          <label>
            <?php 
echo HTML::checkboxField('inc_subcat', '1', true, 'id="entryIncludeSubs"') . '&nbsp;';
?>
          </label>
开发者ID:tiansiyuan,项目名称:oscommerce2,代码行数:31,代码来源:advanced_search.php

示例12: tep_href_link

include XOOPS_ROOT_PATH . '/header.php';
$xoopsTpl->assign("xoops_module_header", '<link rel="stylesheet" type="text/css" media="screen" href="' . XOOPS_URL . '/modules/osC/templates/stylesheet.css" />');
require DIR_WS_LANGUAGES . $language . '/' . FILENAME_ADVANCED_SEARCH;
$breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_ADVANCED_SEARCH));
$xoopsTpl->assign("search_form", tep_draw_form('advanced_search', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get', 'onSubmit="return check_form(this);"') . tep_hide_session_id());
$xoopsTpl->assign("site_image", tep_image(DIR_WS_IMAGES . 'table_background_browse.gif', HEADING_TITLE_1, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT));
$xoopsTpl->assign("seperator", tep_draw_separator('pixel_trans.gif', '100%', '10'));
if ($messageStack->size('search') > 0) {
    $xoopsTpl->assign("message", 1);
    $xoopsTpl->assign("messagetext", $messageStack->output('search'));
}
$info_box_contents = array();
$info_box_contents[] = array('text' => HEADING_SEARCH_CRITERIA);
$heading_box = new infoBoxHeading($info_box_contents, true, true);
$xoopsTpl->assign("block_heading", $heading_box->content);
$info_box_contents = array();
$info_box_contents[] = array('text' => tep_draw_input_field('keywords', '', 'style="width: 100%"'));
$info_box_contents[] = array('align' => 'right', 'text' => tep_draw_checkbox_field('search_in_description', '1') . ' ' . TEXT_SEARCH_IN_DESCRIPTION);
$info_block = new infoBox($info_box_contents);
$xoopsTpl->assign("block_info", $info_block->content);
$xoopsTpl->assign("pop_link", tep_href_link(FILENAME_POPUP_SEARCH_HELP));
$xoopsTpl->assign("bt_search", tep_image_submit('button_search.gif', IMAGE_BUTTON_SEARCH));
$xoopsTpl->assign("categories_menu", tep_draw_pull_down_menu('categories_id', tep_get_categories(array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES)))));
$xoopsTpl->assign("subcat", tep_draw_checkbox_field('inc_subcat', '1', true));
$xoopsTpl->assign("manufacturers_menu", tep_draw_pull_down_menu('manufacturers_id', tep_get_manufacturers(array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS)))));
$xoopsTpl->assign("pfrom", tep_draw_input_field('pfrom'));
$xoopsTpl->assign("pto", tep_draw_input_field('pto'));
$xoopsTpl->assign("dfrom", tep_draw_input_field('dfrom', DOB_FORMAT_STRING, 'onFocus="RemoveFormatString(this, \'' . DOB_FORMAT_STRING . '\')"'));
$xoopsTpl->assign("dto", tep_draw_input_field('dto', DOB_FORMAT_STRING, 'onFocus="RemoveFormatString(this, \'' . DOB_FORMAT_STRING . '\')"'));
include_once XOOPS_ROOT_PATH . '/footer.php';
include "includes/application_bottom.php";
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:31,代码来源:advanced_search.php

示例13: tep_draw_input_field

echo tep_draw_input_field('keywords', '', 'size="93%"');
?>
<br /><span class="smallText"><?php 
echo HEADING_SEARCH_CRITERIA_TEXT;
?>
</span></td>
	  </tr>
	</table>
	<table border="0" cellspacing="0" cellpadding="0" width="100%" id="advanced_search">
	  <tr>
		<td width="40%"><?php 
echo ENTRY_CATEGORY;
?>
</td>
		<td width="60%"><?php 
echo tep_draw_pull_down_menu('categories_id', tep_get_categories(array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES))), '', 'style="width: 95%;"');
?>
</td>
	  </tr>
	  <tr>
		<td width="40%"><?php 
echo ENTRY_MANUFACTURER;
?>
 <span class="errorText">*</span></td>
		<td width="60%"><?php 
echo tep_draw_input_field('manufacturers', '', 'style="width: 95%;"');
?>
</td>
	  </tr>
	  <tr>
		<td width="40%"><?php 
开发者ID:rabbit-source,项目名称:setbook.ru,代码行数:31,代码来源:advanced_search_result.php

示例14: tep_get_categories

function tep_get_categories($categories_array = '', $parent_id = '0', $indent = '')
{
    global $osC_Database, $osC_Session;
    if (!is_array($categories_array)) {
        $categories_array = array();
    }
    $Qcategories = $osC_Database->query('select c.categories_id, cd.categories_name from :table_categories c, :table_categories_description cd where parent_id = :parent_id and c.categories_id = cd.categories_id and cd.language_id = :language_id order by sort_order, cd.categories_name');
    $Qcategories->bindTable(':table_categories', TABLE_CATEGORIES);
    $Qcategories->bindTable(':table_categories_description', TABLE_CATEGORIES_DESCRIPTION);
    $Qcategories->bindInt(':parent_id', $parent_id);
    $Qcategories->bindInt(':language_id', $osC_Session->value('languages_id'));
    $Qcategories->execute();
    while ($Qcategories->next()) {
        $categories_array[] = array('id' => $Qcategories->valueInt('categories_id'), 'text' => $indent . $Qcategories->value('categories_name'));
        if ($Qcategories->valueInt('categories_id') != $parent_id) {
            $categories_array = tep_get_categories($categories_array, $Qcategories->valueInt('categories_id'), $indent . '&nbsp;&nbsp;');
        }
    }
    return $categories_array;
}
开发者ID:itnovator,项目名称:oscommerce_cvs,代码行数:20,代码来源:general.php


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