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


PHP fn_get_category_name函数代码示例

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


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

示例1: fn_br_get_product_main_category_link

/**
 * Gets product main category products link
 *
 * @param int $product_id Product identifier
 * @return array Breadcrumb link data
 */
function fn_br_get_product_main_category_link($product_id)
{
    $result = array();
    $category_id = db_get_field('SELECT category_id FROM ?:products_categories WHERE product_id = ?i and link_type = ?s', $product_id, 'M');
    if (!empty($category_id)) {
        $result = array('title' => __('category') . ': ' . fn_get_category_name($category_id), 'link' => "products.manage.reset_view?cid=" . $category_id);
    }
    return $result;
}
开发者ID:askzap,项目名称:ultimate,代码行数:15,代码来源:backend.functions.php

示例2: fn_exim_get_product_feature_categories

function fn_exim_get_product_feature_categories($data, $lang_code)
{
    $categories = '';
    if (empty($data['Group'])) {
        $categories = fn_get_category_name($data['Categories'], $lang_code);
        if (is_array($categories)) {
            $categories = implode(',', $categories);
        }
    }
    return $categories;
}
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:11,代码来源:features.functions.php

示例3: fn_google_anaylitics_send

function fn_google_anaylitics_send($account, $order_info, $refuse = false)
{
    $_uwv = '1';
    $url = "http://www.google-analytics.com/__utm.gif";
    $sign = $refuse == true ? '-' : '';
    $cookies = fn_google_analytics_cookies();
    // Transaction request
    // http://www.google-analytics.com/__utm.gif?utmwv=1&utmt=tran&utmn=262780020&utmtid=80&utmtto=3.96&utmttx=0&utmtsp=0.00&utmtci=Boston&utmtrg=MA&utmtco=United%20States&utmac=ASSASAS&utmcc=__utma%3D81851599.2062069588.1182951649.1183008786.1183012376.3%3B%2B__utmb%3D81851599%3B%2B__utmc%3D81851599%3B%2B__utmz%3D81851599.1182951649.1.1.utmccn%3D(direct)%7Cutmcsr%3D(direct)%7Cutmcmd%3D(none)%3B%2B
    $transaction = array('utmwv' => $_uwv, 'utmt' => 'tran', 'utmn' => rand(0, 2147483647), 'utmtid' => $order_info['order_id'], 'utmtto' => $sign . $order_info['total'], 'utmttx' => $order_info['tax_subtotal'], 'utmtsp' => $order_info['shipping_cost'], 'utmtci' => $order_info['b_city'], 'utmtrg' => $order_info['b_state'], 'utmtco' => $order_info['b_country_descr'], 'utmac' => $account, 'utmcc' => $cookies);
    list(, $result) = fn_http_request('GET', $url, $transaction);
    // Items request
    //http://www.google-analytics.com/__utm.gif?utmwv=1&utmt=item&utmn=812678190&utmtid=80&utmipc=B00078MG5M&utmipn=100%25%20Cotton%20Adult%2FYouth%20Beefy%20T-Shirt%20by%20Hanes%20(Style%23%205180)&utmipr=4.50&utmiqt=1&utmac=ASSASAS&utmcc=
    foreach ($order_info['items'] as $item) {
        $cat_id = db_get_field("SELECT category_id FROM ?:products_categories WHERE product_id = ?i AND link_type = 'M'", $item['product_id']);
        $i = array('utmwv' => $_uwv, 'utmt' => 'item', 'utmn' => rand(0, 2147483647), 'utmtid' => $order_info['order_id'], 'utmipc' => $item['product_code'], 'utmipn' => $item['product'], 'utmiva' => fn_get_category_name($cat_id, $order_info['lang_code']), 'utmipr' => $sign . fn_format_price($item['subtotal'] / $item['amount']), 'utmiqt' => $item['amount'], 'utmac' => $account, 'utmcc' => $cookies);
        list(, $result) = fn_http_request('GET', $url, $i);
    }
}
开发者ID:diedsmiling,项目名称:busenika,代码行数:18,代码来源:func.php

示例4: fn_twg_set_response_homepage

/**
 * Returns info for homepage
 * @param object $response
 */
function fn_twg_set_response_homepage(&$response)
{
    $home_page_content = TwigmoSettings::get('home_page_content');
    if (empty($home_page_content)) {
        $home_page_content = 'random_products';
    }
    if ($home_page_content == 'home_page_blocks' or $home_page_content == 'tw_home_page_blocks') {
        // Use block manager: get blocks
        if ($home_page_content == 'home_page_blocks') {
            $location = 'index.index';
        } else {
            $location = 'twigmo.post';
        }
        $blocks = TwigmoBlock::getBlocksForLocation($location, TwigmoSettings::get('block_types'));
        // Return blocks
        $response->setData($blocks);
    } else {
        $block = array();
        // Random products or category products
        if ($home_page_content == 'random_products') {
            $product_ids = fn_twg_get_random_ids(TWG_RESPONSE_ITEMS_LIMIT, 'product_id', '?:products', db_quote("status = ?s", 'A'));
            $block['title'] = 'random_products';
        } else {
            $product_ids = fn_twg_get_category_product_ids($home_page_content, false) or array();
            $block['title'] = fn_get_category_name($home_page_content);
        }
        list($block['products']) = fn_twg_api_get_products(array('pid' => $product_ids), count($product_ids));
        $block['total_items'] = count($block['products']);
        $response->setData(array($block));
    }
}
开发者ID:arpad9,项目名称:bygmarket,代码行数:35,代码来源:func.php

示例5: fn_top_menu_form

/**
 * Form top menu
 *
 * @param array $top_menu Top menu data from the database
 * @param int $level Current menu level
 * @param boolean $active Menu item active flag, returned by reference to set tree branch as active
 *
 * @return array Formed top menu
 */
function fn_top_menu_form($top_menu, $level = 0, &$active = NULL)
{
    /**
     * Modifies top menu forming parameters
     *
     * @param array $top_menu Top menu data from the database
     * @param int $level Current menu level
     * @param boolean $active Menu item active flag
     */
    fn_set_hook('top_menu_form_pre', $top_menu, $level, $active);
    $_active = false;
    foreach ($top_menu as $k => $v) {
        if (!empty($v['param_3'])) {
            // get extra items
            list($type, $id, $use_name) = fn_explode(':', $v['param_3']);
            if ($type == 'C') {
                // categories
                $cats = fn_get_categories_tree($id, true);
                $v['subitems'] = fn_array_merge(fn_top_menu_standardize($cats, 'category_id', 'category', 'subcategories', 'categories.view?category_id='), !empty($v['subitems']) ? $v['subitems'] : array(), false);
                if ($use_name == 'Y' && !empty($id)) {
                    $v['descr'] = fn_get_category_name($id);
                    $v['param'] = 'categories.view?category_id=' . $id;
                }
                //Should add this checking because the same pages can have different request parameters and the next checking
                //with fn_top_menu_is_current_url function could return incorrect result.
                //For example: categories.view?category_id=165 and categories.view?category_id=165&currency=EUR should have the same active elements.
                if (fn_check_is_active_menu_item(array('category_id' => $id), 'categories')) {
                    $top_menu[$k]['active'] = true;
                }
            } elseif ($type == 'A') {
                // pages
                $params = array('from_page_id' => $id, 'get_tree' => 'multi_level', 'status' => 'A');
                list($pages) = fn_get_pages($params);
                $v['subitems'] = fn_array_merge(fn_top_menu_standardize($pages, 'page_id', 'page', 'subpages', 'pages.view?page_id='), !empty($v['subitems']) ? $v['subitems'] : array(), false);
                if ($use_name == 'Y' && !empty($id)) {
                    $page_data = fn_get_page_data($id);
                    $v['descr'] = $page_data['page'];
                    $v['param'] = !empty($page_data['link']) ? $page_data['link'] : 'pages.view?page_id=' . $id;
                }
                if (fn_check_is_active_menu_item(array('page_id' => $id), 'pages')) {
                    $top_menu[$k]['active'] = true;
                }
            } else {
                // for addons
                /**
                 * Deprecated since 4.3.6, use top_menu_form_post instead
                 */
                fn_set_hook('top_menu_form', $v, $type, $id, $use_name);
            }
        }
        if (!empty($v['param']) && fn_top_menu_is_current_url($v['param'], $v['param_2'])) {
            $top_menu[$k]['active'] = true;
            // Store active value
            $_active = true;
        }
        if (!empty($v['subitems'])) {
            $top_menu[$k]['subitems'] = fn_top_menu_form($v['subitems'], $level + 1, $active);
            // If active status was returned fron children
            if ($active) {
                $top_menu[$k]['active'] = $active;
                // Strore fo return and reset activity status for athother elements on this level
                // Because in one level may be only one active item
                $_active = true;
                $active = false;
            }
        }
        $top_menu[$k]['item'] = $v['descr'];
        $top_menu[$k]['href'] = $v['param'];
        $top_menu[$k]['level'] = $level;
        unset($top_menu[$k]['descr'], $top_menu[$k]['param']);
    }
    $active = $_active;
    /**
     * Modifies top menu items
     *
     * @param array $top_menu Top menu data from the database
     * @param int $level Current menu level
     * @param boolean $active Menu item active flag
     */
    fn_set_hook('top_menu_form_post', $top_menu, $level, $active);
    return $top_menu;
}
开发者ID:ambient-lounge,项目名称:site,代码行数:91,代码来源:fn.cms.php

示例6: fn_add_breadcrumb

 }
 // [Breadcrumbs]
 fn_add_breadcrumb(fn_get_lang_var('plans'), "affiliate_plans.manage");
 // [/Breadcrumbs]
 // [Page sections]
 Registry::set('navigation.tabs', array('general' => array('title' => fn_get_lang_var('general'), 'js' => true), 'linked_products' => array('title' => fn_get_lang_var('products'), 'js' => true), 'linked_categories' => array('title' => fn_get_lang_var('categories'), 'js' => true), 'coupons' => array('title' => fn_get_lang_var('coupons'), 'js' => true), 'multi_tier_affiliates' => array('title' => fn_get_lang_var('multi_tier_affiliates'), 'js' => true)));
 // [/Page sections]
 $linked_products = array();
 foreach ($affiliate_plan['product_ids'] as $prod_id => $sale) {
     $linked_products[$prod_id] = fn_get_product_data($prod_id, $auth, DESCR_SL);
     $linked_products[$prod_id]['sale'] = $sale;
 }
 $view->assign('linked_products', $linked_products);
 $linked_categories = array();
 foreach ($affiliate_plan['category_ids'] as $cat_id => $sale) {
     $linked_categories[$cat_id]['category'] = fn_get_category_name($cat_id, DESCR_SL);
     $linked_categories[$cat_id]['category_id'] = $cat_id;
     $linked_categories[$cat_id]['sale'] = $sale;
 }
 $view->assign('linked_categories', $linked_categories);
 $params = array('promotion_id' => empty($affiliate_plan['promotion_ids']) ? array('0' => 0) : array_keys($affiliate_plan['promotion_ids']));
 list($affiliate_plan['coupons']) = fn_get_promotions($params);
 foreach ($affiliate_plan['coupons'] as $promotion_id => $coupon_data) {
     if (isset($affiliate_plan['promotion_ids'][$promotion_id])) {
         $affiliate_plan['coupons'][$promotion_id]['use_coupon'] = $affiliate_plan['promotion_ids'][$promotion_id];
     }
 }
 $params = array('coupons' => true);
 list($coupons) = fn_get_promotions($params);
 foreach (array_keys($affiliate_plan['promotion_ids']) as $promotion_id) {
     unset($coupons[$promotion_id]);
开发者ID:diedsmiling,项目名称:busenika,代码行数:31,代码来源:affiliate_plans.php

示例7: fn_top_menu_form

/**
 * Form top menu
 *
 * @param array $top_menu top menu data from the database
 * @return array formed top menu
 */
function fn_top_menu_form($top_menu)
{
    foreach ($top_menu as $k => $v) {
        if (!empty($v['param_3'])) {
            // get extra items
            list($type, $id, $use_name) = fn_explode(':', $v['param_3']);
            if ($type == 'C') {
                // categories
                $cats = fn_get_categories_tree($id, true);
                $v['subitems'] = fn_array_merge(fn_top_menu_standardize($cats, 'category_id', 'category', 'subcategories', 'categories.view?category_id=', $v['param_4']), !empty($v['subitems']) ? $v['subitems'] : array(), false);
                if ($use_name == 'Y' && !empty($id)) {
                    $v['descr'] = fn_get_category_name($id);
                    $v['param'] = 'categories.view?category_id=' . $id;
                }
            } elseif ($type == 'A') {
                // pages
                $params = array('from_page_id' => $id, 'get_tree' => 'multi_level', 'status' => 'A');
                list($pages) = fn_get_pages($params);
                $v['subitems'] = fn_array_merge(fn_top_menu_standardize($pages, 'page_id', 'page', 'subpages', 'pages.view?page_id=', $v['param_4']), !empty($v['subitems']) ? $v['subitems'] : array(), false);
                if ($use_name == 'Y' && !empty($id)) {
                    $v['descr'] = fn_get_page_name($id);
                    $v['param'] = 'pages.view?page_id=' . $id;
                }
            } else {
                // for addons
                fn_set_hook('top_menu_form', $v, $type, $id, $use_name);
            }
        }
        if (!empty($v['subitems'])) {
            $top_menu[$k]['subitems'] = fn_top_menu_form($v['subitems']);
        }
        $top_menu[$k]['item'] = $v['descr'];
        $top_menu[$k]['href'] = $v['param'];
        unset($top_menu[$k]['descr'], $top_menu[$k]['param']);
    }
    return $top_menu;
}
开发者ID:diedsmiling,项目名称:busenika,代码行数:43,代码来源:init.php

示例8: fn_get_categories_list

function fn_get_categories_list($category_ids, $lang_code = CART_LANGUAGE)
{
    /**
     * Change params for getting categories list
     *
     * @param array  $category_ids Category identifier
     * @param string $lang_code    Two-letter language code (e.g. 'en', 'ru', etc.)
     */
    fn_set_hook('get_categories_list_pre', $category_ids, $lang_code);
    static $max_categories = 10;
    $c_names = array();
    if (!empty($category_ids)) {
        $c_ids = fn_explode(',', $category_ids);
        $tr_c_ids = array_slice($c_ids, 0, $max_categories);
        $c_names = fn_get_category_name($tr_c_ids, $lang_code);
        if (sizeof($tr_c_ids) < sizeof($c_ids)) {
            $c_names[] = '... (' . sizeof($c_ids) . ')';
        }
    } else {
        $c_names[] = __('all_categories');
    }
    /**
     * Change categories list
     *
     * @param array  $c_names      Categories names list
     * @param array  $category_ids Category identifier
     * @param string $lang_code    Two-letter language code (e.g. 'en', 'ru', etc.)
     */
    fn_set_hook('get_categories_list_post', $c_names, $category_ids, $lang_code);
    return $c_names;
}
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:31,代码来源:fn.catalog.php

示例9: fn_price_list_build_category_name

function fn_price_list_build_category_name($id_path)
{
    $result = array();
    $cat_ids = explode('/', $id_path);
    if (!empty($cat_ids)) {
        $cats = fn_get_category_name($cat_ids);
        foreach ($cats as $cat_id => $cat_name) {
            $result[] = $cat_name;
        }
    }
    return implode(' - ', $result);
}
开发者ID:askzap,项目名称:ultimate,代码行数:12,代码来源:func.php

示例10: header

    header("Content-disposition: attachment; filename={$action}.html");
    echo $file_content;
    exit;
}
$affiliate_plan = fn_get_affiliate_plan_data_by_partner_id($auth['user_id']);
if (!empty($affiliate_plan['plan_id'])) {
    $affiliate_plan['min_payment'] = floatval($affiliate_plan['min_payment']);
    $linked_products = array();
    foreach ($affiliate_plan['product_ids'] as $prod_id => $sale) {
        $linked_products[$prod_id] = fn_get_product_data($prod_id, $auth);
        $linked_products[$prod_id]['sale'] = $sale;
    }
    $view->assign('linked_products', $linked_products);
    $linked_categories = array();
    foreach ($affiliate_plan['category_ids'] as $cat_id => $sale) {
        $linked_categories[$cat_id]['category'] = fn_get_category_name($cat_id, CART_LANGUAGE);
        $linked_categories[$cat_id]['category_id'] = $cat_id;
        $linked_categories[$cat_id]['sale'] = $sale;
    }
    $view->assign('linked_categories', $linked_categories);
    $params = array('promotion_id' => array_keys($affiliate_plan['promotion_ids']), 'expand' => true);
    list($coupons) = fn_get_promotions($params);
    $aff_prefix = Registry::get('addons.affiliate.coupon_prefix_delim');
    foreach ($coupons as $promotion_id => $coupon_data) {
        if (isset($affiliate_plan['promotion_ids'][$promotion_id])) {
            $coupons[$promotion_id]['use_coupon'] = $affiliate_plan['promotion_ids'][$promotion_id];
            foreach ($coupons[$promotion_id]['conditions']['conditions'] as $cnd) {
                if ($cnd['condition'] == 'coupon_code') {
                    if (Registry::get('addons.affiliate.use_affiliate_id') == 'Y' && $aff_prefix) {
                        $coupons[$promotion_id]['coupon_code'] = $auth['user_id'] . $aff_prefix . $cnd['value'];
                    } else {
开发者ID:diedsmiling,项目名称:busenika,代码行数:31,代码来源:affiliate_plans.php

示例11: die

<?php

/***************************************************************************
*                                                                          *
*   (c) 2004 Vladimir V. Kalynyak, Alexey V. Vinokurov, Ilya M. Shalnev    *
*                                                                          *
* This  is  commercial  software,  only  users  who have purchased a valid *
* license  and  accept  to the terms of the  License Agreement can install *
* and use this program.                                                    *
*                                                                          *
****************************************************************************
* PLEASE READ THE FULL TEXT  OF THE SOFTWARE  LICENSE   AGREEMENT  IN  THE *
* "copyright.txt" FILE PROVIDED WITH THIS DISTRIBUTION PACKAGE.            *
****************************************************************************/
if (!defined('BOOTSTRAP')) {
    die('Access denied');
}
use Tygh\Registry;
$viewed_categories = db_get_array('SELECT * FROM ?:advanced_addon_data');
if (!empty($viewed_categories)) {
    foreach ($viewed_categories as $key => $category_data) {
        $category_data['user_name'] = fn_get_user_name($category_data['user_id']);
        $category_data['categories'] = unserialize($category_data['categories']);
        $category_data['categories'] = fn_get_category_name(array_keys($category_data['categories']));
        $viewed_categories[$key] = $category_data;
    }
    Registry::get('view')->assign('viewed_categories', $viewed_categories);
}
开发者ID:AlanIsrael0,项目名称:market,代码行数:28,代码来源:index.post.php

示例12: fn_top_menu_form

/**
 * Form top menu
 *
 * @param array $top_menu top menu data from the database
 * @param int $level current menu level
 * @param boolean $active - menu item active flag, returned by reference to set tree branch as active
 * @return array formed top menu
 */
function fn_top_menu_form($top_menu, $level = 0, &$active = NULL)
{
    $_active = false;
    foreach ($top_menu as $k => $v) {
        if (!empty($v['param_3'])) {
            // get extra items
            list($type, $id, $use_name) = fn_explode(':', $v['param_3']);
            if ($type == 'C') {
                // categories
                $cats = fn_get_categories_tree($id, true);
                $v['subitems'] = fn_array_merge(fn_top_menu_standardize($cats, 'category_id', 'category', 'subcategories', 'categories.view?category_id='), !empty($v['subitems']) ? $v['subitems'] : array(), false);
                if ($use_name == 'Y' && !empty($id)) {
                    $v['descr'] = fn_get_category_name($id);
                    $v['param'] = 'categories.view?category_id=' . $id;
                }
            } elseif ($type == 'A') {
                // pages
                $params = array('from_page_id' => $id, 'get_tree' => 'multi_level', 'status' => 'A');
                list($pages) = fn_get_pages($params);
                $v['subitems'] = fn_array_merge(fn_top_menu_standardize($pages, 'page_id', 'page', 'subpages', 'pages.view?page_id='), !empty($v['subitems']) ? $v['subitems'] : array(), false);
                if ($use_name == 'Y' && !empty($id)) {
                    $page_data = fn_get_page_data($id);
                    $v['descr'] = $page_data['page'];
                    $v['param'] = !empty($page_data['link']) ? $page_data['link'] : 'pages.view?page_id=' . $id;
                }
            } else {
                // for addons
                fn_set_hook('top_menu_form', $v, $type, $id, $use_name);
            }
        }
        if (!empty($v['param']) && fn_top_menu_is_current_url($v['param'], $v['param_2'])) {
            $top_menu[$k]['active'] = true;
            // Store active value
            $_active = true;
        }
        if (!empty($v['subitems'])) {
            $top_menu[$k]['subitems'] = fn_top_menu_form($v['subitems'], $level + 1, $active);
            // If active status was returned fron children
            if ($active) {
                $top_menu[$k]['active'] = $active;
                // Strore fo return and reset activity status for athother elements on this level
                // Because in one level may be only one active item
                $_active = true;
                $active = false;
            }
        }
        $top_menu[$k]['item'] = $v['descr'];
        $top_menu[$k]['href'] = $v['param'];
        $top_menu[$k]['level'] = $level;
        unset($top_menu[$k]['descr'], $top_menu[$k]['param']);
    }
    $active = $_active;
    return $top_menu;
}
开发者ID:heg-arc-ne,项目名称:cscart,代码行数:62,代码来源:fn.cms.php

示例13: fn_convert_group_data

function fn_convert_group_data($group_data)
{
    if (!empty($group_data)) {
        $group_data['name'] = empty($group_data['name']) ? '' : $group_data['name'];
        if (!empty($group_data['link_to']) && !empty($group_data['data'])) {
            if ($group_data['link_to'] == 'C') {
                $group_data['categories'] = fn_get_category_name($group_data['data'], CART_LANGUAGE, true);
            } elseif ($group_data['link_to'] == 'P') {
                $group_data['product_ids'] = explode(',', $group_data['data']);
            } elseif ($group_data['link_to'] == 'U') {
                $group_data['url'] = $group_data['data'];
            }
            unset($group_data['data']);
        }
    }
    return empty($group_data) ? false : $group_data;
}
开发者ID:diedsmiling,项目名称:busenika,代码行数:17,代码来源:func.php

示例14: content_55d3121dc74e80_73018261

    function content_55d3121dc74e80_73018261($_smarty_tpl)
    {
        if (!is_callable('smarty_function_math')) {
            include '/home/coriolan/public_html/lead/app/lib/other/smarty/plugins/function.math.php';
        }
        if (!is_callable('smarty_function_set_id')) {
            include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/function.set_id.php';
        }
        fn_preload_lang_vars(array('remove', 'remove'));
        if ($_smarty_tpl->tpl_vars['runtime']->value['customization_mode']['design'] == "Y" && @constant('AREA') == "C") {
            $_smarty_tpl->_capture_stack[0][] = array("template_content", null, null);
            ob_start();
            if ($_smarty_tpl->tpl_vars['category_id']->value == "0") {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["category"] = new Smarty_variable($_smarty_tpl->tpl_vars['default_name']->value, null, 0);
            } else {
                ?>
    <?php 
                $_smarty_tpl->tpl_vars["category"] = new Smarty_variable(($tmp = @fn_get_category_name($_smarty_tpl->tpl_vars['category_id']->value)) === null || $tmp === '' ? (string) $_smarty_tpl->tpl_vars['ldelim']->value . "category" . (string) $_smarty_tpl->tpl_vars['rdelim']->value : $tmp, null, 0);
            }
            ?>
<<?php 
            if ($_smarty_tpl->tpl_vars['single_line']->value) {
                ?>
span<?php 
            } else {
                ?>
p<?php 
            }
            ?>
 <?php 
            if (!$_smarty_tpl->tpl_vars['clone']->value) {
                ?>
id="<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['holder']->value, ENT_QUOTES, 'UTF-8');
                ?>
_<?php 
                echo htmlspecialchars($_smarty_tpl->tpl_vars['category_id']->value, ENT_QUOTES, 'UTF-8');
                ?>
" <?php 
            }
            ?>
class="cm-js-item ty-p-none<?php 
            if ($_smarty_tpl->tpl_vars['clone']->value) {
                ?>
 cm-clone hidden<?php 
            }
            ?>
">
<?php 
            if (!$_smarty_tpl->tpl_vars['first_item']->value && $_smarty_tpl->tpl_vars['single_line']->value) {
                ?>
<span class="cm-comma<?php 
                if ($_smarty_tpl->tpl_vars['clone']->value) {
                    ?>
 hidden<?php 
                }
                ?>
">,&nbsp;&nbsp;</span><?php 
            }
            if ($_smarty_tpl->tpl_vars['multiple']->value) {
                ?>
    <?php 
                if (!$_smarty_tpl->tpl_vars['hide_link']->value) {
                    ?>
    <?php 
                    if ($_smarty_tpl->tpl_vars['position_field']->value) {
                        ?>
<input type="text" name="<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['input_name']->value, ENT_QUOTES, 'UTF-8');
                        ?>
[<?php 
                        echo htmlspecialchars($_smarty_tpl->tpl_vars['category_id']->value, ENT_QUOTES, 'UTF-8');
                        ?>
]" value="<?php 
                        echo smarty_function_math(array('equation' => "a*b", 'a' => $_smarty_tpl->tpl_vars['position']->value, 'b' => 10), $_smarty_tpl);
                        ?>
" size="3" class="ty-input-text-short<?php 
                        if ($_smarty_tpl->tpl_vars['clone']->value) {
                            ?>
 disabled<?php 
                        }
                        ?>
"<?php 
                        if ($_smarty_tpl->tpl_vars['clone']->value) {
                            ?>
 disabled="disabled"<?php 
                        }
                        ?>
 />&nbsp;<?php 
                    }
                    ?>
<a href="<?php 
                    echo htmlspecialchars(fn_url("categories.update?category_id=" . (string) $_smarty_tpl->tpl_vars['category_id']->value), ENT_QUOTES, 'UTF-8');
                    ?>
"><?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['category']->value, ENT_QUOTES, 'UTF-8');
                    ?>
</a>
//.........这里部分代码省略.........
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:101,代码来源:91f0eda7714b4b8ed840491ac9b5cfe7e4e9e742.tygh.js.tpl.php

示例15: fn_ult_check_store_permission

function fn_ult_check_store_permission($params, &$redirect_controller)
{
    $result = true;
    $controller = Registry::get('runtime.controller');
    $redirect_controller = $controller;
    // FIXME: move in schema
    switch ($controller) {
        case 'products':
            if (!empty($params['product_id'])) {
                $key = 'product_id';
                $key_id = $params[$key];
                $table = 'products';
                $object_name = fn_get_product_name($key_id, DESCR_SL);
                $object_type = __('product');
                $check_store_permission = array('func' => 'fn_ult_check_store_permission_product', 'args' => array('$table', '$key', '$key_id'));
            }
            break;
        case 'categories':
            if (!empty($params['category_id'])) {
                $key = 'category_id';
                $key_id = $params[$key];
                $table = 'categories';
                $object_name = fn_get_category_name($key_id, DESCR_SL);
                $object_type = __('category');
            }
            break;
        case 'orders':
            if (!empty($params['order_id'])) {
                $key = 'order_id';
                $key_id = $params[$key];
                $table = 'orders';
                $object_name = '#' . $key_id;
                $object_type = __('order');
            }
            break;
        case 'shippings':
            if (!empty($params['shipping_id'])) {
                $key = 'shipping_id';
                $key_id = $params[$key];
                $table = 'shippings';
                $object_name = fn_get_shipping_name($key_id, DESCR_SL);
                $object_type = __('shipping');
            }
            break;
        case 'promotions':
            if (!empty($params['promotion_id'])) {
                $key = 'promotion_id';
                $key_id = $params[$key];
                $table = 'promotions';
                $object_name = fn_get_promotion_name($key_id, DESCR_SL);
                $object_type = __('promotion');
            }
            break;
        case 'pages':
            if (!empty($params['page_id'])) {
                $key = 'page_id';
                $key_id = $params[$key];
                $table = 'pages';
                $object_name = fn_get_page_name($key_id, DESCR_SL);
                $object_type = __('content');
            }
            break;
        case 'profiles':
            if (!empty($params['user_id'])) {
                $key = 'user_id';
                $key_id = $params[$key];
                $table = 'users';
                $object_name = fn_get_user_name($key_id, DESCR_SL);
                $object_type = __('user');
                $check_store_permission = array('func' => 'fn_ult_check_store_permission_profiles', 'args' => array('$params', '$table', '$key', '$key_id'));
            }
            break;
        case 'settings':
            if (!empty($params['section_id'])) {
                $object_name = $params['section_id'];
                $object_type = __('section');
                $table = 'settings';
                $check_store_permission = array('func' => 'fn_ult_check_store_permission_settings', 'args' => array('$object_name'));
            }
            break;
        case 'shipments':
            if (!empty($params['shipment_id'])) {
                $key = 'shipment_id';
                $key_id = $params[$key];
                $table = 'shipments';
                $object_name = '#' . $key_id;
                $object_type = __('shipment');
                $check_store_permission = array('func' => 'fn_ult_check_store_permission_shipments', 'args' => array('$key_id'));
            }
            break;
        case 'static_data':
            if (!empty($params['menu_id'])) {
                $key = 'menu_id';
                $key_id = $params[$key];
                $table = 'menus';
                $object_name = fn_get_menu_name($key_id);
                $object_type = __('menu');
                $redirect_controller = 'menus';
            }
            break;
//.........这里部分代码省略.........
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:101,代码来源:fn.ultimate.php


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