本文整理汇总了PHP中zen_get_category_tree函数的典型用法代码示例。如果您正苦于以下问题:PHP zen_get_category_tree函数的具体用法?PHP zen_get_category_tree怎么用?PHP zen_get_category_tree使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了zen_get_category_tree函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: getHandlerInformation
public static function getHandlerInformation()
{
global $db;
DbIoHandler::loadHandlerMessageFile('Products');
$manufacturers_options = array();
$manufacturers_info = $db->Execute("SELECT manufacturers_id as `id`, manufacturers_name as `text` FROM " . TABLE_MANUFACTURERS . " ORDER BY manufacturers_name ASC");
while (!$manufacturers_info->EOF) {
$manufacturers_options[] = $manufacturers_info->fields;
$manufacturers_info->MoveNext();
}
unset($manufacturers_info);
$status_options = array(array('id' => 'all', 'text' => DBIO_PRODUCTS_TEXT_STATUS_ALL), array('id' => '1', 'text' => DBIO_PRODUCTS_TEXT_STATUS_ENABLED), array('id' => '0', 'text' => DBIO_PRODUCTS_TEXT_STATUS_DISABLED));
$categories_options = zen_get_category_tree();
unset($categories_options[0]);
$my_config = array('version' => '1.0.0', 'handler_version' => '1.0.0', 'include_header' => true, 'export_only' => false, 'description' => DBIO_PRODUCTS_DESCRIPTION, 'export_filters' => array('products_filters' => array('type' => 'array', 'label' => DBIO_PRODUCTS_FILTERS_LABEL, 'fields' => array('products_status' => array('type' => 'dropdown', 'dropdown_options' => $status_options, 'label' => DBIO_PRODUCTS_STATUS_LABEL)))));
if (count($manufacturers_options) > 0) {
$my_config['export_filters']['products_filters']['fields']['products_manufacturers'] = array('type' => 'dropdown_multiple', 'dropdown_options' => $manufacturers_options, 'label' => DBIO_PRODUCTS_MANUFACTURERS_LABEL);
}
$my_config['export_filters']['products_filters']['fields']['products_categories'] = array('type' => 'dropdown_multiple', 'dropdown_options' => array_values($categories_options), 'label' => DBIO_PRODUCTS_CATEGORIES_LABEL);
return $my_config;
}
开发者ID:lat9,项目名称:dbio,代码行数:21,代码来源:DbIoProductsHandler.php
示例2: zen_get_category_tree
</tr>
<tr>
<td class="main"><?php
echo TEXT_SALEMAKER_DATE_END;
?>
</td>
<td class="main"><script language="javascript">EndDate.writeControl(); EndDate.dateFormat="<?php
echo DATE_FORMAT_SPIFFYCAL;
?>
";</script></td>
</tr>
</table>
</tr>
<tr><table width="750" border="0" cellspacing="2" cellpadding="2">
<?php
$categories_array = zen_get_category_tree('0', ' ', '0');
$n = sizeof($categories_array);
for ($i = 0; $i < $n; $i++) {
$parents = $db->Execute("select parent_id from " . TABLE_CATEGORIES . " where categories_id = '" . $categories_array[$i]['id'] . "' ");
$categories_array[$i]['parent_id'] = $parents->fields['parent_id'];
$categories_array[$i]['categories_id'] = $categories_array[$i]['id'];
$categories_array[$i]['path'] = $categories_array[$i]['categories_id'];
$categories_array[$i]['indent'] = 0;
$parent = $categories_array[$i]['parent_id'];
while ($parent != 0) {
$categories_array[$i]['indent']++;
for ($j = 0; $j < $n; $j++) {
if ($categories_array[$j]['categories_id'] == $parent) {
$categories_array[$i]['path'] = $parent . '_' . $categories_array[$i]['path'];
$parent = $categories_array[$j]['parent_id'];
break;
开发者ID:ZenMagick,项目名称:zc-base,代码行数:31,代码来源:salemaker.php
示例3: zen_href_link
$products->MoveNext();
}
?>
<td class="smallText" valign="top"><?php
echo HEADER_CATEGORY_NAME;
?>
</td>
<td class="smallText" align="left"></td><form name="restrict_product" method="post" action="<?php
echo zen_href_link('coupon_restrict.php', zen_get_all_get_params(array('info', 'action', 'x', 'y')) . 'info=' . $cInfo->restrict_id, 'NONSSL');
?>
">
<?php
echo zen_hide_session_id();
?>
<td class="smallText" align="left"><?php
echo zen_draw_pull_down_menu('cPath_prod', zen_get_category_tree(), $current_category_id, 'onChange="this.form.submit();"');
?>
</td></form>
<?php
if (sizeof($products_array) > 0) {
?>
<form name="restrict_category" method="post" action="<?php
echo zen_href_link('coupon_restrict.php', zen_get_all_get_params(array('info', 'action', 'x', 'y')) . 'action=add_product&info=' . $cInfo->restrict_id . '&build_cat=' . $current_category_id, 'NONSSL');
?>
"><?php
echo zen_draw_hidden_field('securityToken', $_SESSION['securityToken']);
?>
<td class="smallText" valign="top"><?php
echo HEADER_PRODUCT_NAME;
?>
</td>
开发者ID:kirkbauer2,项目名称:kirkzc,代码行数:31,代码来源:coupon_restrict.php
示例4: array
<?php
//
// +----------------------------------------------------------------------+
// |zen-cart Open Source E-commerce |
// +----------------------------------------------------------------------+
// | Copyright (c) 2003 The zen-cart developers |
// | |
// | http://www.zen-cart.com/index.php |
// | |
// | Portions Copyright (c) 2003 osCommerce |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.0 of the GPL license, |
// | that is bundled with this package in the file LICENSE, and is |
// | available through the world-wide-web at the following url: |
// | http://www.zen-cart.com/license/2_0.txt. |
// | If you did not receive a copy of the zen-cart license and are unable |
// | to obtain it through the world-wide-web, please send a note to |
// | [email protected] so we can mail you a copy immediately. |
// +----------------------------------------------------------------------+
// $Id: sidebox_move_product.php 290 2004-09-15 19:48:26Z wilt $
//
$heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_MOVE_PRODUCT . '</b>');
$contents = array('form' => zen_draw_form('products', $type_admin_handler, 'action=move_product_confirm&cPath=' . $cPath . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '')) . zen_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>' . zen_output_generated_category_path($pInfo->products_id, 'product') . '</b>');
$contents[] = array('text' => '<br />' . sprintf(TEXT_MOVE, $pInfo->products_name) . '<br />' . zen_draw_pull_down_menu('move_to_category_id', zen_get_category_tree(), $current_category_id));
$contents[] = array('align' => 'center', 'text' => '<br />' . zen_image_submit('button_move.gif', IMAGE_MOVE) . ' <a href="' . zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '')) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:28,代码来源:sidebox_move_product.php
示例5: zen_draw_form
</td>
</tr>
<tr>
<td>
<?php
echo zen_draw_form('bulk_add_tare_groups', FILENAME_TARE_GROUPS_BULK);
echo zen_draw_hidden_field('bulk_add_tare_groups', 'true');
?>
<table>
<tr>
<td><?php
echo 'Category: ';
?>
</td>
<td><?php
echo zen_draw_pull_down_menu('category', zen_get_category_tree());
?>
</td>
</tr>
<tr>
<td><?php
echo TEXT_PRODUCT_TARE_GROUPS . ': ';
?>
</td>
<td><?php
echo zen_draw_pull_down_menu('products_tare_group', $tare_group_array);
?>
</td>
</tr>
<tr>
<td colspan="2">
开发者ID:bislewl,项目名称:product_tare_groups,代码行数:31,代码来源:product_tare_groups_bulk_add.php
示例6: array
case 'copy_to':
$copy_attributes_delete_first = '0';
$copy_attributes_duplicates_skipped = '0';
$copy_attributes_duplicates_overwrite = '0';
$copy_attributes_include_downloads = '1';
$copy_attributes_include_filename = '1';
$heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_COPY_TO . '</b>');
// WebMakers.com Added: Split Page
if (empty($pInfo->products_id)) {
$pInfo->products_id = $pID;
}
$contents = array('form' => zen_draw_form('copy_to', FILENAME_CATEGORIES, 'action=copy_to_confirm&cPath=' . $cPath . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '')) . zen_draw_hidden_field('products_id', $pInfo->products_id));
$contents[] = array('text' => TEXT_INFO_COPY_TO_INTRO);
$contents[] = array('text' => '<br />' . TEXT_INFO_CURRENT_PRODUCT . '<br /><b>' . $pInfo->products_name . ' ID#' . $pInfo->products_id . '</b>');
$contents[] = array('text' => '<br />' . TEXT_INFO_CURRENT_CATEGORIES . '<br /><b>' . zen_output_generated_category_path($pInfo->products_id, 'product') . '</b>');
$contents[] = array('text' => '<br />' . TEXT_CATEGORIES . '<br />' . zen_draw_pull_down_menu('categories_id', zen_get_category_tree(), $current_category_id));
$contents[] = array('text' => '<br />' . TEXT_HOW_TO_COPY . '<br />' . zen_draw_radio_field('copy_as', 'link', true) . ' ' . TEXT_COPY_AS_LINK . '<br />' . zen_draw_radio_field('copy_as', 'duplicate') . ' ' . TEXT_COPY_AS_DUPLICATE);
// only ask about attributes if they exist
if (zen_has_product_attributes($pInfo->products_id, 'false')) {
$contents[] = array('text' => '<br />' . zen_image(DIR_WS_IMAGES . 'pixel_black.gif', '', '100%', '3'));
$contents[] = array('text' => '<br />' . TEXT_COPY_ATTRIBUTES_ONLY);
$contents[] = array('text' => '<br />' . TEXT_COPY_ATTRIBUTES . '<br />' . zen_draw_radio_field('copy_attributes', 'copy_attributes_yes', true) . ' ' . TEXT_COPY_ATTRIBUTES_YES . '<br />' . zen_draw_radio_field('copy_attributes', 'copy_attributes_no') . ' ' . TEXT_COPY_ATTRIBUTES_NO);
// future $contents[] = array('align' => 'center', 'text' => '<br />' . ATTRIBUTES_NAMES_HELPER . '<br />' . zen_draw_separator('pixel_trans.gif', '1', '10'));
$contents[] = array('text' => '<br />' . zen_image(DIR_WS_IMAGES . 'pixel_black.gif', '', '100%', '3'));
}
$contents[] = array('align' => 'center', 'text' => '<br />' . zen_image_submit('button_copy.gif', IMAGE_COPY) . ' <a href="' . zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '')) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
break;
// attribute features
// attribute features
case 'attribute_features':
$copy_attributes_delete_first = '0';
开发者ID:andychang88,项目名称:daddy-store.com,代码行数:31,代码来源:categories.php
示例7: zen_href_link
<td align="center" class="main"><a
href="<?php
echo zen_href_link($curr_page, "products_filter=" . $previous . '¤t_category_id=' . $current_category_id);
?>
"><?php
echo zen_image_button('button_prev.gif', BUTTON_PREVIOUS_ALT);
?>
</a> </td>
<?php
}
?>
<td align="left" class="main"><?php
echo zen_draw_form('new_category', $curr_page, '', 'get');
?>
<?php
echo zen_draw_pull_down_menu('current_category_id', zen_get_category_tree('', '', '0', '', '', true), $current_category_id, 'onChange="this.form.submit();"');
echo zen_draw_hidden_field('products_filter', $_GET['products_filter']);
echo zen_hide_session_id();
echo zen_draw_hidden_field('action', 'new_cat');
?>
</form></td>
<?php
if ($counter > 0) {
?>
<td align="center" class="main"> <a
href="<?php
echo zen_href_link($curr_page, "products_filter=" . $next_item . '¤t_category_id=' . $current_category_id);
?>
"><?php
echo zen_image_button('button_next.gif', BUTTON_NEXT_ALT);
?>
开发者ID:wwxgitcat,项目名称:zencart_v1.0,代码行数:31,代码来源:products_previous_next_display.php
示例8: array
case 'delete':
$heading[] = array('text' => '<strong>' . TEXT_HEADING_DELETE_MEDIA_COLLECTION . '</strong>');
$contents = array('form' => zen_draw_form('collections', FILENAME_MEDIA_MANAGER, 'page=' . $_GET['page'] . '&mID=' . $mInfo->media_id . '&action=deleteconfirm'));
$contents[] = array('text' => TEXT_DELETE_INTRO);
$contents[] = array('text' => '<br><strong>' . $mInfo->media_name . '</strong>');
if ($mInfo->products_count > 0) {
$contents[] = array('text' => '<br>' . zen_draw_checkbox_field('delete_products') . ' ' . TEXT_DELETE_PRODUCTS);
$contents[] = array('text' => '<br>' . sprintf(TEXT_DELETE_WARNING_PRODUCTS, $mInfo->products_count));
}
$contents[] = array('align' => 'center', 'text' => '<br />' . zen_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . zen_href_link(FILENAME_MEDIA_MANAGER, 'page=' . $_GET['page'] . '&mID=' . $mInfo->media_id) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
break;
case 'products':
$new_product_query = $db->Execute("select ptc.*, pd.products_name from " . TABLE_PRODUCTS_TO_CATEGORIES . " ptc left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on ptc.products_id = pd.products_id and pd.language_id = '" . (int) $_SESSION['languages_id'] . "' where ptc.categories_id='" . $current_category_id . "' order by pd.products_name");
$heading[] = array('text' => '<strong>' . TEXT_HEADING_ASSIGN_MEDIA_COLLECTION . '</strong>');
$contents[] = array('text' => TEXT_PRODUCTS_INTRO . '<br /><br />');
$contents[] = array('text' => zen_draw_form('new_category', FILENAME_MEDIA_MANAGER, '', 'get') . ' ' . zen_draw_pull_down_menu('current_category_id', zen_get_category_tree('', '', '0'), '', 'onChange="this.form.submit();"') . zen_hide_session_id() . zen_draw_hidden_field('products_filter', $_GET['products_filter']) . zen_draw_hidden_field('action', 'new_cat') . zen_draw_hidden_field('mID', $mInfo->media_id) . zen_draw_hidden_field('page', $_GET['page']) . ' </form>');
$product_array = $zc_products->get_products_in_category($current_category_id, false);
if ($product_array) {
$contents[] = array('text' => zen_draw_form('new_product', FILENAME_MEDIA_MANAGER, '', 'get') . ' ' . zen_draw_pull_down_menu('current_product_id', $product_array) . ' ' . '<input type="submit" name="add_product" value="Add">' . zen_draw_hidden_field('current_category_id', $current_category_id) . zen_draw_hidden_field('action', 'add_product') . zen_draw_hidden_field('page', $_GET['page']) . zen_draw_hidden_field('mID', $mInfo->media_id) . ' </form>');
} else {
$contents[] = array('text' => ' ' . TEXT_NO_PRODUCTS);
}
$products_linked_query = "select * from " . TABLE_MEDIA_TO_PRODUCTS . "\n where media_id = '" . $mInfo->media_id . "'";
$products_linked = $db->Execute($products_linked_query);
while (!$products_linked->EOF) {
$contents[] = array('text' => '<a href="' . zen_href_link(FILENAME_MEDIA_MANAGER, 'action=remove_product&mID=' . $mInfo->media_id . '&page=' . $_GET['page'] . '&product_id=' . $products_linked->fields['product_id']) . '">' . zen_image_button('button_delete.gif', IMAGE_DELETE) . '</a> ' . $zc_products->products_name($products_linked->fields['product_id']) . '<br />');
$products_linked->MoveNext();
}
$contents[] = array('align' => 'center', 'text' => '<br /><a href="' . zen_href_link(FILENAME_MEDIA_MANAGER, 'page=' . $_GET['page'] . '&mID=' . $mInfo->media_id) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
break;
default:
开发者ID:happyxlq,项目名称:lt_svn,代码行数:31,代码来源:media_manager.php
示例9: while
$products->MoveNext();
}
echo '</select><br />' . "\n";
}
?>
<?php
if ($categories->RecordCount() > 0) {
echo '<label for="categories">' . LABEL_CATEGORIES . '</label>' . "\n";
$categories_size = $categories->RecordCount() > 10 ? 10 : $categories->RecordCount();
/*
echo '<select name="categories[]" multiple="multiple" size="' . $categories_size . '">' . "\n";
while (!$categories->EOF) {
echo '<option value="' . $categories->fields['categories_id'] . '">' . $categories->fields['categories_name'] . '</option>' . "\n";
$categories->MoveNext();
}*/
echo zen_draw_pull_down_menu('categories[]', zen_get_category_tree('', '', '0', '', '', true, false, array(TAGS_MASTER_CATEGORY_ID)), '', 'multiple="multiple" size="' . $categories_size . '"');
echo '</select><br />' . "\n";
}
?>
<label for="discount_amount"><?php
echo LABEL_DISCOUNT_AMOUNT;
?>
</label>
<?php
echo zen_draw_input_field('discount_amount', '', 'size=10 id="discount_amount"');
?>
<label id="discountType"><?php
echo LABEL_DISCOUNT_TYPE;
?>
</label>
开发者ID:bislewl,项目名称:zencart_coupon_import_tool,代码行数:31,代码来源:coupon_import_tool.php
示例10: zen_draw_hidden_field
echo zen_draw_hidden_field('basemodulepath', $modulePath, 'id="basemodulepath" ');
$model = array();
$model[] = array('id' => '', 'text' => TEXT_PLEASE_SELECT);
if ($_REQUEST['cPath1'] != "") {
$model = array_merge($model, $dropdownArray);
}
if (isset($_REQUEST['select_model'])) {
$value = $_REQUEST['select_model'];
}
echo '<span class="pf_selectbox_name">' . TEXT_MODEL . '</span>' . zen_draw_pull_down_menu('select_model', $model, $value, 'id="select_model" class="pf_selectbox_text"');
echo "</li>\n";
echo "<li>";
echo "<noscript>";
if ($_REQUEST['select_model'] != "") {
$value = $_REQUEST['select_model'];
$dropdownArray = zen_get_category_tree($value);
}
echo zen_my_image_submit(PF_NOSCRIPT_SUBMIT, 'Go');
echo "</noscript>";
echo "</li>\n";
echo "<li>";
$year = array();
$year[] = array('id' => '', 'text' => TEXT_PLEASE_SELECT);
if ($_REQUEST['select_model'] != "") {
$year = array_merge($year, $dropdownArray);
}
if (isset($_REQUEST['cPath'])) {
$value = $_REQUEST['cPath'];
}
if ($_REQUEST['select_model'] != "") {
echo '<span class="pf_selectbox_name">' . TEXT_YEAR . '</span>' . zen_draw_pull_down_menu('cPath', $year, $value, 'id="select_year" class="pf_selectbox_text"');
开发者ID:Zen4All-nl,项目名称:Zen-Cart-Product-Finder,代码行数:31,代码来源:tpl_header.php
示例11: zen_get_category_tree
function zen_get_category_tree($parent_id = '0', $spacing = '', $exclude = '', $category_tree_array = '', $include_itself = false, $category_has_products = false, $limit = false)
{
global $gBitDb;
if ($limit) {
$limit_count = 1;
} else {
$limit_count = 100;
}
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 = $gBitDb->Execute("SELECT cd.`categories_name`\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tFROM " . TABLE_CATEGORIES_DESCRIPTION . " cd\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE cd.`language_id` = '" . (int) $_SESSION['languages_id'] . "'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tand cd.`categories_id` = '" . (int) $parent_id . "'");
$category_tree_array[] = array('id' => $parent_id, 'text' => $category->fields['categories_name']);
}
$categories = $gBitDb->Execute("SELECT c.`categories_id`, cd.`categories_name`, c.`parent_id`\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tFROM " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE c.`categories_id` = cd.`categories_id`\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tand cd.`language_id` = '" . (int) $_SESSION['languages_id'] . "'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tand c.`parent_id` = '" . (int) $parent_id . "'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tORDER BY c.`sort_order`, cd.`categories_name`");
while (!$categories->EOF) {
if ($category_has_products == true and zen_products_in_category_count($categories->fields['categories_id'], '', false, true) >= 1) {
$mark = '*';
} else {
$mark = ' ';
}
if ($exclude != $categories->fields['categories_id']) {
$category_tree_array[] = array('id' => $categories->fields['categories_id'], 'text' => $spacing . $categories->fields['categories_name'] . $mark);
}
$category_tree_array = zen_get_category_tree($categories->fields['categories_id'], $spacing . ' ', $exclude, $category_tree_array, '', $category_has_products);
$categories->MoveNext();
}
return $category_tree_array;
}
开发者ID:bitweaver,项目名称:commerce,代码行数:33,代码来源:general.php
示例12: while
$delete_product = FALSE;
while (!$products_types->EOF) {
if ($products_types->fields['type_handler'] . '.php' == $filename) {
$delete_product = TRUE;
break;
}
$products_types->MoveNext();
}
if ($delete_product && $_GET['action'] == 'delete_product_confirm' && $_POST['products_id'] > 0) {
$products_id = zen_db_prepare_input($_POST['products_id']);
$query = 'delete from ' . TABLE_CUSTOMERS_VIEWED_PRODUCTS . ' where products_id="' . $products_id . '"';
$db->Execute($query);
} else {
if ($filename == FILENAME_CATEGORIES . '.php' && $_GET['action'] == 'delete_category_confirm' && $_POST['categories_id'] > 0) {
$categories_id = zen_db_prepare_input($_POST['categories_id']);
$categories = zen_get_category_tree($categories_id, '', '0', '', true);
zen_set_time_limit(600);
for ($i = 0, $n = sizeof($categories); $i < $n; $i++) {
$sql = "select products_id from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id='" . $categories[$i]['id'] . "'";
$category_products = $db->Execute($sql);
while (!$category_products->EOF) {
$query = 'delete from ' . TABLE_CUSTOMERS_VIEWED_PRODUCTS . ' where products_id="' . $category_products->fields['products_id'] . '"';
$db->Execute($query);
$category_products->MoveNext();
}
}
} else {
if ($filename == FILENAME_CUSTOMERS . '.php' && $_GET['action'] == 'deleteconfirm' && $_GET['cID'] > 0) {
$customers_id = zen_db_prepare_input($_GET['cID']);
$query = 'delete from ' . TABLE_CUSTOMERS_VIEWED_PRODUCTS . ' where customers_id="' . (int) $customers_id . '"';
$db->Execute($query);
开发者ID:homework-bazaar,项目名称:zencart-sugu,代码行数:31,代码来源:init_admin.php
示例13: zen_draw_form
} else {
?>
<?php
echo zen_draw_form('quantity_discounts', FILENAME_QUANTITIY_DISCOUNTS, '', 'post');
?>
<table cellspacing="0" cellpadding="5" id="table_info">
<tr>
<th>
Categories Qty Discounts
</th>
</tr>
<tr>
<td>
<?php
echo zen_draw_pull_down_menu('cat_id', zen_get_category_tree(), isset($category_id) ? $category_id : '', ' onchange="this.form.submit();"');
?>
<br/><br/>Or Input Categoriy Id <br/><br/>
<?php
echo zen_draw_input_field('cat_id_input', '');
?>
</td>
</tr>
</table>
<?php
echo '</form>';
}
?>
</td>
开发者ID:happyxlq,项目名称:lt_svn,代码行数:31,代码来源:categories_quantity_discounts.php
示例14: unset
$csv_format_id = $_SESSION['product_csv']['csv_format_id'];
}
if (array_key_exists('ignore_first_line', $_SESSION['product_csv'])) {
$ignore_first_line = $_SESSION['product_csv']['ignore_first_line'];
}
unset($_SESSION['product_csv']);
}
$body = '<tr><th>' . zen_draw_form('import', FILENAME_ADDON_MODULES_ADMIN, 'module=product_csv&action=import', 'post', 'enctype="multipart/form-data"') . PRODUCT_CSV_IMPORT_TITLE . '</th></tr><tr><td>' . PRODUCT_CSV_IMPORT_MESSAGE . '<table border="0" width="100%" cellspacing="0" cellpadding="0" class="tableLayout3"><tr><th width="40%">
<label for="format">' . PRODUCT_CSV_FORMAT . ': </label></th><td>' . zen_draw_pull_down_menu('csv_format_id', $formats, '', 'id="format"') . '</td></tr>
<tr><th width="40%"><label for="ignore">' . PRODUCT_CSV_IGNORE_FIRST_LINE . ': </label>' . zen_draw_checkbox_field('ignore_first_line', 'ignore', false, '', 'id="ignore"') . zen_draw_hidden_field('MAX_FILE_SIZE', return_bytes(ini_get(upload_max_filesize))) . '</th><td>' . zen_draw_file_field('file') . ' <input type="submit" name="upfile" value="' . PRODUCT_CSV_IMPORT_BUTTON . '" disabled="disabled" id="upfile"/><br/>
</form></td></tr></table></tr><tr><th>' . zen_draw_form('export', FILENAME_ADDON_MODULES_ADMIN, 'module=product_csv&action=export', 'post') . PRODUCT_CSV_EXPORT_TITLE . '</th></tr><tr><td><table border="0" width="100%" cellspacing="0" cellpadding="0" class="tableLayout3">
<tr>
<th width="40%"><label for="format">' . PRODUCT_CSV_FORMAT . ': </label></th><td>' . zen_draw_pull_down_menu('csv_format_id', $formats, '', 'id="format"') . '</td>
</tr>
<tr>
<th width="40%"><label for="category">' . PRODUCT_CSV_EXPORT_CATEGORY . ': </label></th><td>' . zen_draw_pull_down_menu('category_id', zen_get_category_tree(), '', 'id="category"') . '</td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" name="downfile" value="' . PRODUCT_CSV_EXPORT_BUTTON . '"/></td>
</form>
</tr>
</table>
</td></tr>';
}
$zco_notifier->notify('NOTIFY_PRODUCT_CSV_FINISH_BODY_GENERATE');
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php
echo HTML_PARAMS;
?>
>
开发者ID:homework-bazaar,项目名称:zencart-sugu,代码行数:31,代码来源:admin.php
示例15: zen_draw_pull_down_menu
$catcount++;
for ($i = 1; $i < $catcount; $i++) {
$texttempcat2 = $categoriesarr[$i][text];
$idtempcat2 = $categoriesarr[$i][id];
$categoriesarr[$i][id] = $idtempcat1;
$categoriesarr[$i][text] = $texttempcat1;
$texttempcat1 = $texttempcat2;
$idtempcat1 = $idtempcat2;
}
$categoriesarr[0][text] = "Choose Category";
$categoriesarr[0][id] = 0.5;
$categoryselectoutput = zen_draw_pull_down_menu('add_product_categories_id', $categoriesarr, $current_category_id, 'onChange="this.form.submit();"');
$categoryselectoutput = str_replace('<option value="0" SELECTED>', '<option value="0">', $categoryselectoutput);
$categoryselectoutput = str_replace('<option value=".5">', '<option value=".5" SELECTED>', $categoryselectoutput);
} else {
$categoryselectoutput = zen_draw_pull_down_menu('add_product_categories_id', zen_get_category_tree(), $current_category_id, 'onChange="this.form.submit();"');
}
echo "<tr class='dataTableRow'>" . zen_draw_form('add_prdct', FILENAME_ORDER_EDIT, zen_get_all_get_params(array('action', 'oID')) . 'oID=' . $oID . '&action=add_prdct', 'post', '', true);
// echo "<tr class=\"dataTableRow\"><form action='$PHP_SELF?oID=$oID&action=$action' method='POST'>\n";
echo "<td class='dataTableContent' align='right'><strong>" . ADDPRODUCT_TEXT_STEP1 . "</strong></td><td class='dataTableContent' valign='top'>";
echo ' ' . $categoryselectoutput;
echo "<input type='hidden' name='step' value='2'>";
echo "</td>\n";
echo "</form></tr>\n";
echo "<tr><td colspan='3'> </td></tr>\n";
// Step 2: Choose Product
if ($step > 1 && $add_product_categories_id != 0.5) {
echo "<tr class='dataTableRow'>" . zen_draw_form('add_prdct', FILENAME_ORDER_EDIT, zen_get_all_get_params(array('action', 'oID')) . 'oID=' . $oID . '&action=add_prdct', 'post', '', true);
// echo "<tr class=\"dataTableRow\"><form action='$PHP_SELF?oID=$oID&action=$action' method='post'>\n";
echo "<td class='dataTableContent' align='right'><strong>" . ADDPRODUCT_TEXT_STEP2 . "</strong></td><td class='dataTableContent' valign='top'><select name=\"add_product_products_id\" onChange=\"this.form.submit();\">";
$ProductOptions = "<option value='0'>" . ADDPRODUCT_TEXT_SELECT_PRODUCT . "\n";
开发者ID:homework-bazaar,项目名称:zencart-sugu,代码行数:31,代码来源:edit_orders.php
示例16: zen_get_category_tree
function zen_get_category_tree($parent_id = '0', $spacing = '', $exclude = '', $category_tree_array = '', $include_itself = false, $category_has_products = false, $limit = false)
{
global $db;
if ($limit) {
$limit_count = " limit 1";
} else {
$limit_count = '';
}
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 = $db->Execute("select cd.categories_name\n from " . TABLE_CATEGORIES_DESCRIPTION . " cd\n where cd.language_id = '" . (int) $_SESSION['languages_id'] . "'\n and cd.categories_id = '" . (int) $parent_id . "'");
$category_tree_array[] = array('id' => $parent_id, 'text' => $category->fields['categories_name']);
}
$categories = $db->Execute("select c.categories_id, cd.categories_name, c.parent_id\n from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd\n where c.categories_id = cd.categories_id\n and cd.language_id = '" . (int) $_SESSION['languages_id'] . "'\n and c.parent_id = '" . (int) $parent_id . "'\n order by c.sort_order, cd.categories_name");
while (!$categories->EOF) {
if ($category_has_products == true and zen_products_in_category_count($categories->fields['categories_id'], '', false, true) >= 1) {
$mark = '*';
} else {
$mark = ' ';
}
if ($exclude != $categories->fields['categories_id']) {
$category_tree_array[] = array('id' => $categories->fields['categories_id'], 'text' => $spacing . $categories->fields['categories_name'] . $mark);
}
$category_tree_array = zen_get_category_tree($categories->fields['categories_id'], $spacing . ' ', $exclude, $category_tree_array, '', $category_has_products);
$categories->MoveNext();
}
return $category_tree_array;
}
开发者ID:kirkbauer2,项目名称:kirkzc,代码行数:33,代码来源:general.php
示例17: zen_draw_pull_down_menu
<?php
global $gBitSmarty;
$gBitSmarty->assign('currentCategoryId', $current_category_id);
$gBitSmarty->assign('catMenu', zen_draw_pull_down_menu('cPath', zen_get_category_tree(), $current_category_id, 'onChange="this.form.submit();"'));
$catListHash = $_REQUEST;
if (isset($_GET['search'])) {
$prodListHash['search'] = $_GET['search'];
$catListHash['search'] = $_GET['search'];
} else {
$catListHash['parent_id'] = $current_category_id;
}
$catCount = 0;
if ($catList = CommerceCategory::getList($catListHash)) {
$catCount = count($catList);
if ($gCommerceSystem->isConfigActive('SHOW_COUNTS_ADMIN')) {
foreach (array_keys($catList) as $catId) {
$catList[$catId]['total_products'] = zen_get_products_to_categories($catId, true);
$catList[$catId]['total_products_on'] = zen_get_products_to_categories($catId, false);
}
}
$gBitSmarty->assign('catList', $catList);
$gBitSmarty->assign('catListHash', $catListHash);
}
$gBitSmarty->assign('catCount', $catCount);
$product = new CommerceProduct();
$offset = new splitPageResults($_GET['page'], MAX_DISPLAY_RESULTS_CATEGORIES, $products_query_raw, $products_query_numrows);
$prodListHash = $_REQUEST;
$prodListHash['all_status'] = 1;
$prodListHash['category_id'] = $current_category_id;
if ($prodList = $product->getList($prodListHash)) {
开发者ID:bitweaver,项目名称:commerce,代码行数:31,代码来源:category_product_listing.php
示例18: zen_db_input
if (isset($_GET['search']) && zen_not_null($_GET['search'])) {
$keywords = zen_db_input(zen_db_prepare_input($_GET['search']));
echo '<br />' . TEXT_INFO_SEARCH_DETAIL_FILTER . $keywords;
}
echo '</form>';
?>
</td>
</tr>
<tr>
<td class="smallText" align="right">
<?php
if ($_SESSION['display_categories_dropdown'] == 0) {
echo '<a href="' . zen_href_link(FILENAME_CATEGORIES, 'set_display_categories_dropdown=1&cID=' . $categories->fields['categories_id'] . '&cPath=' . $cPath . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '')) . '">' . zen_image(DIR_WS_ICONS . 'cross.gif', IMAGE_ICON_STATUS_OFF) . '</a> ';
echo zen_draw_form('goto', FILENAME_CATEGORIES, '', 'get');
echo zen_hide_session_id();
echo HEADING_TITLE_GOTO . ' ' . zen_draw_pull_down_menu('cPath', zen_get_category_tree(), $current_category_id, 'onChange="this.form.submit();"');
echo '</form>';
} else {
echo '<a href="' . zen_href_link(FILENAME_CATEGORIES, 'set_display_categories_dropdown=0&cID=' . $categories->fields['categories_id'] . '&cPath=' . $cPath . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '')) . '">' . zen_image(DIR_WS_ICONS . 'tick.gif', IMAGE_ICON_STATUS_ON) . '</a> ';
echo HEADING_TITLE_GOTO;
}
?>
</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
开发者ID:ygeneration666,项目名称:ec,代码行数:31,代码来源:category_product_listing.php
示例19: mysqli_query
if ($ep_uses_mysqli) {
$manufacturers_query = mysqli_query($db->link, "SELECT manufacturers_id, manufacturers_name FROM " . TABLE_MANUFACTURERS . " ORDER BY manufacturers_name");
while ($manufacturers = mysqli_fetch_array($manufacturers_query)) {
$manufacturers_array[] = array("id" => $manufacturers['manufacturers_id'], 'text' => $manufacturers['manufacturers_name']);
}
} else {
$manufacturers_query = mysql_query("SELECT manufacturers_id, manufacturers_name FROM " . TABLE_MANUFACTURERS . " ORDER BY manufacturers_name");
while ($manufacturers = mysql_fetch_array($manufacturers_query)) {
$manufacturers_array[] = array("id" => $manufacturers['manufacturers_id'], 'text' => $manufacturers['manufacturers_name']);
}
}
$status_array = array(array("id" => '1', 'text' => "Status"), array("id" => '1', 'text' => "active"), array("id" => '0', 'text' => "inactive"), array("id" => '3', 'text' => "all&quo
|
请发表评论