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


PHP goods_type_list函数代码示例

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


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

示例1: array

    $smarty->assign('attr_cat_id', $attr_cat_id);
    $smarty->assign('ur_here', $_LANG['category_edit']);
    $smarty->assign('action_link', array('text' => $_LANG['03_category_list'], 'href' => 'category.php?act=list'));
    //分类是否存在首页推荐
    $res = $db->getAll("SELECT recommend_type FROM " . $ecs->table("cat_recommend") . " WHERE cat_id=" . $cat_id);
    if (!empty($res)) {
        $cat_recommend = array();
        foreach ($res as $data) {
            $cat_recommend[$data['recommend_type']] = 1;
        }
        $smarty->assign('cat_recommend', $cat_recommend);
    }
    $smarty->assign('cat_info', $cat_info);
    $smarty->assign('form_act', 'update');
    $smarty->assign('cat_select', cat_list(0, $cat_info['parent_id'], true));
    $smarty->assign('goods_type_list', goods_type_list(0));
    // 取得商品类型
    /* 显示页面 */
    assign_query_info();
    $smarty->display('category_info.htm');
} elseif ($_REQUEST['act'] == 'add_category') {
    $parent_id = empty($_REQUEST['parent_id']) ? 0 : intval($_REQUEST['parent_id']);
    $category = empty($_REQUEST['cat']) ? '' : json_str_iconv(trim($_REQUEST['cat']));
    if (cat_exists($category, $parent_id)) {
        make_json_error($_LANG['catname_exist']);
    } else {
        $sql = "INSERT INTO " . $ecs->table('category') . "(cat_name, parent_id, is_show)" . "VALUES ( '{$category}', '{$parent_id}', 1)";
        $db->query($sql);
        $category_id = $db->insert_id();
        $arr = array("parent_id" => $parent_id, "id" => $category_id, "cat" => $category);
        clear_cache_files();
开发者ID:GYWang1983,项目名称:fruit,代码行数:31,代码来源:category.php

示例2: admin_priv

    admin_priv('attr_manage');
    /* 添加还是编辑的标识 */
    $is_add = $_REQUEST['act'] == 'add';
    $smarty->assign('form_act', $is_add ? 'insert' : 'update');
    /* 取得属性信息 */
    if ($is_add) {
        $goods_type = isset($_GET['goods_type']) ? intval($_GET['goods_type']) : 0;
        $attr = array('attr_id' => 0, 'cat_id' => $goods_type, 'attr_name' => '', 'attr_input_type' => 0, 'attr_index' => 0, 'attr_values' => '', 'attr_type' => 0, 'is_linked' => 0);
    } else {
        $sql = "SELECT * FROM " . $ecs->table('attribute') . " WHERE attr_id = '{$_REQUEST['attr_id']}'";
        $attr = $db->getRow($sql);
    }
    $smarty->assign('attr', $attr);
    $smarty->assign('attr_groups', get_attr_groups($attr['cat_id']));
    /* 取得商品分类列表 */
    $smarty->assign('goods_type_list', goods_type_list($attr['cat_id']));
    /* 模板赋值 */
    $smarty->assign('ur_here', $is_add ? $_LANG['10_attribute_add'] : $_LANG['52_attribute_add']);
    $smarty->assign('action_link', array('href' => 'attribute.php?act=list', 'text' => $_LANG['09_attribute_list']));
    /* 显示模板 */
    assign_query_info();
    $smarty->display('attribute_info.htm');
} elseif ($_REQUEST['act'] == 'insert' || $_REQUEST['act'] == 'update') {
    /* 检查权限 */
    admin_priv('attr_manage');
    /* 插入还是更新的标识 */
    $is_insert = $_REQUEST['act'] == 'insert';
    /* 检查名称是否重复 */
    $exclude = empty($_POST['attr_id']) ? 0 : intval($_POST['attr_id']);
    if (!$exc->is_only('attr_name', $_POST['attr_name'], $exclude, " cat_id = '{$_POST['cat_id']}'")) {
        sys_msg($_LANG['name_exist'], 1);
开发者ID:norain2050,项目名称:mhFault,代码行数:31,代码来源:attribute.php

示例3: get_member_price_list

             if ($rank_goods_start_num[$k]['user_rank'] == $user_rank_list[$k]['rank_id']) {
                 $user_rank_list[$k]['def_rank_start_num'] = $rank_goods_start_num[$k]['rank_goods_start_num'] ? 0 : $user_rank_list[$k]['rank_start_num'];
                 $user_rank_list[$k]['rank_start_num'] = $rank_goods_start_num[$k]['rank_goods_start_num'];
             }
         }
     }
 }
 $smarty->assign('user_rank_list', $user_rank_list);
 if (!$is_add) {
     $smarty->assign('member_price_list', get_member_price_list($_REQUEST['goods_id']));
 }
 $smarty->assign('link_goods_list', $link_goods_list);
 $smarty->assign('group_goods_list', $group_goods_list);
 $smarty->assign('goods_article_list', $goods_article_list);
 $smarty->assign('img_list', img_list($img_list));
 $smarty->assign('goods_type_list', goods_type_list($goods['goods_type']));
 $smarty->assign('gd', gd_version());
 $smarty->assign('thumb_width', $_CFG['thumb_width']);
 $smarty->assign('thumb_height', $_CFG['thumb_height']);
 $smarty->assign('goods_attr_html', build_attr_html($goods['goods_type'], $goods['goods_id']));
 $volume_price_list = '';
 if (isset($_REQUEST['goods_id'])) {
     $volume_price_list = get_volume_price_list($_REQUEST['goods_id']);
 }
 if (empty($volume_price_list)) {
     $volume_price_list = array('0' => array('number' => '', 'price' => ''));
 }
 $smarty->assign('volume_price_list', $volume_price_list);
 /* 显示商品信息页面 */
 assign_query_info();
 $smarty->display('goods_info.htm');
开发者ID:dlpc,项目名称:ecshop,代码行数:31,代码来源:goods.php

示例4: get_cat_info

    // 权限检查
    $cat_info = get_cat_info(intval($_REQUEST['cat_id']));
    // 查询分类信息数据
    $attr_list = get_attr_list();
    if ($cat_info['filter_attr']) {
        $attr_cat_id = $db->getOne("SELECT cat_id FROM " . $ecs->table('attribute') . " WHERE attr_id = '{$cat_info['filter_attr']}'");
        $attr_option = array();
        foreach ($attr_list[$attr_cat_id] as $val) {
            $attr_option[key($val)] = current($val);
        }
        $smarty->assign('attr_option', $attr_option);
    } else {
        $attr_cat_id = 0;
    }
    /* 模板赋值 */
    $smarty->assign('goods_type_list', goods_type_list($attr_cat_id));
    // 取得商品类型
    $smarty->assign('attr_list', $attr_list);
    // 取得商品属性
    $smarty->assign('attr_cat_id', $attr_cat_id);
    $smarty->assign('ur_here', $_LANG['category_edit']);
    $smarty->assign('action_link', array('text' => $_LANG['03_category_list'], 'href' => 'category.php?act=list'));
    $smarty->assign('cat_info', $cat_info);
    $smarty->assign('form_act', 'update');
    $smarty->assign('cat_select', cat_list(0, $cat_info['parent_id'], true));
    /* 显示页面 */
    assign_query_info();
    $smarty->display('category_info.htm');
} elseif ($_REQUEST['act'] == 'add_category') {
    $parent_id = empty($_REQUEST['parent_id']) ? 0 : intval($_REQUEST['parent_id']);
    $category = empty($_REQUEST['cat']) ? '' : json_str_iconv(trim($_REQUEST['cat']));
开发者ID:songtaiwu,项目名称:m-cmsold,代码行数:31,代码来源:category.php


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