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

PHP tep_get_category_tree函数代码示例

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

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



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

示例1: tep_get_category_tree

function tep_get_category_tree($parent_id = '0', $spacing = '', $exclude = '', $category_tree_array = '', $include_itself = false)
{
    global $languages_id;
    if (!is_array($category_tree_array)) {
        $category_tree_array = array();
    }
    if (sizeof($category_tree_array) < 1 && $exclude != '0') {
        $category_tree_array[] = array('id' => '0', 'text' => "Catalog");
    }
    if ($include_itself) {
        $category_query = tep_db_query("select cd.categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " cd where cd.language_id = '" . (int) $languages_id . "' and cd.categories_id = '" . (int) $parent_id . "'");
        $category = tep_db_fetch_array($category_query);
        $category_tree_array[] = array('id' => $parent_id, 'text' => $category['categories_name']);
    }
    $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = cd.categories_id and cd.language_id = '" . (int) $languages_id . "' and c.parent_id = '" . (int) $parent_id . "' order by c.sort_order, cd.categories_name");
    while ($categories = tep_db_fetch_array($categories_query)) {
        if ($exclude != $categories['categories_id']) {
            $category_tree_array[] = array('id' => $categories['categories_id'], 'text' => $spacing . $categories['categories_name']);
        }
        $category_tree_array = tep_get_category_tree($categories['categories_id'], $spacing . '&nbsp;&nbsp;&nbsp;', $exclude, $category_tree_array);
    }
    return $category_tree_array;
}
开发者ID:laiello,项目名称:myopensources,代码行数:23,代码来源:sts_user_code.php


示例2: sprintf

            <td class="dataTableHeadingContent" colspan="3" align="center"><?php 
echo sprintf(ADDING_TITLE, $oID);
?>
</td>
          </tr>
          <tr class="dataTableRow">
           <form action="<?php 
echo tep_href_link(FILENAME_ORDERS_EDIT_ADD_PRODUCT, 'oID=' . $_GET['oID']);
?>
" method="POST">
            <td class="dataTableContent" align="right"><?php 
echo TEXT_STEP_1;
?>
</td>
            <td class="dataTableContent" valign="top"><?php 
echo tep_draw_pull_down_menu('add_product_categories_id', tep_get_category_tree('0', '', '0', $category_array), $add_product_categories_id, 'style="width:300px;" onchange="this.form.submit();"');
?>
</td>
            <td class="dataTableContent" align="center">
			  <noscript>
			    <input type="submit" value="<?php 
echo TEXT_BUTTON_SELECT_CATEGORY;
?>
">
			  </noscript>
			    <input type="hidden" name="step" value="2">
			 </td>
           </form>
          </tr>
          <tr class="dataTableRow">
            <td class="dataTableContent" colspan="3" align="center"><?php 
开发者ID:digideskio,项目名称:oscmax2,代码行数:31,代码来源:edit_orders_add_product.php


示例3: tep_draw_separator

    echo tep_draw_separator();
    ?>
</td>
	  </tr>
<?php 
    echo tep_draw_form('order_products', FILENAME_ORDERS, tep_get_all_get_params());
    ?>
	  <tr>
		<td class="main"><?php 
    echo TEXT_CHOOSE_CATEGORIES;
    ?>
</td>
	  </tr>
	  <tr>
		<td><?php 
    echo tep_draw_pull_down_menu('categories[]', tep_get_category_tree('', '&nbsp; '), $HTTP_POST_VARS['categories'], 'size="10" multiple="true"');
    ?>
</td>
	  </tr>
	  <tr>
		<td class="main"><?php 
    echo tep_draw_separator('pixel_trans.gif', '100%', '10');
    ?>
</td>
	  </tr>
	  <tr>
		<td class="main"><?php 
    echo TEXT_SEARCH_PRODUCTS;
    ?>
</td>
	  </tr>
开发者ID:rabbit-source,项目名称:setbook.ru,代码行数:31,代码来源:orders.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: tep_db_query

                            tep_db_query($query);
                            $update_product_result = true;
                        }
                    }
                    if ($update_product_result) {
                        $updated++;
                    }
                }
                $messageStack->add_session(sprintf(SUCCESS_PRODUCTS_UPDATED, $updated), 'success');
                tep_redirect(FILENAME_PRODUCTS_UPDATES);
            }
            break;
    }
}
$categories_array = array(array('id' => '', 'text' => TEXT_CHOOSE));
$categories_array = array_merge($categories_array, tep_get_category_tree(0, '', 0));
$manufacturers_array = array(array('id' => '', 'text' => TEXT_CHOOSE));
$manufacturers_query = tep_db_query("select manufacturers_id, manufacturers_name from " . TABLE_MANUFACTURERS_INFO . " where languages_id = '" . (int) $languages_id . "' order by manufacturers_name");
while ($manufacturers = tep_db_fetch_array($manufacturers_query)) {
    $manufacturers_array[] = array('id' => $manufacturers['manufacturers_id'], 'text' => $manufacturers['manufacturers_name']);
}
$products_types_array = array(array('id' => '', 'text' => TEXT_CHOOSE));
$products_types_query = tep_db_query("select products_types_id, products_types_name from " . TABLE_PRODUCTS_TYPES . " where language_id = '" . (int) $languages_id . "' order by sort_order, products_types_name");
while ($products_types = tep_db_fetch_array($products_types_query)) {
    $products_types_array[] = array('id' => $products_types['products_types_id'], 'text' => $products_types['products_types_name']);
}
$series_array = array(array('id' => '', 'text' => TEXT_CHOOSE));
$series_query = tep_db_query("select series_id, series_name from " . TABLE_SERIES . " where language_id = '" . (int) $languages_id . "' order by sort_order, series_name");
while ($series = tep_db_fetch_array($series_query)) {
    $series_array[] = array('id' => $series['series_id'], 'text' => $series['series_name']);
}
开发者ID:rabbit-source,项目名称:setbook.ru,代码行数:31,代码来源:products_updates.php


示例6: tep_db_query

?>
        <tr class="dataTableHeadingRow">
          <td valign="top"><form action="<?php 
echo $current_page;
?>
" method="POST">  
            <table border="0" width="100%" cellspacing="0" cellpadding="2">
              <tr class="dataTableHeadingRow">
                <td class="dataTableHeadingContent" align="left">
<?php 
$customers_groups_query = tep_db_query("select customers_group_name, customers_group_id from " . TABLE_CUSTOMERS_GROUPS . " order by customers_group_id ");
while ($existing_groups = tep_db_fetch_array($customers_groups_query)) {
    $input_groups[] = array("id" => $existing_groups['customers_group_id'], "text" => $existing_groups['customers_group_name']);
    $all_groups[$existing_groups['customers_group_id']] = $existing_groups['customers_group_name'];
}
echo TEXT_SELECT_CAT . ': &nbsp;' . tep_draw_pull_down_menu('categories', tep_get_category_tree(), $categories) . '&nbsp;' . TEXT_SELECT_CUST_GROUP . ': &nbsp;' . tep_draw_pull_down_menu('customers_groups', $input_groups, isset($customers_group) ? $customers_group : '') . '&nbsp;';
$manufacturers_array = array(array('id' => '0', 'text' => TEXT_NONE));
$manufacturers_query = tep_db_query("select manufacturers_id, manufacturers_name from " . TABLE_MANUFACTURERS . " order by manufacturers_name");
while ($manufacturers = tep_db_fetch_array($manufacturers_query)) {
    $manufacturers_array[] = array('id' => $manufacturers['manufacturers_id'], 'text' => $manufacturers['manufacturers_name']);
}
echo TEXT_SELECT_MAN . ' :&nbsp;' . tep_draw_pull_down_menu('manufacturer', $manufacturers_array, $manufacturer) . '&nbsp;' . TEXT_ENTER_DISCOUNT . ':&nbsp; ';
?>

                <input type="text" size="4" name="discount" value="<?php 
if ($discount > 0) {
    echo $discount;
}
?>
"><?php 
echo TEXT_PCT_AND;
开发者ID:digideskio,项目名称:oscmax2,代码行数:31,代码来源:specialsbycategory.php


示例7: array

                }
                break;
            case 'move_product':
                $heading[] = array('text' => OSCOM::getDef('text_info_heading_move_product'));
                $contents = array('form' => HTML::form('products', OSCOM::link(FILENAME_CATEGORIES, 'action=move_product_confirm&cPath=' . $cPath)) . HTML::hiddenField('products_id', $pInfo->products_id));
                $contents[] = array('text' => OSCOM::getDef('text_move_products_intro', ['products_name' => $pInfo->products_name]));
                $contents[] = array('text' => OSCOM::getDef('text_info_current_categories') . '<br /><strong>' . tep_output_generated_category_path($pInfo->products_id, 'product') . '</strong>');
                $contents[] = array('text' => OSCOM::getDef('text_move', ['item_name' => $pInfo->products_name]) . '<br />' . HTML::selectField('move_to_category_id', tep_get_category_tree(), $current_category_id));
                $contents[] = array('text' => HTML::button(OSCOM::getDef('image_move'), 'fa fa-share', null, null, 'btn-success') . HTML::button(OSCOM::getDef('image_cancel'), null, OSCOM::link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id), null, 'btn-link'));
                break;
            case 'copy_to':
                $heading[] = array('text' => OSCOM::getDef('text_info_heading_copy_to'));
                $contents = array('form' => HTML::form('copy_to', OSCOM::link(FILENAME_CATEGORIES, 'action=copy_to_confirm&cPath=' . $cPath)) . HTML::hiddenField('products_id', $pInfo->products_id));
                $contents[] = array('text' => OSCOM::getDef('text_info_copy_to_intro'));
                $contents[] = array('text' => OSCOM::getDef('text_info_current_categories') . '<br /><strong>' . tep_output_generated_category_path($pInfo->products_id, 'product') . '</strong>');
                $contents[] = array('text' => OSCOM::getDef('text_categories') . '<br />' . HTML::selectField('categories_id', tep_get_category_tree(), $current_category_id));
                $contents[] = array('text' => OSCOM::getDef('text_how_to_copy') . '<br />' . HTML::radioField('copy_as', 'link', true) . ' ' . OSCOM::getDef('text_copy_as_link') . '<br />' . HTML::radioField('copy_as', 'duplicate') . ' ' . OSCOM::getDef('text_copy_as_duplicate'));
                $contents[] = array('text' => HTML::button(OSCOM::getDef('image_copy'), 'fa fa-copy', null, null, 'btn-success') . HTML::button(OSCOM::getDef('image_cancel'), null, OSCOM::link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id), null, 'btn-link'));
                break;
        }
        if (tep_not_null($heading) && tep_not_null($contents)) {
            $show_listing = false;
            echo HTML::panel($heading, $contents, ['type' => 'info']);
        }
    }
}
if ($show_listing === true) {
    ?>

<table class="oscom-table table table-hover">
  <thead>
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:31,代码来源:categories.php


示例8: array

     $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
     break;
 case 'move_product':
     $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_MOVE_PRODUCT . '</b>');
     $contents = array('form' => tep_draw_form('products', FILENAME_CATEGORIES, 'action=move_product_confirm&cPath=' . $cPath) . tep_draw_hidden_field('products_id', $pInfo->products_id));
     $contents[] = array('text' => sprintf(TEXT_MOVE_PRODUCTS_INTRO, $pInfo->products_name));
     $contents[] = array('text' => '<br>' . TEXT_INFO_CURRENT_CATEGORIES . '<br><b>' . tep_output_generated_category_path($pInfo->products_id, 'product') . '</b>');
     $contents[] = array('text' => '<br>' . sprintf(TEXT_MOVE, $pInfo->products_name) . '<br>' . tep_draw_pull_down_menu('move_to_category_id', tep_get_category_tree(), $current_category_id));
     $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_move.gif', IMAGE_MOVE) . ' <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
     break;
 case 'copy_to':
     $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_COPY_TO . '</b>');
     $contents = array('form' => tep_draw_form('copy_to', FILENAME_CATEGORIES, 'action=copy_to_confirm&cPath=' . $cPath) . tep_draw_hidden_field('products_id', $pInfo->products_id));
     $contents[] = array('text' => TEXT_INFO_COPY_TO_INTRO);
     $contents[] = array('text' => '<br>' . TEXT_INFO_CURRENT_CATEGORIES . '<br><b>' . tep_output_generated_category_path($pInfo->products_id, 'product') . '</b>');
     $contents[] = array('text' => '<br>' . TEXT_CATEGORIES . '<br>' . tep_draw_pull_down_menu('categories_id', tep_get_category_tree(), $current_category_id));
     $contents[] = array('text' => '<br>' . TEXT_HOW_TO_COPY . '<br>' . tep_draw_radio_field('copy_as', 'link', true) . ' ' . TEXT_COPY_AS_LINK . '<br>' . tep_draw_radio_field('copy_as', 'duplicate') . ' ' . TEXT_COPY_AS_DUPLICATE);
     $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_copy.gif', IMAGE_COPY) . ' <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
     break;
 default:
     if ($rows > 0) {
         if (isset($cInfo) && is_object($cInfo)) {
             // category info box contents
             $heading[] = array('text' => '<b>' . $cInfo->categories_name . '</b>');
             $contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $cInfo->categories_id . '&action=edit_category') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $cInfo->categories_id . '&action=delete_category') . '">' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '</a> <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $cInfo->categories_id . '&action=move_category') . '">' . tep_image_button('button_move.gif', IMAGE_MOVE) . '</a>');
             $contents[] = array('text' => '<br>' . TEXT_DATE_ADDED . ' ' . tep_date_short($cInfo->date_added));
             if (tep_not_null($cInfo->last_modified)) {
                 $contents[] = array('text' => TEXT_LAST_MODIFIED . ' ' . tep_date_short($cInfo->last_modified));
             }
             $contents[] = array('text' => '<br>' . tep_info_image($cInfo->categories_image, $cInfo->categories_name, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT) . '<br>' . $cInfo->categories_image);
             $contents[] = array('text' => '<br>' . TEXT_SUBCATEGORIES . ' ' . $cInfo->childs_count . '<br>' . TEXT_PRODUCTS . ' ' . $cInfo->products_count);
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:31,代码来源:categories.php


示例9: epbox

    if ($tmp_col_count >= 7) {
        $tmp_row_count += 1;
        $tmp_col_count = 0;
    }
}
$bigbox = new epbox('', false);
$bigbox->table_parameters = 'id="customtable" style="border: 1px solid #CCCCCC; padding: 2px; margin: 3px;"';
echo $bigbox->output($cells);
$manufacturers_array = array();
$manufacturers_array[] = array("id" => '', 'text' => '- manufacturer -');
$manufacturers_query = tep_db_query("select manufacturers_id, manufacturers_name from " . TABLE_MANUFACTURERS . " order by manufacturers_name");
while ($manufacturers = tep_db_fetch_array($manufacturers_query)) {
    $manufacturers_array[] = array("id" => $manufacturers['manufacturers_id'], 'text' => $manufacturers['manufacturers_name']);
}
$status_array = array(array("id" => '', 'text' => '- status -'), array("id" => '1', 'text' => 'active'), array("id" => '0', 'text' => 'disabled'));
echo 'filter by: ' . tep_draw_pull_down_menu('epcust_category_filter', array_merge(array(0 => array("id" => '', 'text' => '- category -')), tep_get_category_tree()));
echo ' ' . tep_draw_pull_down_menu('epcust_manufacturer_filter', $manufacturers_array) . ' ';
echo ' ' . tep_draw_pull_down_menu('epcust_status_filter', $status_array) . ' ';
echo tep_draw_input_field('submit', 'Build File', ' style="padding: 0px"', false, 'submit');
?>
</td></tr>
          </table>
          </form>
        <br /><br />

        <font size="-2">Quick Links</font>
        <table width="100%" border="0" cellpadding="3" cellspacing="3"><tr><td width="50%" valign="top" bgcolor="#EEEEEE">
        <p style="margin-top: 8px;"><b>Create then Download Files</b><br />
        <font size="-2">Create entire file in server memory then stream download after completed.</font></p>
        <p><!-- Download file links -  Add your custom fields here -->
          <a href="easypopulate.php?download=stream&amp;dltype=full<?php 
开发者ID:digideskio,项目名称:oscmax2,代码行数:31,代码来源:easypopulate.php


示例10: tep_draw_form

    echo tep_draw_form('row_by_page', FILENAME_DISCOUNT_CATEGORIES, '', 'get');
    echo tep_draw_hidden_field('action', 'show_products');
    echo tep_draw_hidden_field('cgID', $cgID);
    echo tep_draw_hidden_field('dcID', $dcID);
    echo tep_draw_hidden_field('manufacturer', $manufacturer);
    echo tep_draw_hidden_field('cPath', $current_category_id) . tep_draw_pull_down_menu('row_by_page', $row_bypage_array, $row_by_page, 'onChange="this.form.submit();"');
    ?>
</form></td>
   <td class="smallText" align="center" valign="top"><?php 
    echo tep_draw_form('categorie', FILENAME_DISCOUNT_CATEGORIES, '', 'get');
    echo tep_draw_hidden_field('action', 'show_products');
    echo tep_draw_hidden_field('cgID', $cgID);
    echo tep_draw_hidden_field('dcID', $dcID);
    echo tep_draw_hidden_field('row_by_page', $row_by_page);
    echo tep_draw_hidden_field('manufacturer', $manufacturer);
    echo tep_draw_pull_down_menu('cPath', tep_get_category_tree(), $current_category_id, 'onChange="this.form.submit();"');
    ?>
</form></td>
  <td class="smallText" align="center" valign="top"><?php 
    echo tep_draw_form('manufacturers', FILENAME_DISCOUNT_CATEGORIES, '', 'get');
    echo tep_draw_hidden_field('action', 'show_products');
    echo tep_draw_hidden_field('cgID', $cgID);
    echo tep_draw_hidden_field('dcID', $dcID);
    echo tep_draw_hidden_field('row_by_page', $row_by_page);
    echo tep_draw_hidden_field('cPath', $current_category_id);
    echo manufacturers_list();
    ?>
</form></td>
  <td class="smallText" align="center" valign="top" style="border-right: 1px solid #7b9ebd;"><?php 
    echo tep_draw_form('discount_categorie', FILENAME_DISCOUNT_CATEGORIES, '', 'get');
    echo tep_draw_hidden_field('action', 'show_products');
开发者ID:digideskio,项目名称:oscmax2,代码行数:31,代码来源:discount_categories.php


示例11: array

</td>
                <td align="right" class="smallText">
                
                <?php 
// Check if we are editing a cross sell - if so hide the form
if (!isset($_GET['sort']) && !isset($_GET['add_related_product_ID'])) {
    // PGM adds cross sell filter
    $action_filter[0] = array('id' => 'all', 'text' => TEXT_ALL_PRODUCTS);
    $action_filter[1] = array('id' => 'edit_xsell', 'text' => TEXT_PRODUCTS_WITH);
    $action_filter[2] = array('id' => 'new_xsell', 'text' => TEXT_PRODUCTS_WITHOUT);
    echo tep_draw_form('action', FILENAME_XSELL_PRODUCTS, '', 'get');
    echo TEXT_FILTER_XSELL . tep_draw_pull_down_menu('action', $action_filter, '', 'onChange="this.form.submit();"');
    echo tep_hide_session_id() . '</form>';
    // PGM adds category filter
    echo tep_draw_form('category', FILENAME_XSELL_PRODUCTS, '', 'get');
    echo '&nbsp;&nbsp;' . TEXT_CATEGORY_XSELL . tep_draw_pull_down_menu('category', tep_get_category_tree(), '', 'onChange="this.form.submit();"');
    echo tep_hide_session_id() . '</form>';
    // PGM adds Search functionality to xSell
    echo tep_draw_form('search', FILENAME_XSELL_PRODUCTS, '', 'get');
    echo '&nbsp;&nbsp;' . TEXT_SEARCH_XSELL . ' ' . tep_draw_input_field('search');
    echo '</form>';
    echo '&nbsp;&nbsp;<td align="right" width="10"><a href="' . tep_href_link(FILENAME_XSELL_PRODUCTS) . '">' . tep_image_button('button_reset.gif', IMAGE_RESET) . '</a></td>';
}
// end if ( (!isset($_GET['sort'])) && (!isset($_GET['add_related_product_ID'])) )
if (isset($_GET['category']) && $_GET['category'] != 0) {
    $category_filter = " and p2c.categories_id = '" . (int) $_GET['category'] . "'";
} else {
    $category_filter = "";
}
if (isset($_GET['search'])) {
    $search_string = " and ((pd.products_name like '%" . tep_db_prepare_input(addslashes($_GET['search'])) . "%') or (p.products_model like '%" . tep_db_prepare_input(addslashes($_GET['search'])) . "%'))";
开发者ID:digideskio,项目名称:oscmax2,代码行数:31,代码来源:xsell.php


示例12: tep_get_category_tree

function tep_get_category_tree($parent_id = '0', $spacing = '', $exclude = '', $category_tree_array = '', $include_itself = false, $disable_with_subs = false, $disable_with_prods = false)
{
    global $languages_id;
    if (!is_array($category_tree_array)) {
        $category_tree_array = array();
    }
    if (sizeof($category_tree_array) < 1 && $exclude != '0') {
        $category_tree_array[] = array('id' => '0', 'text' => TEXT_TOP);
    }
    if ($include_itself) {
        $category_query = tep_db_query("select cd.categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " cd where cd.language_id = '" . (int) $languages_id . "' and cd.categories_id = '" . (int) $parent_id . "'");
        $category = tep_db_fetch_array($category_query);
        $category_tree_array[] = array('id' => $parent_id, 'text' => $category['categories_name']);
    }
    $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = cd.categories_id and cd.language_id = '" . (int) $languages_id . "' and c.parent_id = '" . (int) $parent_id . "' order by c.sort_order, cd.categories_name");
    while ($categories = tep_db_fetch_array($categories_query)) {
        if ($exclude != $categories['categories_id']) {
            if ($disable_with_subs == true) {
                $subs = tep_db_query('SELECT categories_id FROM categories WHERE parent_id = ' . $categories['categories_id']);
                if (tep_db_num_rows($subs) > 0) {
                    $category_tree_array[] = array('id' => $categories['categories_id'], 'text' => $spacing . $categories['categories_name'], 'params' => 'disabled=disabled');
                } else {
                    $category_tree_array[] = array('id' => $categories['categories_id'], 'text' => $spacing . $categories['categories_name'], 'params' => '');
                }
            } else {
                if ($disable_with_prods == true) {
                    $prods = tep_db_query('SELECT categories_id FROM products_to_categories WHERE categories_id = ' . $categories['categories_id']);
                    if (tep_db_num_rows($prods) > 0) {
                        $category_tree_array[] = array('id' => $categories['categories_id'], 'text' => $spacing . $categories['categories_name'], 'params' => 'disabled=disabled unselectable=on');
                    } else {
                        $category_tree_array[] = array('id' => $categories['categories_id'], 'text' => $spacing . $categories['categories_name'], 'params' => '');
                    }
                } else {
                    $category_tree_array[] = array('id' => $categories['categories_id'], 'text' => $spacing . $categories['categories_name'], 'params' => '');
                }
            }
        }
        $category_tree_array = tep_get_category_tree($categories['categories_id'], $spacing . '&nbsp;&nbsp;&nbsp;', $exclude, $category_tree_array, $include_itself, $disable_with_subs, $disable_with_prods);
    }
    return $category_tree_array;
}
开发者ID:CristianCCIT,项目名称:shop4office,代码行数:41,代码来源:general.php


示例13: isset

  Copyright 2000 - 2011 osCmax

  Released under the GNU General Public License
*/
require 'includes/application_top.php';
$action = isset($_GET['action']) ? $_GET['action'] : '';
$eid = isset($_GET['eid']) ? $_GET['eid'] : '';
$confirm = isset($_GET['confirm']) ? $_GET['confirm'] : '';
$languages = tep_get_languages();
$lang = array();
for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
    // build array accessed directly by language id
    $lang[$languages[$i]['id']] = array('name' => $languages[$i]['name'], 'code' => $languages[$i]['code'], 'image' => $languages[$i]['image'], 'directory' => $languages[$i]['directory']);
}
$categories = tep_get_category_tree();
$confirmation_needed = false;
if (tep_not_null($action)) {
    $messages = array();
    $error = false;
    switch ($action) {
        case 'insert':
            // validate form
            if (!isset($_POST['status'])) {
                $error = true;
                $messages[] = ERROR_ENTRY_REQUIRED . ENTRY_ACTIVATE_NOW;
            } else {
                $status = $_POST['status'] == '0' ? 0 : 1;
            }
            if (!isset($_POST['show_admin'])) {
                $error = true;
开发者ID:digideskio,项目名称:oscmax2,代码行数:30,代码来源:extra_fields.php


示例14: tep_get_category_tree

function tep_get_category_tree($parent_id = '0', $spacing = '', $exclude = '', $category_tree_array = '', $include_itself = false)
{
    $OSCOM_Db = Registry::get('Db');
    $OSCOM_Language = Registry::get('Language');
    if (!is_array($category_tree_array)) {
        $category_tree_array = array();
    }
    if (sizeof($category_tree_array) < 1 && $exclude != '0') {
        $category_tree_array[] = array('id' => '0', 'text' => OSCOM::getDef('text_top'));
    }
    if ($include_itself) {
        $Qcategory = $OSCOM_Db->get('categories_description', 'categories_name', ['language_id' => $OSCOM_Language->getId(), 'categories_id' => (int) $parent_id]);
        $category_tree_array[] = ['id' => $parent_id, 'text' => $Qcategory->value('categories_name')];
    }
    $Qcategories = $OSCOM_Db->get(['categories c', 'categories_description cd'], ['c.categories_id', 'cd.categories_name', 'c.parent_id'], ['c.categories_id' => ['rel' => 'cd.categories_id'], 'cd.language_id' => $OSCOM_Language->getId(), 'c.parent_id' => (int) $parent_id], ['c.sort_order', 'cd.categories_name']);
    while ($Qcategories->fetch()) {
        if ($exclude != $Qcategories->valueInt('categories_id')) {
            $category_tree_array[] = array('id' => $Qcategories->valueInt('categories_id'), 'text' => $spacing . $Qcategories->value('categories_name'));
        }
        $category_tree_array = tep_get_category_tree($Qcategories->valueInt('categories_id'), $spacing . '&nbsp;&nbsp;&nbsp;', $exclude, $category_tree_array);
    }
    return $category_tree_array;
}
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:23,代码来源:general.php


示例15: tep_draw_pull_down_menu

 // ############################################################################
 //   Add Products Steps
 // ############################################################################
 print "<tr><td><table border='0'>\n";
 // # Set Defaults
 if (!isset($add_product_categories_id)) {
     $add_product_categories_id = 0;
 }
 if (!isset($add_product_products_id)) {
     $add_product_products_id = 0;
 }
 // # Step 1: Choose Category
 print "<tr class=\"dataTableRow\"><form action='{$PHP_SELF}?oID={$oID}&action={$action}' method='POST'>\n";
 print "<td class='dataTableContent' align='right'><b>" . ADDPRODUCT_TEXT_STEP . " 1:</b></td>\n";
 print "<td class='dataTableContent' valign='top'>";
 echo ' ' . tep_draw_pull_down_menu('add_product_categories_id', tep_get_category_tree(), $current_category_id, 'onChange="this.form.submit();"');
 print "<input type='hidden' name='step' value='2'>";
 print "</td>\n";
 print "<td class='dataTableContent'>" . ADDPRODUCT_TEXT_STEP1 . "</td>\n";
 print "</form></tr>\n";
 print "<tr><td colspan='3'>&nbsp;</td></tr>\n";
 // # Step 2: Choose Product
 if ($step > 1 && $add_product_categories_id > 0) {
     print "<tr class=\"dataTableRow\"><form action='{$PHP_SELF}?oID={$oID}&action={$action}' method='POST'>\n";
     print "<td class='dataTableContent' align='right'><b>" . ADDPRODUCT_TEXT_STEP . " 2: </b></td>\n";
     print "<td class='dataTableContent' valign='top'><select name=\"add_product_products_id\" onChange=\"this.form.submit();\">";
     $ProductOptions = "<option value='0'>" . ADDPRODUCT_TEXT_SELECT_PRODUCT . "\n";
     asort($ProductList[$add_product_categories_id]);
     foreach ($ProductList[$add_product_categories_id] as $ProductID => $ProductName) {
         $ProductOptions .= "<option value='{$ProductID}'> {$ProductName}\n";
     }
开发者ID:rrecurse,项目名称:IntenseCart,代码行数:31,代码来源:edit_orders.php


示例16: show_attrctl


//.........这里部分代码省略.........
		<td><input type="text" name="new_model_extra[<?php 
        echo $xfld;
        ?>
]" id="new_model_extra[<?php 
        echo $xfld;
        ?>
]" field="model_x_<?php 
        echo $xfld;
        ?>
" size="6"></td>
	</tr>
<?php 
    }
    ?>
</table>
</td></tr>
</table>
<table style="margin: 0 0 5px 40px" cellpadding="0" cellspacing="0">
<tr>
<td valign="top">
<input type="file" id="new_upload_model_image" name="new_upload_model_image" style="font:normal 11px verdana;"></td>
</tr>
</table>

</td>
<td style="padding:0 10px 0 10px;"><a href="javascript:void(0)" onClick="addNewModel('new')"><img src="images/add.png" alt="" border="0" title="Add model to product"></a></td>
</tr></table>

</div>

<div id="models_populate" style="display:none;">
<table><tr>
<td><?php 
    echo tep_draw_pull_down_menu('models_populate_cat', tep_get_category_tree(), '', 'onChange="loadPopulateProducts(this.value)"');
    ?>
</td>
<td id="models_populate_prod_box"></td>
</tr></table>
<script type="text/javascript">
function loadPopulateProducts(cat) {
  var blk=$('models_populate_prod_box');
  blk.innerHTML='';
  new ajax('attrctl_populate.php?cat='+cat,{update:blk});
}
</script>
</div>

</div>


<script type="text/javascript">
var modelAccordion = new Spry.Widget.Accordion("modelAccordion");
var currOptions=<?php 
    echo tep_js_quote_array(array_keys($opts));
    ?>
;

var primaryOptions=[true];
var attrSort=<?php 
    echo tep_js_quote($attrSort);
    ?>
;
var modelFieldList=<?php 
    echo tep_js_quote_array($modelFieldList);
    ?>
;
开发者ID:rrecurse,项目名称:IntenseCart,代码行数:67,代码来源:attrctl.php


示例17: elseif

     $bInfo->objectInfo($banner);
 } elseif (tep_not_null($HTTP_POST_VARS)) {
     $bInfo->objectInfo($HTTP_POST_VARS);
 }
 //    $groups_array = array();
 //    $groups_query = tep_db_query("select distinct banners_group from " . TABLE_BANNERS . " order by banners_group");
 //    while ($groups = tep_db_fetch_array($groups_query)) {
 //      $groups_array[] = array('id' => $groups['banners_group'], 'text' => $groups['banners_group']);
 //    }
 if (preg_match('/(\\w*?):(.*)/', $banner['banners_group'], $banners_group_split)) {
     $banners_group_section = $banners_group_split[1];
     $banners_group_id = $banners_group_split[2];
 } else {
     $banners_group_section = 'other';
 }
 $categories_pull_down = tep_get_category_tree();
 $categories_pull_down[0]['text'] = '--select--';
 $products_pull_down = array(array(id => '', text => '--select--'));
 $products_query = tep_db_query("SELECT products_id,products_name FROM " . TABLE_PRODUCTS_DESCRIPTION . " WHERE language_id='{$languages_id}' ORDER BY products_name");
 while ($products_row = tep_db_fetch_array($products_query)) {
     $products_pull_down[] = array(id => $products_row['products_id'], text => sprintf("%4d: %s", $products_row['products_id'], $products_row['products_name']));
 }
 $manufacturers_pull_down = array(array(id => '', text => '--select--'));
 $manufacturers_query = tep_db_query("SELECT manufacturers_id,manufacturers_name FROM " . TABLE_MANUFACTURERS . " ORDER BY manufacturers_name");
 while ($manufacturers_row = tep_db_fetch_array($manufacturers_query)) {
     $manufacturers_pull_down[] = array(id => $manufacturers_row['manufacturers_id'], text => sprintf("%4d: %s", $manufacturers_row['manufacturers_id'], $manufacturers_row['manufacturers_name']));
 }
 $info_pull_down = array(array(id => '', text => '--select--'));
 $info_query = tep_db_query("SELECT information_id,info_title FROM " . TABLE_INFORMATION . " ORDER BY info_title");
 while ($info_row = tep_db_fetch_array($info_query)) {
     $info_pull_down[] = array(id => $info_row['information_id'], text => sprintf("%4d: %s", $info_row['information_id'], $info_row['info_title']));
开发者ID:rrecurse,项目名称:IntenseCart,代码行数:31,代码来源:banner_manager.php


示例18: array

    $heading[] = array('text' => '<b>' . TEXT_CROSS_SELL_ARTICLES . '</b>');
    $contents[] = array('text' => TEXT_SELECT_A_CATEGORY);
    ?>
	         <table border="0" cellpadding="2" cellspacing="0" width="100%" bgcolor="#999999">
               <tr class="dataTableHeadingRow">
                 <td class="dataTableHeadingContent" width="100%"><?php 
    echo SELECT_CATEGORY;
    ?>
</td>
	           </tr>
               <tr class="dataTableRow">
                 <td class="dataTableContent">
                 <?php 
    echo tep_draw_form('goto', "articles_xsell.php", '', 'get') . tep_hide_session_id();
    echo '<input type="hidden" name="add_related_article_ID" value="' . (int) $_GET['add_related_article_ID'] . '" />';
    echo SELECT_CATEGORY . "&nbsp;:" . tep_draw_pull_down_menu('cPath', tep_get_category_tree(), $current_category_id, 'onChange="this.form.submit();"');
    echo '</form>';
    ?>
                 </td>
               </tr>
             </table>
	
		     <?php 
    if (isset($_GET['cPath'])) {
        $contents[] = array('text' => TEXT_SELECT_PRODUCT);
        ?>
             <table border="0" cellpadding="0" cellspacing="0" width="100%">
               <tr>
                 <td><form action="<?php 
        tep_href_link(FILENAME_ARTICLES_XSELL, '', 'NONSSL');
        ?>
开发者ID:digideskio,项目名称:oscmax2,代码行数:31,代码来源:articles_xsell.php


示例19: tep_get_category_tree

function tep_get_category_tree($parent_id = '0', $spacing = '', $exclude = '', $category_tree_array = '', $include_itself = false, $products_types_id = 0)
{
    global $languages_id;
    if (!is_array($category_tree_array)) {
        $category_tree_array = array();
    }
    if (sizeof($categor 

鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP tep_get_countries函数代码示例发布时间:2022-05-23
下一篇:
PHP tep_get_categories函数代码示例发布时间: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