コード例 #1
0
<?php

$main_category_tree = new category_tree();
$row = 0;
$mobile_category_tree = $main_category_tree->zen_category_tree();
?>
<div id="cat" style="position: absolute; width: 100%; display: none; overflow: visible; min-height: 600px; z-index: 500; margin-top: 75px; background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(204, 204, 204, 1.0)), to(rgba(204, 204, 204, 0.50))); background-color: transparent;" class="ui-page ui-body-b">

	<div data-role="content" class="ui-content">	
		<ul data-role="listview" data-inset="true" class="ui-listview ui-listview-inset ui-corner-all ui-shadow">
		<?php 
for ($i = 0; $i < sizeof($mobile_category_tree); $i++) {
    ?>
			<li class="ui-li ui-li-static ui-body-c"><a href="category<?php 
    echo htmlspecialchars(preg_replace('/^cPath=/', '', $mobile_category_tree[$i]['path']));
    ?>
_1.htm?cPath=<?php 
    echo htmlspecialchars(preg_replace('/^cPath=/', '', $mobile_category_tree[$i]['path']));
    ?>
" class="ui-link"><?php 
    echo $mobile_category_tree[$i]['name'];
    ?>
 </a></li>
		<?php 
}
?>
		</ul>
	</div><!-- /content -->	
	
</div><!-- /page -->
コード例 #2
0
ファイル: mod_categories.php プロジェクト: bitweaver/commerce
// |zen-cart Open Source E-commerce                                       |
// +----------------------------------------------------------------------+
// | Copyright (c) 2004 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       |
// | license@zen-cart.com so we can mail you a copy immediately.          |
// +----------------------------------------------------------------------+
// $Id$
//
global $gBitDb, $gCommerceSystem, $gBitProduct;
require_once BITCOMMERCE_PKG_PATH . 'includes/bitcommerce_start_inc.php';
$main_category_tree = new category_tree();
$row = 0;
$box_categories_array = array();
// don't build a tree when no categories
if ($gBitDb->getOne("select `categories_id` from " . TABLE_CATEGORIES . " where `categories_status` = 1")) {
    $_template->tpl_vars['box_categories_array'] = new Smarty_variable($main_category_tree->zen_category_tree());
}
if (empty($moduleTitle)) {
    $_template->tpl_vars['moduleTitle'] = new Smarty_variable('Categories');
}
//	require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
コード例 #3
0
ファイル: categories.php プロジェクト: kirkbauer2/kirkzc
<?php

/**
 * categories sidebox - prepares content for the main categories sidebox
 *
 * @package templateSystem
 * @copyright Copyright 2003-2005 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: categories.php 2718 2005-12-28 06:42:39Z drbyte $
 */
$main_category_tree = new category_tree();
$row = 0;
$box_categories_array = array();
// don't build a tree when no categories
$check_categories = $db->Execute("select categories_id from " . TABLE_CATEGORIES . " where categories_status=1 limit 1");
if ($check_categories->RecordCount() > 0) {
    $box_categories_array = $main_category_tree->zen_category_tree();
}
require $template->get_template_dir('tpl_categories.php', DIR_WS_TEMPLATE, $current_page_base, 'sideboxes') . '/tpl_categories.php';
$title = BOX_HEADING_CATEGORIES;
$title_link = false;
require $template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base, 'common') . '/' . $column_box_default;
コード例 #4
0
ファイル: tpl_header.php プロジェクト: wwxgitcat/zencart_v1.0
			<div class="col-xs-12 col-sm-12 col-md-12 hidden-xs">
				<ul class="navbar">
			
					<li class="nav-item demo_nav"><a href="<?php 
echo zhlink();
?>
" title="<?php 
echo STORE_NAME;
?>
"><?php 
echo TEXT_HOME;
?>
</a></li>
					<?php 
$main_category_tree = new category_tree();
$main_category_tree->zen_category_tree();
$nav_count = 0;
foreach ((array) $main_category_tree->tree_parents[0] as $cate) {
    ?>
						<?php 
    if (++$nav_count >= (int) HEADER_NAV_SHOW_TOTAL) {
        break;
    }
    ?>
						<?php 
    if ($cate['is_top']) {
        ?>
						<li class="nav-item demo_nav">
							<div class="">
							<a href="<?php 
        echo zen_href_link(FILENAME_DEFAULT, 'cPath=' . $cate['path']);
コード例 #5
0
<?php

$main_category_tree1 = new category_tree();
$box_categories_arr2ay2 = array();
$box_categories_arr2 = array();
$tpl_categories2 = array();
$tpl_categories_top5 = array();
$categoriesortvalue2 = array();
$rand_num = 1;
// don't build a tree when no categories
$check_categories = $db->Execute("select categories_id from " . TABLE_CATEGORIES . " where categories_status=1 limit 1", false, true, CACHE_TIMELIFT);
if ($check_categories->RecordCount() > 0) {
    $box_categories_arr2ay2 = $main_category_tree1->zen_category_tree();
}
$idx = 0;
foreach ($box_categories_arr2ay2 as $category) {
    if ($category['parent_id'] != 0) {
        $box_categories_arr2[$category['parent_id']]['children'][$category['categories_id']] = $category;
        if ($category['has_sub_cat'] == 1) {
            foreach ($category as $key => $cate) {
                $box_categories_arr2[$category['categories_id']][$key] = $cate;
            }
        } else {
        }
    } else {
        foreach ($category as $key => $cate) {
            $box_categories_arr2[$category['categories_id']][$key] = $cate;
        }
    }
}
foreach ($box_categories_arr2 as $category) {
コード例 #6
0
// | Copyright (c) 2004 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       |
// | license@zen-cart.com so we can mail you a copy immediately.          |
// +----------------------------------------------------------------------+
// $Id$
//
global $gBitDb, $gCommerceSystem, $gBitProduct;
if (empty($gCommerceSystem)) {
    require_once BITCOMMERCE_PKG_PATH . 'includes/bitcommerce_start_inc.php';
}
$main_category_tree = new category_tree();
$row = 0;
$box_categories_array = array();
// don't build a tree when no categories
$check_categories = $gBitDb->getOne("select `categories_id` from " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCT_TYPES . " pt, " . TABLE_PRODUCT_TYPES_TO_CATEGORY . " ptc where pt.`type_master_type` = '3' and ptc.`product_type_id` = pt.`type_id` and c.`categories_id` = ptc.`category_id` and c.`categories_status`=1");
if ($check_categories) {
    $_template->tpl_vars['sideboxDocumentCategories'] = new Smarty_variable($main_category_tree->zen_category_tree('3'));
    if (empty($moduleTitle)) {
        $_template->tpl_vars['moduleTitle'] = new Smarty_variable('Documents');
    }
}